@microsoft/teamsfx-core 3.1.4-alpha.f3fb2cd65d.0 → 3.1.4-alpha.f9c867ffc7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/build/client/devPortalClient.d.ts +43 -0
  2. package/build/client/devPortalClient.d.ts.map +1 -0
  3. package/build/client/devPortalClient.js +626 -0
  4. package/build/client/devPortalClient.js.map +1 -0
  5. package/build/client/graphClient.d.ts +1 -0
  6. package/build/client/graphClient.d.ts.map +1 -1
  7. package/build/client/graphClient.js +17 -2
  8. package/build/client/graphClient.js.map +1 -1
  9. package/build/client/teamsDevPortalClient.d.ts +14 -21
  10. package/build/client/teamsDevPortalClient.d.ts.map +1 -1
  11. package/build/client/teamsDevPortalClient.js +65 -112
  12. package/build/client/teamsDevPortalClient.js.map +1 -1
  13. package/build/client/teamsDevPortalClientProvider.d.ts +6 -0
  14. package/build/client/teamsDevPortalClientProvider.d.ts.map +1 -0
  15. package/build/client/teamsDevPortalClientProvider.js +76 -0
  16. package/build/client/teamsDevPortalClientProvider.js.map +1 -0
  17. package/build/common/featureFlags.d.ts +7 -2
  18. package/build/common/featureFlags.d.ts.map +1 -1
  19. package/build/common/featureFlags.js +8 -3
  20. package/build/common/featureFlags.js.map +1 -1
  21. package/build/common/localizeUtils.d.ts +1 -0
  22. package/build/common/localizeUtils.d.ts.map +1 -1
  23. package/build/common/localizeUtils.js +10 -0
  24. package/build/common/localizeUtils.js.map +1 -1
  25. package/build/common/tools.js +2 -2
  26. package/build/common/tools.js.map +1 -1
  27. package/build/common/utils.d.ts.map +1 -1
  28. package/build/common/utils.js +1 -0
  29. package/build/common/utils.js.map +1 -1
  30. package/build/common/wrappedAxiosClient.d.ts.map +1 -1
  31. package/build/common/wrappedAxiosClient.js +87 -27
  32. package/build/common/wrappedAxiosClient.js.map +1 -1
  33. package/build/component/driver/interface/commonArgs.d.ts +1 -0
  34. package/build/component/driver/interface/commonArgs.d.ts.map +1 -1
  35. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  36. package/build/component/driver/teamsApp/appStudio.js +10 -6
  37. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  38. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  39. package/build/component/driver/teamsApp/configure.js +12 -8
  40. package/build/component/driver/teamsApp/configure.js.map +1 -1
  41. package/build/component/driver/teamsApp/constants.d.ts +1 -0
  42. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  43. package/build/component/driver/teamsApp/constants.js +1 -0
  44. package/build/component/driver/teamsApp/constants.js.map +1 -1
  45. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  46. package/build/component/driver/teamsApp/create.js +28 -26
  47. package/build/component/driver/teamsApp/create.js.map +1 -1
  48. package/build/component/driver/teamsApp/createAppPackage.js +1 -1
  49. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  50. package/build/component/driver/teamsApp/interfaces/appdefinitions/appUser.d.ts +1 -0
  51. package/build/component/driver/teamsApp/interfaces/appdefinitions/appUser.d.ts.map +1 -1
  52. package/build/component/driver/teamsApp/utils/telemetry.d.ts +0 -1
  53. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  54. package/build/component/driver/teamsApp/utils/telemetry.js +0 -1
  55. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  56. package/build/component/driver/teamsApp/validateAppPackage.js +3 -3
  57. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  58. package/build/component/driver/teamsApp/validateTestCases.js +4 -4
  59. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
  60. package/build/component/driver/util/utils.d.ts.map +1 -1
  61. package/build/component/driver/util/utils.js +1 -0
  62. package/build/component/driver/util/utils.js.map +1 -1
  63. package/build/component/feature/collaboration.js +4 -4
  64. package/build/component/feature/collaboration.js.map +1 -1
  65. package/build/component/generator/v4TemplateBridge.d.ts +1 -1
  66. package/build/component/generator/v4TemplateBridge.d.ts.map +1 -1
  67. package/build/component/generator/v4TemplateBridge.js +11 -6
  68. package/build/component/generator/v4TemplateBridge.js.map +1 -1
  69. package/build/component/middleware/questionMW.d.ts.map +1 -1
  70. package/build/component/middleware/questionMW.js +2 -0
  71. package/build/component/middleware/questionMW.js.map +1 -1
  72. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +4 -4
  73. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
  74. package/build/component/utils/envUtil.d.ts +1 -1
  75. package/build/component/utils/envUtil.d.ts.map +1 -1
  76. package/build/component/utils/envUtil.js +10 -2
  77. package/build/component/utils/envUtil.js.map +1 -1
  78. package/build/component/utils/pathUtils.d.ts +4 -4
  79. package/build/component/utils/pathUtils.d.ts.map +1 -1
  80. package/build/component/utils/pathUtils.js +17 -8
  81. package/build/component/utils/pathUtils.js.map +1 -1
  82. package/build/component/utils/settingsUtil.d.ts +1 -1
  83. package/build/component/utils/settingsUtil.d.ts.map +1 -1
  84. package/build/component/utils/settingsUtil.js +3 -3
  85. package/build/component/utils/settingsUtil.js.map +1 -1
  86. package/build/core/FxCore.d.ts.map +1 -1
  87. package/build/core/FxCore.js +7 -6
  88. package/build/core/FxCore.js.map +1 -1
  89. package/build/index.d.ts +2 -2
  90. package/build/index.d.ts.map +1 -1
  91. package/build/index.js +6 -5
  92. package/build/index.js.map +1 -1
  93. package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
  94. package/build/question/scaffold/vsc/CapabilityOptions.js +5 -2
  95. package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
  96. package/build/question/share.js +2 -2
  97. package/build/question/share.js.map +1 -1
  98. package/build/v4/capabilities/declarations.d.ts +140 -0
  99. package/build/v4/capabilities/declarations.d.ts.map +1 -0
  100. package/build/v4/capabilities/declarations.js +59 -0
  101. package/build/v4/capabilities/declarations.js.map +1 -0
  102. package/build/v4/collectInputs/collectInputs.d.ts +1 -0
  103. package/build/v4/collectInputs/collectInputs.d.ts.map +1 -1
  104. package/build/v4/collectInputs/collectInputs.js +113 -222
  105. package/build/v4/collectInputs/collectInputs.js.map +1 -1
  106. package/build/v4/distribution/declarativePackage.d.ts +2 -2
  107. package/build/v4/distribution/declarativePackage.d.ts.map +1 -1
  108. package/build/v4/distribution/declarativePackage.js +2 -1
  109. package/build/v4/distribution/declarativePackage.js.map +1 -1
  110. package/build/v4/distribution/descriptorLanguages.d.ts +9 -0
  111. package/build/v4/distribution/descriptorLanguages.d.ts.map +1 -0
  112. package/build/v4/distribution/descriptorLanguages.js +44 -0
  113. package/build/v4/distribution/descriptorLanguages.js.map +1 -0
  114. package/build/v4/distribution/packageDir.d.ts +6 -1
  115. package/build/v4/distribution/packageDir.d.ts.map +1 -1
  116. package/build/v4/distribution/packageDir.js +6 -1
  117. package/build/v4/distribution/packageDir.js.map +1 -1
  118. package/build/v4/engineVersion.d.ts +1 -1
  119. package/build/v4/engineVersion.js +1 -1
  120. package/build/v4/expression/evaluateExpression.d.ts.map +1 -1
  121. package/build/v4/expression/evaluateExpression.js +15 -13
  122. package/build/v4/expression/evaluateExpression.js.map +1 -1
  123. package/build/v4/mcp/mcpAuthScaffold.js +2 -2
  124. package/build/v4/mcp/mcpAuthScaffold.js.map +1 -1
  125. package/build/v4/pipeline/defineStep.d.ts +10 -0
  126. package/build/v4/pipeline/defineStep.d.ts.map +1 -0
  127. package/build/v4/pipeline/defineStep.js +28 -0
  128. package/build/v4/pipeline/defineStep.js.map +1 -0
  129. package/build/v4/pipeline/runScaffoldPipeline.d.ts +3 -7
  130. package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -1
  131. package/build/v4/pipeline/runScaffoldPipeline.js +26 -16
  132. package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -1
  133. package/build/v4/pipeline/stepParams.d.ts +4 -0
  134. package/build/v4/pipeline/stepParams.d.ts.map +1 -0
  135. package/build/v4/pipeline/stepParams.js +17 -0
  136. package/build/v4/pipeline/stepParams.js.map +1 -0
  137. package/build/v4/providers/createLanguageOptionsProvider.d.ts +13 -0
  138. package/build/v4/providers/createLanguageOptionsProvider.d.ts.map +1 -0
  139. package/build/v4/providers/createLanguageOptionsProvider.js +61 -0
  140. package/build/v4/providers/createLanguageOptionsProvider.js.map +1 -0
  141. package/build/v4/providers/createOptionsProviders.d.ts +3 -1
  142. package/build/v4/providers/createOptionsProviders.d.ts.map +1 -1
  143. package/build/v4/providers/createOptionsProviders.js +67 -61
  144. package/build/v4/providers/createOptionsProviders.js.map +1 -1
  145. package/build/v4/runtime/compatibility/index.d.ts +4 -0
  146. package/build/v4/runtime/compatibility/index.d.ts.map +1 -0
  147. package/build/v4/runtime/compatibility/index.js +11 -0
  148. package/build/v4/runtime/compatibility/index.js.map +1 -0
  149. package/build/v4/runtime/compatibility/legacyOpenApiSearch.d.ts +4 -0
  150. package/build/v4/runtime/compatibility/legacyOpenApiSearch.d.ts.map +1 -0
  151. package/build/v4/runtime/compatibility/legacyOpenApiSearch.js +26 -0
  152. package/build/v4/runtime/compatibility/legacyOpenApiSearch.js.map +1 -0
  153. package/build/v4/runtime/functions/assets/officeAddin.json +48 -0
  154. package/build/v4/runtime/functions/generic.d.ts +10 -0
  155. package/build/v4/runtime/functions/generic.d.ts.map +1 -0
  156. package/build/v4/runtime/functions/generic.js +25 -0
  157. package/build/v4/runtime/functions/generic.js.map +1 -0
  158. package/build/v4/runtime/functions/mcp.d.ts +8 -0
  159. package/build/v4/runtime/functions/mcp.d.ts.map +1 -0
  160. package/build/v4/runtime/functions/mcp.js +28 -0
  161. package/build/v4/runtime/functions/mcp.js.map +1 -0
  162. package/build/v4/runtime/functions/officeAddin.d.ts +27 -0
  163. package/build/v4/runtime/functions/officeAddin.d.ts.map +1 -0
  164. package/build/v4/runtime/functions/officeAddin.js +120 -0
  165. package/build/v4/runtime/functions/officeAddin.js.map +1 -0
  166. package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -1
  167. package/build/v4/runtime/inMemoryRuntime.js +7 -0
  168. package/build/v4/runtime/inMemoryRuntime.js.map +1 -1
  169. package/build/v4/runtime/packageParse.d.ts +13 -8
  170. package/build/v4/runtime/packageParse.d.ts.map +1 -1
  171. package/build/v4/runtime/packageParse.js +13 -219
  172. package/build/v4/runtime/packageParse.js.map +1 -1
  173. package/build/v4/runtime/realRuntime.d.ts.map +1 -1
  174. package/build/v4/runtime/realRuntime.js +44 -5
  175. package/build/v4/runtime/realRuntime.js.map +1 -1
  176. package/build/v4/runtime/renderFragment.d.ts +2 -0
  177. package/build/v4/runtime/renderFragment.d.ts.map +1 -0
  178. package/build/v4/runtime/renderFragment.js +11 -0
  179. package/build/v4/runtime/renderFragment.js.map +1 -0
  180. package/build/v4/runtime/runtimeRegistry.d.ts +4 -4
  181. package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -1
  182. package/build/v4/runtime/runtimeRegistry.js +9 -106
  183. package/build/v4/runtime/runtimeRegistry.js.map +1 -1
  184. package/build/v4/runtime/scaffold.d.ts +2 -0
  185. package/build/v4/runtime/scaffold.d.ts.map +1 -1
  186. package/build/v4/runtime/scaffold.js +15 -12
  187. package/build/v4/runtime/scaffold.js.map +1 -1
  188. package/build/v4/runtime/scaffoldFromPackageDir.d.ts.map +1 -1
  189. package/build/v4/runtime/scaffoldFromPackageDir.js +1 -4
  190. package/build/v4/runtime/scaffoldFromPackageDir.js.map +1 -1
  191. package/build/v4/runtime/selectLanguageContent.d.ts +1 -0
  192. package/build/v4/runtime/selectLanguageContent.d.ts.map +1 -1
  193. package/build/v4/runtime/selectLanguageContent.js +5 -1
  194. package/build/v4/runtime/selectLanguageContent.js.map +1 -1
  195. package/build/v4/runtime/services/daManifestService.d.ts +9 -0
  196. package/build/v4/runtime/services/daManifestService.d.ts.map +1 -0
  197. package/build/v4/runtime/services/daManifestService.js +102 -0
  198. package/build/v4/runtime/services/daManifestService.js.map +1 -0
  199. package/build/v4/runtime/steps/assets/metaOs.json +197 -0
  200. package/build/v4/runtime/steps/assets/openApiAuth.json +33 -0
  201. package/build/v4/runtime/steps/assets/openApiCustomApi.json +141 -0
  202. package/build/v4/runtime/steps/daAction.d.ts +3 -1
  203. package/build/v4/runtime/steps/daAction.d.ts.map +1 -1
  204. package/build/v4/runtime/steps/daAction.js +25 -25
  205. package/build/v4/runtime/steps/daAction.js.map +1 -1
  206. package/build/v4/runtime/steps/daSensitivity.d.ts +3 -2
  207. package/build/v4/runtime/steps/daSensitivity.d.ts.map +1 -1
  208. package/build/v4/runtime/steps/daSensitivity.js +16 -16
  209. package/build/v4/runtime/steps/daSensitivity.js.map +1 -1
  210. package/build/v4/runtime/steps/mcpAuth.d.ts +2 -2
  211. package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -1
  212. package/build/v4/runtime/steps/mcpAuth.js +40 -58
  213. package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
  214. package/build/v4/runtime/steps/mcpLocal.d.ts +1 -1
  215. package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -1
  216. package/build/v4/runtime/steps/mcpLocal.js +19 -31
  217. package/build/v4/runtime/steps/mcpLocal.js.map +1 -1
  218. package/build/v4/runtime/steps/mcpStatic.d.ts +1 -1
  219. package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -1
  220. package/build/v4/runtime/steps/mcpStatic.js +33 -39
  221. package/build/v4/runtime/steps/mcpStatic.js.map +1 -1
  222. package/build/v4/runtime/steps/metaOs.d.ts +2 -2
  223. package/build/v4/runtime/steps/metaOs.d.ts.map +1 -1
  224. package/build/v4/runtime/steps/metaOs.js +46 -169
  225. package/build/v4/runtime/steps/metaOs.js.map +1 -1
  226. package/build/v4/runtime/steps/officeAddin.d.ts +1 -1
  227. package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -1
  228. package/build/v4/runtime/steps/officeAddin.js +16 -20
  229. package/build/v4/runtime/steps/officeAddin.js.map +1 -1
  230. package/build/v4/runtime/steps/openApi.d.ts +2 -2
  231. package/build/v4/runtime/steps/openApi.d.ts.map +1 -1
  232. package/build/v4/runtime/steps/openApi.js +46 -112
  233. package/build/v4/runtime/steps/openApi.js.map +1 -1
  234. package/build/v4/runtime/steps/openApiAuth.d.ts +9 -0
  235. package/build/v4/runtime/steps/openApiAuth.d.ts.map +1 -0
  236. package/build/v4/runtime/steps/openApiAuth.js +51 -0
  237. package/build/v4/runtime/steps/openApiAuth.js.map +1 -0
  238. package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +1 -1
  239. package/build/v4/runtime/steps/openApiCustomApi.js +9 -119
  240. package/build/v4/runtime/steps/openApiCustomApi.js.map +1 -1
  241. package/build/v4/runtime/whitelist.d.ts +4 -38
  242. package/build/v4/runtime/whitelist.d.ts.map +1 -1
  243. package/build/v4/runtime/whitelist.js +30 -190
  244. package/build/v4/runtime/whitelist.js.map +1 -1
  245. package/build/v4/surface/createFloorTail.d.ts +2 -2
  246. package/build/v4/surface/createFloorTail.d.ts.map +1 -1
  247. package/build/v4/surface/createFloorTail.js +5 -22
  248. package/build/v4/surface/createFloorTail.js.map +1 -1
  249. package/build/v4/surface/createInputs.d.ts +2 -2
  250. package/build/v4/surface/createInputs.d.ts.map +1 -1
  251. package/build/v4/surface/createInputs.js +17 -44
  252. package/build/v4/surface/createInputs.js.map +1 -1
  253. package/build/v4/surface/createSelectorWalk.d.ts.map +1 -1
  254. package/build/v4/surface/createSelectorWalk.js +2 -56
  255. package/build/v4/surface/createSelectorWalk.js.map +1 -1
  256. package/build/v4/surface/localizePrompt.d.ts +2 -0
  257. package/build/v4/surface/localizePrompt.d.ts.map +1 -1
  258. package/build/v4/surface/localizePrompt.js +0 -1
  259. package/build/v4/surface/localizePrompt.js.map +1 -1
  260. package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -1
  261. package/build/v4/surface/modifySelectorWalk.js +2 -52
  262. package/build/v4/surface/modifySelectorWalk.js.map +1 -1
  263. package/build/v4/surface/selectorPresentation.d.ts +5 -0
  264. package/build/v4/surface/selectorPresentation.d.ts.map +1 -0
  265. package/build/v4/surface/selectorPresentation.js +78 -0
  266. package/build/v4/surface/selectorPresentation.js.map +1 -0
  267. package/build/v4/validation/capabilityCatalog.d.ts +2 -2
  268. package/build/v4/validation/capabilityCatalog.d.ts.map +1 -1
  269. package/build/v4/validation/capabilityCatalog.js +9 -46
  270. package/build/v4/validation/capabilityCatalog.js.map +1 -1
  271. package/build/v4/validation/packageParse.d.ts +27 -0
  272. package/build/v4/validation/packageParse.d.ts.map +1 -0
  273. package/build/v4/validation/packageParse.js +247 -0
  274. package/build/v4/validation/packageParse.js.map +1 -0
  275. package/build/v4/validation/templateArchiveValidation.d.ts +2 -2
  276. package/build/v4/validation/templateArchiveValidation.d.ts.map +1 -1
  277. package/build/v4/validation/templateArchiveValidation.js +7 -2
  278. package/build/v4/validation/templateArchiveValidation.js.map +1 -1
  279. package/build/v4/validation/validateTemplatePackage.d.ts +3 -2
  280. package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -1
  281. package/build/v4/validation/validateTemplatePackage.js +23 -3
  282. package/build/v4/validation/validateTemplatePackage.js.map +1 -1
  283. package/build/v4/validators/createInputValidators.d.ts.map +1 -1
  284. package/build/v4/validators/createInputValidators.js +9 -8
  285. package/build/v4/validators/createInputValidators.js.map +1 -1
  286. package/package.json +3 -3
  287. package/resource/package.nls.json +5 -1
  288. package/templates/fallback/common.zip +0 -0
  289. package/templates/fallback/csharp.zip +0 -0
  290. package/templates/fallback/js.zip +0 -0
  291. package/templates/fallback/python.zip +0 -0
  292. package/templates/fallback/ts.zip +0 -0
  293. package/templates/metadata.zip +0 -0
  294. package/templates/ui/tdpNode.json +1 -1
  295. package/templates/ui/wizardNode.json +1 -1
  296. package/templates/v4/create-selector.json +2 -2
  297. package/templates/v4/templates-metadata.zip +0 -0
  298. package/templates/v4/templates.zip +0 -0
