@oneuptime/common 14.0.9 → 14.0.10
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/Models/DatabaseModels/AutoRemediationSuggestion.ts +60 -0
- package/Models/DatabaseModels/CephCluster.ts +213 -0
- package/Models/DatabaseModels/DatabaseServer.ts +213 -0
- package/Models/DatabaseModels/DockerHost.ts +213 -0
- package/Models/DatabaseModels/DockerSwarmCluster.ts +213 -0
- package/Models/DatabaseModels/GlobalConfig.ts +1 -1
- package/Models/DatabaseModels/Host.ts +213 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/PodmanHost.ts +213 -0
- package/Models/DatabaseModels/ProxmoxCluster.ts +213 -0
- package/Models/DatabaseModels/ResourceAiAgent.ts +419 -0
- package/Models/DatabaseModels/RunnerJob.ts +144 -0
- package/Models/DatabaseModels/VMwareVCenter.ts +213 -0
- package/Server/API/AutoRemediationAPI.ts +392 -1
- package/Server/API/ResourceAiAccessAPI.ts +1669 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1796300000000-AddResourceAiAgents.ts +423 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +2 -0
- package/Server/Infrastructure/Semaphore.ts +22 -0
- package/Server/Middleware/TelemetryIngest.ts +15 -5
- package/Server/Services/AnalyticsDatabaseService.ts +45 -1
- package/Server/Services/AutoRemediationRuleEngineService.ts +940 -112
- package/Server/Services/CephClusterService.ts +109 -1
- package/Server/Services/DatabaseServerService.ts +116 -1
- package/Server/Services/DockerHostService.ts +109 -1
- package/Server/Services/DockerSwarmClusterService.ts +113 -1
- package/Server/Services/HostService.ts +126 -4
- package/Server/Services/MetricRecordingRuleService.ts +47 -0
- package/Server/Services/PodmanHostService.ts +109 -1
- package/Server/Services/ProxmoxClusterService.ts +110 -1
- package/Server/Services/ResourceAiAccessService.ts +1439 -0
- package/Server/Services/ResourceAiAgentJobService.ts +202 -0
- package/Server/Services/ResourceAiAgentService.ts +2432 -0
- package/Server/Services/RunnerJobService.ts +611 -4
- package/Server/Services/TelemetryUsageBillingService.ts +28 -0
- package/Server/Services/TraceRecordingRuleService.ts +33 -0
- package/Server/Services/VMwareVCenterService.ts +110 -1
- package/Server/Utils/AI/Remediation/RemediationCommandTools.ts +1434 -32
- package/Server/Utils/AI/Remediation/RemediationExecutionRunner.ts +935 -21
- package/Server/Utils/AI/Remediation/RemediationPlanRunner.ts +25 -1
- package/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.ts +577 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAccessContext.ts +271 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAccessToolNames.ts +45 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.ts +964 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.ts +333 -0
- package/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.ts +873 -0
- package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +72 -2
- package/Server/Utils/AI/SRE/AlertInvestigationRunner.ts +72 -5
- package/Server/Utils/AI/SRE/IncidentInvestigationRunner.ts +72 -5
- package/Server/Utils/AutoRemediation/CommandPlanExecutor.ts +396 -13
- package/Server/Utils/AutoRemediation/RemediationVerifier.ts +35 -2
- package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +9 -1
- package/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.ts +920 -0
- package/Server/Utils/SessionReplay/SessionReplayUsage.ts +84 -6
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +35 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +33 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +21 -1
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +298 -224
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.ts +35 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +389 -175
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +366 -143
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.ts +163 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.ts +396 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.ts +418 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.ts +152 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.ts +251 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.ts +214 -0
- package/Tests/App/Dashboard/ClusterAccessNotice.test.tsx +93 -0
- package/Tests/App/Dashboard/DatabaseDocumentationMarkdown.test.ts +18 -6
- package/Tests/App/Dashboard/InvestigationInfrastructureTools.test.tsx +506 -0
- package/Tests/App/Dashboard/RemediationSuggestionCardDescription.test.tsx +209 -0
- package/Tests/App/Dashboard/RemediationSuggestionCardResource.test.tsx +317 -0
- package/Tests/App/Dashboard/ResourceAiAccessSettingsUtil.test.ts +921 -0
- package/Tests/App/Dashboard/ResourceAiAgentInstall.test.ts +860 -0
- package/Tests/App/Dashboard/ResourceAiAgentPage.test.tsx +1721 -0
- package/Tests/App/Dashboard/ResourceAiAgentStatus.test.ts +1002 -0
- package/Tests/App/Dashboard/ResourceAiInsightsPage.test.tsx +931 -0
- package/Tests/App/Dashboard/ResourceAiNavigation.test.tsx +575 -0
- package/Tests/App/Dashboard/RunbookStepTypeMaps.test.ts +38 -7
- package/Tests/Models/DatabaseModels/DatabaseServerModels.test.ts +33 -1
- package/Tests/Models/DatabaseModels/ResourceAiAccessColumns.test.ts +738 -0
- package/Tests/Models/DatabaseModels/ResourceAiAgentModel.test.ts +842 -0
- package/Tests/Server/API/AutoRemediationApproveResourceRound.test.ts +835 -0
- package/Tests/Server/API/ResourceAiAccessAPI.test.ts +2730 -0
- package/Tests/Server/Infrastructure/Postgres/AddDatabaseServerTablesMigration.test.ts +60 -0
- package/Tests/Server/Infrastructure/Postgres/AddResourceAiAgentsMigration.test.ts +659 -0
- package/Tests/Server/Infrastructure/SemaphoreMutex.test.ts +31 -0
- package/Tests/Server/Middleware/TelemetryIngestBrowserKey.test.ts +63 -5
- package/Tests/Server/Middleware/TelemetryIngestKubernetesAgentRunnerPinnedKey.test.ts +103 -5
- package/Tests/Server/Middleware/TelemetryIngestKubernetesAgentRunnerRateLimit.test.ts +19 -1
- package/Tests/Server/Services/AutoRemediationResourceRuleEngine.test.ts +1279 -0
- package/Tests/Server/Services/DatabaseServerService.test.ts +55 -0
- package/Tests/Server/Services/GroupTelemetryUsageExcludeNames.test.ts +299 -0
- package/Tests/Server/Services/HostServiceFindOrCreateMemo.test.ts +44 -0
- package/Tests/Server/Services/MonitorProbeServiceIntervalScheduling.test.ts +45 -6
- package/Tests/Server/Services/RecordingRuleReservedMetricName.test.ts +171 -0
- package/Tests/Server/Services/ResourceAiAccessChangeAuthorization.test.ts +256 -0
- package/Tests/Server/Services/ResourceAiAccessService.test.ts +1373 -0
- package/Tests/Server/Services/ResourceAiAgentJobService.test.ts +375 -0
- package/Tests/Server/Services/ResourceAiAgentServiceHelpers.test.ts +1114 -0
- package/Tests/Server/Services/ResourceAiAgentServiceLifecycle.test.ts +1050 -0
- package/Tests/Server/Services/ResourceAiAgentServiceRegister.test.ts +2251 -0
- package/Tests/Server/Services/ResourceAiSettingsCreate.test.ts +373 -0
- package/Tests/Server/Services/ResourceAiSettingsPermission.test.ts +1042 -0
- package/Tests/Server/Services/ResourceServiceDeleteCleansUpAi.test.ts +319 -0
- package/Tests/Server/Services/RunnerJobEnqueueKubectl.test.ts +105 -0
- package/Tests/Server/Services/RunnerJobEnqueueResourceCommand.test.ts +986 -0
- package/Tests/Server/Services/RunnerJobResourceCommandLane.test.ts +211 -0
- package/Tests/Server/Services/RunnerJobResourceCommandTimeoutAndRedaction.test.ts +352 -0
- package/Tests/Server/Services/TelemetryUsageBillingSloExclusion.test.ts +218 -0
- package/Tests/Server/TestingUtils/Services/FakeRunnerJobCount.ts +145 -0
- package/Tests/Server/Utils/AI/InvestigationInfrastructureAccessWiring.test.ts +453 -0
- package/Tests/Server/Utils/AI/InvestigationInfrastructureReport.test.ts +721 -0
- package/Tests/Server/Utils/AI/RemediationCommandTools.test.ts +94 -1
- package/Tests/Server/Utils/AI/RemediationCommandToolsResource.test.ts +1530 -0
- package/Tests/Server/Utils/AI/RemediationExecutionRunnerResourceMode.test.ts +1249 -0
- package/Tests/Server/Utils/AI/RemediationPlanRunner.test.ts +117 -0
- package/Tests/Server/Utils/AI/RemediationResourceCopyParity.test.ts +463 -0
- package/Tests/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.test.ts +722 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceAccessContext.test.ts +266 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.test.ts +1220 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.test.ts +569 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.test.ts +830 -0
- package/Tests/Server/Utils/AutoRemediation/CommandPlanExecutorResource.test.ts +717 -0
- package/Tests/Server/Utils/AutoRemediation/RemediationVerifierResourceFollowUp.test.ts +338 -0
- package/Tests/Server/Utils/Monitor/Criteria/SessionReplayBudgetTemplateCriteria.test.ts +422 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.test.ts +1647 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayUsage.test.ts +143 -1
- package/Tests/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.test.ts +33 -3
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsAccountNotLinked.test.ts +1093 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.test.ts +1049 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.test.ts +1676 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCards.test.ts +2884 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.test.ts +2490 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateSubmit.test.ts +2293 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateSubmitServerTimezone.test.ts +386 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.test.ts +1477 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.test.ts +1967 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsStripHtmlTags.test.ts +92 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsSubmittedFormRemoval.test.ts +1819 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.test.ts +1033 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezoneServerZone.test.ts +610 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsBotMessageHandling.test.ts +2610 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsCreateCommandsEndToEnd.test.ts +4672 -0
- package/Tests/Server/Utils/Workspace/WorkspaceCreateProjectReferences.test.ts +190 -65
- package/Tests/Types/AutoRemediation/AiRemediationCommandPlan.test.ts +10 -4
- package/Tests/Types/AutoRemediation/AiRemediationCommandPlanResourceCommand.test.ts +305 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCatalog.test.ts +277 -13
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationUtil.test.ts +113 -0
- package/Tests/Types/Monitor/RumAlertTemplates.test.ts +773 -2
- package/Tests/Types/ResourceAiAgent/AiResourceType.test.ts +419 -0
- package/Tests/Types/ResourceAiAgent/ResourceAiAccess.test.ts +517 -0
- package/Tests/Types/Runbook/RunbookStepType.test.ts +147 -8
- package/Tests/UI/Rum/RecordingHealthDashboard.test.tsx +769 -1
- package/Tests/Utils/AiRemediation/Resource/CephCommandPolicy.test.ts +1653 -0
- package/Tests/Utils/AiRemediation/Resource/CephOutputRedaction.test.ts +204 -0
- package/Tests/Utils/AiRemediation/Resource/DatabaseCommandPolicy.test.ts +1077 -0
- package/Tests/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.test.ts +558 -0
- package/Tests/Utils/AiRemediation/Resource/DatabaseQueryRedactor.test.ts +834 -0
- package/Tests/Utils/AiRemediation/Resource/DockerCliGrammar.test.ts +747 -0
- package/Tests/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.test.ts +1259 -0
- package/Tests/Utils/AiRemediation/Resource/DockerOutputRedaction.test.ts +386 -0
- package/Tests/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.test.ts +782 -0
- package/Tests/Utils/AiRemediation/Resource/GovcCommandPolicy.test.ts +2259 -0
- package/Tests/Utils/AiRemediation/Resource/HostCommandPolicy.test.ts +2019 -0
- package/Tests/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.test.ts +2497 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceCommandPolicy.test.ts +1305 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.test.ts +585 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceOutputRedactor.test.ts +334 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceOutputRedactorCopyParity.test.ts +98 -0
- package/Tests/Utils/AiRemediation/Resource/ResourcePolicyImportClosure.test.ts +391 -0
- package/Tests/Utils/AiRemediation/ResourceAiAgentPolicyCopyParity.test.ts +497 -0
- package/Tests/Utils/SessionReplay/SessionReplayBudgetMetricType.test.ts +383 -0
- package/Types/AI/ResourceAiAccessApi.ts +140 -0
- package/Types/AI/ResourceAiAccessPermissions.ts +126 -0
- package/Types/AutoRemediation/AiRemediationCommandPlan.ts +183 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.ts +55 -22
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.ts +35 -3
- package/Types/Monitor/RumAlertTemplates.ts +351 -4
- package/Types/ResourceAiAgent/AiResourceType.ts +310 -0
- package/Types/ResourceAiAgent/ResourceAiAccess.ts +574 -0
- package/Types/Rum/SessionReplayBudgetMetricType.ts +47 -0
- package/Types/Runbook/RunbookStepType.ts +29 -0
- package/Types/Telemetry/TelemetryIngestSurface.ts +14 -2
- package/Utils/AI/InvestigationReport.ts +121 -15
- package/Utils/AiRemediation/Resource/CephCommandPolicy.ts +1936 -0
- package/Utils/AiRemediation/Resource/DatabaseCommandPolicy.ts +166 -0
- package/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.ts +1532 -0
- package/Utils/AiRemediation/Resource/DatabaseQueryRedactor.ts +1394 -0
- package/Utils/AiRemediation/Resource/DockerCliGrammar.ts +1839 -0
- package/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.ts +490 -0
- package/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.ts +687 -0
- package/Utils/AiRemediation/Resource/GovcCommandPolicy.ts +2096 -0
- package/Utils/AiRemediation/Resource/HostCommandPolicy.ts +2982 -0
- package/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.ts +1679 -0
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.ts +851 -0
- package/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.ts +593 -0
- package/Utils/AiRemediation/Resource/ResourceOutputRedactor.ts +2812 -0
- package/Utils/SessionReplay/SessionReplayBudgetMetricType.ts +184 -0
- package/build/dist/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/build/dist/Models/DatabaseModels/AutoRemediationSuggestion.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephCluster.js +219 -0
- package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DatabaseServer.js +219 -0
- package/build/dist/Models/DatabaseModels/DatabaseServer.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHost.js +219 -0
- package/build/dist/Models/DatabaseModels/DockerHost.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js +219 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Host.js +219 -0
- package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHost.js +219 -0
- package/build/dist/Models/DatabaseModels/PodmanHost.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +219 -0
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ResourceAiAgent.js +439 -0
- package/build/dist/Models/DatabaseModels/ResourceAiAgent.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RunnerJob.js +145 -0
- package/build/dist/Models/DatabaseModels/RunnerJob.js.map +1 -1
- package/build/dist/Models/DatabaseModels/VMwareVCenter.js +219 -0
- package/build/dist/Models/DatabaseModels/VMwareVCenter.js.map +1 -1
- package/build/dist/Server/API/AutoRemediationAPI.js +231 -1
- package/build/dist/Server/API/AutoRemediationAPI.js.map +1 -1
- package/build/dist/Server/API/ResourceAiAccessAPI.js +1119 -0
- package/build/dist/Server/API/ResourceAiAccessAPI.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796300000000-AddResourceAiAgents.js +168 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796300000000-AddResourceAiAgents.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +2 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Semaphore.js +6 -0
- package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +12 -5
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +26 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js +601 -3
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +104 -0
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseServerService.js +99 -0
- package/build/dist/Server/Services/DatabaseServerService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +104 -0
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +104 -0
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +114 -2
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/MetricRecordingRuleService.js +46 -0
- package/build/dist/Server/Services/MetricRecordingRuleService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +104 -0
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +104 -0
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ResourceAiAccessService.js +1028 -0
- package/build/dist/Server/Services/ResourceAiAccessService.js.map +1 -0
- package/build/dist/Server/Services/ResourceAiAgentJobService.js +173 -0
- package/build/dist/Server/Services/ResourceAiAgentJobService.js.map +1 -0
- package/build/dist/Server/Services/ResourceAiAgentService.js +1687 -0
- package/build/dist/Server/Services/ResourceAiAgentService.js.map +1 -0
- package/build/dist/Server/Services/RunnerJobService.js +344 -5
- package/build/dist/Server/Services/RunnerJobService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +26 -0
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceRecordingRuleService.js +37 -0
- package/build/dist/Server/Services/TraceRecordingRuleService.js.map +1 -1
- package/build/dist/Server/Services/VMwareVCenterService.js +104 -0
- package/build/dist/Server/Services/VMwareVCenterService.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js +1029 -30
- package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js +633 -28
- package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationPlanRunner.js +21 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationPlanRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.js +330 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessContext.js +160 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessContext.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessToolNames.js +33 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessToolNames.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.js +640 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.js +226 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.js +600 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +50 -4
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js +55 -4
- package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js +55 -4
- package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AutoRemediation/CommandPlanExecutor.js +290 -13
- package/build/dist/Server/Utils/AutoRemediation/CommandPlanExecutor.js.map +1 -1
- package/build/dist/Server/Utils/AutoRemediation/RemediationVerifier.js +29 -1
- package/build/dist/Server/Utils/AutoRemediation/RemediationVerifier.js.map +1 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +9 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.js +627 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.js.map +1 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayUsage.js +60 -5
- package/build/dist/Server/Utils/SessionReplay/SessionReplayUsage.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +19 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +19 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +17 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +183 -209
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.js +19 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +233 -167
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +263 -110
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.js +129 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.js +266 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.js +258 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.js +104 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.js +183 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.js +123 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.js.map +1 -0
- package/build/dist/Types/AI/ResourceAiAccessApi.js +30 -0
- package/build/dist/Types/AI/ResourceAiAccessApi.js.map +1 -0
- package/build/dist/Types/AI/ResourceAiAccessPermissions.js +98 -0
- package/build/dist/Types/AI/ResourceAiAccessPermissions.js.map +1 -0
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPlan.js +116 -29
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPlan.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +47 -21
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +5 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js.map +1 -1
- package/build/dist/Types/Monitor/RumAlertTemplates.js +199 -3
- package/build/dist/Types/Monitor/RumAlertTemplates.js.map +1 -1
- package/build/dist/Types/ResourceAiAgent/AiResourceType.js +242 -0
- package/build/dist/Types/ResourceAiAgent/AiResourceType.js.map +1 -0
- package/build/dist/Types/ResourceAiAgent/ResourceAiAccess.js +275 -0
- package/build/dist/Types/ResourceAiAgent/ResourceAiAccess.js.map +1 -0
- package/build/dist/Types/Rum/SessionReplayBudgetMetricType.js +45 -0
- package/build/dist/Types/Rum/SessionReplayBudgetMetricType.js.map +1 -0
- package/build/dist/Types/Runbook/RunbookStepType.js +27 -0
- package/build/dist/Types/Runbook/RunbookStepType.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryIngestSurface.js +13 -2
- package/build/dist/Types/Telemetry/TelemetryIngestSurface.js.map +1 -1
- package/build/dist/Utils/AI/InvestigationReport.js +71 -11
- package/build/dist/Utils/AI/InvestigationReport.js.map +1 -1
- package/build/dist/Utils/AiRemediation/Resource/CephCommandPolicy.js +1462 -0
- package/build/dist/Utils/AiRemediation/Resource/CephCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseCommandPolicy.js +122 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.js +1139 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseQueryRedactor.js +1060 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseQueryRedactor.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerCliGrammar.js +1301 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerCliGrammar.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.js +370 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.js +498 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/GovcCommandPolicy.js +1565 -0
- package/build/dist/Utils/AiRemediation/Resource/GovcCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/HostCommandPolicy.js +2206 -0
- package/build/dist/Utils/AiRemediation/Resource/HostCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.js +1129 -0
- package/build/dist/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +565 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.js +408 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceOutputRedactor.js +1910 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceOutputRedactor.js.map +1 -0
- package/build/dist/Utils/SessionReplay/SessionReplayBudgetMetricType.js +160 -0
- package/build/dist/Utils/SessionReplay/SessionReplayBudgetMetricType.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import {
|
|
2
|
+
afterEach,
|
|
3
|
+
beforeEach,
|
|
4
|
+
describe,
|
|
5
|
+
expect,
|
|
6
|
+
jest,
|
|
7
|
+
test,
|
|
8
|
+
} from "@jest/globals";
|
|
9
|
+
import "@testing-library/jest-dom";
|
|
10
|
+
import { cleanup } from "@testing-library/react";
|
|
11
|
+
import * as React from "react";
|
|
12
|
+
import { FunctionComponent, ReactElement } from "react";
|
|
13
|
+
import fs from "fs";
|
|
14
|
+
import path from "path";
|
|
15
|
+
import CephSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/Ceph/View/SideMenu";
|
|
16
|
+
import DatabaseSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/Database/View/SideMenu";
|
|
17
|
+
import DockerSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/Docker/View/SideMenu";
|
|
18
|
+
import DockerSwarmSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/DockerSwarm/View/SideMenu";
|
|
19
|
+
import HostSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/Host/View/SideMenu";
|
|
20
|
+
import PodmanSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/Podman/View/SideMenu";
|
|
21
|
+
import ProxmoxSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/Proxmox/View/SideMenu";
|
|
22
|
+
import VMwareSideMenu from "../../../../App/FeatureSet/Dashboard/src/Pages/VMware/View/SideMenu";
|
|
23
|
+
import { getCephBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/CephBreadcrumbs";
|
|
24
|
+
import { getDatabaseBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/DatabaseBreadcrumbs";
|
|
25
|
+
import { getDockerBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/DockerBreadcrumbs";
|
|
26
|
+
import { getDockerSwarmBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/DockerSwarmBreadcrumbs";
|
|
27
|
+
import { getHostBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/HostBreadcrumbs";
|
|
28
|
+
import { getPodmanBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/PodmanBreadcrumbs";
|
|
29
|
+
import { getProxmoxBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/ProxmoxBreadcrumbs";
|
|
30
|
+
import { getVMwareBreadcrumbs } from "../../../../App/FeatureSet/Dashboard/src/Utils/Breadcrumbs/VMwareBreadcrumbs";
|
|
31
|
+
import { getResourceAiAgentDescriptor } from "../../../../App/FeatureSet/Dashboard/src/Components/ResourceAiAgent/ResourceAiAgentDescriptors";
|
|
32
|
+
import PageMap from "../../../../App/FeatureSet/Dashboard/src/Utils/PageMap";
|
|
33
|
+
import RouteMap, {
|
|
34
|
+
CephRoutePath,
|
|
35
|
+
DatabaseRoutePath,
|
|
36
|
+
DockerRoutePath,
|
|
37
|
+
DockerSwarmRoutePath,
|
|
38
|
+
HostRoutePath,
|
|
39
|
+
PodmanRoutePath,
|
|
40
|
+
ProxmoxRoutePath,
|
|
41
|
+
RouteUtil,
|
|
42
|
+
VMwareRoutePath,
|
|
43
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Utils/RouteMap";
|
|
44
|
+
import Dictionary from "../../../Types/Dictionary";
|
|
45
|
+
import Link from "../../../Types/Link";
|
|
46
|
+
import ListResult from "../../../Types/BaseDatabase/ListResult";
|
|
47
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
48
|
+
import AiResourceType, {
|
|
49
|
+
ALL_AI_RESOURCE_TYPES,
|
|
50
|
+
} from "../../../Types/ResourceAiAgent/AiResourceType";
|
|
51
|
+
import SideMenuItem from "../../../UI/Components/SideMenu/SideMenuItem";
|
|
52
|
+
import ModelAPI from "../../../UI/Utils/ModelAPI/ModelAPI";
|
|
53
|
+
import {
|
|
54
|
+
MenuLink,
|
|
55
|
+
PROJECT_ID,
|
|
56
|
+
goTo,
|
|
57
|
+
iconCountIn,
|
|
58
|
+
linksIn,
|
|
59
|
+
renderMenu,
|
|
60
|
+
sectionTitlesInOrder,
|
|
61
|
+
} from "./SideMenuHarness";
|
|
62
|
+
|
|
63
|
+
jest.mock("react-i18next", () => {
|
|
64
|
+
return {
|
|
65
|
+
useTranslation: () => {
|
|
66
|
+
return {
|
|
67
|
+
t: (value: string): string => {
|
|
68
|
+
return value;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// The recommendation badge fetch is unrelated to the AI section.
|
|
76
|
+
jest.mock(
|
|
77
|
+
"../../../../App/FeatureSet/Dashboard/src/Components/Recommendations/RecommendationsSideMenuItem",
|
|
78
|
+
() => {
|
|
79
|
+
return {
|
|
80
|
+
__esModule: true,
|
|
81
|
+
default: (props: { link: Link }): ReactElement => {
|
|
82
|
+
return <SideMenuItem link={props.link} />;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
// No unresolved states: the Activity badges never reach for a count.
|
|
89
|
+
jest.mock(
|
|
90
|
+
"../../../../App/FeatureSet/Dashboard/src/Utils/IncidentState",
|
|
91
|
+
() => {
|
|
92
|
+
return {
|
|
93
|
+
__esModule: true,
|
|
94
|
+
default: {
|
|
95
|
+
getUnresolvedIncidentStates: () => {
|
|
96
|
+
return Promise.resolve([]);
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
jest.mock("../../../../App/FeatureSet/Dashboard/src/Utils/AlertState", () => {
|
|
104
|
+
return {
|
|
105
|
+
__esModule: true,
|
|
106
|
+
default: {
|
|
107
|
+
getUnresolvedAlertStates: () => {
|
|
108
|
+
return Promise.resolve([]);
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
jest.mock(
|
|
115
|
+
"../../../../App/FeatureSet/Dashboard/src/Utils/ScheduledMaintenanceState",
|
|
116
|
+
() => {
|
|
117
|
+
return {
|
|
118
|
+
__esModule: true,
|
|
119
|
+
default: {
|
|
120
|
+
getActiveScheduledMaintenanceStates: () => {
|
|
121
|
+
return Promise.resolve([]);
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
/*
|
|
129
|
+
* Every resource a resource AI agent serves gets the Kubernetes cluster's
|
|
130
|
+
* AI section: an "AI" side-menu section right after its first section,
|
|
131
|
+
* holding "Insights" (what AI investigated and changed) and "AI agent" (the
|
|
132
|
+
* resource's AI agent and what AI may do), on the routes :id/ai/insights
|
|
133
|
+
* and :id/ai/agent nested under the resource's view, with "AI" trails.
|
|
134
|
+
* Where a resource already had a metrics page called "Insights" (Docker
|
|
135
|
+
* Swarm, Proxmox, VMware, Ceph), that page is "Resource Usage" now — same
|
|
136
|
+
* route — so each menu has exactly one "Insights" and the LightBulb belongs
|
|
137
|
+
* to AI alone.
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
const MODEL_ID: ObjectID = new ObjectID("44444444-0000-4000-8000-000000000004");
|
|
141
|
+
|
|
142
|
+
const DASHBOARD_SRC: string = path.resolve(
|
|
143
|
+
__dirname,
|
|
144
|
+
"../../../../App/FeatureSet/Dashboard/src",
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
interface ResourceCase {
|
|
148
|
+
type: AiResourceType;
|
|
149
|
+
// The folder under Pages/ and the Routes/<name>Routes.tsx file.
|
|
150
|
+
directory: string;
|
|
151
|
+
routesFile: string;
|
|
152
|
+
// The URL segment after the project, and the route dictionary.
|
|
153
|
+
base: string;
|
|
154
|
+
routePath: Dictionary<string>;
|
|
155
|
+
prefix: string;
|
|
156
|
+
menu: FunctionComponent<{ modelId: ObjectID }>;
|
|
157
|
+
firstSection: string;
|
|
158
|
+
breadcrumbs: (path: string) => Array<Link> | undefined;
|
|
159
|
+
trail: Array<string>;
|
|
160
|
+
// The page key of a metrics page titled "Insights" before the AI section.
|
|
161
|
+
metricsInsights: PageMap | null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const CASES: Array<ResourceCase> = [
|
|
165
|
+
{
|
|
166
|
+
type: AiResourceType.DockerHost,
|
|
167
|
+
directory: "Docker",
|
|
168
|
+
routesFile: "DockerRoutes.tsx",
|
|
169
|
+
base: "docker",
|
|
170
|
+
routePath: DockerRoutePath,
|
|
171
|
+
prefix: "DOCKER_HOST_VIEW",
|
|
172
|
+
menu: DockerSideMenu,
|
|
173
|
+
firstSection: "Basic",
|
|
174
|
+
breadcrumbs: getDockerBreadcrumbs,
|
|
175
|
+
trail: ["Project", "Docker", "View Host"],
|
|
176
|
+
metricsInsights: null,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
type: AiResourceType.PodmanHost,
|
|
180
|
+
directory: "Podman",
|
|
181
|
+
routesFile: "PodmanRoutes.tsx",
|
|
182
|
+
base: "podman",
|
|
183
|
+
routePath: PodmanRoutePath,
|
|
184
|
+
prefix: "PODMAN_HOST_VIEW",
|
|
185
|
+
menu: PodmanSideMenu,
|
|
186
|
+
firstSection: "Basic",
|
|
187
|
+
breadcrumbs: getPodmanBreadcrumbs,
|
|
188
|
+
trail: ["Project", "Podman", "View Host"],
|
|
189
|
+
metricsInsights: null,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
type: AiResourceType.DockerSwarmCluster,
|
|
193
|
+
directory: "DockerSwarm",
|
|
194
|
+
routesFile: "DockerSwarmRoutes.tsx",
|
|
195
|
+
base: "docker-swarm",
|
|
196
|
+
routePath: DockerSwarmRoutePath,
|
|
197
|
+
prefix: "DOCKER_SWARM_CLUSTER_VIEW",
|
|
198
|
+
menu: DockerSwarmSideMenu,
|
|
199
|
+
firstSection: "Overview",
|
|
200
|
+
breadcrumbs: getDockerSwarmBreadcrumbs,
|
|
201
|
+
trail: ["Project", "DockerSwarm", "View Cluster"],
|
|
202
|
+
metricsInsights: PageMap.DOCKER_SWARM_CLUSTER_VIEW_INSIGHTS,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: AiResourceType.ProxmoxCluster,
|
|
206
|
+
directory: "Proxmox",
|
|
207
|
+
routesFile: "ProxmoxRoutes.tsx",
|
|
208
|
+
base: "proxmox",
|
|
209
|
+
routePath: ProxmoxRoutePath,
|
|
210
|
+
prefix: "PROXMOX_CLUSTER_VIEW",
|
|
211
|
+
menu: ProxmoxSideMenu,
|
|
212
|
+
firstSection: "Basic",
|
|
213
|
+
breadcrumbs: getProxmoxBreadcrumbs,
|
|
214
|
+
trail: ["Project", "Proxmox", "View Cluster"],
|
|
215
|
+
metricsInsights: PageMap.PROXMOX_CLUSTER_VIEW_INSIGHTS,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
type: AiResourceType.VMwareVCenter,
|
|
219
|
+
directory: "VMware",
|
|
220
|
+
routesFile: "VMwareRoutes.tsx",
|
|
221
|
+
base: "vmware",
|
|
222
|
+
routePath: VMwareRoutePath,
|
|
223
|
+
prefix: "VMWARE_VCENTER_VIEW",
|
|
224
|
+
menu: VMwareSideMenu,
|
|
225
|
+
firstSection: "Basic",
|
|
226
|
+
breadcrumbs: getVMwareBreadcrumbs,
|
|
227
|
+
trail: ["Project", "VMware", "View vCenter"],
|
|
228
|
+
metricsInsights: PageMap.VMWARE_VCENTER_VIEW_INSIGHTS,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
type: AiResourceType.CephCluster,
|
|
232
|
+
directory: "Ceph",
|
|
233
|
+
routesFile: "CephRoutes.tsx",
|
|
234
|
+
base: "ceph",
|
|
235
|
+
routePath: CephRoutePath,
|
|
236
|
+
prefix: "CEPH_CLUSTER_VIEW",
|
|
237
|
+
menu: CephSideMenu,
|
|
238
|
+
firstSection: "Basic",
|
|
239
|
+
breadcrumbs: getCephBreadcrumbs,
|
|
240
|
+
trail: ["Project", "Ceph", "View Cluster"],
|
|
241
|
+
metricsInsights: PageMap.CEPH_CLUSTER_VIEW_INSIGHTS,
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
type: AiResourceType.DatabaseServer,
|
|
245
|
+
directory: "Database",
|
|
246
|
+
routesFile: "DatabaseRoutes.tsx",
|
|
247
|
+
base: "databases",
|
|
248
|
+
routePath: DatabaseRoutePath,
|
|
249
|
+
prefix: "DATABASE_SERVER_VIEW",
|
|
250
|
+
menu: DatabaseSideMenu,
|
|
251
|
+
firstSection: "Basic",
|
|
252
|
+
breadcrumbs: getDatabaseBreadcrumbs,
|
|
253
|
+
trail: ["Project", "Databases", "View Database"],
|
|
254
|
+
metricsInsights: null,
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
type: AiResourceType.Host,
|
|
258
|
+
directory: "Host",
|
|
259
|
+
routesFile: "HostRoutes.tsx",
|
|
260
|
+
base: "host",
|
|
261
|
+
routePath: HostRoutePath,
|
|
262
|
+
prefix: "HOST_VIEW",
|
|
263
|
+
menu: HostSideMenu,
|
|
264
|
+
firstSection: "Basic",
|
|
265
|
+
breadcrumbs: getHostBreadcrumbs,
|
|
266
|
+
trail: ["Project", "Hosts", "View Host"],
|
|
267
|
+
metricsInsights: null,
|
|
268
|
+
},
|
|
269
|
+
];
|
|
270
|
+
|
|
271
|
+
function insightsKey(item: ResourceCase): PageMap {
|
|
272
|
+
return `${item.prefix}_AI_INSIGHTS` as PageMap;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function agentKey(item: ResourceCase): PageMap {
|
|
276
|
+
return `${item.prefix}_AI_AGENT` as PageMap;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/*
|
|
280
|
+
* A real resource path, built from the pattern rather than with
|
|
281
|
+
* populateRouteParams, which fills the project id from whatever the
|
|
282
|
+
* previous test left in the address bar.
|
|
283
|
+
*/
|
|
284
|
+
function resourceRoute(page: PageMap): string {
|
|
285
|
+
return RouteMap[page]!.toString()
|
|
286
|
+
.replace(":projectId", PROJECT_ID)
|
|
287
|
+
.replace(":id", MODEL_ID.toString());
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function readSource(...segments: Array<string>): string {
|
|
291
|
+
return fs.readFileSync(path.join(DASHBOARD_SRC, ...segments), "utf8");
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function titlesOf(links: Array<MenuLink>): Array<string> {
|
|
295
|
+
return links.map((link: MenuLink): string => {
|
|
296
|
+
return link.title;
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
async function renderResourceMenu(item: ResourceCase): Promise<void> {
|
|
301
|
+
goTo(resourceRoute(`${item.prefix}` as PageMap));
|
|
302
|
+
const Menu: FunctionComponent<{ modelId: ObjectID }> = item.menu;
|
|
303
|
+
await renderMenu(<Menu modelId={MODEL_ID} />);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
beforeEach(() => {
|
|
307
|
+
jest.spyOn(ModelAPI, "getList").mockResolvedValue({
|
|
308
|
+
data: [],
|
|
309
|
+
count: 0,
|
|
310
|
+
skip: 0,
|
|
311
|
+
limit: 0,
|
|
312
|
+
} as ListResult<never>);
|
|
313
|
+
jest.spyOn(ModelAPI, "count").mockResolvedValue(0);
|
|
314
|
+
jest.spyOn(ModelAPI, "getItem").mockResolvedValue(null);
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
afterEach(() => {
|
|
318
|
+
cleanup();
|
|
319
|
+
jest.restoreAllMocks();
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
test("every resource type a resource AI agent serves is wired here", () => {
|
|
323
|
+
expect(
|
|
324
|
+
CASES.map((item: ResourceCase): AiResourceType => {
|
|
325
|
+
return item.type;
|
|
326
|
+
}),
|
|
327
|
+
).toEqual([...ALL_AI_RESOURCE_TYPES]);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
describe.each(CASES)("$type", (item: ResourceCase) => {
|
|
331
|
+
describe("PageMap and RouteMap", () => {
|
|
332
|
+
test("declare the two AI pages", () => {
|
|
333
|
+
expect(PageMap[insightsKey(item) as keyof typeof PageMap]).toBe(
|
|
334
|
+
insightsKey(item),
|
|
335
|
+
);
|
|
336
|
+
expect(PageMap[agentKey(item) as keyof typeof PageMap]).toBe(
|
|
337
|
+
agentKey(item),
|
|
338
|
+
);
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
test("nest them under the resource: :id/ai/insights and :id/ai/agent", () => {
|
|
342
|
+
expect(item.routePath[insightsKey(item)]).toBe(":id/ai/insights");
|
|
343
|
+
expect(item.routePath[agentKey(item)]).toBe(":id/ai/agent");
|
|
344
|
+
expect(RouteMap[insightsKey(item)]!.toString()).toBe(
|
|
345
|
+
`/dashboard/:projectId/${item.base}/:id/ai/insights`,
|
|
346
|
+
);
|
|
347
|
+
expect(RouteMap[agentKey(item)]!.toString()).toBe(
|
|
348
|
+
`/dashboard/:projectId/${item.base}/:id/ai/agent`,
|
|
349
|
+
);
|
|
350
|
+
// The view's own route stays where it was.
|
|
351
|
+
expect(RouteMap[item.prefix]!.toString()).toBe(
|
|
352
|
+
`/dashboard/:projectId/${item.base}/:id`,
|
|
353
|
+
);
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
test("register as children of the view taking the last two segments", () => {
|
|
357
|
+
expect(RouteUtil.getLastPathForKey(insightsKey(item), 2)).toBe(
|
|
358
|
+
"ai/insights",
|
|
359
|
+
);
|
|
360
|
+
expect(RouteUtil.getLastPathForKey(agentKey(item), 2)).toBe("ai/agent");
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
test("are the pages the descriptor links to", () => {
|
|
364
|
+
expect(getResourceAiAgentDescriptor(item.type).insightsPage).toBe(
|
|
365
|
+
insightsKey(item),
|
|
366
|
+
);
|
|
367
|
+
expect(getResourceAiAgentDescriptor(item.type).agentPage).toBe(
|
|
368
|
+
agentKey(item),
|
|
369
|
+
);
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
describe("the routes file", () => {
|
|
374
|
+
const source: string = readSource("Routes", item.routesFile);
|
|
375
|
+
const dense: string = source.replace(/\s+/g, "");
|
|
376
|
+
|
|
377
|
+
test("imports the thin AI pages", () => {
|
|
378
|
+
expect(source).toContain(
|
|
379
|
+
`from "../Pages/${item.directory}/View/AI/Insights"`,
|
|
380
|
+
);
|
|
381
|
+
expect(source).toContain(
|
|
382
|
+
`from "../Pages/${item.directory}/View/AI/Agent"`,
|
|
383
|
+
);
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
test("mounts both, two segments deep, with their page routes", () => {
|
|
387
|
+
for (const key of [insightsKey(item), agentKey(item)]) {
|
|
388
|
+
expect(dense).toMatch(
|
|
389
|
+
new RegExp(`getLastPathForKey\\(PageMap\\.${key},2,?\\)`),
|
|
390
|
+
);
|
|
391
|
+
expect(dense).toContain(`RouteMap[PageMap.${key}]asRoute`);
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
test("mounts them inside the resource's view layout", () => {
|
|
396
|
+
const layoutAt: number = source.indexOf("ViewLayout {...props} />}");
|
|
397
|
+
expect(layoutAt).toBeGreaterThan(-1);
|
|
398
|
+
expect(source.indexOf(`PageMap.${insightsKey(item)},`)).toBeGreaterThan(
|
|
399
|
+
layoutAt,
|
|
400
|
+
);
|
|
401
|
+
});
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
describe("the thin pages", () => {
|
|
405
|
+
test.each([
|
|
406
|
+
["Agent.tsx", "ResourceAiAgentPage"],
|
|
407
|
+
["Insights.tsx", "ResourceAiInsightsPage"],
|
|
408
|
+
])(
|
|
409
|
+
"%s renders %s for this resource type",
|
|
410
|
+
(file: string, component: string) => {
|
|
411
|
+
const source: string = readSource(
|
|
412
|
+
"Pages",
|
|
413
|
+
item.directory,
|
|
414
|
+
"View",
|
|
415
|
+
"AI",
|
|
416
|
+
file,
|
|
417
|
+
);
|
|
418
|
+
expect(source).toContain(
|
|
419
|
+
`from "../../../../Components/ResourceAiAgent/${component}"`,
|
|
420
|
+
);
|
|
421
|
+
expect(source).toMatch(
|
|
422
|
+
new RegExp(
|
|
423
|
+
`getResourceAiAgentDescriptor\\(\\s*AiResourceType\\.${item.type},?\\s*\\)`,
|
|
424
|
+
),
|
|
425
|
+
);
|
|
426
|
+
expect(source).toContain(`<${component}`);
|
|
427
|
+
},
|
|
428
|
+
);
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
describe("the breadcrumbs", () => {
|
|
432
|
+
function crumbTitles(page: PageMap): Array<string> {
|
|
433
|
+
goTo(resourceRoute(page));
|
|
434
|
+
return (item.breadcrumbs(RouteMap[page]!.toString()) || []).map(
|
|
435
|
+
(link: Link): string => {
|
|
436
|
+
return link.title;
|
|
437
|
+
},
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
test('say the two pages live under "AI"', () => {
|
|
442
|
+
expect(crumbTitles(insightsKey(item))).toEqual([
|
|
443
|
+
...item.trail,
|
|
444
|
+
"AI",
|
|
445
|
+
"Insights",
|
|
446
|
+
]);
|
|
447
|
+
expect(crumbTitles(agentKey(item))).toEqual([
|
|
448
|
+
...item.trail,
|
|
449
|
+
"AI",
|
|
450
|
+
"AI agent",
|
|
451
|
+
]);
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
test('never call the page a bare "Agent"', () => {
|
|
455
|
+
expect(crumbTitles(agentKey(item))).not.toContain("Agent");
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
test("never link a crumb to a page that does not exist", () => {
|
|
459
|
+
goTo(resourceRoute(agentKey(item)));
|
|
460
|
+
const links: Array<Link> = item.breadcrumbs(
|
|
461
|
+
RouteMap[agentKey(item)]!.toString(),
|
|
462
|
+
)!;
|
|
463
|
+
for (const link of links) {
|
|
464
|
+
expect(link.to.toString()).not.toMatch(/[:*]/);
|
|
465
|
+
expect(link.to.toString()).not.toMatch(/\/ai$/);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
if (item.metricsInsights) {
|
|
470
|
+
test("the resource charts are Resource Usage in the trail", () => {
|
|
471
|
+
expect(crumbTitles(item.metricsInsights!)).toEqual([
|
|
472
|
+
...item.trail,
|
|
473
|
+
"Resource Usage",
|
|
474
|
+
]);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
describe("the side menu", () => {
|
|
480
|
+
test("has an AI section right after its first section", async () => {
|
|
481
|
+
await renderResourceMenu(item);
|
|
482
|
+
|
|
483
|
+
const sections: Array<string> = sectionTitlesInOrder();
|
|
484
|
+
expect(sections[0]).toBe(item.firstSection);
|
|
485
|
+
expect(sections[1]).toBe("AI");
|
|
486
|
+
expect(
|
|
487
|
+
sections.filter((title: string): boolean => {
|
|
488
|
+
return title === "AI";
|
|
489
|
+
}),
|
|
490
|
+
).toHaveLength(1);
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
test('holds "Insights" and "AI agent", linking to their pages, each with an icon', async () => {
|
|
494
|
+
await renderResourceMenu(item);
|
|
495
|
+
|
|
496
|
+
expect(linksIn("AI")).toEqual([
|
|
497
|
+
{ title: "Insights", href: resourceRoute(insightsKey(item)) },
|
|
498
|
+
{ title: "AI agent", href: resourceRoute(agentKey(item)) },
|
|
499
|
+
]);
|
|
500
|
+
expect(iconCountIn("AI")).toBe(2);
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
test('the whole menu has exactly one "Insights" item, and no bare link to /ai', async () => {
|
|
504
|
+
await renderResourceMenu(item);
|
|
505
|
+
|
|
506
|
+
const allLinks: Array<MenuLink> = sectionTitlesInOrder().flatMap(
|
|
507
|
+
(section: string): Array<MenuLink> => {
|
|
508
|
+
return linksIn(section);
|
|
509
|
+
},
|
|
510
|
+
);
|
|
511
|
+
expect(
|
|
512
|
+
titlesOf(allLinks).filter((title: string): boolean => {
|
|
513
|
+
return title === "Insights";
|
|
514
|
+
}),
|
|
515
|
+
).toHaveLength(1);
|
|
516
|
+
for (const link of allLinks) {
|
|
517
|
+
expect(link.href).not.toMatch(/\/ai$/);
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
if (item.metricsInsights) {
|
|
522
|
+
test('its charts page is "Resource Usage" now, on the same route', async () => {
|
|
523
|
+
await renderResourceMenu(item);
|
|
524
|
+
|
|
525
|
+
const usage: MenuLink | undefined = linksIn(item.firstSection).find(
|
|
526
|
+
(link: MenuLink): boolean => {
|
|
527
|
+
return link.title === "Resource Usage";
|
|
528
|
+
},
|
|
529
|
+
);
|
|
530
|
+
expect(usage).toBeDefined();
|
|
531
|
+
expect(usage!.href).toBe(resourceRoute(item.metricsInsights!));
|
|
532
|
+
expect(RouteMap[item.metricsInsights!]!.toString()).toBe(
|
|
533
|
+
`/dashboard/:projectId/${item.base}/:id/insights`,
|
|
534
|
+
);
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
test("the LightBulb is used only by AI → Insights, the robot only by AI → AI agent", () => {
|
|
539
|
+
const source: string = readSource(
|
|
540
|
+
"Pages",
|
|
541
|
+
item.directory,
|
|
542
|
+
"View",
|
|
543
|
+
"SideMenu.tsx",
|
|
544
|
+
);
|
|
545
|
+
|
|
546
|
+
expect(source.match(/IconProp\.LightBulb/g)).toHaveLength(1);
|
|
547
|
+
const lightBulbAt: number = source.indexOf("IconProp.LightBulb");
|
|
548
|
+
const insightsAt: number = source.lastIndexOf(
|
|
549
|
+
insightsKey(item),
|
|
550
|
+
lightBulbAt,
|
|
551
|
+
);
|
|
552
|
+
expect(insightsAt).toBeGreaterThan(-1);
|
|
553
|
+
expect(source.slice(insightsAt, lightBulbAt)).not.toContain(
|
|
554
|
+
"SideMenuItem",
|
|
555
|
+
);
|
|
556
|
+
|
|
557
|
+
expect(source.match(/IconProp\.Automation/g)).toHaveLength(1);
|
|
558
|
+
const automationAt: number = source.indexOf("IconProp.Automation");
|
|
559
|
+
const agentAt: number = source.lastIndexOf(agentKey(item), automationAt);
|
|
560
|
+
expect(agentAt).toBeGreaterThan(-1);
|
|
561
|
+
expect(source.slice(agentAt, automationAt)).not.toContain("SideMenuItem");
|
|
562
|
+
|
|
563
|
+
if (item.metricsInsights) {
|
|
564
|
+
// The charts page's icon is a chart, like a Kubernetes cluster's.
|
|
565
|
+
const usageAt: number = source.indexOf('"Resource Usage"');
|
|
566
|
+
const chartAt: number = source.indexOf("IconProp.ChartBar", usageAt);
|
|
567
|
+
expect(usageAt).toBeGreaterThan(-1);
|
|
568
|
+
expect(source.slice(usageAt, chartAt)).toContain(
|
|
569
|
+
`PageMap.${item.metricsInsights}]`,
|
|
570
|
+
);
|
|
571
|
+
expect(source.slice(usageAt, chartAt)).not.toContain("SideMenuItem");
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
});
|
|
@@ -90,8 +90,9 @@ function keysIn(block: string): Array<string> {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
describe("Runbook step-type maps", () => {
|
|
93
|
-
test("the enum has the
|
|
93
|
+
test("the enum has the AI-only members the maps must cover", () => {
|
|
94
94
|
expect(STEP_TYPES).toContain(RunbookStepType.Kubectl);
|
|
95
|
+
expect(STEP_TYPES).toContain(RunbookStepType.ResourceCommand);
|
|
95
96
|
});
|
|
96
97
|
|
|
97
98
|
for (const map of MAPS) {
|
|
@@ -129,23 +130,53 @@ describe("Runbook step-type maps", () => {
|
|
|
129
130
|
expect(kubectlEntry).toMatch(/description:\s*\n?\s*"[^"]+"/);
|
|
130
131
|
});
|
|
131
132
|
|
|
133
|
+
test("the resource command entries name it as an AI agent command", () => {
|
|
134
|
+
const executionView: string = readSource("ExecutionView.tsx");
|
|
135
|
+
const steps: string = readSource("Steps.tsx");
|
|
136
|
+
|
|
137
|
+
expect(
|
|
138
|
+
cutBlock(
|
|
139
|
+
executionView,
|
|
140
|
+
"const STEP_TYPE_LABEL: Record<RunbookStepType, string> = {",
|
|
141
|
+
),
|
|
142
|
+
).toContain('[RunbookStepType.ResourceCommand]: "AI agent command"');
|
|
143
|
+
|
|
144
|
+
const meta: string = cutBlock(
|
|
145
|
+
steps,
|
|
146
|
+
"const STEP_TYPE_META: Record<RunbookStepType, StepTypeMeta> = {",
|
|
147
|
+
);
|
|
148
|
+
const resourceEntry: string = meta.slice(
|
|
149
|
+
meta.indexOf("[RunbookStepType.ResourceCommand]"),
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
expect(resourceEntry).toContain('label: "Resource command"');
|
|
153
|
+
expect(resourceEntry).toContain('shortLabel: "AI agent"');
|
|
154
|
+
expect(resourceEntry).toContain("icon: IconProp.");
|
|
155
|
+
expect(resourceEntry).toMatch(/description:\s*\n?\s*"[^"]+"/);
|
|
156
|
+
});
|
|
157
|
+
|
|
132
158
|
/*
|
|
133
|
-
* Kubectl steps are composed by OneUptime AI only
|
|
134
|
-
* so): the editor must render one that exists but
|
|
135
|
-
* something to add. Every other type stays offered,
|
|
136
|
-
* type cannot be forgotten by the picker.
|
|
159
|
+
* Kubectl and ResourceCommand steps are composed by OneUptime AI only
|
|
160
|
+
* (RunbookStepType says so): the editor must render one that exists but
|
|
161
|
+
* must not offer it as something to add. Every other type stays offered,
|
|
162
|
+
* so a new authored type cannot be forgotten by the picker.
|
|
137
163
|
*/
|
|
138
|
-
test("the step picker offers every step type except
|
|
164
|
+
test("the step picker offers every step type except the AI-only ones", () => {
|
|
139
165
|
const picker: string = cutBlock(
|
|
140
166
|
readSource("Steps.tsx"),
|
|
141
167
|
"const ALL_STEP_TYPES: RunbookStepType[] = [",
|
|
142
168
|
);
|
|
143
169
|
const offered: Array<string> = keysInList(picker);
|
|
170
|
+
const aiOnly: Array<RunbookStepType> = [
|
|
171
|
+
RunbookStepType.Kubectl,
|
|
172
|
+
RunbookStepType.ResourceCommand,
|
|
173
|
+
];
|
|
144
174
|
|
|
145
175
|
expect(offered).not.toContain(RunbookStepType.Kubectl);
|
|
176
|
+
expect(offered).not.toContain(RunbookStepType.ResourceCommand);
|
|
146
177
|
expect([...offered].sort()).toEqual(
|
|
147
178
|
STEP_TYPES.filter((type: RunbookStepType): boolean => {
|
|
148
|
-
return type
|
|
179
|
+
return !aiOnly.includes(type);
|
|
149
180
|
}).sort(),
|
|
150
181
|
);
|
|
151
182
|
});
|