@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
|
@@ -24,6 +24,7 @@ import TenantColumn from "../../Types/Database/TenantColumn";
|
|
|
24
24
|
import IconProp from "../../Types/Icon/IconProp";
|
|
25
25
|
import ObjectID from "../../Types/ObjectID";
|
|
26
26
|
import Permission from "../../Types/Permission";
|
|
27
|
+
import AiResourceType from "../../Types/ResourceAiAgent/AiResourceType";
|
|
27
28
|
import { JSONObject } from "../../Types/JSON";
|
|
28
29
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
29
30
|
|
|
@@ -251,6 +252,65 @@ export default class AutoRemediationSuggestion extends BaseModel {
|
|
|
251
252
|
})
|
|
252
253
|
public kubernetesClusterId?: ObjectID = undefined;
|
|
253
254
|
|
|
255
|
+
/*
|
|
256
|
+
* Resource-level remediation: a suggestion produced by the AI remediation
|
|
257
|
+
* mode of an infrastructure resource other than a Kubernetes cluster (a
|
|
258
|
+
* Docker or Podman host, a Docker Swarm, Proxmox or Ceph cluster, a
|
|
259
|
+
* vCenter, a database server or a host), through its resource AI agent.
|
|
260
|
+
* Like a cluster-level suggestion it has no rule; the resource's mode and
|
|
261
|
+
* allowlist play the rule's part. Two columns, not a relation: resourceId
|
|
262
|
+
* points into the table resourceType names, so it can have no foreign key.
|
|
263
|
+
*/
|
|
264
|
+
@ColumnAccessControl({
|
|
265
|
+
create: [],
|
|
266
|
+
read: [
|
|
267
|
+
Permission.ProjectOwner,
|
|
268
|
+
Permission.ProjectAdmin,
|
|
269
|
+
Permission.ProjectMember,
|
|
270
|
+
],
|
|
271
|
+
update: [],
|
|
272
|
+
})
|
|
273
|
+
@Index()
|
|
274
|
+
@TableColumn({
|
|
275
|
+
type: TableColumnType.ShortText,
|
|
276
|
+
required: false,
|
|
277
|
+
canReadOnRelationQuery: true,
|
|
278
|
+
title: "Resource Type",
|
|
279
|
+
description:
|
|
280
|
+
"The kind of resource whose AI remediation mode produced this suggestion (DockerHost, PodmanHost, DockerSwarmCluster, ProxmoxCluster, VMwareVCenter, CephCluster, DatabaseServer or Host; resource-level remediation, no rule).",
|
|
281
|
+
})
|
|
282
|
+
@Column({
|
|
283
|
+
type: ColumnType.ShortText,
|
|
284
|
+
length: ColumnLength.ShortText,
|
|
285
|
+
nullable: true,
|
|
286
|
+
})
|
|
287
|
+
public resourceType?: AiResourceType = undefined;
|
|
288
|
+
|
|
289
|
+
@ColumnAccessControl({
|
|
290
|
+
create: [],
|
|
291
|
+
read: [
|
|
292
|
+
Permission.ProjectOwner,
|
|
293
|
+
Permission.ProjectAdmin,
|
|
294
|
+
Permission.ProjectMember,
|
|
295
|
+
],
|
|
296
|
+
update: [],
|
|
297
|
+
})
|
|
298
|
+
@Index()
|
|
299
|
+
@TableColumn({
|
|
300
|
+
type: TableColumnType.ObjectID,
|
|
301
|
+
required: false,
|
|
302
|
+
canReadOnRelationQuery: true,
|
|
303
|
+
title: "Resource ID",
|
|
304
|
+
description:
|
|
305
|
+
"ID of the resource whose AI remediation mode produced this suggestion, in the table its resource type names.",
|
|
306
|
+
})
|
|
307
|
+
@Column({
|
|
308
|
+
type: ColumnType.ObjectID,
|
|
309
|
+
nullable: true,
|
|
310
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
311
|
+
})
|
|
312
|
+
public resourceId?: ObjectID = undefined;
|
|
313
|
+
|
|
254
314
|
@ColumnAccessControl({
|
|
255
315
|
create: [],
|
|
256
316
|
read: [
|
|
@@ -19,6 +19,7 @@ import UniqueColumnBy from "../../Types/Database/UniqueColumnBy";
|
|
|
19
19
|
import IconProp from "../../Types/Icon/IconProp";
|
|
20
20
|
import ObjectID from "../../Types/ObjectID";
|
|
21
21
|
import Permission from "../../Types/Permission";
|
|
22
|
+
import { ResourceAiRemediationMode } from "../../Types/ResourceAiAgent/ResourceAiAccess";
|
|
22
23
|
import TelemetryRetentionConfig from "../../Types/Telemetry/TelemetryRetentionConfig";
|
|
23
24
|
import {
|
|
24
25
|
Column,
|
|
@@ -1109,4 +1110,216 @@ export default class CephCluster extends BaseModel {
|
|
|
1109
1110
|
nullable: true,
|
|
1110
1111
|
})
|
|
1111
1112
|
public telemetryRetentionConfig?: TelemetryRetentionConfig = undefined;
|
|
1113
|
+
|
|
1114
|
+
/*
|
|
1115
|
+
* OneUptime AI access to this Ceph cluster through its Ceph AI agent (a resource AI
|
|
1116
|
+
* agent, ResourceAiAgent). The settings are plain columns written through
|
|
1117
|
+
* ordinary CRUD, so they exist before any agent registers. The columns
|
|
1118
|
+
* keep the Ceph cluster's own update ACL: anyone who may edit the Ceph cluster may make
|
|
1119
|
+
* AI do LESS; making it do MORE is refused by the service unless the
|
|
1120
|
+
* caller may author a FullAuto auto-remediation rule. The aiAccess*
|
|
1121
|
+
* columns are written only by the server.
|
|
1122
|
+
*/
|
|
1123
|
+
@ColumnAccessControl({
|
|
1124
|
+
create: [],
|
|
1125
|
+
read: [
|
|
1126
|
+
Permission.ProjectOwner,
|
|
1127
|
+
Permission.ProjectAdmin,
|
|
1128
|
+
Permission.ProjectMember,
|
|
1129
|
+
Permission.Viewer,
|
|
1130
|
+
Permission.SettingsAdmin,
|
|
1131
|
+
Permission.SettingsMember,
|
|
1132
|
+
Permission.SettingsViewer,
|
|
1133
|
+
Permission.ReadCephCluster,
|
|
1134
|
+
],
|
|
1135
|
+
update: [
|
|
1136
|
+
Permission.ProjectOwner,
|
|
1137
|
+
Permission.ProjectAdmin,
|
|
1138
|
+
Permission.ProjectMember,
|
|
1139
|
+
Permission.SettingsAdmin,
|
|
1140
|
+
Permission.SettingsMember,
|
|
1141
|
+
Permission.EditCephCluster,
|
|
1142
|
+
],
|
|
1143
|
+
})
|
|
1144
|
+
@TableColumn({
|
|
1145
|
+
isDefaultValueColumn: true,
|
|
1146
|
+
required: true,
|
|
1147
|
+
type: TableColumnType.Boolean,
|
|
1148
|
+
title: "Let AI Investigate With Read-Only Commands",
|
|
1149
|
+
description:
|
|
1150
|
+
"When on, OneUptime AI runs read-only commands (ceph health, status, osd tree, df) on this Ceph cluster, through its Ceph AI agent, while investigating incidents and alerts linked to it, and uses their output, with secret values redacted, as evidence. Nothing is ever changed by an investigation. Off by default. Anyone who may edit the Ceph cluster can turn it on or off.",
|
|
1151
|
+
defaultValue: false,
|
|
1152
|
+
})
|
|
1153
|
+
@Column({
|
|
1154
|
+
type: ColumnType.Boolean,
|
|
1155
|
+
nullable: false,
|
|
1156
|
+
default: false,
|
|
1157
|
+
})
|
|
1158
|
+
public isAiInvestigationEnabled?: boolean = undefined;
|
|
1159
|
+
|
|
1160
|
+
@ColumnAccessControl({
|
|
1161
|
+
create: [],
|
|
1162
|
+
read: [
|
|
1163
|
+
Permission.ProjectOwner,
|
|
1164
|
+
Permission.ProjectAdmin,
|
|
1165
|
+
Permission.ProjectMember,
|
|
1166
|
+
Permission.Viewer,
|
|
1167
|
+
Permission.SettingsAdmin,
|
|
1168
|
+
Permission.SettingsMember,
|
|
1169
|
+
Permission.SettingsViewer,
|
|
1170
|
+
Permission.ReadCephCluster,
|
|
1171
|
+
],
|
|
1172
|
+
update: [
|
|
1173
|
+
Permission.ProjectOwner,
|
|
1174
|
+
Permission.ProjectAdmin,
|
|
1175
|
+
Permission.ProjectMember,
|
|
1176
|
+
Permission.SettingsAdmin,
|
|
1177
|
+
Permission.SettingsMember,
|
|
1178
|
+
Permission.EditCephCluster,
|
|
1179
|
+
],
|
|
1180
|
+
})
|
|
1181
|
+
@TableColumn({
|
|
1182
|
+
isDefaultValueColumn: true,
|
|
1183
|
+
required: true,
|
|
1184
|
+
type: TableColumnType.ShortText,
|
|
1185
|
+
title: "AI Remediation Mode",
|
|
1186
|
+
/*
|
|
1187
|
+
* The API and Terraform docs for the mode: the same semantics as the
|
|
1188
|
+
* ResourceAiRemediationMode doc comment in
|
|
1189
|
+
* Types/ResourceAiAgent/ResourceAiAccess.ts (the canonical text).
|
|
1190
|
+
*/
|
|
1191
|
+
description:
|
|
1192
|
+
"Disabled: AI never proposes or runs a change on this Ceph cluster. RequireApproval: AI composes a command plan and a human approves it with one click before anything runs. Automatic: safe changes (SafeWrite) run without a human; a riskier change is proposed for approval unless the Ceph cluster's allowlist names its exact shape. BypassApproval: every change the policy allows — safe AND riskier — runs on its own, except what always needs a human. In EVERY mode: Denied commands never run, commands the policy marks requiresHuman always ask, and the agent itself refuses every write unless it was started with ONEUPTIME_AI_ALLOW_WRITES=true (and then only on the targets ONEUPTIME_AI_WRITE_TARGETS allows, never its protected targets). Anyone who may edit the Ceph cluster can lower the mode; raising it needs Project Owner, Project Admin or Edit Auto Remediation Rule.",
|
|
1193
|
+
defaultValue: ResourceAiRemediationMode.Disabled,
|
|
1194
|
+
example: ResourceAiRemediationMode.RequireApproval,
|
|
1195
|
+
})
|
|
1196
|
+
@Column({
|
|
1197
|
+
type: ColumnType.ShortText,
|
|
1198
|
+
length: ColumnLength.ShortText,
|
|
1199
|
+
nullable: false,
|
|
1200
|
+
default: ResourceAiRemediationMode.Disabled,
|
|
1201
|
+
})
|
|
1202
|
+
public aiRemediationMode?: ResourceAiRemediationMode = undefined;
|
|
1203
|
+
|
|
1204
|
+
@ColumnAccessControl({
|
|
1205
|
+
create: [],
|
|
1206
|
+
read: [
|
|
1207
|
+
Permission.ProjectOwner,
|
|
1208
|
+
Permission.ProjectAdmin,
|
|
1209
|
+
Permission.ProjectMember,
|
|
1210
|
+
Permission.Viewer,
|
|
1211
|
+
Permission.SettingsAdmin,
|
|
1212
|
+
Permission.SettingsMember,
|
|
1213
|
+
Permission.SettingsViewer,
|
|
1214
|
+
Permission.ReadCephCluster,
|
|
1215
|
+
],
|
|
1216
|
+
update: [
|
|
1217
|
+
Permission.ProjectOwner,
|
|
1218
|
+
Permission.ProjectAdmin,
|
|
1219
|
+
Permission.ProjectMember,
|
|
1220
|
+
Permission.SettingsAdmin,
|
|
1221
|
+
Permission.SettingsMember,
|
|
1222
|
+
Permission.EditCephCluster,
|
|
1223
|
+
],
|
|
1224
|
+
})
|
|
1225
|
+
@TableColumn({
|
|
1226
|
+
type: TableColumnType.JSON,
|
|
1227
|
+
required: false,
|
|
1228
|
+
title: "AI Command Allowlist",
|
|
1229
|
+
description:
|
|
1230
|
+
"Optional JSON array of command patterns that Automatic mode may run on this Ceph cluster without approval even though they are riskier changes. Each pattern is one command line for this Ceph cluster's agent (ceph) and is compared with the command word by word: * stands for exactly one word (a name, an id), never for extra words or flags, and every flag the command uses must be written out in the pattern. At most 50 patterns of at most 500 characters each; a pattern that is not one valid write command for this Ceph cluster is refused. Destructive commands (Denied tier) never run regardless, and a command that always needs a human still asks. Adding a pattern needs Project Owner, Project Admin or Edit Auto Remediation Rule; anyone who may edit the Ceph cluster can remove patterns or clear the list.",
|
|
1231
|
+
})
|
|
1232
|
+
@Column({
|
|
1233
|
+
type: ColumnType.JSON,
|
|
1234
|
+
nullable: true,
|
|
1235
|
+
})
|
|
1236
|
+
public aiCommandAllowlist?: Array<string> = undefined;
|
|
1237
|
+
|
|
1238
|
+
@ColumnAccessControl({
|
|
1239
|
+
create: [],
|
|
1240
|
+
read: [
|
|
1241
|
+
Permission.ProjectOwner,
|
|
1242
|
+
Permission.ProjectAdmin,
|
|
1243
|
+
Permission.ProjectMember,
|
|
1244
|
+
Permission.Viewer,
|
|
1245
|
+
Permission.SettingsAdmin,
|
|
1246
|
+
Permission.SettingsMember,
|
|
1247
|
+
Permission.SettingsViewer,
|
|
1248
|
+
Permission.ReadCephCluster,
|
|
1249
|
+
],
|
|
1250
|
+
update: [],
|
|
1251
|
+
})
|
|
1252
|
+
@TableColumn({
|
|
1253
|
+
required: false,
|
|
1254
|
+
type: TableColumnType.Date,
|
|
1255
|
+
title: "AI Access Last Verified At",
|
|
1256
|
+
description:
|
|
1257
|
+
"When a command from OneUptime AI last succeeded on this Ceph cluster through its Ceph AI agent. Set by the server.",
|
|
1258
|
+
})
|
|
1259
|
+
@Column({
|
|
1260
|
+
type: ColumnType.Date,
|
|
1261
|
+
nullable: true,
|
|
1262
|
+
})
|
|
1263
|
+
public aiAccessLastVerifiedAt?: Date = undefined;
|
|
1264
|
+
|
|
1265
|
+
@ColumnAccessControl({
|
|
1266
|
+
create: [],
|
|
1267
|
+
read: [
|
|
1268
|
+
Permission.ProjectOwner,
|
|
1269
|
+
Permission.ProjectAdmin,
|
|
1270
|
+
Permission.ProjectMember,
|
|
1271
|
+
Permission.Viewer,
|
|
1272
|
+
Permission.SettingsAdmin,
|
|
1273
|
+
Permission.SettingsMember,
|
|
1274
|
+
Permission.SettingsViewer,
|
|
1275
|
+
Permission.ReadCephCluster,
|
|
1276
|
+
],
|
|
1277
|
+
update: [],
|
|
1278
|
+
})
|
|
1279
|
+
@TableColumn({
|
|
1280
|
+
required: false,
|
|
1281
|
+
type: TableColumnType.LongText,
|
|
1282
|
+
title: "AI Access Last Error",
|
|
1283
|
+
description:
|
|
1284
|
+
"The most recent failure OneUptime AI hit while running a command on this Ceph cluster, kept until the next successful command. Set by the server.",
|
|
1285
|
+
})
|
|
1286
|
+
@Column({
|
|
1287
|
+
type: ColumnType.LongText,
|
|
1288
|
+
nullable: true,
|
|
1289
|
+
})
|
|
1290
|
+
public aiAccessLastError?: string = undefined;
|
|
1291
|
+
|
|
1292
|
+
/*
|
|
1293
|
+
* When this Ceph cluster's AI access was first configured — by anyone writing an
|
|
1294
|
+
* AI access setting. Only the server writes it, and nothing ever clears
|
|
1295
|
+
* it. A registering Ceph AI agent reads it to tell "never configured" (it may
|
|
1296
|
+
* apply its first-connection defaults) from "an operator chose settings,
|
|
1297
|
+
* perhaps before installing the agent" (every setting stays as chosen).
|
|
1298
|
+
*/
|
|
1299
|
+
@ColumnAccessControl({
|
|
1300
|
+
create: [],
|
|
1301
|
+
read: [
|
|
1302
|
+
Permission.ProjectOwner,
|
|
1303
|
+
Permission.ProjectAdmin,
|
|
1304
|
+
Permission.ProjectMember,
|
|
1305
|
+
Permission.Viewer,
|
|
1306
|
+
Permission.SettingsAdmin,
|
|
1307
|
+
Permission.SettingsMember,
|
|
1308
|
+
Permission.SettingsViewer,
|
|
1309
|
+
Permission.ReadCephCluster,
|
|
1310
|
+
],
|
|
1311
|
+
update: [],
|
|
1312
|
+
})
|
|
1313
|
+
@TableColumn({
|
|
1314
|
+
required: false,
|
|
1315
|
+
type: TableColumnType.Date,
|
|
1316
|
+
title: "AI Access Configured At",
|
|
1317
|
+
description:
|
|
1318
|
+
"When OneUptime AI access to this Ceph cluster was first configured by anyone saving an AI access setting. Set by the server; never cleared, so a Ceph AI agent that registers later never overwrites a setting an operator chose.",
|
|
1319
|
+
})
|
|
1320
|
+
@Column({
|
|
1321
|
+
type: ColumnType.Date,
|
|
1322
|
+
nullable: true,
|
|
1323
|
+
})
|
|
1324
|
+
public aiAccessConfiguredAt?: Date = undefined;
|
|
1112
1325
|
}
|
|
@@ -22,6 +22,7 @@ import IconProp from "../../Types/Icon/IconProp";
|
|
|
22
22
|
import { JSONObject } from "../../Types/JSON";
|
|
23
23
|
import ObjectID from "../../Types/ObjectID";
|
|
24
24
|
import Permission from "../../Types/Permission";
|
|
25
|
+
import { ResourceAiRemediationMode } from "../../Types/ResourceAiAgent/ResourceAiAccess";
|
|
25
26
|
import TelemetryRetentionConfig from "../../Types/Telemetry/TelemetryRetentionConfig";
|
|
26
27
|
import {
|
|
27
28
|
Column,
|
|
@@ -1647,4 +1648,216 @@ export default class DatabaseServer extends BaseModel {
|
|
|
1647
1648
|
nullable: true,
|
|
1648
1649
|
})
|
|
1649
1650
|
public telemetryRetentionConfig?: TelemetryRetentionConfig = undefined;
|
|
1651
|
+
|
|
1652
|
+
/*
|
|
1653
|
+
* OneUptime AI access to this database server through its Database AI agent (a resource AI
|
|
1654
|
+
* agent, ResourceAiAgent). The settings are plain columns written through
|
|
1655
|
+
* ordinary CRUD, so they exist before any agent registers. The columns
|
|
1656
|
+
* keep the database server's own update ACL: anyone who may edit the database server may make
|
|
1657
|
+
* AI do LESS; making it do MORE is refused by the service unless the
|
|
1658
|
+
* caller may author a FullAuto auto-remediation rule. The aiAccess*
|
|
1659
|
+
* columns are written only by the server.
|
|
1660
|
+
*/
|
|
1661
|
+
@ColumnAccessControl({
|
|
1662
|
+
create: [],
|
|
1663
|
+
read: [
|
|
1664
|
+
Permission.ProjectOwner,
|
|
1665
|
+
Permission.ProjectAdmin,
|
|
1666
|
+
Permission.ProjectMember,
|
|
1667
|
+
Permission.Viewer,
|
|
1668
|
+
Permission.SettingsAdmin,
|
|
1669
|
+
Permission.SettingsMember,
|
|
1670
|
+
Permission.SettingsViewer,
|
|
1671
|
+
Permission.ReadDatabaseServer,
|
|
1672
|
+
],
|
|
1673
|
+
update: [
|
|
1674
|
+
Permission.ProjectOwner,
|
|
1675
|
+
Permission.ProjectAdmin,
|
|
1676
|
+
Permission.ProjectMember,
|
|
1677
|
+
Permission.SettingsAdmin,
|
|
1678
|
+
Permission.SettingsMember,
|
|
1679
|
+
Permission.EditDatabaseServer,
|
|
1680
|
+
],
|
|
1681
|
+
})
|
|
1682
|
+
@TableColumn({
|
|
1683
|
+
isDefaultValueColumn: true,
|
|
1684
|
+
required: true,
|
|
1685
|
+
type: TableColumnType.Boolean,
|
|
1686
|
+
title: "Let AI Investigate With Read-Only Commands",
|
|
1687
|
+
description:
|
|
1688
|
+
"When on, OneUptime AI runs read-only commands (db diagnostics from a fixed catalog such as ping, version and sessions; never free-form SQL) on this database server, through its Database AI agent, while investigating incidents and alerts linked to it, and uses their output, with secret values redacted, as evidence. Nothing is ever changed by an investigation. Off by default. Anyone who may edit the database server can turn it on or off.",
|
|
1689
|
+
defaultValue: false,
|
|
1690
|
+
})
|
|
1691
|
+
@Column({
|
|
1692
|
+
type: ColumnType.Boolean,
|
|
1693
|
+
nullable: false,
|
|
1694
|
+
default: false,
|
|
1695
|
+
})
|
|
1696
|
+
public isAiInvestigationEnabled?: boolean = undefined;
|
|
1697
|
+
|
|
1698
|
+
@ColumnAccessControl({
|
|
1699
|
+
create: [],
|
|
1700
|
+
read: [
|
|
1701
|
+
Permission.ProjectOwner,
|
|
1702
|
+
Permission.ProjectAdmin,
|
|
1703
|
+
Permission.ProjectMember,
|
|
1704
|
+
Permission.Viewer,
|
|
1705
|
+
Permission.SettingsAdmin,
|
|
1706
|
+
Permission.SettingsMember,
|
|
1707
|
+
Permission.SettingsViewer,
|
|
1708
|
+
Permission.ReadDatabaseServer,
|
|
1709
|
+
],
|
|
1710
|
+
update: [
|
|
1711
|
+
Permission.ProjectOwner,
|
|
1712
|
+
Permission.ProjectAdmin,
|
|
1713
|
+
Permission.ProjectMember,
|
|
1714
|
+
Permission.SettingsAdmin,
|
|
1715
|
+
Permission.SettingsMember,
|
|
1716
|
+
Permission.EditDatabaseServer,
|
|
1717
|
+
],
|
|
1718
|
+
})
|
|
1719
|
+
@TableColumn({
|
|
1720
|
+
isDefaultValueColumn: true,
|
|
1721
|
+
required: true,
|
|
1722
|
+
type: TableColumnType.ShortText,
|
|
1723
|
+
title: "AI Remediation Mode",
|
|
1724
|
+
/*
|
|
1725
|
+
* The API and Terraform docs for the mode: the same semantics as the
|
|
1726
|
+
* ResourceAiRemediationMode doc comment in
|
|
1727
|
+
* Types/ResourceAiAgent/ResourceAiAccess.ts (the canonical text).
|
|
1728
|
+
*/
|
|
1729
|
+
description:
|
|
1730
|
+
"Disabled: AI never proposes or runs a change on this database server. RequireApproval: AI composes a command plan and a human approves it with one click before anything runs. Automatic: safe changes (SafeWrite) run without a human; a riskier change is proposed for approval unless the database server's allowlist names its exact shape. BypassApproval: every change the policy allows — safe AND riskier — runs on its own, except what always needs a human. In EVERY mode: Denied commands never run, commands the policy marks requiresHuman always ask, and the agent itself refuses every write unless it was started with ONEUPTIME_AI_ALLOW_WRITES=true (and then only on the targets ONEUPTIME_AI_WRITE_TARGETS allows, never its protected targets). Anyone who may edit the database server can lower the mode; raising it needs Project Owner, Project Admin or Edit Auto Remediation Rule.",
|
|
1731
|
+
defaultValue: ResourceAiRemediationMode.Disabled,
|
|
1732
|
+
example: ResourceAiRemediationMode.RequireApproval,
|
|
1733
|
+
})
|
|
1734
|
+
@Column({
|
|
1735
|
+
type: ColumnType.ShortText,
|
|
1736
|
+
length: ColumnLength.ShortText,
|
|
1737
|
+
nullable: false,
|
|
1738
|
+
default: ResourceAiRemediationMode.Disabled,
|
|
1739
|
+
})
|
|
1740
|
+
public aiRemediationMode?: ResourceAiRemediationMode = undefined;
|
|
1741
|
+
|
|
1742
|
+
@ColumnAccessControl({
|
|
1743
|
+
create: [],
|
|
1744
|
+
read: [
|
|
1745
|
+
Permission.ProjectOwner,
|
|
1746
|
+
Permission.ProjectAdmin,
|
|
1747
|
+
Permission.ProjectMember,
|
|
1748
|
+
Permission.Viewer,
|
|
1749
|
+
Permission.SettingsAdmin,
|
|
1750
|
+
Permission.SettingsMember,
|
|
1751
|
+
Permission.SettingsViewer,
|
|
1752
|
+
Permission.ReadDatabaseServer,
|
|
1753
|
+
],
|
|
1754
|
+
update: [
|
|
1755
|
+
Permission.ProjectOwner,
|
|
1756
|
+
Permission.ProjectAdmin,
|
|
1757
|
+
Permission.ProjectMember,
|
|
1758
|
+
Permission.SettingsAdmin,
|
|
1759
|
+
Permission.SettingsMember,
|
|
1760
|
+
Permission.EditDatabaseServer,
|
|
1761
|
+
],
|
|
1762
|
+
})
|
|
1763
|
+
@TableColumn({
|
|
1764
|
+
type: TableColumnType.JSON,
|
|
1765
|
+
required: false,
|
|
1766
|
+
title: "AI Command Allowlist",
|
|
1767
|
+
description:
|
|
1768
|
+
"Optional JSON array of command patterns that Automatic mode may run on this database server without approval even though they are riskier changes. Each pattern is one command line for this database server's agent (db, a fixed catalog of diagnostics, never free-form SQL) and is compared with the command word by word: * stands for exactly one word (a name, an id), never for extra words or flags, and every flag the command uses must be written out in the pattern. At most 50 patterns of at most 500 characters each; a pattern that is not one valid write command for this database server is refused. Destructive commands (Denied tier) never run regardless, and a command that always needs a human still asks. Adding a pattern needs Project Owner, Project Admin or Edit Auto Remediation Rule; anyone who may edit the database server can remove patterns or clear the list.",
|
|
1769
|
+
})
|
|
1770
|
+
@Column({
|
|
1771
|
+
type: ColumnType.JSON,
|
|
1772
|
+
nullable: true,
|
|
1773
|
+
})
|
|
1774
|
+
public aiCommandAllowlist?: Array<string> = undefined;
|
|
1775
|
+
|
|
1776
|
+
@ColumnAccessControl({
|
|
1777
|
+
create: [],
|
|
1778
|
+
read: [
|
|
1779
|
+
Permission.ProjectOwner,
|
|
1780
|
+
Permission.ProjectAdmin,
|
|
1781
|
+
Permission.ProjectMember,
|
|
1782
|
+
Permission.Viewer,
|
|
1783
|
+
Permission.SettingsAdmin,
|
|
1784
|
+
Permission.SettingsMember,
|
|
1785
|
+
Permission.SettingsViewer,
|
|
1786
|
+
Permission.ReadDatabaseServer,
|
|
1787
|
+
],
|
|
1788
|
+
update: [],
|
|
1789
|
+
})
|
|
1790
|
+
@TableColumn({
|
|
1791
|
+
required: false,
|
|
1792
|
+
type: TableColumnType.Date,
|
|
1793
|
+
title: "AI Access Last Verified At",
|
|
1794
|
+
description:
|
|
1795
|
+
"When a command from OneUptime AI last succeeded on this database server through its Database AI agent. Set by the server.",
|
|
1796
|
+
})
|
|
1797
|
+
@Column({
|
|
1798
|
+
type: ColumnType.Date,
|
|
1799
|
+
nullable: true,
|
|
1800
|
+
})
|
|
1801
|
+
public aiAccessLastVerifiedAt?: Date = undefined;
|
|
1802
|
+
|
|
1803
|
+
@ColumnAccessControl({
|
|
1804
|
+
create: [],
|
|
1805
|
+
read: [
|
|
1806
|
+
Permission.ProjectOwner,
|
|
1807
|
+
Permission.ProjectAdmin,
|
|
1808
|
+
Permission.ProjectMember,
|
|
1809
|
+
Permission.Viewer,
|
|
1810
|
+
Permission.SettingsAdmin,
|
|
1811
|
+
Permission.SettingsMember,
|
|
1812
|
+
Permission.SettingsViewer,
|
|
1813
|
+
Permission.ReadDatabaseServer,
|
|
1814
|
+
],
|
|
1815
|
+
update: [],
|
|
1816
|
+
})
|
|
1817
|
+
@TableColumn({
|
|
1818
|
+
required: false,
|
|
1819
|
+
type: TableColumnType.LongText,
|
|
1820
|
+
title: "AI Access Last Error",
|
|
1821
|
+
description:
|
|
1822
|
+
"The most recent failure OneUptime AI hit while running a command on this database server, kept until the next successful command. Set by the server.",
|
|
1823
|
+
})
|
|
1824
|
+
@Column({
|
|
1825
|
+
type: ColumnType.LongText,
|
|
1826
|
+
nullable: true,
|
|
1827
|
+
})
|
|
1828
|
+
public aiAccessLastError?: string = undefined;
|
|
1829
|
+
|
|
1830
|
+
/*
|
|
1831
|
+
* When this database server's AI access was first configured — by anyone writing an
|
|
1832
|
+
* AI access setting. Only the server writes it, and nothing ever clears
|
|
1833
|
+
* it. A registering Database AI agent reads it to tell "never configured" (it may
|
|
1834
|
+
* apply its first-connection defaults) from "an operator chose settings,
|
|
1835
|
+
* perhaps before installing the agent" (every setting stays as chosen).
|
|
1836
|
+
*/
|
|
1837
|
+
@ColumnAccessControl({
|
|
1838
|
+
create: [],
|
|
1839
|
+
read: [
|
|
1840
|
+
Permission.ProjectOwner,
|
|
1841
|
+
Permission.ProjectAdmin,
|
|
1842
|
+
Permission.ProjectMember,
|
|
1843
|
+
Permission.Viewer,
|
|
1844
|
+
Permission.SettingsAdmin,
|
|
1845
|
+
Permission.SettingsMember,
|
|
1846
|
+
Permission.SettingsViewer,
|
|
1847
|
+
Permission.ReadDatabaseServer,
|
|
1848
|
+
],
|
|
1849
|
+
update: [],
|
|
1850
|
+
})
|
|
1851
|
+
@TableColumn({
|
|
1852
|
+
required: false,
|
|
1853
|
+
type: TableColumnType.Date,
|
|
1854
|
+
title: "AI Access Configured At",
|
|
1855
|
+
description:
|
|
1856
|
+
"When OneUptime AI access to this database server was first configured by anyone saving an AI access setting. Set by the server; never cleared, so a Database AI agent that registers later never overwrites a setting an operator chose.",
|
|
1857
|
+
})
|
|
1858
|
+
@Column({
|
|
1859
|
+
type: ColumnType.Date,
|
|
1860
|
+
nullable: true,
|
|
1861
|
+
})
|
|
1862
|
+
public aiAccessConfiguredAt?: Date = undefined;
|
|
1650
1863
|
}
|