@@ -0,0 +1,197 @@
1
+ {
2
+ "agent": {
3
+ "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.4/schema.json",
4
+ "version": "v1.4",
5
+ "name": "Add-in Skill + Agent for {{appName}}",
6
+ "description": "You are an agent for working with add-in. You can work with any cells, not only well formatted table.",
7
+ "instructions": "You are an agent for working with add-in. You can work with any cells, not only well formatted table.",
8
+ "conversation_starters": [
9
+ {
10
+ "title": "Change cell color (for excel)",
11
+ "text": "Change the cell below A2 to the color of grass. Tell me how long it took in seconds."
12
+ },
13
+ {
14
+ "title": "Add footer (for word)",
15
+ "text": "Add a footer with message 'Hello Agent!'. Tell me how long it took in seconds."
16
+ },
17
+ {
18
+ "title": "Add text to slide (for powerpoint)",
19
+ "text": "Please add text 'Hello PPT!' to the slide. Tell me how long it took in seconds."
20
+ }
21
+ ],
22
+ "actions": [
23
+ {
24
+ "id": "alchemyPlugin",
25
+ "file": "{{actionFilename}}"
26
+ }
27
+ ]
28
+ },
29
+ "plugin": {
30
+ "$schema": "https://developer.microsoft.com/json-schemas/copilot/plugin/v2.3/schema.json",
31
+ "schema_version": "v2.3",
32
+ "name_for_human": "Add-in Skill + Agent for {{appName}}",
33
+ "description_for_human": "Get answer for user's question related to Microsoft 365 products",
34
+ "namespace": "AddInFunctions",
35
+ "functions": [
36
+ {
37
+ "name": "{{word}}",
38
+ "description": "Action addfooter: take in arg a JSON object, with a footer message in the field 'Footer'.",
39
+ "parameters": {
40
+ "type": "object",
41
+ "properties": {
42
+ "Footer": {
43
+ "type": "string",
44
+ "description": "example message to be added to footer",
45
+ "default": "Declarative Agent Footer"
46
+ }
47
+ },
48
+ "required": ["Footer"]
49
+ },
50
+ "states": {
51
+ "reasoning": {
52
+ "description": "",
53
+ "instructions": ""
54
+ },
55
+ "responding": {
56
+ "description": "",
57
+ "instructions": "reply"
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "name": "{{excel}}",
63
+ "description": "Action fillcolor: take in arg a JSON object, a cell location and a color in hex. Cell location is a single cell.",
64
+ "parameters": {
65
+ "type": "object",
66
+ "properties": {
67
+ "Cell": {
68
+ "type": "string",
69
+ "description": "example cell location",
70
+ "default": "B7"
71
+ },
72
+ "Color": {
73
+ "type": "string",
74
+ "description": "example color in hex",
75
+ "default": "#30d5c8"
76
+ }
77
+ },
78
+ "required": ["Cell", "Color"]
79
+ },
80
+ "states": {
81
+ "reasoning": {
82
+ "description": "",
83
+ "instructions": ""
84
+ },
85
+ "responding": {
86
+ "description": "",
87
+ "instructions": "reply"
88
+ }
89
+ }
90
+ },
91
+ {
92
+ "name": "{{powerpoint}}",
93
+ "description": "Action addtexttoslide: take in arg a JSON object, a text to be added to a slide.",
94
+ "parameters": {
95
+ "type": "object",
96
+ "properties": {
97
+ "Text": {
98
+ "type": "string",
99
+ "description": "example text to be added to a slide",
100
+ "default": "hello declarative agent"
101
+ }
102
+ },
103
+ "required": ["Text"]
104
+ },
105
+ "states": {
106
+ "reasoning": {
107
+ "description": "",
108
+ "instructions": ""
109
+ },
110
+ "responding": {
111
+ "description": "",
112
+ "instructions": "reply"
113
+ }
114
+ }
115
+ }
116
+ ],
117
+ "runtimes": [
118
+ {
119
+ "type": "LocalPlugin",
120
+ "spec": {
121
+ "local_endpoint": "Microsoft.Office.Addin"
122
+ },
123
+ "run_for_functions": ["{{word}}", "{{excel}}", "{{powerpoint}}"]
124
+ }
125
+ ]
126
+ },
127
+ "commandHandlerCode": [
128
+ "",
129
+ "/* global Office */",
130
+ "/* global Word, Excel, PowerPoint, performance, console */",
131
+ "",
132
+ "async function addFooter(message) {",
133
+ " await Word.run(async (context) => {",
134
+ " context.document.sections",
135
+ " .getFirst()",
136
+ " .getFooter(Word.HeaderFooterType.primary)",
137
+ " .insertParagraph(`From Agent: ${message}`, \"End\");",
138
+ "",
139
+ " await context.sync();",
140
+ " });",
141
+ "}",
142
+ "",
143
+ "async function fillColor(cell, color) {",
144
+ " await Excel.run(async (context) => {",
145
+ " context.workbook.worksheets.getActiveWorksheet().getRange(cell).format.fill.color = color;",
146
+ " await context.sync();",
147
+ " });",
148
+ "}",
149
+ "",
150
+ "async function addTextToSlide(text) {",
151
+ " await PowerPoint.run(async (context) => {",
152
+ " context.presentation.slides.getItemAt(0).shapes.addTextBox(text, {",
153
+ " left: Math.random() * 200,",
154
+ " top: Math.random() * 200,",
155
+ " height: 150,",
156
+ " width: 150,",
157
+ " });",
158
+ " await context.sync();",
159
+ " });",
160
+ "}",
161
+ "",
162
+ "Office.onReady((info) => {",
163
+ " if (info.host === Office.HostType.Word) {",
164
+ " Office.actions.associate(\"{{word}}\", async (message) => {",
165
+ " const start = performance.now();",
166
+ " const { Footer: footer } = JSON.parse(message);",
167
+ " await addFooter(footer);",
168
+ " const duration = performance.now() - start;",
169
+ " const result = `Demo add-in: Footer added! completed in ${duration.toFixed(0)} ms.`;",
170
+ " console.log(`Returning result: \"${result}\"`);",
171
+ " return result;",
172
+ " });",
173
+ " } else if (info.host === Office.HostType.Excel) {",
174
+ " Office.actions.associate(\"{{excel}}\", async (message) => {",
175
+ " const start = performance.now();",
176
+ " const { Cell: cell, Color: color } = JSON.parse(message);",
177
+ " await fillColor(cell, color);",
178
+ " const duration = performance.now() - start;",
179
+ " const result = `Demo add-in: Action completed! completed in ${duration.toFixed(0)} ms.`;",
180
+ " console.log(`Returning result: \"${result}\"`);",
181
+ " return result;",
182
+ " });",
183
+ " } else if (info.host === Office.HostType.PowerPoint) {",
184
+ " Office.actions.associate(\"{{powerpoint}}\", async (message) => {",
185
+ " const start = performance.now();",
186
+ " const { Text: text } = JSON.parse(message);",
187
+ " await addTextToSlide(text);",
188
+ " const duration = performance.now() - start;",
189
+ " const result = `Demo add-in: text added to slide! completed in ${duration.toFixed(0)} ms.`;",
190
+ " console.log(`Returning result: \"${result}\"`);",
191
+ " return result;",
192
+ " });",
193
+ " }",
194
+ "});",
195
+ ""
196
+ ]
197
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "apiKey": [
3
+ "# Register API KEY",
4
+ "uses: apiKey/register",
5
+ "with:",
6
+ " # Name of the API Key",
7
+ " name: ''",
8
+ " # app ID",
9
+ " appId: ${{TEAMS_APP_ID}}",
10
+ " # Path to OpenAPI description document",
11
+ " apiSpecPath: ''",
12
+ "# Write the registration information of API Key into environment file for",
13
+ "# the specified environment variable(s).",
14
+ "writeToEnvironmentFile:",
15
+ " registrationId: ''"
16
+ ],
17
+ "oauth2": [
18
+ "uses: oauth/register",
19
+ "with:",
20
+ " name: ''",
21
+ " flow: authorizationCode",
22
+ " # app ID",
23
+ " appId: ${{TEAMS_APP_ID}}",
24
+ " # Path to OpenAPI description document",
25
+ " apiSpecPath: ''",
26
+ " # Use below property to change token exchange behaviour, BasicAuthorizationHeader: token exchange is done via HTTP headers. PostRequestBody: token exchange is done via request body",
27
+ " # tokenExchangeMethodType: BasicAuthorizationHeader",
28
+ " # Uncomment below property to use proof key for code exchange (PKCE)",
29
+ " # isPKCEEnabled: true",
30
+ "writeToEnvironmentFile:",
31
+ " configurationId: ''"
32
+ ]
33
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "functionDefinitionCode": {
3
+ "javascript": [
4
+ ".function(",
5
+ " functionDefs.{{operationId}}.name,",
6
+ " functionDefs.{{operationId}}.description,",
7
+ " functionDefs.{{operationId}}.parameters,",
8
+ " async (parameter) => {",
9
+ " const result = await functionHandlers.{{operationId}}Handler(parameter);",
10
+ " if(result) {",
11
+ " await send(result);",
12
+ " return \"result showed\";",
13
+ " } else {",
14
+ " return \"no result\";",
15
+ " }",
16
+ " }",
17
+ " )"
18
+ ],
19
+ "typescript": [
20
+ ".function(",
21
+ " functionDefs.{{operationId}}.name,",
22
+ " functionDefs.{{operationId}}.description,",
23
+ " functionDefs.{{operationId}}.parameters,",
24
+ " async (parameter) => {",
25
+ " const result = await functionHandlers.{{operationId}}Handler(parameter);",
26
+ " if(result) {",
27
+ " await send(result);",
28
+ " return \"result showed\";",
29
+ " } else {",
30
+ " return \"no result\";",
31
+ " }",
32
+ " }",
33
+ " )"
34
+ ],
35
+ "python": [
36
+ ".with_function(",
37
+ " Function(",
38
+ " name=function_defs[\"{{operationId}}\"][\"name\"],",
39
+ " description=function_defs[\"{{operationId}}\"][\"description\"],",
40
+ " parameter_schema=function_defs[\"{{operationId}}\"][\"parameters\"],",
41
+ " handler=make_handler({{operationId}}, ctx)",
42
+ " )",
43
+ " )"
44
+ ]
45
+ },
46
+ "functionHandlerCode": {
47
+ "javascript": [
48
+ "const {{operationId}}Handler = async (",
49
+ " parameters",
50
+ ") => {",
51
+ " const client = await api.getClient();",
52
+ " // Add authentication configuration for the client",
53
+ " const apiPath = client.paths[\"{{pathUrl}}\"];",
54
+ " if (apiPath && apiPath.{{method}}) {",
55
+ " const result = await apiPath.{{method}}(parameters.path, parameters.body, {",
56
+ " params: parameters.query,",
57
+ " });",
58
+ " if (!result || !result.data) {",
59
+ " throw new Error(\"Get empty result from api call.\");",
60
+ " }",
61
+ " const cardName = \"{{operationId}}\".replace(/[^a-zA-Z0-9]/g, \"_\");",
62
+ " const cardTemplatePath = path.join(__dirname, '../adaptiveCards', cardName + '.json');",
63
+ " if (await fs.exists(cardTemplatePath)){",
64
+ " const card = generateAdaptiveCard(cardTemplatePath, result);",
65
+ " return card;",
66
+ " } else {",
67
+ " return JSON.stringify(result.data);",
68
+ " }",
69
+ " } else {",
70
+ " return \"\";",
71
+ " }",
72
+ "",
73
+ "};",
74
+ "",
75
+ "module.exports = { {{operationId}}Handler };"
76
+ ],
77
+ "typescript": [
78
+ "export const {{operationId}}Handler = async (",
79
+ " parameter: any",
80
+ ") => {",
81
+ " const client = await api.getClient();",
82
+ " // Add authentication configuration for the client",
83
+ " const apiPath = client.paths[\"{{pathUrl}}\"];",
84
+ " if (apiPath && apiPath.{{method}}) {",
85
+ " const result = await apiPath.{{method}}(parameter.path, parameter.body, {",
86
+ " params: parameter.query,",
87
+ " });",
88
+ " if (!result || !result.data) {",
89
+ " throw new Error(\"Get empty result from api call.\");",
90
+ " }",
91
+ " const cardName = \"{{operationId}}\".replace(/[^a-zA-Z0-9]/g, \"_\");",
92
+ " const cardTemplatePath = path.join(__dirname, '../adaptiveCards', cardName + '.json');",
93
+ " if (await fs.exists(cardTemplatePath)){",
94
+ " const card = generateAdaptiveCard(cardTemplatePath, result);",
95
+ " return card;",
96
+ " } else {",
97
+ " return JSON.stringify(result.data);",
98
+ " }",
99
+ " } else {",
100
+ " return \"\";",
101
+ " }",
102
+ " ",
103
+ "};"
104
+ ],
105
+ "python": [
106
+ "async def {{operationId}}(",
107
+ " parameters,",
108
+ "):",
109
+ " path = getattr(parameters, \"path\", {})",
110
+ " body = getattr(parameters, \"body\", None)",
111
+ " query = getattr(parameters, \"query\", {}) or {}",
112
+ " resp = client.{{operationId}}(**path, json=body, _headers={}, _params=query, _cookies={})",
113
+ "",
114
+ " if resp.status_code != 200:",
115
+ " return resp.reason",
116
+ " else:",
117
+ " card_template_path = os.path.join(current_dir, 'adaptiveCards/{{operationId}}.json')",
118
+ " if not os.path.exists(card_template_path):",
119
+ " json_resoponse_str = resp.text",
120
+ " return json_resoponse_str",
121
+ " else:",
122
+ " with open(card_template_path) as card_template_file:",
123
+ " adaptive_card_template = card_template_file.read()",
124
+ "",
125
+ " renderer = AdaptiveCardRenderer(adaptive_card_template)",
126
+ "",
127
+ " json_resoponse_str = resp.text",
128
+ " rendered_card_str = renderer.render(json_resoponse_str)",
129
+ " rendered_card_json = json.loads(rendered_card_str)",
130
+ " return AdaptiveCard.model_validate(rendered_card_json)",
131
+ " "
132
+ ]
133
+ },
134
+ "instructions": [
135
+ "The following is a conversation with an AI assistant.",
136
+ "The assistant can help to call APIs for the open api spec file{{description}}",
137
+ "If the API doesn't require parameters, invoke it with default JSON object {{emptyArgs}}.",
138
+ "",
139
+ ""
140
+ ]
141
+ }
@@ -1,6 +1,8 @@
1
1
  import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
2
+ import { DaManifestService } from "../services/daManifestService";
2
3
  /** Engine step name `da-action/register-plugin-manifest`. */
3
- export declare const STEP_REGISTER_PLUGIN_MANIFEST = "da-action/register-plugin-manifest";
4
+ export declare const STEP_REGISTER_PLUGIN_MANIFEST: string;
5
+ export declare function createDaActionRegisterPluginManifestStep(manifests?: DaManifestService): RegisteredStep;
4
6
  /** Registered step for adding a rendered API plugin manifest as a DA action. */
5
7
  export declare const daActionRegisterPluginManifest: RegisteredStep;
6
8
  //# sourceMappingURL=daAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"daAction.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daAction.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA2B,MAAM,oCAAoC,CAAC;AAM7F,6DAA6D;AAC7D,eAAO,MAAM,6BAA6B,uCAAuC,CAAC;AAWlF,gFAAgF;AAChF,eAAO,MAAM,8BAA8B,EAAE,cAqB5C,CAAC"}
1
+ {"version":3,"file":"daAction.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daAction.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EAAE,iBAAiB,EAAqB,MAAM,+BAA+B,CAAC;AAMrF,6DAA6D;AAC7D,eAAO,MAAM,6BAA6B,QAAwD,CAAC;AAMnG,wBAAgB,wCAAwC,CACtD,SAAS,GAAE,iBAAqC,GAC/C,cAAc,CAmBhB;AAED,gFAAgF;AAChF,eAAO,MAAM,8BAA8B,gBAA6C,CAAC"}
@@ -3,39 +3,39 @@
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.daActionRegisterPluginManifest = exports.STEP_REGISTER_PLUGIN_MANIFEST = void 0;
6
+ exports.createDaActionRegisterPluginManifestStep = createDaActionRegisterPluginManifestStep;
6
7
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
7
8
  const neverthrow_1 = require("neverthrow");
9
+ const declarations_1 = require("../../capabilities/declarations");
10
+ const defineStep_1 = require("../../pipeline/defineStep");
11
+ const stepParams_1 = require("../../pipeline/stepParams");
12
+ const daManifestService_1 = require("../services/daManifestService");
8
13
  /** Declarative Agent manifest mutation steps for modify flows. */
9
14
  const SOURCE = "Scaffold";
10
15
  /** Engine step name `da-action/register-plugin-manifest`. */
11
- exports.STEP_REGISTER_PLUGIN_MANIFEST = "da-action/register-plugin-manifest";
16
+ exports.STEP_REGISTER_PLUGIN_MANIFEST = declarations_1.capabilityDeclarations.step.registerPluginManifest.id;
12
17
  function systemError(name, message) {
13
18
  return new teamsfx_api_1.SystemError({ source: SOURCE, name, message });
14
19
  }
15
- function stringParam(params, key) {
16
- const value = params[key];
17
- return typeof value === "string" ? value : undefined;
20
+ function createDaActionRegisterPluginManifestStep(manifests = daManifestService_1.daManifestService) {
21
+ return (0, defineStep_1.defineStep)({
22
+ parse(resolved) {
23
+ const teamsManifestPath = (0, stepParams_1.stringParam)(resolved, "teamsManifestPath");
24
+ if (teamsManifestPath === undefined) {
25
+ return (0, neverthrow_1.err)("missing string parameter 'teamsManifestPath'");
26
+ }
27
+ const pluginManifestPath = (0, stepParams_1.stringParam)(resolved, "pluginManifestPath");
28
+ if (pluginManifestPath === undefined) {
29
+ return (0, neverthrow_1.err)("missing string parameter 'pluginManifestPath'");
30
+ }
31
+ return (0, neverthrow_1.ok)({ teamsManifestPath, pluginManifestPath });
32
+ },
33
+ invalidParams: () => systemError("DaActionRegisterParams", "resolved parameters are not all strings"),
34
+ apply({ teamsManifestPath, pluginManifestPath }, ctx) {
35
+ return manifests.registerDeclarativeAgentAction(ctx, teamsManifestPath, pluginManifestPath);
36
+ },
37
+ });
18
38
  }
19
39
  /** Registered step for adding a rendered API plugin manifest as a DA action. */
20
- exports.daActionRegisterPluginManifest = {
21
- validateParams(resolved) {
22
- if (stringParam(resolved, "teamsManifestPath") === undefined) {
23
- return "missing string parameter 'teamsManifestPath'";
24
- }
25
- if (stringParam(resolved, "pluginManifestPath") === undefined) {
26
- return "missing string parameter 'pluginManifestPath'";
27
- }
28
- return undefined;
29
- },
30
- apply(resolved, ctx) {
31
- const teamsManifestPath = stringParam(resolved, "teamsManifestPath");
32
- const pluginManifestPath = stringParam(resolved, "pluginManifestPath");
33
- if (teamsManifestPath === undefined || pluginManifestPath === undefined) {
34
- return (0, neverthrow_1.err)(systemError("DaActionRegisterParams", "resolved parameters are not all strings"));
35
- }
36
- return ctx
37
- .manifestWrapper("declarativeAgent")
38
- .registerDeclarativeAgentAction(teamsManifestPath, pluginManifestPath);
39
- },
40
- };
40
+ exports.daActionRegisterPluginManifest = createDaActionRegisterPluginManifestStep();
41
41
  //# sourceMappingURL=daAction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"daAction.js","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daAction.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wDAA8D;AAC9D,2CAAyC;AAGzC,kEAAkE;AAElE,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,6DAA6D;AAChD,QAAA,6BAA6B,GAAG,oCAAoC,CAAC;AAElF,SAAS,WAAW,CAAC,IAAY,EAAE,OAAe;IAChD,OAAO,IAAI,yBAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,WAAW,CAAC,MAAkB,EAAE,GAAW;IAClD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,gFAAgF;AACnE,QAAA,8BAA8B,GAAmB;IAC5D,cAAc,CAAC,QAAoB;QACjC,IAAI,WAAW,CAAC,QAAQ,EAAE,mBAAmB,CAAC,KAAK,SAAS,EAAE,CAAC;YAC7D,OAAO,8CAA8C,CAAC;QACxD,CAAC;QACD,IAAI,WAAW,CAAC,QAAQ,EAAE,oBAAoB,CAAC,KAAK,SAAS,EAAE,CAAC;YAC9D,OAAO,+CAA+C,CAAC;QACzD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,KAAK,CAAC,QA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,EAAC,8CAA8C,CAAC,CAAC;YAC7D,CAAC;YACD,MAAM,kBAAkB,GAAG,IAAA,wBAAW,EAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;YACvE,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;gBACrC,OAAO,IAAA,gBAAG,EAAC,+CAA+C,CAAC,CAAC;YAC9D,CAAC;YACD,OAAO,IAAA,eAAE,EAAC,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,aAAa,EAAE,GAAG,EAAE,CAClB,WAAW,CAAC,wBAAwB,EAAE,yCAAyC,CAAC;QAClF,KAAK,CAAC,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,EAAE,GAAG;YAClD,OAAO,SAAS,CAAC,8BAA8B,CAAC,GAAG,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;QAC9F,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,gFAAgF;AACnE,QAAA,8BAA8B,GAAG,wCAAwC,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
2
+ import { DaManifestService } from "../services/daManifestService";
2
3
  /** Engine step name `da/set-sensitivity-label`. */
3
- export declare const STEP_SET_SENSITIVITY_LABEL = "da/set-sensitivity-label";
4
+ export declare const STEP_SET_SENSITIVITY_LABEL: string;
4
5
  /** Best-effort service used by the sensitivity-label step. */
5
6
  export interface GeneralSensitivityLabelService {
6
7
  resolveId(): Promise<string | undefined>;
@@ -8,7 +9,7 @@ export interface GeneralSensitivityLabelService {
8
9
  /** Offline/default service used when no authenticated M365 adapter is registered. */
9
10
  export declare const NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE: GeneralSensitivityLabelService;
10
11
  /** Bind the General-label lookup dependency into its registered step. */
11
- export declare function createDaSetSensitivityLabelStep(generalSensitivityLabel: GeneralSensitivityLabelService): RegisteredStep;
12
+ export declare function createDaSetSensitivityLabelStep(generalSensitivityLabel: GeneralSensitivityLabelService, manifests?: DaManifestService): RegisteredStep;
12
13
  /** Default step binding for offline runtimes and compatibility consumers. */
13
14
  export declare const daSetSensitivityLabel: RegisteredStep;
14
15
  //# sourceMappingURL=daSensitivity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"daSensitivity.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daSensitivity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA2B,MAAM,oCAAoC,CAAC;AAI7F,mDAAmD;AACnD,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAWrE,8DAA8D;AAC9D,MAAM,WAAW,8BAA8B;IAC7C,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,qFAAqF;AACrF,eAAO,MAAM,sCAAsC,EAAE,8BAEpD,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,8BAA8B,GACtD,cAAc,CAgChB;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,gBAEjC,CAAC"}
1
+ {"version":3,"file":"daSensitivity.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daSensitivity.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAc,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAqB,MAAM,+BAA+B,CAAC;AAIrF,mDAAmD;AACnD,eAAO,MAAM,0BAA0B,QAAqD,CAAC;AAW7F,8DAA8D;AAC9D,MAAM,WAAW,8BAA8B;IAC7C,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,qFAAqF;AACrF,eAAO,MAAM,sCAAsC,EAAE,8BAEpD,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,8BAA8B,EACvD,SAAS,GAAE,iBAAqC,GAC/C,cAAc,CA2BhB;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,gBAEjC,CAAC"}
@@ -6,9 +6,12 @@ exports.daSetSensitivityLabel = exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE =
6
6
  exports.createDaSetSensitivityLabelStep = createDaSetSensitivityLabelStep;
7
7
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
8
  const neverthrow_1 = require("neverthrow");
9
+ const declarations_1 = require("../../capabilities/declarations");
10
+ const defineStep_1 = require("../../pipeline/defineStep");
11
+ const daManifestService_1 = require("../services/daManifestService");
9
12
  const SOURCE = "Scaffold";
10
13
  /** Engine step name `da/set-sensitivity-label`. */
11
- exports.STEP_SET_SENSITIVITY_LABEL = "da/set-sensitivity-label";
14
+ exports.STEP_SET_SENSITIVITY_LABEL = declarations_1.capabilityDeclarations.step.setSensitivityLabel.id;
12
15
  function systemError(name, message) {
13
16
  return new teamsfx_api_1.SystemError({ source: SOURCE, name, message });
14
17
  }
@@ -21,29 +24,26 @@ exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE = {
21
24
  resolveId: () => Promise.resolve(undefined),
22
25
  };
23
26
  /** Bind the General-label lookup dependency into its registered step. */
24
- function createDaSetSensitivityLabelStep(generalSensitivityLabel) {
25
- return {
26
- validateParams(resolved) {
27
- return manifestPath(resolved) === undefined
28
- ? "missing non-empty string parameter 'manifestPath'"
29
- : undefined;
30
- },
31
- async apply(resolved, ctx) {
27
+ function createDaSetSensitivityLabelStep(generalSensitivityLabel, manifests = daManifestService_1.daManifestService) {
28
+ return (0, defineStep_1.defineStep)({
29
+ parse(resolved) {
32
30
  const path = manifestPath(resolved);
33
- if (path === undefined) {
34
- return (0, neverthrow_1.err)(systemError("DaSensitivityLabelParams", "resolved manifestPath is not a non-empty string"));
35
- }
31
+ return path === undefined
32
+ ? (0, neverthrow_1.err)("missing non-empty string parameter 'manifestPath'")
33
+ : (0, neverthrow_1.ok)(path);
34
+ },
35
+ invalidParams: () => systemError("DaSensitivityLabelParams", "resolved manifestPath is not a non-empty string"),
36
+ async apply(path, ctx) {
36
37
  const id = await generalSensitivityLabel.resolveId();
37
38
  if (id === undefined) {
38
39
  return (0, neverthrow_1.ok)(undefined);
39
40
  }
40
- const wrapper = ctx.manifestWrapper("declarativeAgent");
41
- if (wrapper.setSensitivityLabel === undefined) {
41
+ if (manifests.setSensitivityLabel === undefined) {
42
42
  return (0, neverthrow_1.err)(systemError("DaSensitivityLabelWrapperMissing", "the Declarative Agent manifest wrapper cannot set a sensitivity label"));
43
43
  }
44
- return wrapper.setSensitivityLabel(path, id);
44
+ return manifests.setSensitivityLabel(ctx, path, id);
45
45
  },
46
- };
46
+ });
47
47
  }
48
48
  /** Default step binding for offline runtimes and compatibility consumers. */
49
49
  exports.daSetSensitivityLabel = createDaSetSensitivityLabelStep(exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE);
@@ -1 +1 @@
1
- {"version":3,"file":"daSensitivity.js","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daSensitivity.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA+BlC,0EAkCC;AA/DD,wDAA8D;AAC9D,2CAA6C;AAG7C,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,mDAAmD;AACtC,QAAA,0BAA0B,GAAG,0BAA0B,CAAC;AAErE,SAAS,WAAW,CAAC,IAAY,EAAE,OAAe;IAChD,OAAO,IAAI,yBAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,YAAY,CAAC,MAAkB;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAClF,CAAC;AAOD,qFAAqF;AACxE,QA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GAAG,MAAM,uBAAuB,CAAC,SAAS,EAAE,CAAC;YACrD,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;gBACrB,OAAO,IAAA,eAAE,EAAC,SAAS,CAAC,CAAC;YACvB,CAAC;YAED,IAAI,SAAS,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;gBAChD,OAAO,IAAA,gBAAG,EACR,WAAW,CACT,kCAAkC,EAClC,uEAAuE,CACxE,CACF,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACtD,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,6EAA6E;AAChE,QAAA,qBAAqB,GAAG,+BAA+B,CAClE,8CAAsC,CACvC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
2
2
  /** Engine step name `mcp-auth/inject-yml-action`. */
3
- export declare const STEP_INJECT_YML_ACTION = "mcp-auth/inject-yml-action";
3
+ export declare const STEP_INJECT_YML_ACTION: string;
4
4
  /** Engine step name `mcp-auth/persist-credential-env`. */
5
- export declare const STEP_PERSIST_CREDENTIAL_ENV = "mcp-auth/persist-credential-env";
5
+ export declare const STEP_PERSIST_CREDENTIAL_ENV: string;
6
6
  /** Registered step for injecting the shared v4 MCP auth action into `m365agents.yml`. */
7
7
  export declare const mcpAuthInjectYmlAction: RegisteredStep;
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mcpAuth.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/mcpAuth.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA2B,MAAM,oCAAoC,CAAC;AAO7F,qDAAqD;AACrD,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE,0DAA0D;AAC1D,eAAO,MAAM,2BAA2B,oCAAoC,CAAC;AAmB7E,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,EAAE,cA0CpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,cA6BzC,CAAC"}
1
+ {"version":3,"file":"mcpAuth.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/mcpAuth.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AASpE,qDAAqD;AACrD,eAAO,MAAM,sBAAsB,QAAiD,CAAC;AAErF,0DAA0D;AAC1D,eAAO,MAAM,2BAA2B,QAAsD,CAAC;AAM/F,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,EAAE,cAkCnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,cAuBxC,CAAC"}