@microsoft/teamsfx-core 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/aadAppClient.d.ts +0 -6
- package/build/client/aadAppClient.d.ts.map +1 -1
- package/build/client/aadAppClient.js +8 -6
- package/build/client/aadAppClient.js.map +1 -1
- package/build/client/graphClient.d.ts +4 -4
- package/build/client/graphClient.d.ts.map +1 -1
- package/build/client/graphClient.js +91 -23
- package/build/client/graphClient.js.map +1 -1
- package/build/client/teamsDevPortalClient.d.ts +2 -6
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +97 -120
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/client/teamsGraphClient.d.ts +20 -0
- package/build/client/teamsGraphClient.d.ts.map +1 -0
- package/build/client/teamsGraphClient.js +152 -0
- package/build/client/teamsGraphClient.js.map +1 -0
- package/build/common/accountUtils.d.ts +3 -2
- package/build/common/accountUtils.d.ts.map +1 -1
- package/build/common/accountUtils.js +7 -2
- package/build/common/accountUtils.js.map +1 -1
- package/build/common/constants.d.ts +5 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +20 -5
- package/build/common/constants.js.map +1 -1
- package/build/common/daSpecParser.d.ts +2 -1
- package/build/common/daSpecParser.d.ts.map +1 -1
- package/build/common/daSpecParser.js +214 -21
- package/build/common/daSpecParser.js.map +1 -1
- package/build/common/featureFlags.d.ts +22 -5
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +40 -9
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/fetchHelper.d.ts.map +1 -1
- package/build/common/fetchHelper.js +41 -3
- package/build/common/fetchHelper.js.map +1 -1
- package/build/common/globalVars.d.ts +1 -1
- package/build/common/globalVars.d.ts.map +1 -1
- package/build/common/globalVars.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/kiotaClient.d.ts +3 -3
- package/build/common/kiotaClient.d.ts.map +1 -1
- package/build/common/kiotaClient.js +10 -10
- package/build/common/kiotaClient.js.map +1 -1
- 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/projectSettingsHelper.d.ts +0 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -59
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/retryHandler.d.ts +5 -0
- package/build/common/retryHandler.d.ts.map +1 -0
- package/build/common/retryHandler.js +27 -0
- package/build/common/retryHandler.js.map +1 -0
- package/build/common/samples.d.ts +1 -1
- package/build/common/samples.js +1 -1
- 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/teamsGraphApiNames.d.ts +10 -0
- package/build/common/teamsGraphApiNames.d.ts.map +1 -0
- package/build/common/teamsGraphApiNames.js +16 -0
- package/build/common/teamsGraphApiNames.js.map +1 -0
- package/build/common/telemetry.d.ts +6 -15
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +9 -20
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +10 -3
- package/build/common/tools.d.ts +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +6 -6
- package/build/common/tools.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts +11 -2
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +147 -59
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/actionInjector.d.ts +16 -1
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +106 -1
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +9 -0
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +2 -0
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +13 -11
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/component/deps-checker/internal/funcToolChecker.js +6 -7
- package/build/component/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/component/deps-checker/internal/testToolChecker.js +13 -13
- package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +5 -5
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +7 -4
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/add/addWebPart.js +3 -3
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +4 -4
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/update.d.ts.map +1 -1
- package/build/component/driver/apiKey/update.js +4 -4
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js +5 -4
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts +14 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts.map +1 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.js +5 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.js.map +1 -0
- package/build/component/driver/copilotAgent/publish.d.ts +16 -0
- package/build/component/driver/copilotAgent/publish.d.ts.map +1 -0
- package/build/component/driver/copilotAgent/publish.js +175 -0
- package/build/component/driver/copilotAgent/publish.js.map +1 -0
- package/build/component/driver/dcr/create.d.ts +10 -0
- package/build/component/driver/dcr/create.d.ts.map +1 -0
- package/build/component/driver/dcr/create.js +142 -0
- package/build/component/driver/dcr/create.js.map +1 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.d.ts +5 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.d.ts.map +1 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.js +21 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.js.map +1 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts +5 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts.map +1 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.js +21 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.js.map +1 -0
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts +9 -0
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts.map +1 -0
- package/build/component/driver/dcr/interface/createDcrArgs.js +5 -0
- package/build/component/driver/dcr/interface/createDcrArgs.js.map +1 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.d.ts +7 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.d.ts.map +1 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.js +10 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.js.map +1 -0
- package/build/component/driver/dcr/utility/constants.d.ts +7 -0
- package/build/component/driver/dcr/utility/constants.d.ts.map +1 -0
- package/build/component/driver/dcr/utility/constants.js +12 -0
- package/build/component/driver/dcr/utility/constants.js.map +1 -0
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts +3 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +12 -9
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.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/devTool/httpClient.d.ts +4 -0
- package/build/component/driver/devTool/httpClient.d.ts.map +1 -1
- package/build/component/driver/devTool/httpClient.js +6 -3
- package/build/component/driver/devTool/httpClient.js.map +1 -1
- package/build/component/driver/index.d.ts +2 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +2 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +4 -3
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts.map +1 -1
- package/build/component/driver/oauth/create.js +5 -4
- package/build/component/driver/oauth/create.js.map +1 -1
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +5 -5
- package/build/component/driver/oauth/update.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +3 -2
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/share/utils.d.ts.map +1 -1
- package/build/component/driver/share/utils.js +9 -7
- package/build/component/driver/share/utils.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +1 -1
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +7 -0
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +9 -3
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +11 -4
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +19 -1
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +130 -11
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts +10 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.js +5 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +4 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/ValidationResult.d.ts +6 -0
- package/build/component/driver/teamsApp/interfaces/ValidationResult.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +0 -2
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +19 -60
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.d.ts +3 -3
- package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.js +8 -8
- package/build/component/driver/teamsApp/syncManifest.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts +4 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +6 -3
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +2 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +120 -5
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +10 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts +17 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js +72 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js.map +1 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +1 -4
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +3 -25
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +16 -5
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +7 -0
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.js +23 -7
- package/build/component/driver/typeSpec/compile.js.map +1 -1
- package/build/component/driver/typeSpec/error/typeSpecCompileError.d.ts +5 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.d.ts.map +1 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.js +21 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.js.map +1 -0
- package/build/component/generator/combinedProject/generator.d.ts.map +1 -1
- package/build/component/generator/combinedProject/generator.js +9 -1
- package/build/component/generator/combinedProject/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/generator.d.ts +7 -0
- package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/generator.js +23 -15
- package/build/component/generator/declarativeAgent/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/helper.d.ts +52 -0
- package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/helper.js +469 -63
- package/build/component/generator/declarativeAgent/helper.js.map +1 -1
- package/build/component/generator/defaultGenerator.d.ts.map +1 -1
- package/build/component/generator/defaultGenerator.js +17 -1
- package/build/component/generator/defaultGenerator.js.map +1 -1
- package/build/component/generator/error.d.ts +3 -0
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +7 -1
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +12 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +16 -8
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts +13 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +159 -35
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +4 -0
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +6 -3
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts +8 -0
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.js +9 -4
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.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/openPlugin/authorParser.d.ts +8 -0
- package/build/component/generator/openPlugin/authorParser.d.ts.map +1 -0
- package/build/component/generator/openPlugin/authorParser.js +49 -0
- package/build/component/generator/openPlugin/authorParser.js.map +1 -0
- package/build/component/generator/openPlugin/deterministicId.d.ts +6 -0
- package/build/component/generator/openPlugin/deterministicId.d.ts.map +1 -0
- package/build/component/generator/openPlugin/deterministicId.js +31 -0
- package/build/component/generator/openPlugin/deterministicId.js.map +1 -0
- package/build/component/generator/openPlugin/exporter.d.ts +18 -0
- package/build/component/generator/openPlugin/exporter.d.ts.map +1 -0
- package/build/component/generator/openPlugin/exporter.js +233 -0
- package/build/component/generator/openPlugin/exporter.js.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts +8 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.js +62 -0
- package/build/component/generator/openPlugin/iconStrategy.js.map +1 -0
- package/build/component/generator/openPlugin/importer.d.ts +25 -0
- package/build/component/generator/openPlugin/importer.d.ts.map +1 -0
- package/build/component/generator/openPlugin/importer.js +140 -0
- package/build/component/generator/openPlugin/importer.js.map +1 -0
- package/build/component/generator/openPlugin/mapper.d.ts +6 -0
- package/build/component/generator/openPlugin/mapper.d.ts.map +1 -0
- package/build/component/generator/openPlugin/mapper.js +141 -0
- package/build/component/generator/openPlugin/mapper.js.map +1 -0
- package/build/component/generator/openPlugin/parser.d.ts +3 -0
- package/build/component/generator/openPlugin/parser.d.ts.map +1 -0
- package/build/component/generator/openPlugin/parser.js +153 -0
- package/build/component/generator/openPlugin/parser.js.map +1 -0
- package/build/component/generator/openPlugin/placeholderPng.d.ts +6 -0
- package/build/component/generator/openPlugin/placeholderPng.d.ts.map +1 -0
- package/build/component/generator/openPlugin/placeholderPng.js +71 -0
- package/build/component/generator/openPlugin/placeholderPng.js.map +1 -0
- package/build/component/generator/openPlugin/textUtils.d.ts +12 -0
- package/build/component/generator/openPlugin/textUtils.d.ts.map +1 -0
- package/build/component/generator/openPlugin/textUtils.js +43 -0
- package/build/component/generator/openPlugin/textUtils.js.map +1 -0
- package/build/component/generator/openPlugin/types.d.ts +128 -0
- package/build/component/generator/openPlugin/types.d.ts.map +1 -0
- package/build/component/generator/openPlugin/types.js.map +1 -0
- package/build/component/generator/other/tdpGenerator.d.ts +1 -0
- package/build/component/generator/other/tdpGenerator.d.ts.map +1 -1
- package/build/component/generator/other/tdpGenerator.js +24 -2
- package/build/component/generator/other/tdpGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -1
- package/build/component/generator/spfx/utils/utils.js +1 -1
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/templateHelper.d.ts +17 -2
- package/build/component/generator/templateHelper.d.ts.map +1 -1
- package/build/component/generator/templateHelper.js +36 -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 +51 -5
- package/build/component/generator/templates/metadata/index.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +6 -3
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +7 -2
- package/build/component/generator/templates/templateNames.js.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.js +4 -1
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +14 -8
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/generator/v4MetadataSource.d.ts +16 -0
- package/build/component/generator/v4MetadataSource.d.ts.map +1 -0
- package/build/component/generator/v4MetadataSource.js +35 -0
- package/build/component/generator/v4MetadataSource.js.map +1 -0
- package/build/component/generator/v4TemplateBridge.d.ts +55 -0
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -0
- package/build/component/generator/v4TemplateBridge.js +224 -0
- package/build/component/generator/v4TemplateBridge.js.map +1 -0
- package/build/component/local/localCertificateManager.d.ts +16 -1
- package/build/component/local/localCertificateManager.d.ts.map +1 -1
- package/build/component/local/localCertificateManager.js +47 -31
- package/build/component/local/localCertificateManager.js.map +1 -1
- package/build/component/m365/constants.d.ts +2 -1
- package/build/component/m365/constants.d.ts.map +1 -1
- package/build/component/m365/constants.js +1 -0
- package/build/component/m365/constants.js.map +1 -1
- package/build/component/m365/launchHelper.d.ts.map +1 -1
- package/build/component/m365/launchHelper.js +7 -2
- package/build/component/m365/launchHelper.js.map +1 -1
- package/build/component/m365/packageService.d.ts +7 -0
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +79 -13
- package/build/component/m365/packageService.js.map +1 -1
- package/build/component/m365/serviceConstant.d.ts.map +1 -1
- package/build/component/m365/serviceConstant.js +24 -4
- package/build/component/m365/serviceConstant.js.map +1 -1
- package/build/component/middleware/envMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +5 -0
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +5 -2
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +4 -0
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +8 -4
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/charsetUtils.js +3 -3
- package/build/component/utils/charsetUtils.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 +9 -0
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +31 -17
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +137 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -0
- package/build/component/utils/mcpAuthScaffolder.js +200 -0
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -0
- package/build/component/utils/mcpToolFetcher.d.ts +2 -0
- package/build/component/utils/mcpToolFetcher.d.ts.map +1 -0
- package/build/component/utils/mcpToolFetcher.js +7 -0
- package/build/component/utils/mcpToolFetcher.js.map +1 -0
- package/build/component/utils/metadataGraphPermssion.d.ts +4 -0
- package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
- package/build/component/utils/metadataGraphPermssion.js +7 -4
- package/build/component/utils/metadataGraphPermssion.js.map +1 -1
- package/build/component/utils/odrProvider.d.ts +1 -48
- package/build/component/utils/odrProvider.d.ts.map +1 -1
- package/build/component/utils/odrProvider.js +2 -94
- package/build/component/utils/odrProvider.js.map +1 -1
- package/build/core/FxCore.d.ts +45 -13
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +45 -1
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +747 -56
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +462 -305
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCore.openPlugin.d.ts +23 -0
- package/build/core/FxCore.openPlugin.d.ts.map +1 -0
- package/build/core/FxCore.openPlugin.js +131 -0
- package/build/core/FxCore.openPlugin.js.map +1 -0
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/createFrontDoorAdapters.d.ts +39 -0
- package/build/core/createFrontDoorAdapters.d.ts.map +1 -0
- package/build/core/createFrontDoorAdapters.js +210 -0
- package/build/core/createFrontDoorAdapters.js.map +1 -0
- package/build/core/createProjectFrontDoor.d.ts +49 -0
- package/build/core/createProjectFrontDoor.d.ts.map +1 -0
- package/build/core/createProjectFrontDoor.js +351 -0
- package/build/core/createProjectFrontDoor.js.map +1 -0
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +7 -10
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +9 -0
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/fileLocker.js +6 -6
- package/build/core/middleware/fileLocker.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts +1 -34
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +6 -245
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/modifyProjectFrontDoor.d.ts +27 -0
- package/build/core/modifyProjectFrontDoor.d.ts.map +1 -0
- package/build/core/modifyProjectFrontDoor.js +149 -0
- package/build/core/modifyProjectFrontDoor.js.map +1 -0
- package/build/core/v4ArtifactSnapshot.d.ts +5 -0
- package/build/core/v4ArtifactSnapshot.d.ts.map +1 -0
- package/build/core/v4ArtifactSnapshot.js +23 -0
- package/build/core/v4ArtifactSnapshot.js.map +1 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +3 -0
- package/build/error/common.js.map +1 -1
- package/build/error/teamsApp.d.ts +3 -0
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +15 -1
- package/build/error/teamsApp.js.map +1 -1
- package/build/error/teamsGraph.d.ts +5 -0
- package/build/error/teamsGraph.d.ts.map +1 -0
- package/build/error/teamsGraph.js +24 -0
- package/build/error/teamsGraph.js.map +1 -0
- package/build/index.d.ts +5 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +15 -2
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +1 -0
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +15 -8
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +18 -0
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +121 -14
- package/build/question/create.js.map +1 -1
- package/build/question/index.d.ts +1 -1
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +4 -4
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +17 -5
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/inputs/AddSkillInputs.d.ts +10 -0
- package/build/question/inputs/AddSkillInputs.d.ts.map +1 -0
- package/build/question/inputs/AddSkillInputs.js +5 -0
- package/build/question/inputs/AddSkillInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +19 -1
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/ExportOpenPluginInputs.d.ts +10 -0
- package/build/question/inputs/ExportOpenPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/ExportOpenPluginInputs.js +5 -0
- package/build/question/inputs/ExportOpenPluginInputs.js.map +1 -0
- package/build/question/inputs/ImportOpenPluginInputs.d.ts +28 -0
- package/build/question/inputs/ImportOpenPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/ImportOpenPluginInputs.js +5 -0
- package/build/question/inputs/ImportOpenPluginInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +4 -1
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +4 -1
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +38 -6
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/AddSkillOptions.d.ts +4 -0
- package/build/question/options/AddSkillOptions.d.ts.map +1 -0
- package/build/question/options/AddSkillOptions.js +47 -0
- package/build/question/options/AddSkillOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +53 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/ExportOpenPluginOptions.d.ts +4 -0
- package/build/question/options/ExportOpenPluginOptions.d.ts.map +1 -0
- package/build/question/options/ExportOpenPluginOptions.js +29 -0
- package/build/question/options/ExportOpenPluginOptions.js.map +1 -0
- package/build/question/options/ImportOpenPluginOptions.d.ts +4 -0
- package/build/question/options/ImportOpenPluginOptions.d.ts.map +1 -0
- package/build/question/options/ImportOpenPluginOptions.js +54 -0
- package/build/question/options/ImportOpenPluginOptions.js.map +1 -0
- package/build/question/options/index.d.ts +3 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +3 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +1 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +195 -17
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +14 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +13 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/commonNodes.d.ts.map +1 -1
- package/build/question/scaffold/commonNodes.js +14 -2
- package/build/question/scaffold/commonNodes.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 +55 -2
- package/build/question/scaffold/constructNode.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +3 -5
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +46 -46
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts +2 -0
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.js +9 -0
- package/build/question/scaffold/vsc/ProjectTypeOptions.js.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.js +3 -0
- package/build/question/scaffold/vsc/createRootNode.js.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -6
- package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/rootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/rootNode.js +17 -4
- package/build/question/scaffold/vsc/rootNode.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +66 -0
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +408 -21
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/question/share.js +3 -2
- package/build/question/share.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +10 -0
- package/build/ui/visitor.js.map +1 -1
- package/build/v4/buildTarget/parseSelector.d.ts +35 -0
- package/build/v4/buildTarget/parseSelector.d.ts.map +1 -0
- package/build/v4/buildTarget/parseSelector.js +226 -0
- package/build/v4/buildTarget/parseSelector.js.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts +85 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.js +260 -0
- package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -0
- package/build/v4/collectInputs/collectInputs.d.ts +151 -0
- package/build/v4/collectInputs/collectInputs.d.ts.map +1 -0
- package/build/v4/collectInputs/collectInputs.js +533 -0
- package/build/v4/collectInputs/collectInputs.js.map +1 -0
- package/build/v4/distribution/bundledFloor.d.ts +11 -0
- package/build/v4/distribution/bundledFloor.d.ts.map +1 -0
- package/build/v4/distribution/bundledFloor.js +114 -0
- package/build/v4/distribution/bundledFloor.js.map +1 -0
- package/build/v4/distribution/createQuestions.d.ts +6 -0
- package/build/v4/distribution/createQuestions.d.ts.map +1 -0
- package/build/v4/distribution/createQuestions.js +61 -0
- package/build/v4/distribution/createQuestions.js.map +1 -0
- package/build/v4/distribution/createSelector.d.ts +15 -0
- package/build/v4/distribution/createSelector.d.ts.map +1 -0
- package/build/v4/distribution/createSelector.js +115 -0
- package/build/v4/distribution/createSelector.js.map +1 -0
- package/build/v4/distribution/declarativePackage.d.ts +14 -0
- package/build/v4/distribution/declarativePackage.d.ts.map +1 -0
- package/build/v4/distribution/declarativePackage.js +165 -0
- package/build/v4/distribution/declarativePackage.js.map +1 -0
- package/build/v4/distribution/packageDir.d.ts +15 -0
- package/build/v4/distribution/packageDir.d.ts.map +1 -0
- package/build/v4/distribution/packageDir.js +101 -0
- package/build/v4/distribution/packageDir.js.map +1 -0
- 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/distribution/templateArtifacts.d.ts +61 -0
- package/build/v4/distribution/templateArtifacts.d.ts.map +1 -0
- package/build/v4/distribution/templateArtifacts.js +459 -0
- package/build/v4/distribution/templateArtifacts.js.map +1 -0
- package/build/v4/distribution/templateConfig.d.ts +43 -0
- package/build/v4/distribution/templateConfig.d.ts.map +1 -0
- package/build/v4/distribution/templateConfig.js +70 -0
- package/build/v4/distribution/templateConfig.js.map +1 -0
- package/build/v4/distribution/templatePackage.d.ts +6 -0
- package/build/v4/distribution/templatePackage.d.ts.map +1 -0
- package/build/v4/distribution/templatePackage.js +63 -0
- package/build/v4/distribution/templatePackage.js.map +1 -0
- package/build/v4/distribution/templateSource.d.ts +66 -0
- package/build/v4/distribution/templateSource.d.ts.map +1 -0
- package/build/v4/distribution/templateSource.js +233 -0
- package/build/v4/distribution/templateSource.js.map +1 -0
- package/build/v4/distribution/templateSourcePort.d.ts +27 -0
- package/build/v4/distribution/templateSourcePort.d.ts.map +1 -0
- package/build/v4/distribution/templateSourcePort.js +175 -0
- package/build/v4/distribution/templateSourcePort.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 +55 -0
- package/build/v4/expression/evaluateExpression.d.ts.map +1 -0
- package/build/v4/expression/evaluateExpression.js +338 -0
- package/build/v4/expression/evaluateExpression.js.map +1 -0
- package/build/v4/index.d.ts +41 -0
- package/build/v4/index.d.ts.map +1 -0
- package/build/v4/index.js +46 -0
- package/build/v4/index.js.map +1 -0
- 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/mcp/mcpStaticTools.d.ts +17 -0
- package/build/v4/mcp/mcpStaticTools.d.ts.map +1 -0
- package/build/v4/mcp/mcpStaticTools.js +70 -0
- package/build/v4/mcp/mcpStaticTools.js.map +1 -0
- package/build/v4/model/dataModel.d.ts +27 -0
- package/build/v4/model/dataModel.d.ts.map +1 -0
- package/build/v4/model/dataModel.js +5 -0
- package/build/v4/model/dataModel.js.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts +101 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.js +212 -0
- package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -0
- 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 +24 -0
- package/build/v4/renderContext/buildRenderContext.d.ts.map +1 -0
- package/build/v4/renderContext/buildRenderContext.js +75 -0
- package/build/v4/renderContext/buildRenderContext.js.map +1 -0
- 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 +21 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.js +43 -0
- package/build/v4/runtime/inMemoryRuntime.js.map +1 -0
- package/build/v4/runtime/packageParse.d.ts +13 -0
- package/build/v4/runtime/packageParse.d.ts.map +1 -0
- package/build/v4/runtime/packageParse.js +235 -0
- package/build/v4/runtime/packageParse.js.map +1 -0
- package/build/v4/runtime/realRuntime.d.ts +11 -0
- package/build/v4/runtime/realRuntime.d.ts.map +1 -0
- package/build/v4/runtime/realRuntime.js +64 -0
- package/build/v4/runtime/realRuntime.js.map +1 -0
- package/build/v4/runtime/renderMustache.d.ts +7 -0
- package/build/v4/runtime/renderMustache.d.ts.map +1 -0
- package/build/v4/runtime/renderMustache.js +54 -0
- package/build/v4/runtime/renderMustache.js.map +1 -0
- package/build/v4/runtime/runtimeRegistry.d.ts +28 -0
- package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -0
- package/build/v4/runtime/runtimeRegistry.js +165 -0
- package/build/v4/runtime/runtimeRegistry.js.map +1 -0
- package/build/v4/runtime/scaffold.d.ts +31 -0
- package/build/v4/runtime/scaffold.d.ts.map +1 -0
- package/build/v4/runtime/scaffold.js +34 -0
- package/build/v4/runtime/scaffold.js.map +1 -0
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts +7 -0
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts.map +1 -0
- package/build/v4/runtime/scaffoldFromPackageDir.js +43 -0
- package/build/v4/runtime/scaffoldFromPackageDir.js.map +1 -0
- package/build/v4/runtime/selectLanguageContent.d.ts +7 -0
- package/build/v4/runtime/selectLanguageContent.d.ts.map +1 -0
- package/build/v4/runtime/selectLanguageContent.js +39 -0
- package/build/v4/runtime/selectLanguageContent.js.map +1 -0
- package/build/v4/runtime/steps/daAction.d.ts +6 -0
- package/build/v4/runtime/steps/daAction.d.ts.map +1 -0
- package/build/v4/runtime/steps/daAction.js +41 -0
- package/build/v4/runtime/steps/daAction.js.map +1 -0
- 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 +13 -0
- package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpAuth.js +90 -0
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -0
- package/build/v4/runtime/steps/mcpLocal.d.ts +6 -0
- package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpLocal.js +93 -0
- package/build/v4/runtime/steps/mcpLocal.js.map +1 -0
- package/build/v4/runtime/steps/mcpStatic.d.ts +10 -0
- package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpStatic.js +182 -0
- package/build/v4/runtime/steps/mcpStatic.js.map +1 -0
- package/build/v4/runtime/steps/metaOs.d.ts +10 -0
- package/build/v4/runtime/steps/metaOs.d.ts.map +1 -0
- package/build/v4/runtime/steps/metaOs.js +422 -0
- package/build/v4/runtime/steps/metaOs.js.map +1 -0
- package/build/v4/runtime/steps/officeAddin.d.ts +4 -0
- package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -0
- package/build/v4/runtime/steps/officeAddin.js +168 -0
- package/build/v4/runtime/steps/officeAddin.js.map +1 -0
- package/build/v4/runtime/steps/openApi.d.ts +6 -0
- package/build/v4/runtime/steps/openApi.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApi.js +389 -0
- package/build/v4/runtime/steps/openApi.js.map +1 -0
- 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 +41 -0
- package/build/v4/runtime/whitelist.d.ts.map +1 -0
- package/build/v4/runtime/whitelist.js +211 -0
- package/build/v4/runtime/whitelist.js.map +1 -0
- 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 +51 -0
- package/build/v4/surface/createInputs.d.ts.map +1 -0
- package/build/v4/surface/createInputs.js +153 -0
- package/build/v4/surface/createInputs.js.map +1 -0
- package/build/v4/surface/createSelectorWalk.d.ts +26 -0
- package/build/v4/surface/createSelectorWalk.d.ts.map +1 -0
- package/build/v4/surface/createSelectorWalk.js +143 -0
- package/build/v4/surface/createSelectorWalk.js.map +1 -0
- package/build/v4/surface/deriveCreateOptions.d.ts +5 -0
- package/build/v4/surface/deriveCreateOptions.d.ts.map +1 -0
- package/build/v4/surface/deriveCreateOptions.js +212 -0
- package/build/v4/surface/deriveCreateOptions.js.map +1 -0
- 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 +12 -0
- package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -0
- package/build/v4/surface/modifySelectorWalk.js +115 -0
- package/build/v4/surface/modifySelectorWalk.js.map +1 -0
- package/build/v4/surface/uiPromptUI.d.ts +5 -0
- package/build/v4/surface/uiPromptUI.d.ts.map +1 -0
- package/build/v4/surface/uiPromptUI.js +220 -0
- package/build/v4/surface/uiPromptUI.js.map +1 -0
- 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 +83 -0
- package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -0
- package/build/v4/validation/validateTemplatePackage.js +313 -0
- package/build/v4/validation/validateTemplatePackage.js.map +1 -0
- 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 +46 -97
- package/resource/package.nls.cs.json +1176 -1095
- package/resource/package.nls.de.json +1176 -1095
- package/resource/package.nls.es.json +1176 -1095
- package/resource/package.nls.fr.json +1176 -1095
- package/resource/package.nls.it.json +1176 -1095
- package/resource/package.nls.ja.json +1176 -1095
- package/resource/package.nls.json +116 -28
- package/resource/package.nls.ko.json +1176 -1095
- package/resource/package.nls.pl.json +1176 -1095
- package/resource/package.nls.pt-BR.json +1176 -1095
- package/resource/package.nls.ru.json +1176 -1095
- package/resource/package.nls.tr.json +1176 -1095
- package/resource/package.nls.zh-Hans.json +1176 -1095
- package/resource/package.nls.zh-Hant.json +1176 -1095
- package/resource/templates/package.nls.cs.json +39 -24
- package/resource/templates/package.nls.de.json +37 -22
- package/resource/templates/package.nls.es.json +35 -20
- package/resource/templates/package.nls.fr.json +45 -30
- package/resource/templates/package.nls.it.json +42 -27
- package/resource/templates/package.nls.ja.json +35 -20
- package/resource/templates/package.nls.json +27 -12
- package/resource/templates/package.nls.ko.json +33 -18
- package/resource/templates/package.nls.pl.json +38 -23
- package/resource/templates/package.nls.pt-BR.json +34 -19
- package/resource/templates/package.nls.ru.json +33 -18
- package/resource/templates/package.nls.tr.json +38 -23
- package/resource/templates/package.nls.zh-Hans.json +44 -29
- package/resource/templates/package.nls.zh-Hant.json +45 -30
- package/resource/templates/package.nls.zh-cn.json +7 -8
- package/resource/templates/package.nls.zh-tw.json +7 -8
- package/resource/yaml-schema/v1.11/yaml.schema.json +3 -0
- package/resource/yaml-schema/v1.12/yaml.schema.json +2132 -0
- package/resource/yaml-schema/v1.13/yaml.schema.json +2193 -0
- package/resource/yaml-schema/yaml.schema.json +127 -2
- package/templates/configs/playground/typescript/.vscode/tasks.json +1 -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 +32 -16
- package/templates/metadata/defaultGeneratorTemplates.json +8 -0
- package/templates/metadata.zip +0 -0
- package/templates/ui/ceaNode.json +30 -0
- package/templates/ui/tdpNode.json +13 -14
- package/templates/ui/teamsNode.json +124 -0
- package/templates/ui/wizardNode.json +56 -46
- package/templates/v4/create-selector.json +392 -0
- package/templates/v4/floor.json +3 -0
- package/templates/v4/modify-selector.json +78 -0
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
- package/build/core/middleware/projectMigratorV3.d.ts +0 -39
- package/build/core/middleware/projectMigratorV3.d.ts.map +0 -1
- package/build/core/middleware/projectMigratorV3.js +0 -694
- package/build/core/middleware/projectMigratorV3.js.map +0 -1
- package/build/core/middleware/projectVersionChecker.d.ts +0 -3
- package/build/core/middleware/projectVersionChecker.d.ts.map +0 -1
- package/build/core/middleware/projectVersionChecker.js +0 -60
- package/build/core/middleware/projectVersionChecker.js.map +0 -1
- package/build/core/middleware/types.d.ts +0 -9
- package/build/core/middleware/types.d.ts.map +0 -1
- package/build/core/middleware/types.js.map +0 -1
- package/build/core/middleware/utils/MigrationUtils.d.ts +0 -13
- package/build/core/middleware/utils/MigrationUtils.d.ts.map +0 -1
- package/build/core/middleware/utils/MigrationUtils.js +0 -212
- package/build/core/middleware/utils/MigrationUtils.js.map +0 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts +0 -34
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +0 -1
- package/build/core/middleware/utils/appYmlGenerator.js +0 -158
- package/build/core/middleware/utils/appYmlGenerator.js.map +0 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts +0 -65
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +0 -61
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +0 -1
- package/build/core/middleware/utils/debug/constants.d.ts +0 -20
- package/build/core/middleware/utils/debug/constants.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/constants.js +0 -28
- package/build/core/middleware/utils/debug/constants.js.map +0 -1
- package/build/core/middleware/utils/debug/debugMigrationContext.d.ts +0 -14
- package/build/core/middleware/utils/debug/debugMigrationContext.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/debugMigrationContext.js +0 -23
- package/build/core/middleware/utils/debug/debugMigrationContext.js.map +0 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts +0 -37
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +0 -291
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +0 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts +0 -22
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +0 -935
- package/build/core/middleware/utils/debug/taskMigrator.js.map +0 -1
- package/build/core/middleware/utils/migrationContext.d.ts +0 -32
- package/build/core/middleware/utils/migrationContext.d.ts.map +0 -1
- package/build/core/middleware/utils/migrationContext.js +0 -104
- package/build/core/middleware/utils/migrationContext.js.map +0 -1
- package/templates/configs/local/typescript/.gitignore +0 -1
- package/templates/configs/playground/typescript/.gitignore +0 -4
- /package/build/{core/middleware → component/generator/openPlugin}/types.js +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.applyIcons = applyIcons;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
8
|
+
const path = tslib_1.__importStar(require("path"));
|
|
9
|
+
const placeholderPng_1 = require("./placeholderPng");
|
|
10
|
+
const COLOR_FILL = [0x4a, 0x90, 0xd9];
|
|
11
|
+
const OUTLINE_FILL = [0xff, 0xff, 0xff];
|
|
12
|
+
/**
|
|
13
|
+
* Write color.png and outline.png into the appPackage directory. Resolution
|
|
14
|
+
* order matches the conversion plan: user-supplied root PNG → Open Plugin
|
|
15
|
+
* `logo` (when it is a local .png) → generated placeholder.
|
|
16
|
+
*/
|
|
17
|
+
async function applyIcons(parsed, appPackageDir, warnings) {
|
|
18
|
+
const colorDest = path.join(appPackageDir, "color.png");
|
|
19
|
+
const outlineDest = path.join(appPackageDir, "outline.png");
|
|
20
|
+
if (parsed.hasColorPng) {
|
|
21
|
+
await fs_extra_1.default.copy(path.join(parsed.pluginRoot, "color.png"), colorDest);
|
|
22
|
+
}
|
|
23
|
+
else if (typeof parsed.manifest.logo === "string" && parsed.manifest.logo) {
|
|
24
|
+
const applied = await tryApplyLogo(parsed, colorDest, warnings);
|
|
25
|
+
if (!applied) {
|
|
26
|
+
await fs_extra_1.default.writeFile(colorDest, (0, placeholderPng_1.generatePlaceholderPng)(192, ...COLOR_FILL));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
await fs_extra_1.default.writeFile(colorDest, (0, placeholderPng_1.generatePlaceholderPng)(192, ...COLOR_FILL));
|
|
31
|
+
}
|
|
32
|
+
if (parsed.hasOutlinePng) {
|
|
33
|
+
await fs_extra_1.default.copy(path.join(parsed.pluginRoot, "outline.png"), outlineDest);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
await fs_extra_1.default.writeFile(outlineDest, (0, placeholderPng_1.generatePlaceholderPng)(32, ...OUTLINE_FILL));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function tryApplyLogo(parsed, colorDest, warnings) {
|
|
40
|
+
const logo = parsed.manifest.logo;
|
|
41
|
+
if (/^https?:\/\//i.test(logo)) {
|
|
42
|
+
warnings.push(`'logo' field points to a remote URL (${logo}); using placeholder color.png. Download manually if you want to ship the original.`);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
if (!/\.png$/i.test(logo)) {
|
|
46
|
+
warnings.push(`'logo' field '${logo}' is not a .png file; using placeholder color.png.`);
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const logoAbs = path.resolve(parsed.pluginRoot, logo);
|
|
50
|
+
const relativeToRoot = path.relative(parsed.pluginRoot, logoAbs);
|
|
51
|
+
if (relativeToRoot.startsWith("..") || path.isAbsolute(relativeToRoot)) {
|
|
52
|
+
warnings.push(`'logo' field '${logo}' resolves outside the plugin root; using placeholder color.png.`);
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (!(await fs_extra_1.default.pathExists(logoAbs))) {
|
|
56
|
+
warnings.push(`'logo' field '${logo}' does not exist; using placeholder color.png.`);
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
await fs_extra_1.default.copy(logoAbs, colorDest);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=iconStrategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconStrategy.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/iconStrategy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAelC,gCAwBC;;AArCD,gEAA0B;AAC1B,mDAA6B;AAC7B,qDAA0D;AAG1D,MAAM,UAAU,GAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChE,MAAM,YAAY,GAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAElE;;;;GAIG;AACI,KAAK,UAAU,UAAU,CAC9B,MAAwB,EACxB,aAAqB,EACrB,QAAkB;IAElB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACxD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAE5D,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,MAAM,kBAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,C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iB,IAAI,oDAAoD,CAAC,CAAC;QACzF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjE,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QACvE,QAAQ,CAAC,IAAI,CACX,iBAAiB,IAAI,kEAAkE,CACxF,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,IAAI,gDAAgD,CAAC,CAAC;QACrF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,kBAAE,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FxError, Result } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { ImportInputs } from "./types";
|
|
3
|
+
export declare const OPEN_PLUGIN_IMPORT_SOURCE = "OpenPluginImport";
|
|
4
|
+
export interface ImportResult {
|
|
5
|
+
projectPath: string;
|
|
6
|
+
warnings: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Import an Open Plugin / Claude Code plugin / Cursor plugin directory into
|
|
10
|
+
* a scaffolded Microsoft 365 Agents Toolkit project. The output is a usable
|
|
11
|
+
* ATK project; run `atk teamsapp package` from inside it to produce the
|
|
12
|
+
* upload zip.
|
|
13
|
+
*
|
|
14
|
+
* Static baseline files (m365agents.yml, README, .gitignore, .vscode, env)
|
|
15
|
+
* come from the `open-plugin-import` template, which ships in the standard
|
|
16
|
+
* template release pipeline and can be updated independently of fx-core.
|
|
17
|
+
* Variable-length outputs (manifest, skill folders, icons) are written as
|
|
18
|
+
* the post-scaffold step here.
|
|
19
|
+
*/
|
|
20
|
+
export declare function importOpenPlugin(inputs: ImportInputs): Promise<Result<ImportResult, FxError>>;
|
|
21
|
+
export declare function stripDisallowedFrontmatter(source: string): {
|
|
22
|
+
content: string;
|
|
23
|
+
removedKeys: string[];
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=importer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importer.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/importer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAM,MAAM,EAA0B,MAAM,wBAAwB,CAAC;AAU1F,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAuExC;AAqCD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAsBA"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.OPEN_PLUGIN_IMPORT_SOURCE = void 0;
|
|
6
|
+
exports.importOpenPlugin = importOpenPlugin;
|
|
7
|
+
exports.stripDisallowedFrontmatter = stripDisallowedFrontmatter;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
10
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
12
|
+
const path = tslib_1.__importStar(require("path"));
|
|
13
|
+
const globalVars_1 = require("../../../common/globalVars");
|
|
14
|
+
const generator_1 = require("../generator");
|
|
15
|
+
const templateNames_1 = require("../templates/templateNames");
|
|
16
|
+
const iconStrategy_1 = require("./iconStrategy");
|
|
17
|
+
const mapper_1 = require("./mapper");
|
|
18
|
+
const parser_1 = require("./parser");
|
|
19
|
+
exports.OPEN_PLUGIN_IMPORT_SOURCE = "OpenPluginImport";
|
|
20
|
+
/**
|
|
21
|
+
* Import an Open Plugin / Claude Code plugin / Cursor plugin directory into
|
|
22
|
+
* a scaffolded Microsoft 365 Agents Toolkit project. The output is a usable
|
|
23
|
+
* ATK project; run `atk teamsapp package` from inside it to produce the
|
|
24
|
+
* upload zip.
|
|
25
|
+
*
|
|
26
|
+
* Static baseline files (m365agents.yml, README, .gitignore, .vscode, env)
|
|
27
|
+
* come from the `open-plugin-import` template, which ships in the standard
|
|
28
|
+
* template release pipeline and can be updated independently of fx-core.
|
|
29
|
+
* Variable-length outputs (manifest, skill folders, icons) are written as
|
|
30
|
+
* the post-scaffold step here.
|
|
31
|
+
*/
|
|
32
|
+
async function importOpenPlugin(inputs) {
|
|
33
|
+
try {
|
|
34
|
+
if (!inputs.path) {
|
|
35
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError(exports.OPEN_PLUGIN_IMPORT_SOURCE, "MissingPluginPath", "--path is required."));
|
|
36
|
+
}
|
|
37
|
+
const parsed = await (0, parser_1.readOpenPluginDir)(inputs.path);
|
|
38
|
+
const { manifest, copyOps, warnings } = (0, mapper_1.mapToTtkProject)(parsed, inputs);
|
|
39
|
+
const defaultOutput = path.join(process.cwd(), parsed.manifest.name);
|
|
40
|
+
const projectPath = path.resolve(inputs.output ?? defaultOutput);
|
|
41
|
+
if (await fs_extra_1.default.pathExists(projectPath)) {
|
|
42
|
+
const entries = await fs_extra_1.default.readdir(projectPath);
|
|
43
|
+
if (entries.length > 0) {
|
|
44
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError(exports.OPEN_PLUGIN_IMPORT_SOURCE, "OutputDirectoryNotEmpty", `Output directory is not empty: ${projectPath}. Choose a different --output path or empty the directory.`));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// 1. Scaffold the static baseline from the open-plugin-import template.
|
|
48
|
+
const ctx = (0, globalVars_1.createContext)();
|
|
49
|
+
ctx.templateVariables = { appName: parsed.manifest.name };
|
|
50
|
+
const scaffoldRes = await generator_1.Generator.generateTemplate(ctx, projectPath, templateNames_1.TemplateNames.OpenPluginImport, "common");
|
|
51
|
+
if (scaffoldRes.isErr())
|
|
52
|
+
return (0, teamsfx_api_1.err)(scaffoldRes.error);
|
|
53
|
+
// 2. Post-scaffold: write the dynamic outputs.
|
|
54
|
+
const appPackageDir = path.join(projectPath, "appPackage");
|
|
55
|
+
await fs_extra_1.default.ensureDir(appPackageDir);
|
|
56
|
+
// Manifest (vDevPreview agentSkills/agentConnectors are variable-length).
|
|
57
|
+
await fs_extra_1.default.writeJSON(path.join(appPackageDir, "manifest.json"), manifest, { spaces: 4 });
|
|
58
|
+
// Copy skill folders and (when present) the commands folder.
|
|
59
|
+
for (const op of copyOps) {
|
|
60
|
+
await fs_extra_1.default.copy(op.src, path.join(projectPath, op.destRelative));
|
|
61
|
+
}
|
|
62
|
+
// Strip SKILL.md frontmatter fields that Teams Developer Portal rejects.
|
|
63
|
+
// Allowed: name, description, license, metadata, compatibility.
|
|
64
|
+
await sanitizeSkillFiles(path.join(appPackageDir, "skills"), warnings);
|
|
65
|
+
// Icons.
|
|
66
|
+
await (0, iconStrategy_1.applyIcons)(parsed, appPackageDir, warnings);
|
|
67
|
+
return (0, teamsfx_api_1.ok)({ projectPath, warnings });
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
if (e instanceof teamsfx_api_1.UserError || e instanceof teamsfx_api_1.SystemError) {
|
|
71
|
+
return (0, teamsfx_api_1.err)(e);
|
|
72
|
+
}
|
|
73
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
74
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.SystemError({
|
|
75
|
+
source: exports.OPEN_PLUGIN_IMPORT_SOURCE,
|
|
76
|
+
name: "ImportOpenPluginFailed",
|
|
77
|
+
message,
|
|
78
|
+
displayMessage: message,
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Teams Developer Portal accepts only these SKILL.md frontmatter keys.
|
|
83
|
+
const ALLOWED_SKILL_FRONTMATTER_KEYS = new Set([
|
|
84
|
+
"name",
|
|
85
|
+
"description",
|
|
86
|
+
"license",
|
|
87
|
+
"metadata",
|
|
88
|
+
"compatibility",
|
|
89
|
+
]);
|
|
90
|
+
/**
|
|
91
|
+
* Walk every `skills/<name>/SKILL.md` and remove top-level frontmatter keys
|
|
92
|
+
* that aren't on the M365 allow-list (e.g. Claude-specific `user-invocable`,
|
|
93
|
+
* `argument-hint`). Records each removal as a warning. Files without a
|
|
94
|
+
* frontmatter block are left untouched.
|
|
95
|
+
*/
|
|
96
|
+
async function sanitizeSkillFiles(skillsRoot, warnings) {
|
|
97
|
+
if (!(await fs_extra_1.default.pathExists(skillsRoot)))
|
|
98
|
+
return;
|
|
99
|
+
const entries = await fs_extra_1.default.readdir(skillsRoot, { withFileTypes: true });
|
|
100
|
+
for (const entry of entries) {
|
|
101
|
+
if (!entry.isDirectory())
|
|
102
|
+
continue;
|
|
103
|
+
const skillMd = path.join(skillsRoot, entry.name, "SKILL.md");
|
|
104
|
+
if (!(await fs_extra_1.default.pathExists(skillMd)))
|
|
105
|
+
continue;
|
|
106
|
+
const original = await fs_extra_1.default.readFile(skillMd, "utf8");
|
|
107
|
+
const { content, removedKeys } = stripDisallowedFrontmatter(original);
|
|
108
|
+
if (removedKeys.length > 0) {
|
|
109
|
+
await fs_extra_1.default.writeFile(skillMd, content, "utf8");
|
|
110
|
+
warnings.push(`Removed unsupported SKILL.md frontmatter field(s) from skills/${entry.name}: ${removedKeys.join(", ")}.`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function stripDisallowedFrontmatter(source) {
|
|
115
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/.exec(source);
|
|
116
|
+
if (!match)
|
|
117
|
+
return { content: source, removedKeys: [] };
|
|
118
|
+
const parsed = js_yaml_1.default.load(match[1]);
|
|
119
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
120
|
+
return { content: source, removedKeys: [] };
|
|
121
|
+
}
|
|
122
|
+
const obj = parsed;
|
|
123
|
+
const removedKeys = [];
|
|
124
|
+
const kept = {};
|
|
125
|
+
for (const key of Object.keys(obj)) {
|
|
126
|
+
if (ALLOWED_SKILL_FRONTMATTER_KEYS.has(key)) {
|
|
127
|
+
kept[key] = obj[key];
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
removedKeys.push(key);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (removedKeys.length === 0)
|
|
134
|
+
return { content: source, removedKeys: [] };
|
|
135
|
+
const dumped = js_yaml_1.default.dump(kept, { lineWidth: -1 }).replace(/\n$/, "");
|
|
136
|
+
const trailing = match[2] || "\n";
|
|
137
|
+
const rebuilt = `---\n${dumped}\n---${trailing}` + source.slice(match[0].length);
|
|
138
|
+
return { content: rebuilt, removedKeys };
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=importer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importer.js","sourceRoot":"","sources":["../../../../src/component/generator/open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W,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;IAC1E,MAAM,MAAM,GAAG,iBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IAClC,MAAM,OAAO,GAAG,QAAQ,MAAM,QAAQ,QAAQ,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACjF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ImportInputs, MappedManifest, ParsedOpenPlugin } from "./types";
|
|
2
|
+
export declare const MANIFEST_SCHEMA_URL = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json";
|
|
3
|
+
export declare const MANIFEST_VERSION = "devPreview";
|
|
4
|
+
export declare const ACCENT_COLOR = "#4A90D9";
|
|
5
|
+
export declare function mapToTtkProject(parsed: ParsedOpenPlugin, inputs: ImportInputs): MappedManifest;
|
|
6
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/mapper.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,YAAY,EACZ,cAAc,EAEd,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,mBAAmB,8FAC6D,CAAC;AAC9F,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,YAAY,YAAY,CAAC;AAQtC,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,GAAG,cAAc,CAsG9F"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ACCENT_COLOR = exports.MANIFEST_VERSION = exports.MANIFEST_SCHEMA_URL = void 0;
|
|
6
|
+
exports.mapToTtkProject = mapToTtkProject;
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
const path = tslib_1.__importStar(require("path"));
|
|
9
|
+
const authorParser_1 = require("./authorParser");
|
|
10
|
+
const deterministicId_1 = require("./deterministicId");
|
|
11
|
+
const textUtils_1 = require("./textUtils");
|
|
12
|
+
exports.MANIFEST_SCHEMA_URL = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json";
|
|
13
|
+
exports.MANIFEST_VERSION = "devPreview";
|
|
14
|
+
exports.ACCENT_COLOR = "#4A90D9";
|
|
15
|
+
const NAME_SHORT_MAX = 30;
|
|
16
|
+
const NAME_FULL_MAX = 100;
|
|
17
|
+
const DESC_SHORT_MAX = 80;
|
|
18
|
+
const DESC_FULL_MAX = 4000;
|
|
19
|
+
const MAX_AGENT_CONNECTORS = 10;
|
|
20
|
+
function mapToTtkProject(parsed, inputs) {
|
|
21
|
+
const warnings = [...parsed.warnings];
|
|
22
|
+
const pj = parsed.manifest;
|
|
23
|
+
const pluginName = pj.name;
|
|
24
|
+
const ext = parsed.atkExtension ?? {};
|
|
25
|
+
if (inputs.packageName !== undefined) {
|
|
26
|
+
warnings.push("--package-name was provided but the devPreview manifest schema does not include 'packageName'; ignored.");
|
|
27
|
+
}
|
|
28
|
+
const author = (0, authorParser_1.parseAuthor)(pj.author);
|
|
29
|
+
const websiteUrl = inputs.websiteUrl ?? ext.developer?.websiteUrl ?? pj.homepage ?? author.url;
|
|
30
|
+
if (!websiteUrl) {
|
|
31
|
+
throw new Error("developer.websiteUrl could not be resolved. Set 'homepage' in plugin.json, 'author.url', or pass --website-url.");
|
|
32
|
+
}
|
|
33
|
+
const privacyUrl = inputs.privacyUrl ?? ext.developer?.privacyUrl;
|
|
34
|
+
if (!privacyUrl) {
|
|
35
|
+
throw new Error("developer.privacyUrl is required. Pass --privacy-url (Open Plugin spec has no equivalent field).");
|
|
36
|
+
}
|
|
37
|
+
const termsUrl = inputs.termsUrl ?? ext.developer?.termsOfUseUrl;
|
|
38
|
+
if (!termsUrl) {
|
|
39
|
+
throw new Error("developer.termsOfUseUrl is required. Pass --terms-url (Open Plugin spec has no equivalent field).");
|
|
40
|
+
}
|
|
41
|
+
const idSeed = inputs.packageName ?? ext.packageName ?? `openplugin:${pluginName}`;
|
|
42
|
+
const appId = inputs.appId ?? ext.id ?? (0, deterministicId_1.deterministicAppId)(idSeed);
|
|
43
|
+
const displayName = (0, textUtils_1.toTitleCaseFromKebab)(pluginName);
|
|
44
|
+
const shortName = ext.name?.short ?? (0, textUtils_1.truncateAtWordBoundary)(displayName, NAME_SHORT_MAX);
|
|
45
|
+
const fullName = ext.name?.full ?? (0, textUtils_1.truncateAtWordBoundary)(displayName, NAME_FULL_MAX);
|
|
46
|
+
const description = pj.description ?? pluginName;
|
|
47
|
+
const shortDesc = ext.description?.short ?? (0, textUtils_1.truncateAtWordBoundary)(description, DESC_SHORT_MAX);
|
|
48
|
+
const fullDesc = ext.description?.full ?? (0, textUtils_1.truncateAtWordBoundary)(description, DESC_FULL_MAX);
|
|
49
|
+
const agentSkills = parsed.skills.map((folder) => ({ folder: `./skills/${folder}` }));
|
|
50
|
+
const agentConnectors = buildAgentConnectors(parsed.mcpServers, pluginName, inputs.defaultAuthType ?? "Auto", ext.agentConnectors, warnings);
|
|
51
|
+
if (agentConnectors.length > MAX_AGENT_CONNECTORS) {
|
|
52
|
+
throw new Error(`Too many MCP servers: ${agentConnectors.length}. The manifest caps agentConnectors at ${MAX_AGENT_CONNECTORS}.`);
|
|
53
|
+
}
|
|
54
|
+
const developer = {
|
|
55
|
+
name: ext.developer?.name ?? author.name ?? "Unknown",
|
|
56
|
+
websiteUrl,
|
|
57
|
+
privacyUrl,
|
|
58
|
+
termsOfUseUrl: termsUrl,
|
|
59
|
+
};
|
|
60
|
+
const accentColor = ext.accentColor ?? exports.ACCENT_COLOR;
|
|
61
|
+
const manifest = {
|
|
62
|
+
$schema: exports.MANIFEST_SCHEMA_URL,
|
|
63
|
+
manifestVersion: ext.manifestVersion ?? exports.MANIFEST_VERSION,
|
|
64
|
+
version: pj.version ?? "1.0.0",
|
|
65
|
+
id: appId,
|
|
66
|
+
};
|
|
67
|
+
manifest.developer = developer;
|
|
68
|
+
manifest.name = { short: shortName, full: fullName };
|
|
69
|
+
manifest.description = { short: shortDesc, full: fullDesc };
|
|
70
|
+
manifest.icons = { color: "color.png", outline: "outline.png" };
|
|
71
|
+
manifest.accentColor = accentColor;
|
|
72
|
+
if (agentSkills.length > 0) {
|
|
73
|
+
manifest.agentSkills = agentSkills;
|
|
74
|
+
}
|
|
75
|
+
if (agentConnectors.length > 0) {
|
|
76
|
+
manifest.agentConnectors = agentConnectors;
|
|
77
|
+
}
|
|
78
|
+
const copyOps = [];
|
|
79
|
+
if (parsed.skillsRoot) {
|
|
80
|
+
for (const skill of parsed.skills) {
|
|
81
|
+
copyOps.push({
|
|
82
|
+
src: path.join(parsed.skillsRoot, skill),
|
|
83
|
+
destRelative: `appPackage/skills/${skill}`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (parsed.commandsRoot && parsed.commands.length > 0) {
|
|
88
|
+
copyOps.push({
|
|
89
|
+
src: parsed.commandsRoot,
|
|
90
|
+
destRelative: "appPackage/commands",
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return { manifest, copyOps, warnings };
|
|
94
|
+
}
|
|
95
|
+
function buildAgentConnectors(mcpServers, pluginName, defaultAuth, extOverrides, warnings) {
|
|
96
|
+
const out = [];
|
|
97
|
+
const serverNames = Object.keys(mcpServers).sort();
|
|
98
|
+
for (const name of serverNames) {
|
|
99
|
+
const server = mcpServers[name];
|
|
100
|
+
const url = typeof server.url === "string" ? server.url.trim() : "";
|
|
101
|
+
if (!url) {
|
|
102
|
+
warnings.push(`Skipping MCP server '${name}': no URL found (stdio servers require manual localMcpServer configuration).`);
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
const override = extOverrides?.[name];
|
|
106
|
+
const authType = override?.authorization?.type ?? resolveAuthType(url, defaultAuth);
|
|
107
|
+
const authorization = { type: authType };
|
|
108
|
+
if (authType !== "None") {
|
|
109
|
+
authorization.referenceId =
|
|
110
|
+
override?.authorization?.referenceId ?? `${pluginName}-${name}-auth`;
|
|
111
|
+
}
|
|
112
|
+
const description = override?.description ??
|
|
113
|
+
(typeof server.description === "string" && server.description
|
|
114
|
+
? server.description
|
|
115
|
+
: `Remote MCP server providing tools for ${pluginName}`);
|
|
116
|
+
out.push({
|
|
117
|
+
id: name,
|
|
118
|
+
displayName: override?.displayName ?? `${name} MCP Server`,
|
|
119
|
+
description,
|
|
120
|
+
toolSource: {
|
|
121
|
+
remoteMcpServer: {
|
|
122
|
+
mcpServerUrl: url,
|
|
123
|
+
authorization,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
function resolveAuthType(url, defaultAuth) {
|
|
131
|
+
if (defaultAuth !== "Auto") {
|
|
132
|
+
return defaultAuth;
|
|
133
|
+
}
|
|
134
|
+
const isHttps = /^https:\/\//i.test(url);
|
|
135
|
+
const isLocal = /localhost|127\.0\.0\.1/.test(url);
|
|
136
|
+
if (isHttps && !isLocal) {
|
|
137
|
+
return "OAuthPluginVault";
|
|
138
|
+
}
|
|
139
|
+
return "None";
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/mapper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA4BlC,0CAsGC;;AAhID,mDAA6B;AAC7B,iDAA6C;AAC7C,uDAAuD;AACvD,2CAA2E;AAY9D,QAAA,mBAAmB,GAC9B,2FAA2F,CAAC;AACjF,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,YAAY,GAAG,SAAS,CAAC;AAEtC,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,SAAgB,eAAe,CAAC,MAAwB,EAAE,MAAoB;IAC5E,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3B,MAAM,UAAU,GAAG,EAAE,CAAC,IAAI,CAAC;IAC3B,MAAM,GAAG,GAAsB,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;IAEzD,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACrC,QAAQ,CAAC,IAAI,CACX,yGAAyG,CAC1G,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAA,0BAAW,EAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,GAAG,CAAC,SAAS,EAAE,UAAU,IAAI,EAAE,CAAC,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC;IAC/F,IAAI,CAAC,UAAU,EAAE,CAAC;Q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M,OAAO,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnD,IAAI,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/parser.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAoCjB,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA+H/E"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.readOpenPluginDir = readOpenPluginDir;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
8
|
+
const path = tslib_1.__importStar(require("path"));
|
|
9
|
+
const MANIFEST_LOCATIONS = [
|
|
10
|
+
{ relPath: ".plugin/plugin.json", kind: "open-plugin" },
|
|
11
|
+
{ relPath: ".claude-plugin/plugin.json", kind: "claude-plugin" },
|
|
12
|
+
{ relPath: ".cursor-plugin/plugin.json", kind: "cursor-plugin" },
|
|
13
|
+
];
|
|
14
|
+
const SKILL_NAME_RE = /^[a-z0-9][a-z0-9-_]*$/;
|
|
15
|
+
const UNMAPPED_FIELDS = [
|
|
16
|
+
"agents",
|
|
17
|
+
"hooks",
|
|
18
|
+
"rules",
|
|
19
|
+
"lspServers",
|
|
20
|
+
"outputStyles",
|
|
21
|
+
];
|
|
22
|
+
function requireStringPathOverride(value, field) {
|
|
23
|
+
if (value === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (typeof value === "string") {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`Open Plugin '${field}' override is set to a non-string value. Only the single-string form ` +
|
|
30
|
+
`(e.g. \"${field}\": \"./custom/path\") is supported by this converter today.`);
|
|
31
|
+
}
|
|
32
|
+
async function readOpenPluginDir(root) {
|
|
33
|
+
const warnings = [];
|
|
34
|
+
const absRoot = path.resolve(root);
|
|
35
|
+
if (!(await fs_extra_1.default.pathExists(absRoot))) {
|
|
36
|
+
throw new Error(`Plugin directory not found: ${absRoot}`);
|
|
37
|
+
}
|
|
38
|
+
// 1. Probe manifest locations.
|
|
39
|
+
let manifestPath;
|
|
40
|
+
let manifestKind;
|
|
41
|
+
for (const loc of MANIFEST_LOCATIONS) {
|
|
42
|
+
const candidate = path.join(absRoot, loc.relPath);
|
|
43
|
+
if (await fs_extra_1.default.pathExists(candidate)) {
|
|
44
|
+
manifestPath = candidate;
|
|
45
|
+
manifestKind = loc.kind;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (!manifestPath || !manifestKind) {
|
|
50
|
+
throw new Error(`No Open Plugin manifest found in ${absRoot}. Looked for: ` +
|
|
51
|
+
MANIFEST_LOCATIONS.map((l) => l.relPath).join(", "));
|
|
52
|
+
}
|
|
53
|
+
const manifest = (await fs_extra_1.default.readJSON(manifestPath));
|
|
54
|
+
if (!manifest.name || typeof manifest.name !== "string") {
|
|
55
|
+
throw new Error(`plugin.json is missing required 'name' field at ${manifestPath}`);
|
|
56
|
+
}
|
|
57
|
+
// 2. MCP servers (with optional path override).
|
|
58
|
+
const mcpRel = requireStringPathOverride(manifest.mcpServers, "mcpServers") ?? ".mcp.json";
|
|
59
|
+
const mcpAbs = path.resolve(absRoot, mcpRel);
|
|
60
|
+
const mcpServers = {};
|
|
61
|
+
if (await fs_extra_1.default.pathExists(mcpAbs)) {
|
|
62
|
+
const mcpJson = (await fs_extra_1.default.readJSON(mcpAbs));
|
|
63
|
+
const source = mcpJson &&
|
|
64
|
+
typeof mcpJson === "object" &&
|
|
65
|
+
mcpJson.mcpServers &&
|
|
66
|
+
typeof mcpJson.mcpServers === "object"
|
|
67
|
+
? mcpJson.mcpServers
|
|
68
|
+
: mcpJson;
|
|
69
|
+
if (source && typeof source === "object") {
|
|
70
|
+
for (const [name, value] of Object.entries(source)) {
|
|
71
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
72
|
+
mcpServers[name] = value;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// 3. Skills.
|
|
78
|
+
const skillsRel = requireStringPathOverride(manifest.skills, "skills") ?? "skills";
|
|
79
|
+
const skillsAbs = path.resolve(absRoot, skillsRel);
|
|
80
|
+
const skills = [];
|
|
81
|
+
let skillsRoot;
|
|
82
|
+
if (await fs_extra_1.default.pathExists(skillsAbs)) {
|
|
83
|
+
skillsRoot = skillsAbs;
|
|
84
|
+
const entries = await fs_extra_1.default.readdir(skillsAbs, { withFileTypes: true });
|
|
85
|
+
for (const entry of entries) {
|
|
86
|
+
if (!entry.isDirectory()) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (!SKILL_NAME_RE.test(entry.name)) {
|
|
90
|
+
warnings.push(`Skipping skill folder '${entry.name}': name does not match ${SKILL_NAME_RE.source}.`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const skillMd = path.join(skillsAbs, entry.name, "SKILL.md");
|
|
94
|
+
if (await fs_extra_1.default.pathExists(skillMd)) {
|
|
95
|
+
skills.push(entry.name);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
skills.sort();
|
|
99
|
+
}
|
|
100
|
+
// 4. Commands.
|
|
101
|
+
const commandsRel = requireStringPathOverride(manifest.commands, "commands") ?? "commands";
|
|
102
|
+
const commandsAbs = path.resolve(absRoot, commandsRel);
|
|
103
|
+
const commands = [];
|
|
104
|
+
let commandsRoot;
|
|
105
|
+
if (await fs_extra_1.default.pathExists(commandsAbs)) {
|
|
106
|
+
commandsRoot = commandsAbs;
|
|
107
|
+
const entries = await fs_extra_1.default.readdir(commandsAbs, { withFileTypes: true });
|
|
108
|
+
for (const entry of entries) {
|
|
109
|
+
if (entry.isFile() && entry.name.toLowerCase().endsWith(".md")) {
|
|
110
|
+
commands.push(entry.name);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
commands.sort();
|
|
114
|
+
}
|
|
115
|
+
// 5. Unmapped Open Plugin fields → emit a warning so the caller knows we
|
|
116
|
+
// dropped them. We do not throw — the spec says hosts may ignore unknown
|
|
117
|
+
// component types.
|
|
118
|
+
const manifestRecord = manifest;
|
|
119
|
+
for (const field of UNMAPPED_FIELDS) {
|
|
120
|
+
if (manifestRecord[field] !== undefined) {
|
|
121
|
+
warnings.push(`Open Plugin '${field}' field is present but not supported by MOS3 today; dropped.`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// 6. Icons.
|
|
125
|
+
const hasColorPng = await fs_extra_1.default.pathExists(path.join(absRoot, "color.png"));
|
|
126
|
+
const hasOutlinePng = await fs_extra_1.default.pathExists(path.join(absRoot, "outline.png"));
|
|
127
|
+
// 7. Round-trip extension block (written by `atk export openplugin`).
|
|
128
|
+
const atkExtension = readAtkExtensionBlock(manifest);
|
|
129
|
+
return {
|
|
130
|
+
pluginRoot: absRoot,
|
|
131
|
+
manifest,
|
|
132
|
+
manifestPath,
|
|
133
|
+
manifestKind,
|
|
134
|
+
mcpServers,
|
|
135
|
+
skills,
|
|
136
|
+
skillsRoot,
|
|
137
|
+
commands,
|
|
138
|
+
commandsRoot,
|
|
139
|
+
hasColorPng,
|
|
140
|
+
hasOutlinePng,
|
|
141
|
+
warnings,
|
|
142
|
+
atkExtension,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const ATK_EXTENSION_KEY = "x-microsoft-365-agents-toolkit";
|
|
146
|
+
function readAtkExtensionBlock(manifest) {
|
|
147
|
+
const raw = manifest[ATK_EXTENSION_KEY];
|
|
148
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
return raw;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/parser.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA8ClC,8CA+HC;;AA3KD,gEAA0B;AAC1B,mDAA6B;AAc7B,MAAM,kBAAkB,GAAuB;IAC7C,EAAE,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAE,aAAa,EAAE;IACvD,EAAE,OAAO,EAAE,4BAA4B,EAAE,IAAI,EAAE,eAAe,EAAE;IAChE,EAAE,OAAO,EAAE,4BAA4B,EAAE,IAAI,EAAE,eAAe,EAAE;CACjE,CAAC;AAEF,MAAM,aAAa,GAAG,uBAAuB,CAAC;AAE9C,MAAM,eAAe,GAAoC;IACvD,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,cAAc;CACf,CAAC;AAEF,SAAS,yBAAyB,CAAC,KAAc,EAAE,KAAa;IAC9D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,KAAK,CACb,gBAAgB,KAAK,uEAAuE;QAC1F,WAAW,KAAK,8DAA8D,CACjF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,iBAAiB,CAAC,IAAY;IAClD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,CA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,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a square solid-color RGB PNG of the given size.
|
|
3
|
+
* Produces minimal valid PNG bytes; no external dependencies.
|
|
4
|
+
*/
|
|
5
|
+
export declare function generatePlaceholderPng(size: number, r: number, g: number, b: number): Buffer;
|
|
6
|
+
//# sourceMappingURL=placeholderPng.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholderPng.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/placeholderPng.ts"],"names":[],"mappings":"AAqCA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAkC5F"}
|