@microsoft/teamsfx-core 3.0.15 → 3.0.16-alpha.027c46bf2b.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.
- package/build/client/aadAppClient.d.ts.map +1 -1
- package/build/client/aadAppClient.js +6 -6
- package/build/client/aadAppClient.js.map +1 -1
- package/build/common/featureFlags.d.ts +0 -5
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +0 -5
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/httpProxy.d.ts +21 -0
- package/build/common/httpProxy.d.ts.map +1 -0
- package/build/common/httpProxy.js +117 -0
- package/build/common/httpProxy.js.map +1 -0
- package/build/common/mcpToolFetcher.d.ts +90 -0
- package/build/common/mcpToolFetcher.d.ts.map +1 -0
- package/build/common/mcpToolFetcher.js +404 -0
- package/build/common/mcpToolFetcher.js.map +1 -0
- package/build/common/odrProvider.d.ts +43 -0
- package/build/common/odrProvider.d.ts.map +1 -0
- package/build/common/odrProvider.js +154 -0
- package/build/common/odrProvider.js.map +1 -0
- package/build/common/openApiParserOptions.d.ts +3 -0
- package/build/common/openApiParserOptions.d.ts.map +1 -0
- package/build/common/openApiParserOptions.js +61 -0
- package/build/common/openApiParserOptions.js.map +1 -0
- package/build/common/secretmasker/dict.d.ts.map +1 -1
- package/build/common/secretmasker/dict.js +5 -2
- package/build/common/secretmasker/dict.js.map +1 -1
- package/build/common/secretmasker/feature.js.map +1 -1
- package/build/common/templates-config.json +4 -4
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +3 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +38 -3
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/script/scriptDriver.js +1 -1
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +3 -3
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +1 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +23 -0
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/helper.js +25 -2
- package/build/component/generator/declarativeAgent/helper.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +3 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts +1 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +109 -2
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts +2 -3
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +19 -57
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/templateHelper.d.ts +10 -2
- package/build/component/generator/templateHelper.d.ts.map +1 -1
- package/build/component/generator/templateHelper.js +16 -3
- package/build/component/generator/templateHelper.js.map +1 -1
- package/build/component/generator/templates/metadata/index.d.ts +15 -0
- package/build/component/generator/templates/metadata/index.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/index.js +39 -0
- package/build/component/generator/templates/metadata/index.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +2 -0
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +2 -0
- package/build/component/generator/templates/templateNames.js.map +1 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +6 -0
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/generator/v4TemplateBridge.d.ts +4 -1
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -1
- package/build/component/generator/v4TemplateBridge.js +19 -3
- package/build/component/generator/v4TemplateBridge.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +2 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +4 -1
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +28 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.js +39 -4
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
- package/build/component/utils/mcpToolFetcher.d.ts +1 -72
- package/build/component/utils/mcpToolFetcher.d.ts.map +1 -1
- package/build/component/utils/mcpToolFetcher.js +1 -227
- package/build/component/utils/mcpToolFetcher.js.map +1 -1
- package/build/component/utils/odrProvider.d.ts +1 -55
- package/build/component/utils/odrProvider.d.ts.map +1 -1
- package/build/component/utils/odrProvider.js +1 -101
- package/build/component/utils/odrProvider.js.map +1 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +110 -3
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +4 -6
- package/build/core/FxCore.js.map +1 -1
- package/build/core/createFrontDoorAdapters.d.ts +4 -27
- package/build/core/createFrontDoorAdapters.d.ts.map +1 -1
- package/build/core/createFrontDoorAdapters.js +17 -157
- package/build/core/createFrontDoorAdapters.js.map +1 -1
- package/build/core/createProjectFrontDoor.d.ts +10 -12
- package/build/core/createProjectFrontDoor.d.ts.map +1 -1
- package/build/core/createProjectFrontDoor.js +143 -106
- package/build/core/createProjectFrontDoor.js.map +1 -1
- package/build/core/modifyProjectFrontDoor.d.ts +0 -1
- package/build/core/modifyProjectFrontDoor.d.ts.map +1 -1
- package/build/core/modifyProjectFrontDoor.js +0 -2
- package/build/core/modifyProjectFrontDoor.js.map +1 -1
- package/build/index.d.ts +3 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +9 -1
- package/build/index.js.map +1 -1
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +2 -1
- package/build/question/create.js.map +1 -1
- package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +4 -0
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +14 -0
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +11 -1
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +2 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +2 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/constructNode.d.ts +3 -1
- package/build/question/scaffold/constructNode.d.ts.map +1 -1
- package/build/question/scaffold/constructNode.js +50 -0
- package/build/question/scaffold/constructNode.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +2 -0
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +16 -0
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +19 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +39 -7
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/v4/buildTarget/parseSelector.d.ts +6 -2
- package/build/v4/buildTarget/parseSelector.d.ts.map +1 -1
- package/build/v4/buildTarget/parseSelector.js +58 -45
- package/build/v4/buildTarget/parseSelector.js.map +1 -1
- package/build/v4/buildTarget/resolveBuildTarget.d.ts +21 -7
- package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -1
- package/build/v4/buildTarget/resolveBuildTarget.js +97 -52
- package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -1
- package/build/v4/collectInputs/collectInputs.d.ts +51 -10
- package/build/v4/collectInputs/collectInputs.d.ts.map +1 -1
- package/build/v4/collectInputs/collectInputs.js +287 -91
- package/build/v4/collectInputs/collectInputs.js.map +1 -1
- package/build/v4/distribution/createQuestions.d.ts.map +1 -1
- package/build/v4/distribution/createQuestions.js +2 -29
- package/build/v4/distribution/createQuestions.js.map +1 -1
- package/build/v4/distribution/declarativePackage.d.ts.map +1 -1
- package/build/v4/distribution/declarativePackage.js +2 -30
- package/build/v4/distribution/declarativePackage.js.map +1 -1
- package/build/v4/distribution/questionFragments.d.ts +11 -0
- package/build/v4/distribution/questionFragments.d.ts.map +1 -0
- package/build/v4/distribution/questionFragments.js +130 -0
- package/build/v4/distribution/questionFragments.js.map +1 -0
- package/build/v4/engineVersion.d.ts +7 -0
- package/build/v4/engineVersion.d.ts.map +1 -0
- package/build/v4/engineVersion.js +12 -0
- package/build/v4/engineVersion.js.map +1 -0
- package/build/v4/expression/evaluateExpression.d.ts +13 -0
- package/build/v4/expression/evaluateExpression.d.ts.map +1 -1
- package/build/v4/expression/evaluateExpression.js +57 -0
- package/build/v4/expression/evaluateExpression.js.map +1 -1
- package/build/v4/index.d.ts +7 -0
- package/build/v4/index.d.ts.map +1 -1
- package/build/v4/index.js +7 -0
- package/build/v4/index.js.map +1 -1
- package/build/v4/inspection/scaffoldCatalog.d.ts +28 -0
- package/build/v4/inspection/scaffoldCatalog.d.ts.map +1 -0
- package/build/v4/inspection/scaffoldCatalog.js +66 -0
- package/build/v4/inspection/scaffoldCatalog.js.map +1 -0
- package/build/v4/inspection/scaffoldMetadataSource.d.ts +6 -0
- package/build/v4/inspection/scaffoldMetadataSource.d.ts.map +1 -0
- package/build/v4/inspection/scaffoldMetadataSource.js +78 -0
- package/build/v4/inspection/scaffoldMetadataSource.js.map +1 -0
- package/build/v4/mcp/mcpAuthAction.d.ts +36 -0
- package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -0
- package/build/v4/mcp/mcpAuthAction.js +177 -0
- package/build/v4/mcp/mcpAuthAction.js.map +1 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts +37 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -0
- package/build/v4/mcp/mcpAuthScaffold.js +162 -0
- package/build/v4/mcp/mcpAuthScaffold.js.map +1 -0
- package/build/v4/model/dataModel.d.ts +1 -1
- package/build/v4/model/dataModel.d.ts.map +1 -1
- package/build/v4/pipeline/runScaffoldPipeline.d.ts +27 -5
- package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -1
- package/build/v4/pipeline/runScaffoldPipeline.js +64 -10
- package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -1
- package/build/v4/providers/createOptionsProviders.d.ts +11 -0
- package/build/v4/providers/createOptionsProviders.d.ts.map +1 -0
- package/build/v4/providers/createOptionsProviders.js +268 -0
- package/build/v4/providers/createOptionsProviders.js.map +1 -0
- package/build/v4/renderContext/buildRenderContext.d.ts.map +1 -1
- package/build/v4/renderContext/buildRenderContext.js +4 -6
- package/build/v4/renderContext/buildRenderContext.js.map +1 -1
- package/build/v4/runtime/generalSensitivityLabel.d.ts +5 -0
- package/build/v4/runtime/generalSensitivityLabel.d.ts.map +1 -0
- package/build/v4/runtime/generalSensitivityLabel.js +36 -0
- package/build/v4/runtime/generalSensitivityLabel.js.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts +7 -1
- package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -1
- package/build/v4/runtime/inMemoryRuntime.js +25 -3
- package/build/v4/runtime/inMemoryRuntime.js.map +1 -1
- package/build/v4/runtime/packageParse.d.ts.map +1 -1
- package/build/v4/runtime/packageParse.js +64 -8
- package/build/v4/runtime/packageParse.js.map +1 -1
- package/build/v4/runtime/realRuntime.d.ts +3 -1
- package/build/v4/runtime/realRuntime.d.ts.map +1 -1
- package/build/v4/runtime/realRuntime.js +3 -2
- package/build/v4/runtime/realRuntime.js.map +1 -1
- package/build/v4/runtime/renderMustache.d.ts.map +1 -1
- package/build/v4/runtime/renderMustache.js +13 -4
- package/build/v4/runtime/renderMustache.js.map +1 -1
- package/build/v4/runtime/runtimeRegistry.d.ts +12 -3
- package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -1
- package/build/v4/runtime/runtimeRegistry.js +123 -17
- package/build/v4/runtime/runtimeRegistry.js.map +1 -1
- package/build/v4/runtime/scaffold.d.ts +1 -0
- package/build/v4/runtime/scaffold.d.ts.map +1 -1
- package/build/v4/runtime/scaffold.js +1 -20
- package/build/v4/runtime/scaffold.js.map +1 -1
- package/build/v4/runtime/steps/daAction.d.ts.map +1 -1
- package/build/v4/runtime/steps/daAction.js +3 -111
- package/build/v4/runtime/steps/daAction.js.map +1 -1
- package/build/v4/runtime/steps/daSensitivity.d.ts +14 -0
- package/build/v4/runtime/steps/daSensitivity.d.ts.map +1 -0
- package/build/v4/runtime/steps/daSensitivity.js +50 -0
- package/build/v4/runtime/steps/daSensitivity.js.map +1 -0
- package/build/v4/runtime/steps/mcpAuth.d.ts +5 -2
- package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpAuth.js +37 -66
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
- package/build/v4/runtime/steps/mcpLocal.d.ts +0 -4
- package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpLocal.js +11 -31
- package/build/v4/runtime/steps/mcpLocal.js.map +1 -1
- package/build/v4/runtime/steps/mcpStatic.d.ts +1 -1
- package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpStatic.js +14 -32
- package/build/v4/runtime/steps/mcpStatic.js.map +1 -1
- package/build/v4/runtime/steps/metaOs.d.ts.map +1 -1
- package/build/v4/runtime/steps/metaOs.js +39 -51
- package/build/v4/runtime/steps/metaOs.js.map +1 -1
- package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -1
- package/build/v4/runtime/steps/officeAddin.js +7 -12
- package/build/v4/runtime/steps/officeAddin.js.map +1 -1
- package/build/v4/runtime/steps/openApi.d.ts.map +1 -1
- package/build/v4/runtime/steps/openApi.js +85 -566
- package/build/v4/runtime/steps/openApi.js.map +1 -1
- package/build/v4/runtime/steps/openApiCustomApi.d.ts +5 -0
- package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApiCustomApi.js +385 -0
- package/build/v4/runtime/steps/openApiCustomApi.js.map +1 -0
- package/build/v4/runtime/whitelist.d.ts +27 -0
- package/build/v4/runtime/whitelist.d.ts.map +1 -1
- package/build/v4/runtime/whitelist.js +156 -1
- package/build/v4/runtime/whitelist.js.map +1 -1
- package/build/v4/runtime/withTempDirectory.d.ts +10 -0
- package/build/v4/runtime/withTempDirectory.d.ts.map +1 -0
- package/build/v4/runtime/withTempDirectory.js +41 -0
- package/build/v4/runtime/withTempDirectory.js.map +1 -0
- package/build/v4/surface/createFloorTail.d.ts +12 -0
- package/build/v4/surface/createFloorTail.d.ts.map +1 -0
- package/build/v4/surface/createFloorTail.js +138 -0
- package/build/v4/surface/createFloorTail.js.map +1 -0
- package/build/v4/surface/createInputs.d.ts +25 -3
- package/build/v4/surface/createInputs.d.ts.map +1 -1
- package/build/v4/surface/createInputs.js +54 -431
- package/build/v4/surface/createInputs.js.map +1 -1
- package/build/v4/surface/createSelectorWalk.d.ts +8 -3
- package/build/v4/surface/createSelectorWalk.d.ts.map +1 -1
- package/build/v4/surface/createSelectorWalk.js +21 -11
- package/build/v4/surface/createSelectorWalk.js.map +1 -1
- package/build/v4/surface/deriveCreateOptions.d.ts.map +1 -1
- package/build/v4/surface/deriveCreateOptions.js +5 -2
- package/build/v4/surface/deriveCreateOptions.js.map +1 -1
- package/build/v4/surface/localizePrompt.d.ts +11 -0
- package/build/v4/surface/localizePrompt.d.ts.map +1 -0
- package/build/v4/surface/localizePrompt.js +32 -0
- package/build/v4/surface/localizePrompt.js.map +1 -0
- package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -1
- package/build/v4/surface/modifySelectorWalk.js +0 -3
- package/build/v4/surface/modifySelectorWalk.js.map +1 -1
- package/build/v4/surface/uiPromptUI.d.ts.map +1 -1
- package/build/v4/surface/uiPromptUI.js +45 -45
- package/build/v4/surface/uiPromptUI.js.map +1 -1
- package/build/v4/validation/capabilityCatalog.d.ts +8 -0
- package/build/v4/validation/capabilityCatalog.d.ts.map +1 -0
- package/build/v4/validation/capabilityCatalog.js +62 -0
- package/build/v4/validation/capabilityCatalog.js.map +1 -0
- package/build/v4/validation/templateArchiveValidation.d.ts +15 -0
- package/build/v4/validation/templateArchiveValidation.d.ts.map +1 -0
- package/build/v4/validation/templateArchiveValidation.js +297 -0
- package/build/v4/validation/templateArchiveValidation.js.map +1 -0
- package/build/v4/validation/validateTemplatePackage.d.ts +21 -2
- package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -1
- package/build/v4/validation/validateTemplatePackage.js +155 -31
- package/build/v4/validation/validateTemplatePackage.js.map +1 -1
- package/build/v4/validators/createInputValidators.d.ts +7 -0
- package/build/v4/validators/createInputValidators.d.ts.map +1 -0
- package/build/v4/validators/createInputValidators.js +77 -0
- package/build/v4/validators/createInputValidators.js.map +1 -0
- package/build/v4/validators/mcpCredentialValidators.d.ts +5 -0
- package/build/v4/validators/mcpCredentialValidators.d.ts.map +1 -0
- package/build/v4/validators/mcpCredentialValidators.js +13 -0
- package/build/v4/validators/mcpCredentialValidators.js.map +1 -0
- package/build/v4/validators/mcpServerUrlValidator.d.ts +9 -0
- package/build/v4/validators/mcpServerUrlValidator.d.ts.map +1 -0
- package/build/v4/validators/mcpServerUrlValidator.js +15 -0
- package/build/v4/validators/mcpServerUrlValidator.js.map +1 -0
- package/package.json +29 -23
- package/resource/package.nls.cs.json +56 -54
- package/resource/package.nls.de.json +56 -54
- package/resource/package.nls.es.json +55 -53
- package/resource/package.nls.fr.json +56 -54
- package/resource/package.nls.it.json +55 -53
- package/resource/package.nls.ja.json +56 -54
- package/resource/package.nls.json +10 -3
- package/resource/package.nls.ko.json +56 -54
- package/resource/package.nls.pl.json +56 -54
- package/resource/package.nls.pt-BR.json +56 -54
- package/resource/package.nls.ru.json +56 -54
- package/resource/package.nls.tr.json +56 -54
- package/resource/package.nls.zh-Hans.json +56 -54
- package/resource/package.nls.zh-Hant.json +56 -54
- package/resource/templates/package.nls.cs.json +22 -9
- package/resource/templates/package.nls.de.json +22 -9
- package/resource/templates/package.nls.es.json +22 -9
- package/resource/templates/package.nls.fr.json +22 -9
- package/resource/templates/package.nls.it.json +22 -9
- package/resource/templates/package.nls.ja.json +22 -9
- package/resource/templates/package.nls.json +16 -3
- package/resource/templates/package.nls.ko.json +22 -9
- package/resource/templates/package.nls.pl.json +22 -9
- package/resource/templates/package.nls.pt-BR.json +22 -9
- package/resource/templates/package.nls.ru.json +22 -9
- package/resource/templates/package.nls.tr.json +22 -9
- package/resource/templates/package.nls.zh-Hans.json +22 -9
- package/resource/templates/package.nls.zh-Hant.json +22 -9
- package/resource/templates/package.nls.zh-cn.json +7 -1
- package/resource/templates/package.nls.zh-tw.json +7 -1
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata/allTemplates.json +16 -2
- package/templates/metadata.zip +0 -0
- package/templates/ui/wizardNode.json +24 -0
- package/templates/v4/create-selector.json +30 -5
- package/templates/v4/floor.json +1 -1
- package/templates/v4/modify-selector.json +1 -6
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
- package/templates/configs/local/typescript/.gitignore +0 -1
- package/templates/configs/playground/typescript/.gitignore +0 -4
|
@@ -3,6 +3,7 @@ import { Result } from "neverthrow";
|
|
|
3
3
|
import { Answers, CallerFloor, TemplateFileEntry } from "../model/dataModel";
|
|
4
4
|
import { ExpressionRuntimePort } from "../expression/evaluateExpression";
|
|
5
5
|
import { PipelineRuntimePort, ScaffoldOutcome, TargetDir } from "../pipeline/runScaffoldPipeline";
|
|
6
|
+
/** v4 scaffold composition over an injected runtime. See create-mcp-server spec. */
|
|
6
7
|
/** The two ports `scaffold` composes. */
|
|
7
8
|
export interface ScaffoldRuntime {
|
|
8
9
|
/** The pure expression port (whitelist + flags) for `{expr}` render-var derivation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAO,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EAEV,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAO,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EAEV,MAAM,iCAAiC,CAAC;AAIzC,oFAAoF;AAEpF,yCAAyC;AACzC,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,QAAQ,EAAE,qBAAqB,CAAC;IAChC,2FAA2F;IAC3F,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,UAAU,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,yEAAyE;IACzE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,4DAA4D;IAC5D,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,WAAW,EAAE,WAAW,CAAC;IACzB,wFAAwF;IACxF,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,iEAAiE;AACjE,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CA8B3C"}
|
|
@@ -8,24 +8,6 @@ const buildRenderContext_1 = require("../renderContext/buildRenderContext");
|
|
|
8
8
|
const runScaffoldPipeline_1 = require("../pipeline/runScaffoldPipeline");
|
|
9
9
|
const packageParse_1 = require("./packageParse");
|
|
10
10
|
const selectLanguageContent_1 = require("./selectLanguageContent");
|
|
11
|
-
/** v4 scaffold composition over an injected runtime. See create-mcp-server spec. */
|
|
12
|
-
const SANDBOXED_TEAM_FLAG = "TEAMSFX_SANDBOXED_TEAM";
|
|
13
|
-
const sandboxFileNames = new Set([
|
|
14
|
-
"teamsapp.sandbox.yml.tpl",
|
|
15
|
-
"m365agents.sandbox.yml.tpl",
|
|
16
|
-
".env.sandbox",
|
|
17
|
-
".env.sandbox.user.tpl",
|
|
18
|
-
]);
|
|
19
|
-
function filterSandboxContent(content, runtime) {
|
|
20
|
-
if (runtime.exprPort.flags(SANDBOXED_TEAM_FLAG)) {
|
|
21
|
-
return content;
|
|
22
|
-
}
|
|
23
|
-
return content.filter((entry) => {
|
|
24
|
-
const normalizedPath = entry.path.replace(/\\/g, "/");
|
|
25
|
-
const fileName = normalizedPath.slice(normalizedPath.lastIndexOf("/") + 1);
|
|
26
|
-
return !sandboxFileNames.has(fileName);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
11
|
/** Scaffold one template package against an injected runtime. */
|
|
30
12
|
async function scaffold(request, runtime) {
|
|
31
13
|
const replaceMap = (0, packageParse_1.parseReplaceMap)(request.descriptor);
|
|
@@ -46,8 +28,7 @@ async function scaffold(request, runtime) {
|
|
|
46
28
|
const renderVars = { ...baseVars.value, ...request.callerFloor };
|
|
47
29
|
// Select the active language subtree before render.
|
|
48
30
|
const language = request.callerFloor.language || selectLanguageContent_1.COMMON_LANGUAGE;
|
|
49
|
-
const
|
|
50
|
-
const content = filterSandboxContent(selectedContent, runtime);
|
|
31
|
+
const content = (0, selectLanguageContent_1.selectLanguageContent)(request.descriptor, request.content, language);
|
|
51
32
|
return (0, runScaffoldPipeline_1.runScaffoldPipeline)(pipeline.value, content, renderVars, request.targetDir, runtime.port);
|
|
52
33
|
}
|
|
53
34
|
//# sourceMappingURL=scaffold.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../../src/v4/runtime/scaffold.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;
|
|
1
|
+
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../../src/v4/runtime/scaffold.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA2ClC,4BAiCC;AAzED,2CAAyC;AAGzC,4EAAyE;AACzE,yEAKyC;AACzC,iDAAmF;AACnF,mEAAiF;AA4BjF,iEAAiE;AAC1D,KAAK,UAAU,QAAQ,CAC5B,OAAwB,EACx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,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daAction.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/daAction.ts"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -3,9 +3,7 @@
|
|
|
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
|
-
const tslib_1 = require("tslib");
|
|
7
6
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
7
|
const neverthrow_1 = require("neverthrow");
|
|
10
8
|
/** Declarative Agent manifest mutation steps for modify flows. */
|
|
11
9
|
const SOURCE = "Scaffold";
|
|
@@ -18,88 +16,6 @@ function stringParam(params, key) {
|
|
|
18
16
|
const value = params[key];
|
|
19
17
|
return typeof value === "string" ? value : undefined;
|
|
20
18
|
}
|
|
21
|
-
function isRecord(value) {
|
|
22
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23
|
-
}
|
|
24
|
-
function isAction(value) {
|
|
25
|
-
return (isRecord(value) &&
|
|
26
|
-
typeof value.id === "string" &&
|
|
27
|
-
typeof value.file === "string" &&
|
|
28
|
-
Object.values(value).every((item) => typeof item === "string"));
|
|
29
|
-
}
|
|
30
|
-
function parseJsonObject(json, errorName, filePath) {
|
|
31
|
-
let parsed;
|
|
32
|
-
try {
|
|
33
|
-
parsed = JSON.parse(json.toString("utf8"));
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
return (0, neverthrow_1.err)(systemError(errorName, `'${filePath}' is not valid JSON.`));
|
|
37
|
-
}
|
|
38
|
-
if (!isRecord(parsed)) {
|
|
39
|
-
return (0, neverthrow_1.err)(systemError(errorName, `'${filePath}' must be a JSON object.`));
|
|
40
|
-
}
|
|
41
|
-
return (0, neverthrow_1.ok)(parsed);
|
|
42
|
-
}
|
|
43
|
-
function firstFileFromArray(value) {
|
|
44
|
-
if (!Array.isArray(value)) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
const first = value[0];
|
|
48
|
-
return isRecord(first) && typeof first.file === "string" ? first.file : undefined;
|
|
49
|
-
}
|
|
50
|
-
function nestedRecord(value, key) {
|
|
51
|
-
if (!isRecord(value)) {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
const nested = value[key];
|
|
55
|
-
return isRecord(nested) ? nested : undefined;
|
|
56
|
-
}
|
|
57
|
-
function declarativeAgentFile(teamsManifest) {
|
|
58
|
-
const copilotExtensions = nestedRecord(teamsManifest, "copilotExtensions");
|
|
59
|
-
const legacy = firstFileFromArray(copilotExtensions?.declarativeCopilots);
|
|
60
|
-
if (legacy !== undefined) {
|
|
61
|
-
return legacy;
|
|
62
|
-
}
|
|
63
|
-
const copilotAgents = nestedRecord(teamsManifest, "copilotAgents");
|
|
64
|
-
const current = firstFileFromArray(copilotAgents?.declarativeAgents);
|
|
65
|
-
if (current !== undefined) {
|
|
66
|
-
return current;
|
|
67
|
-
}
|
|
68
|
-
return firstFileFromArray(teamsManifest.declarativeAgents);
|
|
69
|
-
}
|
|
70
|
-
function normalizeTargetPath(entryPath) {
|
|
71
|
-
return entryPath.replace(/\\/g, "/");
|
|
72
|
-
}
|
|
73
|
-
function resolveSiblingPath(baseFile, relativeFile) {
|
|
74
|
-
return normalizeTargetPath(path_1.default.posix.normalize(path_1.default.posix.join(path_1.default.posix.dirname(baseFile), relativeFile)));
|
|
75
|
-
}
|
|
76
|
-
function pluginFileRelativeToAgent(agentManifestPath, pluginManifestPath) {
|
|
77
|
-
return normalizeTargetPath(path_1.default.posix.relative(path_1.default.posix.dirname(agentManifestPath), pluginManifestPath));
|
|
78
|
-
}
|
|
79
|
-
function actionId(pluginManifestPath) {
|
|
80
|
-
const basename = path_1.default.posix.basename(pluginManifestPath, path_1.default.posix.extname(pluginManifestPath));
|
|
81
|
-
return basename.startsWith("ai-plugin-") ? basename.substring("ai-plugin-".length) : basename;
|
|
82
|
-
}
|
|
83
|
-
function upsertAction(manifest, action) {
|
|
84
|
-
const existing = manifest.actions;
|
|
85
|
-
const actions = Array.isArray(existing) ? existing.filter(isAction) : [];
|
|
86
|
-
const index = actions.findIndex((item) => item.file === action.file);
|
|
87
|
-
if (index === -1) {
|
|
88
|
-
actions.push(action);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
actions[index] = action;
|
|
92
|
-
}
|
|
93
|
-
manifest.actions = actions;
|
|
94
|
-
return actions;
|
|
95
|
-
}
|
|
96
|
-
function readRequired(ctx, filePath, errorName) {
|
|
97
|
-
const current = ctx.read(filePath);
|
|
98
|
-
if (current === undefined) {
|
|
99
|
-
return (0, neverthrow_1.err)(systemError(errorName, `Cannot read '${filePath}'.`));
|
|
100
|
-
}
|
|
101
|
-
return (0, neverthrow_1.ok)(current);
|
|
102
|
-
}
|
|
103
19
|
/** Registered step for adding a rendered API plugin manifest as a DA action. */
|
|
104
20
|
exports.daActionRegisterPluginManifest = {
|
|
105
21
|
validateParams(resolved) {
|
|
@@ -117,33 +33,9 @@ exports.daActionRegisterPluginManifest = {
|
|
|
117
33
|
if (teamsManifestPath === undefined || pluginManifestPath === undefined) {
|
|
118
34
|
return (0, neverthrow_1.err)(systemError("DaActionRegisterParams", "resolved parameters are not all strings"));
|
|
119
35
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
const teamsManifest = parseJsonObject(teamsManifestRaw.value, "DaActionTeamsManifestInvalid", teamsManifestPath);
|
|
125
|
-
if (teamsManifest.isErr()) {
|
|
126
|
-
return (0, neverthrow_1.err)(teamsManifest.error);
|
|
127
|
-
}
|
|
128
|
-
const agentFile = declarativeAgentFile(teamsManifest.value);
|
|
129
|
-
if (agentFile === undefined) {
|
|
130
|
-
return (0, neverthrow_1.err)(systemError("DaActionManifestFileMissing", `The Teams manifest '${teamsManifestPath}' does not reference a declarative agent manifest.`));
|
|
131
|
-
}
|
|
132
|
-
const agentManifestPath = resolveSiblingPath(teamsManifestPath, agentFile);
|
|
133
|
-
const agentManifestRaw = readRequired(ctx, agentManifestPath, "DaActionManifestMissing");
|
|
134
|
-
if (agentManifestRaw.isErr()) {
|
|
135
|
-
return (0, neverthrow_1.err)(agentManifestRaw.error);
|
|
136
|
-
}
|
|
137
|
-
const agentManifest = parseJsonObject(agentManifestRaw.value, "DaActionManifestInvalid", agentManifestPath);
|
|
138
|
-
if (agentManifest.isErr()) {
|
|
139
|
-
return (0, neverthrow_1.err)(agentManifest.error);
|
|
140
|
-
}
|
|
141
|
-
upsertAction(agentManifest.value, {
|
|
142
|
-
id: actionId(pluginManifestPath),
|
|
143
|
-
file: pluginFileRelativeToAgent(agentManifestPath, pluginManifestPath),
|
|
144
|
-
});
|
|
145
|
-
ctx.write(agentManifestPath, Buffer.from(JSON.stringify(agentManifest.value, null, 2) + "\n", "utf8"));
|
|
146
|
-
return (0, neverthrow_1.ok)(undefined);
|
|
36
|
+
return ctx
|
|
37
|
+
.manifestWrapper("declarativeAgent")
|
|
38
|
+
.registerDeclarativeAgentAction(teamsManifestPath, pluginManifestPath);
|
|
147
39
|
},
|
|
148
40
|
};
|
|
149
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
|
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,CAAC,wBAAwB,EAAE,yCAAyC,CAAC,CAAC,CAAC;QAC/F,CAAC;QAED,OAAO,GAAG;aACP,eAAe,CAAC,kBAAkB,CAAC;aACnC,8BAA8B,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IAC3E,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
|
|
2
|
+
/** Engine step name `da/set-sensitivity-label`. */
|
|
3
|
+
export declare const STEP_SET_SENSITIVITY_LABEL = "da/set-sensitivity-label";
|
|
4
|
+
/** Best-effort service used by the sensitivity-label step. */
|
|
5
|
+
export interface GeneralSensitivityLabelService {
|
|
6
|
+
resolveId(): Promise<string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
/** Offline/default service used when no authenticated M365 adapter is registered. */
|
|
9
|
+
export declare const NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE: GeneralSensitivityLabelService;
|
|
10
|
+
/** Bind the General-label lookup dependency into its registered step. */
|
|
11
|
+
export declare function createDaSetSensitivityLabelStep(generalSensitivityLabel: GeneralSensitivityLabelService): RegisteredStep;
|
|
12
|
+
/** Default step binding for offline runtimes and compatibility consumers. */
|
|
13
|
+
export declare const daSetSensitivityLabel: RegisteredStep;
|
|
14
|
+
//# sourceMappingURL=daSensitivity.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.daSetSensitivityLabel = exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE = exports.STEP_SET_SENSITIVITY_LABEL = void 0;
|
|
6
|
+
exports.createDaSetSensitivityLabelStep = createDaSetSensitivityLabelStep;
|
|
7
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
+
const neverthrow_1 = require("neverthrow");
|
|
9
|
+
const SOURCE = "Scaffold";
|
|
10
|
+
/** Engine step name `da/set-sensitivity-label`. */
|
|
11
|
+
exports.STEP_SET_SENSITIVITY_LABEL = "da/set-sensitivity-label";
|
|
12
|
+
function systemError(name, message) {
|
|
13
|
+
return new teamsfx_api_1.SystemError({ source: SOURCE, name, message });
|
|
14
|
+
}
|
|
15
|
+
function manifestPath(params) {
|
|
16
|
+
const value = params.manifestPath;
|
|
17
|
+
return typeof value === "string" && value.trim().length > 0 ? value : undefined;
|
|
18
|
+
}
|
|
19
|
+
/** Offline/default service used when no authenticated M365 adapter is registered. */
|
|
20
|
+
exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE = {
|
|
21
|
+
resolveId: () => Promise.resolve(undefined),
|
|
22
|
+
};
|
|
23
|
+
/** 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) {
|
|
32
|
+
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
|
+
}
|
|
36
|
+
const id = await generalSensitivityLabel.resolveId();
|
|
37
|
+
if (id === undefined) {
|
|
38
|
+
return (0, neverthrow_1.ok)(undefined);
|
|
39
|
+
}
|
|
40
|
+
const wrapper = ctx.manifestWrapper("declarativeAgent");
|
|
41
|
+
if (wrapper.setSensitivityLabel === undefined) {
|
|
42
|
+
return (0, neverthrow_1.err)(systemError("DaSensitivityLabelWrapperMissing", "the Declarative Agent manifest wrapper cannot set a sensitivity label"));
|
|
43
|
+
}
|
|
44
|
+
return wrapper.setSensitivityLabel(path, id);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** Default step binding for offline runtimes and compatibility consumers. */
|
|
49
|
+
exports.daSetSensitivityLabel = createDaSetSensitivityLabelStep(exports.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE);
|
|
50
|
+
//# sourceMappingURL=daSensitivity.js.map
|
|
@@ -0,0 +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,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,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC;AAED,6EAA6E;AAChE,QAAA,qBAAqB,GAAG,+BAA+B,CAClE,8CAAsC,CACvC,CAAC"}
|
|
@@ -3,8 +3,11 @@ import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
|
|
|
3
3
|
export declare const STEP_INJECT_YML_ACTION = "mcp-auth/inject-yml-action";
|
|
4
4
|
/** Engine step name `mcp-auth/persist-credential-env`. */
|
|
5
5
|
export declare const STEP_PERSIST_CREDENTIAL_ENV = "mcp-auth/persist-credential-env";
|
|
6
|
-
/** Registered step for injecting the auth
|
|
6
|
+
/** Registered step for injecting the shared v4 MCP auth action into `m365agents.yml`. */
|
|
7
7
|
export declare const mcpAuthInjectYmlAction: RegisteredStep;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Registered step for writing the deterministic `MCP_DA_AUTH_ID_<NS>` registration placeholder into
|
|
10
|
+
* `env/.env.dev`.
|
|
11
|
+
*/
|
|
9
12
|
export declare const mcpAuthPersistCredentialEnv: RegisteredStep;
|
|
10
13
|
//# sourceMappingURL=mcpAuth.d.ts.map
|
|
@@ -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;
|
|
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;AAY7E,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,EAAE,cAqCpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,cA4BzC,CAAC"}
|
|
@@ -5,15 +5,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.mcpAuthPersistCredentialEnv = exports.mcpAuthInjectYmlAction = exports.STEP_PERSIST_CREDENTIAL_ENV = exports.STEP_INJECT_YML_ACTION = void 0;
|
|
6
6
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
7
7
|
const neverthrow_1 = require("neverthrow");
|
|
8
|
-
const
|
|
8
|
+
const mcpAuthScaffold_1 = require("../../mcp/mcpAuthScaffold");
|
|
9
9
|
/** MCP auth post-render steps for the create flow. See create-mcp-server scenario spec. */
|
|
10
10
|
const SOURCE = "Scaffold";
|
|
11
11
|
/** Engine step name `mcp-auth/inject-yml-action`. */
|
|
12
12
|
exports.STEP_INJECT_YML_ACTION = "mcp-auth/inject-yml-action";
|
|
13
13
|
/** Engine step name `mcp-auth/persist-credential-env`. */
|
|
14
14
|
exports.STEP_PERSIST_CREDENTIAL_ENV = "mcp-auth/persist-credential-env";
|
|
15
|
-
/** The create flow scaffolds the `dev` environment; this is its credential file. */
|
|
16
|
-
const CREATE_ENV_FILE = "env/.env.dev";
|
|
17
15
|
function systemError(name, message) {
|
|
18
16
|
return new teamsfx_api_1.SystemError({ source: SOURCE, name, message });
|
|
19
17
|
}
|
|
@@ -22,39 +20,14 @@ function stringParam(params, key) {
|
|
|
22
20
|
const value = params[key];
|
|
23
21
|
return typeof value === "string" ? value : undefined;
|
|
24
22
|
}
|
|
25
|
-
/**
|
|
26
|
-
function registrationId(serverUrl) {
|
|
27
|
-
return "MCP_DA_AUTH_ID_" + (0, whitelist_1.deriveMcpServerName)(serverUrl).toUpperCase();
|
|
28
|
-
}
|
|
29
|
-
/** The registration action a given auth type uses. */
|
|
30
|
-
function authActionUses(authType) {
|
|
31
|
-
return authType === "entra-sso" ? "microsoftEntra/register" : "oauth/register";
|
|
32
|
-
}
|
|
33
|
-
/** Insert an action block as the first entry under the top-level `provision:` key. */
|
|
34
|
-
function injectUnderProvision(yml, block) {
|
|
35
|
-
const lines = yml.split("\n");
|
|
36
|
-
const index = lines.findIndex((line) => line.trim() === "provision:");
|
|
37
|
-
if (index === -1) {
|
|
38
|
-
return yml + "\nprovision:\n" + block + "\n";
|
|
39
|
-
}
|
|
40
|
-
lines.splice(index + 1, 0, block);
|
|
41
|
-
return lines.join("\n");
|
|
42
|
-
}
|
|
43
|
-
function containsRegistrationAction(yml, authType, serverUrl) {
|
|
44
|
-
return (yml.includes(`- uses: ${authActionUses(authType)}`) &&
|
|
45
|
-
yml.includes(`registrationId: ${registrationId(serverUrl)}`));
|
|
46
|
-
}
|
|
47
|
-
/** True if the dotenv content already declares `name=…` (idempotency guard). */
|
|
48
|
-
function containsEnvVar(envContent, name) {
|
|
49
|
-
return envContent.split("\n").some((line) => line.startsWith(name + "="));
|
|
50
|
-
}
|
|
51
|
-
/** Registered step for injecting the auth registration action into `m365agents.yml`. */
|
|
23
|
+
/** Registered step for injecting the shared v4 MCP auth action into `m365agents.yml`. */
|
|
52
24
|
exports.mcpAuthInjectYmlAction = {
|
|
53
25
|
validateParams(resolved) {
|
|
54
26
|
if (stringParam(resolved, "ymlPath") === undefined) {
|
|
55
27
|
return "missing string parameter 'ymlPath'";
|
|
56
28
|
}
|
|
57
|
-
|
|
29
|
+
const authType = stringParam(resolved, "authType");
|
|
30
|
+
if (authType === undefined) {
|
|
58
31
|
return "missing string parameter 'authType'";
|
|
59
32
|
}
|
|
60
33
|
if (stringParam(resolved, "mcpServerUrl") === undefined) {
|
|
@@ -65,34 +38,32 @@ exports.mcpAuthInjectYmlAction = {
|
|
|
65
38
|
apply(resolved, ctx) {
|
|
66
39
|
const ymlPath = stringParam(resolved, "ymlPath");
|
|
67
40
|
const authType = stringParam(resolved, "authType");
|
|
68
|
-
const
|
|
69
|
-
if (ymlPath === undefined || authType === undefined ||
|
|
70
|
-
return (0, neverthrow_1.err)(systemError("
|
|
41
|
+
const mcpServerUrl = stringParam(resolved, "mcpServerUrl");
|
|
42
|
+
if (ymlPath === undefined || authType === undefined || mcpServerUrl === undefined) {
|
|
43
|
+
return Promise.resolve((0, neverthrow_1.err)(systemError("McpAuthInjectParams", "resolved parameters are not all strings")));
|
|
71
44
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
` writeToEnvironmentFile:`,
|
|
85
|
-
` registrationId: ${registrationId(serverUrl)}`,
|
|
86
|
-
].join("\n");
|
|
87
|
-
const injected = injectUnderProvision(yml, block);
|
|
88
|
-
ctx.write(ymlPath, Buffer.from(injected, "utf8"));
|
|
89
|
-
return (0, neverthrow_1.ok)(undefined);
|
|
45
|
+
return (0, mcpAuthScaffold_1.injectMcpAuthAction)(ctx, {
|
|
46
|
+
ymlPath,
|
|
47
|
+
authType,
|
|
48
|
+
mcpServerUrl,
|
|
49
|
+
credentialFields: {
|
|
50
|
+
clientId: authType === "oauth"
|
|
51
|
+
? Boolean(stringParam(resolved, "oauthClientId")?.trim())
|
|
52
|
+
: Boolean(stringParam(resolved, "entraClientId")?.trim()),
|
|
53
|
+
clientSecret: Boolean(stringParam(resolved, "oauthClientSecret")?.trim()),
|
|
54
|
+
scope: Boolean(stringParam(resolved, "oauthScopes")?.trim()),
|
|
55
|
+
},
|
|
56
|
+
});
|
|
90
57
|
},
|
|
91
58
|
};
|
|
92
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Registered step for writing the deterministic `MCP_DA_AUTH_ID_<NS>` registration placeholder into
|
|
61
|
+
* `env/.env.dev`.
|
|
62
|
+
*/
|
|
93
63
|
exports.mcpAuthPersistCredentialEnv = {
|
|
94
64
|
validateParams(resolved) {
|
|
95
|
-
|
|
65
|
+
const authType = stringParam(resolved, "authType");
|
|
66
|
+
if (authType === undefined) {
|
|
96
67
|
return "missing string parameter 'authType'";
|
|
97
68
|
}
|
|
98
69
|
if (stringParam(resolved, "mcpServerUrl") === undefined) {
|
|
@@ -101,19 +72,19 @@ exports.mcpAuthPersistCredentialEnv = {
|
|
|
101
72
|
return undefined;
|
|
102
73
|
},
|
|
103
74
|
apply(resolved, ctx) {
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const varName = registrationId(serverUrl);
|
|
109
|
-
const current = ctx.read(CREATE_ENV_FILE);
|
|
110
|
-
const base = current ? current.toString("utf8") : "";
|
|
111
|
-
if (containsEnvVar(base, varName)) {
|
|
112
|
-
return (0, neverthrow_1.ok)(undefined);
|
|
75
|
+
const authType = stringParam(resolved, "authType");
|
|
76
|
+
const mcpServerUrl = stringParam(resolved, "mcpServerUrl");
|
|
77
|
+
if (authType === undefined || mcpServerUrl === undefined) {
|
|
78
|
+
return Promise.resolve((0, neverthrow_1.err)(systemError("McpAuthPersistParams", "resolved parameters are not all strings")));
|
|
113
79
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
80
|
+
return (0, mcpAuthScaffold_1.persistMcpAuthRegistrationEnv)(ctx, {
|
|
81
|
+
authType,
|
|
82
|
+
mcpServerUrl,
|
|
83
|
+
oauthClientId: stringParam(resolved, "oauthClientId"),
|
|
84
|
+
oauthClientSecret: stringParam(resolved, "oauthClientSecret"),
|
|
85
|
+
oauthScopes: stringParam(resolved, "oauthScopes"),
|
|
86
|
+
entraClientId: stringParam(resolved, "entraClientId"),
|
|
87
|
+
});
|
|
117
88
|
},
|
|
118
89
|
};
|
|
119
90
|
//# sourceMappingURL=mcpAuth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpAuth.js","sourceRoot":"","sources":["../../../../src/v4/runtime/steps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C;YAC3B,OAAO,qCAAqC,CAAC;QAC/C,CAAC;QACD,IAAI,WAAW,CAAC,QAAQ,EAAE,cAAc,CAAC,KAAK,SAAS,EAAE,CAAC;YACxD,OAAO,yCAAyC,CAAC;QACnD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,KAAK,CAAC,QAAoB,EAAE,GAAgB;QAC1C,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,WAAW,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAC3D,IAAI,QAAQ,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YACzD,OAAO,OAAO,CAAC,OAAO,CACpB,IAAA,gBAAG,EAAC,WAAW,CAAC,sBAAsB,EAAE,yCAAyC,CAAC,CAAC,CACpF,CAAC;QACJ,CAAC;QACD,OAAO,IAAA,+CAA6B,EAAC,GAAG,EAAE;YACxC,QAAQ;YACR,YAAY;YACZ,aAAa,EAAE,WAAW,CAAC,QAAQ,EAAE,eAAe,CAAC;YACrD,iBAAiB,EAAE,WAAW,CAAC,QAAQ,EAAE,mBAAmB,CAAC;YAC7D,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC;YACjD,aAAa,EAAE,WAAW,CAAC,QAAQ,EAAE,eAAe,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { type ODRServer } from "../../../component/utils/odrProvider";
|
|
2
1
|
import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
|
|
3
|
-
export declare const mcpLocalDeps: {
|
|
4
|
-
listServers: () => Promise<ODRServer[]>;
|
|
5
|
-
};
|
|
6
2
|
/** Engine step name `mcp-local/materialize-servers`. */
|
|
7
3
|
export declare const STEP_MATERIALIZE_LOCAL_SERVERS = "mcp-local/materialize-servers";
|
|
8
4
|
/** Registered step for writing `.vscode/mcp.json` in the local branch. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpLocal.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/mcpLocal.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"mcpLocal.d.ts","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/mcpLocal.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA2B,MAAM,oCAAoC,CAAC;AAM7F,wDAAwD;AACxD,eAAO,MAAM,8BAA8B,kCAAkC,CAAC;AA6D9E,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,EAAE,cA+CxC,CAAC"}
|
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.mcpLocalMaterializeServers = exports.STEP_MATERIALIZE_LOCAL_SERVERS =
|
|
5
|
+
exports.mcpLocalMaterializeServers = exports.STEP_MATERIALIZE_LOCAL_SERVERS = void 0;
|
|
6
6
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
7
7
|
const neverthrow_1 = require("neverthrow");
|
|
8
|
-
const odrProvider_1 = require("../../../component/utils/odrProvider");
|
|
9
8
|
/** Materialize local MCP stdio servers. See create-mcp-server scenario spec. */
|
|
10
9
|
const SOURCE = "Scaffold";
|
|
11
|
-
exports.mcpLocalDeps = {
|
|
12
|
-
listServers: () => odrProvider_1.ODRProvider.listServers(),
|
|
13
|
-
};
|
|
14
10
|
/** Engine step name `mcp-local/materialize-servers`. */
|
|
15
11
|
exports.STEP_MATERIALIZE_LOCAL_SERVERS = "mcp-local/materialize-servers";
|
|
16
12
|
function systemError(name, message) {
|
|
@@ -21,13 +17,6 @@ function stringParam(params, key) {
|
|
|
21
17
|
const value = params[key];
|
|
22
18
|
return typeof value === "string" ? value : undefined;
|
|
23
19
|
}
|
|
24
|
-
function optionalStringParam(params, key) {
|
|
25
|
-
const value = stringParam(params, key);
|
|
26
|
-
if (value === undefined || /^\{\{[A-Za-z_][A-Za-z0-9_.]*\}\}$/.test(value)) {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
20
|
/** Read a `with` value as the multiSelect `string[]`, or `undefined`. */
|
|
32
21
|
function stringArrayParam(params, key) {
|
|
33
22
|
const value = params[key];
|
|
@@ -42,13 +31,6 @@ function isRecord(value) {
|
|
|
42
31
|
function errorMessage(error) {
|
|
43
32
|
return error instanceof Error ? error.message : String(error);
|
|
44
33
|
}
|
|
45
|
-
function catalogFromServers(servers) {
|
|
46
|
-
const catalog = {};
|
|
47
|
-
for (const server of servers) {
|
|
48
|
-
catalog[server.name] = { command: server.command, args: server.args };
|
|
49
|
-
}
|
|
50
|
-
return catalog;
|
|
51
|
-
}
|
|
52
34
|
/** Build one stdio server from its catalog record. */
|
|
53
35
|
function toLocalServer(id, entry) {
|
|
54
36
|
if (!isRecord(entry)) {
|
|
@@ -74,26 +56,24 @@ exports.mcpLocalMaterializeServers = {
|
|
|
74
56
|
if (stringArrayParam(resolved, "selected") === undefined) {
|
|
75
57
|
return "missing string[] parameter 'selected'";
|
|
76
58
|
}
|
|
59
|
+
if (stringParam(resolved, "catalog") === undefined) {
|
|
60
|
+
return "missing string parameter 'catalog'";
|
|
61
|
+
}
|
|
77
62
|
return undefined;
|
|
78
63
|
},
|
|
79
|
-
|
|
64
|
+
apply(resolved, ctx) {
|
|
80
65
|
const target = stringParam(resolved, "target");
|
|
81
66
|
const selected = stringArrayParam(resolved, "selected");
|
|
82
|
-
const catalogRaw =
|
|
83
|
-
if (target === undefined || selected === undefined) {
|
|
67
|
+
const catalogRaw = stringParam(resolved, "catalog");
|
|
68
|
+
if (target === undefined || selected === undefined || catalogRaw === undefined) {
|
|
84
69
|
return (0, neverthrow_1.err)(systemError("McpLocalParams", "resolved parameters are not all of the expected type"));
|
|
85
70
|
}
|
|
86
71
|
let parsed;
|
|
87
|
-
|
|
88
|
-
parsed =
|
|
72
|
+
try {
|
|
73
|
+
parsed = JSON.parse(catalogRaw);
|
|
89
74
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
parsed = JSON.parse(catalogRaw);
|
|
93
|
-
}
|
|
94
|
-
catch (error) {
|
|
95
|
-
return (0, neverthrow_1.err)(systemError("McpLocalCatalogParse", `local server catalog is not valid JSON: ${errorMessage(error)}`));
|
|
96
|
-
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
return (0, neverthrow_1.err)(systemError("McpLocalCatalogParse", `local server catalog is not valid JSON: ${errorMessage(error)}`));
|
|
97
77
|
}
|
|
98
78
|
if (!isRecord(parsed)) {
|
|
99
79
|
return (0, neverthrow_1.err)(systemError("McpLocalCatalogShape", "local server catalog is not a JSON object"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpLocal.js","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/mcpLocal.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wDAA8D;AAC9D,2CAA6C;
|
|
1
|
+
{"version":3,"file":"mcpLocal.js","sourceRoot":"","sources":["../../../../src/v4/runtime/steps/mcpLocal.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wDAA8D;AAC9D,2CAA6C;AAG7C,gFAAgF;AAEhF,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,wDAAwD;AAC3C,QAAA,8BAA8B,GAAG,+BAA+B,CAAC;AAE9E,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,oFAAoF;AACpF,SAAS,WAAW,CAAC,MAAkB,EAAE,GAAW;IAClD,MAAM,KAAK,GAAG,MAAM,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1
|
-
import { MCPFetchResult } from "../../../
|
|
1
|
+
import { MCPFetchResult } from "../../../common/mcpToolFetcher";
|
|
2
2
|
import { RegisteredStep } from "../../pipeline/runScaffoldPipeline";
|
|
3
3
|
export declare const mcpStaticDeps: {
|
|
4
4
|
fetchTools: (serverUrl: string) => Promise<MCPFetchResult>;
|