@microsoft/teamsfx-core 3.0.13 → 3.0.14-alpha.0890e15c35.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/teamsDevPortalClient.d.ts +7 -2
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +63 -59
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/client/teamsGraphClient.d.ts +6 -3
- package/build/client/teamsGraphClient.d.ts.map +1 -1
- package/build/client/teamsGraphClient.js +20 -3
- package/build/client/teamsGraphClient.js.map +1 -1
- package/build/common/daSpecParser.d.ts +16 -1
- package/build/common/daSpecParser.d.ts.map +1 -1
- package/build/common/daSpecParser.js +34 -21
- package/build/common/daSpecParser.js.map +1 -1
- package/build/common/featureFlags.d.ts +22 -2
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +31 -3
- 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/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/projectSettingsHelper.d.ts +0 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -56
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/telemetry.d.ts +4 -15
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +7 -20
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +9 -2
- package/build/common/tools.d.ts +6 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +13 -8
- package/build/common/tools.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts +1 -1
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +12 -13
- 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/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 +4 -0
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +10 -3
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/deps-checker/internal/funcToolChecker.d.ts +6 -0
- package/build/component/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/component/deps-checker/internal/funcToolChecker.js +15 -12
- 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.d.ts +12 -0
- package/build/component/deps-checker/internal/testToolChecker.d.ts.map +1 -1
- package/build/component/deps-checker/internal/testToolChecker.js +23 -14
- package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +11 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +21 -12
- 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.d.ts +9 -0
- package/build/component/driver/add/addWebPart.d.ts.map +1 -1
- package/build/component/driver/add/addWebPart.js +13 -7
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/arm/util/handleError.d.ts +5 -0
- package/build/component/driver/arm/util/handleError.d.ts.map +1 -1
- package/build/component/driver/arm/util/handleError.js +10 -5
- 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 +8 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +15 -10
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.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 +13 -1
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +16 -8
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/oauth/update.d.ts +6 -0
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +8 -4
- package/build/component/driver/oauth/update.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +6 -0
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +9 -4
- 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/constants.d.ts +4 -3
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +4 -3
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +8 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +113 -13
- 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/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 +4 -2
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +9 -55
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.d.ts +16 -3
- package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.js +28 -18
- 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 +113 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +5 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +14 -3
- 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/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/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +12 -2
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts +12 -0
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.js +17 -8
- package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
- package/build/component/driver/typeSpec/compile.d.ts +9 -0
- package/build/component/driver/typeSpec/compile.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.js +16 -10
- package/build/component/driver/typeSpec/compile.js.map +1 -1
- package/build/component/generator/declarativeAgent/generator.d.ts +8 -0
- package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/generator.js +16 -10
- package/build/component/generator/declarativeAgent/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/helper.d.ts +31 -0
- package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/helper.js +237 -34
- 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 +14 -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 +9 -0
- 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 +12 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +53 -3
- 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 +9 -0
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.js +11 -5
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.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/spfx/utils/constants.d.ts +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -1
- package/build/component/generator/templateHelper.d.ts +15 -0
- package/build/component/generator/templateHelper.d.ts.map +1 -1
- package/build/component/generator/templateHelper.js +28 -0
- package/build/component/generator/templateHelper.js.map +1 -1
- package/build/component/generator/templates/metadata/index.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/index.js +12 -5
- package/build/component/generator/templates/metadata/index.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +4 -1
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +5 -0
- 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.js +8 -8
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/generator/v4MetadataSource.d.ts +23 -0
- package/build/component/generator/v4MetadataSource.d.ts.map +1 -0
- package/build/component/generator/v4MetadataSource.js +42 -0
- package/build/component/generator/v4MetadataSource.js.map +1 -0
- package/build/component/generator/v4TemplateBridge.d.ts +40 -0
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -0
- package/build/component/generator/v4TemplateBridge.js +125 -0
- package/build/component/generator/v4TemplateBridge.js.map +1 -0
- package/build/component/local/localCertificateManager.d.ts +17 -1
- package/build/component/local/localCertificateManager.d.ts.map +1 -1
- package/build/component/local/localCertificateManager.js +48 -31
- package/build/component/local/localCertificateManager.js.map +1 -1
- package/build/component/m365/packageService.d.ts +10 -0
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +55 -13
- package/build/component/m365/packageService.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/utils/ResourceGroupHelper.d.ts +4 -0
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +7 -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/fileOperation.d.ts +10 -0
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +27 -17
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +106 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -0
- package/build/component/utils/mcpAuthScaffolder.js +153 -0
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -0
- package/build/component/utils/mcpToolFetcher.d.ts +12 -1
- package/build/component/utils/mcpToolFetcher.d.ts.map +1 -1
- package/build/component/utils/mcpToolFetcher.js +23 -3
- package/build/component/utils/mcpToolFetcher.js.map +1 -1
- 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 +6 -0
- package/build/component/utils/odrProvider.d.ts.map +1 -1
- package/build/component/utils/odrProvider.js +9 -4
- package/build/component/utils/odrProvider.js.map +1 -1
- package/build/core/FxCore.d.ts +46 -4
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +9 -0
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +286 -174
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +443 -140
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCore.openPlugin.d.ts +29 -0
- package/build/core/FxCore.openPlugin.d.ts.map +1 -0
- package/build/core/FxCore.openPlugin.js +135 -0
- package/build/core/FxCore.openPlugin.js.map +1 -0
- package/build/core/collaborator.d.ts +4 -0
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +6 -3
- package/build/core/collaborator.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts +9 -0
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +14 -11
- 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.d.ts +6 -0
- package/build/core/middleware/fileLocker.d.ts.map +1 -1
- package/build/core/middleware/fileLocker.js +11 -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/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/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +1 -6
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +8 -1
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +24 -15
- package/build/question/create.js.map +1 -1
- package/build/question/index.d.ts +1 -0
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +3 -0
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +1 -1
- 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 +7 -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 +3 -0
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +3 -0
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddPluginOptions.js +1 -1
- 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 +17 -2
- 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 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +152 -35
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +10 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +9 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +1 -0
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +11 -0
- 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/daProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -3
- package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/rootNode.js +6 -4
- package/build/question/scaffold/vsc/rootNode.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +32 -0
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +136 -36
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/question/share.d.ts +7 -0
- package/build/question/share.d.ts.map +1 -1
- package/build/question/share.js +7 -3
- package/build/question/share.js.map +1 -1
- package/build/v4/distribution/bundledFloor.d.ts +12 -0
- package/build/v4/distribution/bundledFloor.d.ts.map +1 -0
- package/build/v4/distribution/bundledFloor.js +80 -0
- package/build/v4/distribution/bundledFloor.js.map +1 -0
- package/build/v4/distribution/templateConfig.d.ts +79 -0
- package/build/v4/distribution/templateConfig.d.ts.map +1 -0
- package/build/v4/distribution/templateConfig.js +81 -0
- package/build/v4/distribution/templateConfig.js.map +1 -0
- package/build/v4/distribution/templatePackage.d.ts +29 -0
- package/build/v4/distribution/templatePackage.d.ts.map +1 -0
- package/build/v4/distribution/templatePackage.js +82 -0
- package/build/v4/distribution/templatePackage.js.map +1 -0
- package/build/v4/distribution/templateSource.d.ts +67 -0
- package/build/v4/distribution/templateSource.d.ts.map +1 -0
- package/build/v4/distribution/templateSource.js +220 -0
- package/build/v4/distribution/templateSource.js.map +1 -0
- package/build/v4/distribution/templateSourcePort.d.ts +50 -0
- package/build/v4/distribution/templateSourcePort.d.ts.map +1 -0
- package/build/v4/distribution/templateSourcePort.js +207 -0
- package/build/v4/distribution/templateSourcePort.js.map +1 -0
- package/build/v4/index.d.ts +13 -0
- package/build/v4/index.d.ts.map +1 -0
- package/build/v4/index.js +18 -0
- package/build/v4/index.js.map +1 -0
- package/package.json +18 -79
- package/resource/package.nls.cs.json +42 -14
- package/resource/package.nls.de.json +43 -15
- package/resource/package.nls.es.json +42 -14
- package/resource/package.nls.fr.json +42 -14
- package/resource/package.nls.it.json +43 -15
- package/resource/package.nls.ja.json +42 -14
- package/resource/package.nls.json +64 -14
- package/resource/package.nls.ko.json +42 -14
- package/resource/package.nls.pl.json +43 -15
- package/resource/package.nls.pt-BR.json +42 -14
- package/resource/package.nls.ru.json +43 -15
- package/resource/package.nls.tr.json +44 -16
- package/resource/package.nls.zh-Hans.json +42 -14
- package/resource/package.nls.zh-Hant.json +54 -26
- package/resource/templates/package.nls.cs.json +2 -0
- package/resource/templates/package.nls.de.json +2 -0
- package/resource/templates/package.nls.es.json +2 -0
- package/resource/templates/package.nls.fr.json +2 -0
- package/resource/templates/package.nls.it.json +2 -0
- package/resource/templates/package.nls.ja.json +2 -0
- package/resource/templates/package.nls.json +5 -0
- package/resource/templates/package.nls.ko.json +2 -0
- package/resource/templates/package.nls.pl.json +2 -0
- package/resource/templates/package.nls.pt-BR.json +2 -0
- package/resource/templates/package.nls.ru.json +2 -0
- package/resource/templates/package.nls.tr.json +2 -0
- package/resource/templates/package.nls.zh-Hans.json +2 -0
- package/resource/templates/package.nls.zh-Hant.json +2 -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 +124 -2
- 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 -0
- package/templates/metadata/defaultGeneratorTemplates.json +8 -0
- package/templates/metadata.zip +0 -0
- package/templates/ui/tdpNode.json +8 -2
- package/templates/ui/wizardNode.json +34 -2
- package/templates/v4/floor.json +3 -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/build/{core/middleware → component/generator/openPlugin}/types.js +0 -0
|
@@ -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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ACR,WAAW,EAAE,QAAQ,EAAE,WAAW,IAAI,GAAG,IAAI,aAAa;YAC1D,WAAW;YACX,UAAU,EAAE;gBACV,eAAe,EAAE;oBACf,YAAY,EAAE,GAAG;oBACjB,aAAa;iBACd;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,eAAe,CAAC,GAAW,EAAE,WAAuC;IAC3E,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,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,KA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AAQ;QACR,YAAY;QACZ,WAAW;QACX,aAAa;QACb,QAAQ;QACR,YAAY;KACb,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG,gCAAgC,CAAC;AAE3D,SAAS,qBAAqB,CAAC,QAA4B;IACzD,MAAM,GAAG,GAAI,QAA+C,CAAC,iBAAiB,CAAC,CAAC;IAChF,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,GAAwB,CAAC;AAClC,CAAC"}
|
|
@@ -0,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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.generatePlaceholderPng = generatePlaceholderPng;
|
|
6
|
+
const zlib_1 = require("zlib");
|
|
7
|
+
// PNG file signature.
|
|
8
|
+
const PNG_SIGNATURE = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
9
|
+
const CRC_TABLE = (() => {
|
|
10
|
+
const table = new Uint32Array(256);
|
|
11
|
+
for (let n = 0; n < 256; n++) {
|
|
12
|
+
let c = n;
|
|
13
|
+
for (let k = 0; k < 8; k++) {
|
|
14
|
+
c = (c & 1) !== 0 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
|
15
|
+
}
|
|
16
|
+
table[n] = c >>> 0;
|
|
17
|
+
}
|
|
18
|
+
return table;
|
|
19
|
+
})();
|
|
20
|
+
function crc32(data) {
|
|
21
|
+
let crc = 0xffffffff;
|
|
22
|
+
for (let i = 0; i < data.length; i++) {
|
|
23
|
+
crc = (crc >>> 8) ^ CRC_TABLE[(crc ^ data[i]) & 0xff];
|
|
24
|
+
}
|
|
25
|
+
return (crc ^ 0xffffffff) >>> 0;
|
|
26
|
+
}
|
|
27
|
+
function chunk(type, data) {
|
|
28
|
+
const typeBuf = Buffer.from(type, "ascii");
|
|
29
|
+
const lenBuf = Buffer.alloc(4);
|
|
30
|
+
lenBuf.writeUInt32BE(data.length, 0);
|
|
31
|
+
const crcBuf = Buffer.alloc(4);
|
|
32
|
+
crcBuf.writeUInt32BE(crc32(Buffer.concat([typeBuf, data])), 0);
|
|
33
|
+
return Buffer.concat([lenBuf, typeBuf, data, crcBuf]);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generate a square solid-color RGB PNG of the given size.
|
|
37
|
+
* Produces minimal valid PNG bytes; no external dependencies.
|
|
38
|
+
*/
|
|
39
|
+
function generatePlaceholderPng(size, r, g, b) {
|
|
40
|
+
if (size <= 0 || !Number.isInteger(size)) {
|
|
41
|
+
throw new Error(`generatePlaceholderPng: size must be a positive integer, got ${size}`);
|
|
42
|
+
}
|
|
43
|
+
const ihdr = Buffer.alloc(13);
|
|
44
|
+
ihdr.writeUInt32BE(size, 0);
|
|
45
|
+
ihdr.writeUInt32BE(size, 4);
|
|
46
|
+
ihdr[8] = 8; // bit depth
|
|
47
|
+
ihdr[9] = 2; // color type RGB
|
|
48
|
+
ihdr[10] = 0; // compression
|
|
49
|
+
ihdr[11] = 0; // filter
|
|
50
|
+
ihdr[12] = 0; // interlace
|
|
51
|
+
const rowBytes = 1 + size * 3;
|
|
52
|
+
const raw = Buffer.alloc(rowBytes * size);
|
|
53
|
+
for (let y = 0; y < size; y++) {
|
|
54
|
+
const rowOffset = y * rowBytes;
|
|
55
|
+
raw[rowOffset] = 0; // none filter
|
|
56
|
+
for (let x = 0; x < size; x++) {
|
|
57
|
+
const pixelOffset = rowOffset + 1 + x * 3;
|
|
58
|
+
raw[pixelOffset] = r;
|
|
59
|
+
raw[pixelOffset + 1] = g;
|
|
60
|
+
raw[pixelOffset + 2] = b;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const idat = (0, zlib_1.deflateSync)(raw);
|
|
64
|
+
return Buffer.concat([
|
|
65
|
+
PNG_SIGNATURE,
|
|
66
|
+
chunk("IHDR", ihdr),
|
|
67
|
+
chunk("IDAT", idat),
|
|
68
|
+
chunk("IEND", Buffer.alloc(0)),
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=placeholderPng.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholderPng.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/placeholderPng.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAwClC,wDAkCC;AAxED,+BAAmC;AAEnC,sBAAsB;AACtB,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEpF,MAAM,SAAS,GAAgB,CAAC,GAAG,EAAE;IACnC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC;IACnC,KAAK,IAAI,CAA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C,GAAG,QAAQ,CAAC;QAC/B,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc;QAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9B,MAAM,WAAW,GAAG,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC1C,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACrB,GAAG,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACzB,GAAG,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,MAAM,IAAI,GAAG,IAAA,kBAAW,EAAC,GAAG,CAAC,CAAC;IAE9B,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,aAAa;QACb,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;QACnB,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;QACnB,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAC/B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Truncate `text` to at most `maxLength` characters, preferring a word
|
|
3
|
+
* boundary when the cut would land mid-word. If no usable boundary exists
|
|
4
|
+
* within the first 50% of the limit, falls back to a hard cut.
|
|
5
|
+
*/
|
|
6
|
+
export declare function truncateAtWordBoundary(text: string | undefined, maxLength: number): string;
|
|
7
|
+
/**
|
|
8
|
+
* Convert a kebab-case identifier to a Title Case display name.
|
|
9
|
+
* Empty segments and stray dashes are ignored.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toTitleCaseFromKebab(name: string | undefined): string;
|
|
12
|
+
//# sourceMappingURL=textUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textUtils.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAgB1F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CASrE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.truncateAtWordBoundary = truncateAtWordBoundary;
|
|
6
|
+
exports.toTitleCaseFromKebab = toTitleCaseFromKebab;
|
|
7
|
+
/**
|
|
8
|
+
* Truncate `text` to at most `maxLength` characters, preferring a word
|
|
9
|
+
* boundary when the cut would land mid-word. If no usable boundary exists
|
|
10
|
+
* within the first 50% of the limit, falls back to a hard cut.
|
|
11
|
+
*/
|
|
12
|
+
function truncateAtWordBoundary(text, maxLength) {
|
|
13
|
+
if (!text) {
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
if (text.length <= maxLength) {
|
|
17
|
+
return text;
|
|
18
|
+
}
|
|
19
|
+
const truncated = text.substring(0, maxLength);
|
|
20
|
+
if (/\s/.test(text.charAt(maxLength))) {
|
|
21
|
+
return truncated.trimEnd();
|
|
22
|
+
}
|
|
23
|
+
const lastSpace = truncated.lastIndexOf(" ");
|
|
24
|
+
if (lastSpace > Math.floor(maxLength * 0.5)) {
|
|
25
|
+
return truncated.substring(0, lastSpace).trimEnd();
|
|
26
|
+
}
|
|
27
|
+
return truncated.trimEnd();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Convert a kebab-case identifier to a Title Case display name.
|
|
31
|
+
* Empty segments and stray dashes are ignored.
|
|
32
|
+
*/
|
|
33
|
+
function toTitleCaseFromKebab(name) {
|
|
34
|
+
if (!name) {
|
|
35
|
+
return "";
|
|
36
|
+
}
|
|
37
|
+
return name
|
|
38
|
+
.split("-")
|
|
39
|
+
.filter((part) => part.length > 0)
|
|
40
|
+
.map((part) => part.charAt(0).toUpperCase() + part.substring(1).toLowerCase())
|
|
41
|
+
.join(" ");
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=textUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textUtils.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,wDAgBC;AAMD,oDASC;AApCD;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,IAAwB,EAAE,SAAiB;IAChF,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC/C,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;QACtC,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IACD,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;IACrD,CAAC;IACD,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,IAAwB;IAC3D,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACjC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SAC7E,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export interface OpenPluginAuthorObject {
|
|
2
|
+
name?: string;
|
|
3
|
+
email?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface OpenPluginManifest {
|
|
7
|
+
name: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
author?: string | OpenPluginAuthorObject;
|
|
11
|
+
homepage?: string;
|
|
12
|
+
repository?: string;
|
|
13
|
+
license?: string;
|
|
14
|
+
logo?: string;
|
|
15
|
+
keywords?: string[];
|
|
16
|
+
skills?: string | string[] | Record<string, unknown>;
|
|
17
|
+
commands?: string | string[] | Record<string, unknown>;
|
|
18
|
+
agents?: string | string[] | Record<string, unknown>;
|
|
19
|
+
hooks?: string | string[] | Record<string, unknown>;
|
|
20
|
+
mcpServers?: string | string[] | Record<string, unknown>;
|
|
21
|
+
lspServers?: string | string[] | Record<string, unknown>;
|
|
22
|
+
rules?: string | string[] | Record<string, unknown>;
|
|
23
|
+
outputStyles?: string | string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ParsedAuthor {
|
|
26
|
+
name?: string;
|
|
27
|
+
email?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface OpenPluginMcpServerEntry {
|
|
31
|
+
url?: string;
|
|
32
|
+
type?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface OpenPluginMcpJson {
|
|
37
|
+
mcpServers?: Record<string, OpenPluginMcpServerEntry>;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface ParsedOpenPlugin {
|
|
41
|
+
pluginRoot: string;
|
|
42
|
+
manifest: OpenPluginManifest;
|
|
43
|
+
manifestPath: string;
|
|
44
|
+
manifestKind: "open-plugin" | "claude-plugin" | "cursor-plugin";
|
|
45
|
+
mcpServers: Record<string, OpenPluginMcpServerEntry>;
|
|
46
|
+
skills: string[];
|
|
47
|
+
skillsRoot?: string;
|
|
48
|
+
commands: string[];
|
|
49
|
+
commandsRoot?: string;
|
|
50
|
+
hasColorPng: boolean;
|
|
51
|
+
hasOutlinePng: boolean;
|
|
52
|
+
warnings: string[];
|
|
53
|
+
/** Round-trip metadata produced by `atk export openplugin`, when present. */
|
|
54
|
+
atkExtension?: AtkExtensionBlock;
|
|
55
|
+
}
|
|
56
|
+
export type AuthorizationType = "None" | "OAuthPluginVault" | "ApiKeyPluginVault";
|
|
57
|
+
export type DefaultAuthOption = "Auto" | AuthorizationType;
|
|
58
|
+
/**
|
|
59
|
+
* Extension block embedded under `x-microsoft-365-agents-toolkit` in plugin.json
|
|
60
|
+
* by `atk export openplugin`. Carries every field that the Open Plugin Spec
|
|
61
|
+
* cannot natively represent so that re-importing reconstructs the original
|
|
62
|
+
* project losslessly. All fields are optional — the importer treats missing
|
|
63
|
+
* keys the same way it treats a plugin.json without this extension at all.
|
|
64
|
+
*/
|
|
65
|
+
export interface AtkExtensionBlock {
|
|
66
|
+
manifestVersion?: string;
|
|
67
|
+
id?: string;
|
|
68
|
+
packageName?: string;
|
|
69
|
+
accentColor?: string;
|
|
70
|
+
developer?: {
|
|
71
|
+
name?: string;
|
|
72
|
+
websiteUrl?: string;
|
|
73
|
+
privacyUrl?: string;
|
|
74
|
+
termsOfUseUrl?: string;
|
|
75
|
+
};
|
|
76
|
+
name?: {
|
|
77
|
+
short?: string;
|
|
78
|
+
full?: string;
|
|
79
|
+
};
|
|
80
|
+
description?: {
|
|
81
|
+
short?: string;
|
|
82
|
+
full?: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Per-agentConnector overrides preserved verbatim: the keys are the
|
|
86
|
+
* connector ids (matching the .mcp.json server name). Values store the
|
|
87
|
+
* fields .mcp.json cannot carry: displayName, description, authorization.
|
|
88
|
+
*/
|
|
89
|
+
agentConnectors?: Record<string, AtkAgentConnectorExt>;
|
|
90
|
+
}
|
|
91
|
+
export interface AtkAgentConnectorExt {
|
|
92
|
+
displayName?: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
authorization?: {
|
|
95
|
+
type: AuthorizationType;
|
|
96
|
+
referenceId?: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export interface ImportInputs {
|
|
100
|
+
path: string;
|
|
101
|
+
output?: string;
|
|
102
|
+
/** Optional when plugin.json carries an x-microsoft-365-agents-toolkit block. */
|
|
103
|
+
privacyUrl?: string;
|
|
104
|
+
/** Optional when plugin.json carries an x-microsoft-365-agents-toolkit block. */
|
|
105
|
+
termsUrl?: string;
|
|
106
|
+
websiteUrl?: string;
|
|
107
|
+
appId?: string;
|
|
108
|
+
defaultAuthType?: DefaultAuthOption;
|
|
109
|
+
packageName?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ExportInputs {
|
|
112
|
+
/** Path to the existing ATK project (folder that contains appPackage/manifest.json). */
|
|
113
|
+
path: string;
|
|
114
|
+
/** Destination open-plugin directory. Defaults to ./<plugin-name>-openplugin. */
|
|
115
|
+
output?: string;
|
|
116
|
+
/** Manifest kind to emit. Defaults to 'open-plugin' (.plugin/plugin.json). */
|
|
117
|
+
manifestKind?: "open-plugin" | "claude-plugin" | "cursor-plugin";
|
|
118
|
+
}
|
|
119
|
+
export interface CopyOp {
|
|
120
|
+
src: string;
|
|
121
|
+
destRelative: string;
|
|
122
|
+
}
|
|
123
|
+
export interface MappedManifest {
|
|
124
|
+
manifest: Record<string, unknown>;
|
|
125
|
+
copyOps: CopyOp[];
|
|
126
|
+
warnings: string[];
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAGpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,G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MAAM,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/types.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
|
|
@@ -16,7 +16,7 @@ export declare class Constants {
|
|
|
16
16
|
static readonly TEAMS_APP_NAME_MAX_LENGTH = 30;
|
|
17
17
|
static readonly YO_RC_VERSION = "version";
|
|
18
18
|
static readonly YO_RC_FILE = ".yo-rc.json";
|
|
19
|
-
static readonly DEFAULT_NODE_VERSION = "
|
|
19
|
+
static readonly DEFAULT_NODE_VERSION = "22";
|
|
20
20
|
static readonly PACKAGE_JSON_FILE = "package.json";
|
|
21
21
|
}
|
|
22
22
|
export declare class ProgressTitleMessage {
|
|
@@ -23,7 +23,7 @@ class Constants {
|
|
|
23
23
|
static TEAMS_APP_NAME_MAX_LENGTH = 30;
|
|
24
24
|
static YO_RC_VERSION = "version";
|
|
25
25
|
static YO_RC_FILE = ".yo-rc.json";
|
|
26
|
-
static DEFAULT_NODE_VERSION = "
|
|
26
|
+
static DEFAULT_NODE_VERSION = "22";
|
|
27
27
|
static PACKAGE_JSON_FILE = "package.json";
|
|
28
28
|
}
|
|
29
29
|
exports.Constants = Constants;
|