@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
|
@@ -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,
|
|
@@ -1004,4 +1005,216 @@ export default class DockerHost extends BaseModel {
|
|
|
1004
1005
|
nullable: true,
|
|
1005
1006
|
})
|
|
1006
1007
|
public telemetryRetentionConfig?: TelemetryRetentionConfig = undefined;
|
|
1008
|
+
|
|
1009
|
+
/*
|
|
1010
|
+
* OneUptime AI access to this Docker host through its Docker AI agent (a resource AI
|
|
1011
|
+
* agent, ResourceAiAgent). The settings are plain columns written through
|
|
1012
|
+
* ordinary CRUD, so they exist before any agent registers. The columns
|
|
1013
|
+
* keep the Docker host's own update ACL: anyone who may edit the Docker host may make
|
|
1014
|
+
* AI do LESS; making it do MORE is refused by the service unless the
|
|
1015
|
+
* caller may author a FullAuto auto-remediation rule. The aiAccess*
|
|
1016
|
+
* columns are written only by the server.
|
|
1017
|
+
*/
|
|
1018
|
+
@ColumnAccessControl({
|
|
1019
|
+
create: [],
|
|
1020
|
+
read: [
|
|
1021
|
+
Permission.ProjectOwner,
|
|
1022
|
+
Permission.ProjectAdmin,
|
|
1023
|
+
Permission.ProjectMember,
|
|
1024
|
+
Permission.Viewer,
|
|
1025
|
+
Permission.SettingsAdmin,
|
|
1026
|
+
Permission.SettingsMember,
|
|
1027
|
+
Permission.SettingsViewer,
|
|
1028
|
+
Permission.ReadDockerHost,
|
|
1029
|
+
],
|
|
1030
|
+
update: [
|
|
1031
|
+
Permission.ProjectOwner,
|
|
1032
|
+
Permission.ProjectAdmin,
|
|
1033
|
+
Permission.ProjectMember,
|
|
1034
|
+
Permission.SettingsAdmin,
|
|
1035
|
+
Permission.SettingsMember,
|
|
1036
|
+
Permission.EditDockerHost,
|
|
1037
|
+
],
|
|
1038
|
+
})
|
|
1039
|
+
@TableColumn({
|
|
1040
|
+
isDefaultValueColumn: true,
|
|
1041
|
+
required: true,
|
|
1042
|
+
type: TableColumnType.Boolean,
|
|
1043
|
+
title: "Let AI Investigate With Read-Only Commands",
|
|
1044
|
+
description:
|
|
1045
|
+
"When on, OneUptime AI runs read-only commands (docker ps, inspect, logs, stats, events) on this Docker host, through its Docker 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 Docker host can turn it on or off.",
|
|
1046
|
+
defaultValue: false,
|
|
1047
|
+
})
|
|
1048
|
+
@Column({
|
|
1049
|
+
type: ColumnType.Boolean,
|
|
1050
|
+
nullable: false,
|
|
1051
|
+
default: false,
|
|
1052
|
+
})
|
|
1053
|
+
public isAiInvestigationEnabled?: boolean = undefined;
|
|
1054
|
+
|
|
1055
|
+
@ColumnAccessControl({
|
|
1056
|
+
create: [],
|
|
1057
|
+
read: [
|
|
1058
|
+
Permission.ProjectOwner,
|
|
1059
|
+
Permission.ProjectAdmin,
|
|
1060
|
+
Permission.ProjectMember,
|
|
1061
|
+
Permission.Viewer,
|
|
1062
|
+
Permission.SettingsAdmin,
|
|
1063
|
+
Permission.SettingsMember,
|
|
1064
|
+
Permission.SettingsViewer,
|
|
1065
|
+
Permission.ReadDockerHost,
|
|
1066
|
+
],
|
|
1067
|
+
update: [
|
|
1068
|
+
Permission.ProjectOwner,
|
|
1069
|
+
Permission.ProjectAdmin,
|
|
1070
|
+
Permission.ProjectMember,
|
|
1071
|
+
Permission.SettingsAdmin,
|
|
1072
|
+
Permission.SettingsMember,
|
|
1073
|
+
Permission.EditDockerHost,
|
|
1074
|
+
],
|
|
1075
|
+
})
|
|
1076
|
+
@TableColumn({
|
|
1077
|
+
isDefaultValueColumn: true,
|
|
1078
|
+
required: true,
|
|
1079
|
+
type: TableColumnType.ShortText,
|
|
1080
|
+
title: "AI Remediation Mode",
|
|
1081
|
+
/*
|
|
1082
|
+
* The API and Terraform docs for the mode: the same semantics as the
|
|
1083
|
+
* ResourceAiRemediationMode doc comment in
|
|
1084
|
+
* Types/ResourceAiAgent/ResourceAiAccess.ts (the canonical text).
|
|
1085
|
+
*/
|
|
1086
|
+
description:
|
|
1087
|
+
"Disabled: AI never proposes or runs a change on this Docker host. 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 Docker host'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 Docker host can lower the mode; raising it needs Project Owner, Project Admin or Edit Auto Remediation Rule.",
|
|
1088
|
+
defaultValue: ResourceAiRemediationMode.Disabled,
|
|
1089
|
+
example: ResourceAiRemediationMode.RequireApproval,
|
|
1090
|
+
})
|
|
1091
|
+
@Column({
|
|
1092
|
+
type: ColumnType.ShortText,
|
|
1093
|
+
length: ColumnLength.ShortText,
|
|
1094
|
+
nullable: false,
|
|
1095
|
+
default: ResourceAiRemediationMode.Disabled,
|
|
1096
|
+
})
|
|
1097
|
+
public aiRemediationMode?: ResourceAiRemediationMode = undefined;
|
|
1098
|
+
|
|
1099
|
+
@ColumnAccessControl({
|
|
1100
|
+
create: [],
|
|
1101
|
+
read: [
|
|
1102
|
+
Permission.ProjectOwner,
|
|
1103
|
+
Permission.ProjectAdmin,
|
|
1104
|
+
Permission.ProjectMember,
|
|
1105
|
+
Permission.Viewer,
|
|
1106
|
+
Permission.SettingsAdmin,
|
|
1107
|
+
Permission.SettingsMember,
|
|
1108
|
+
Permission.SettingsViewer,
|
|
1109
|
+
Permission.ReadDockerHost,
|
|
1110
|
+
],
|
|
1111
|
+
update: [
|
|
1112
|
+
Permission.ProjectOwner,
|
|
1113
|
+
Permission.ProjectAdmin,
|
|
1114
|
+
Permission.ProjectMember,
|
|
1115
|
+
Permission.SettingsAdmin,
|
|
1116
|
+
Permission.SettingsMember,
|
|
1117
|
+
Permission.EditDockerHost,
|
|
1118
|
+
],
|
|
1119
|
+
})
|
|
1120
|
+
@TableColumn({
|
|
1121
|
+
type: TableColumnType.JSON,
|
|
1122
|
+
required: false,
|
|
1123
|
+
title: "AI Command Allowlist",
|
|
1124
|
+
description:
|
|
1125
|
+
"Optional JSON array of command patterns that Automatic mode may run on this Docker host without approval even though they are riskier changes. Each pattern is one command line for this Docker host's agent (docker) 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 Docker host 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 Docker host can remove patterns or clear the list.",
|
|
1126
|
+
})
|
|
1127
|
+
@Column({
|
|
1128
|
+
type: ColumnType.JSON,
|
|
1129
|
+
nullable: true,
|
|
1130
|
+
})
|
|
1131
|
+
public aiCommandAllowlist?: Array<string> = undefined;
|
|
1132
|
+
|
|
1133
|
+
@ColumnAccessControl({
|
|
1134
|
+
create: [],
|
|
1135
|
+
read: [
|
|
1136
|
+
Permission.ProjectOwner,
|
|
1137
|
+
Permission.ProjectAdmin,
|
|
1138
|
+
Permission.ProjectMember,
|
|
1139
|
+
Permission.Viewer,
|
|
1140
|
+
Permission.SettingsAdmin,
|
|
1141
|
+
Permission.SettingsMember,
|
|
1142
|
+
Permission.SettingsViewer,
|
|
1143
|
+
Permission.ReadDockerHost,
|
|
1144
|
+
],
|
|
1145
|
+
update: [],
|
|
1146
|
+
})
|
|
1147
|
+
@TableColumn({
|
|
1148
|
+
required: false,
|
|
1149
|
+
type: TableColumnType.Date,
|
|
1150
|
+
title: "AI Access Last Verified At",
|
|
1151
|
+
description:
|
|
1152
|
+
"When a command from OneUptime AI last succeeded on this Docker host through its Docker AI agent. Set by the server.",
|
|
1153
|
+
})
|
|
1154
|
+
@Column({
|
|
1155
|
+
type: ColumnType.Date,
|
|
1156
|
+
nullable: true,
|
|
1157
|
+
})
|
|
1158
|
+
public aiAccessLastVerifiedAt?: Date = 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.ReadDockerHost,
|
|
1171
|
+
],
|
|
1172
|
+
update: [],
|
|
1173
|
+
})
|
|
1174
|
+
@TableColumn({
|
|
1175
|
+
required: false,
|
|
1176
|
+
type: TableColumnType.LongText,
|
|
1177
|
+
title: "AI Access Last Error",
|
|
1178
|
+
description:
|
|
1179
|
+
"The most recent failure OneUptime AI hit while running a command on this Docker host, kept until the next successful command. Set by the server.",
|
|
1180
|
+
})
|
|
1181
|
+
@Column({
|
|
1182
|
+
type: ColumnType.LongText,
|
|
1183
|
+
nullable: true,
|
|
1184
|
+
})
|
|
1185
|
+
public aiAccessLastError?: string = undefined;
|
|
1186
|
+
|
|
1187
|
+
/*
|
|
1188
|
+
* When this Docker host's AI access was first configured — by anyone writing an
|
|
1189
|
+
* AI access setting. Only the server writes it, and nothing ever clears
|
|
1190
|
+
* it. A registering Docker AI agent reads it to tell "never configured" (it may
|
|
1191
|
+
* apply its first-connection defaults) from "an operator chose settings,
|
|
1192
|
+
* perhaps before installing the agent" (every setting stays as chosen).
|
|
1193
|
+
*/
|
|
1194
|
+
@ColumnAccessControl({
|
|
1195
|
+
create: [],
|
|
1196
|
+
read: [
|
|
1197
|
+
Permission.ProjectOwner,
|
|
1198
|
+
Permission.ProjectAdmin,
|
|
1199
|
+
Permission.ProjectMember,
|
|
1200
|
+
Permission.Viewer,
|
|
1201
|
+
Permission.SettingsAdmin,
|
|
1202
|
+
Permission.SettingsMember,
|
|
1203
|
+
Permission.SettingsViewer,
|
|
1204
|
+
Permission.ReadDockerHost,
|
|
1205
|
+
],
|
|
1206
|
+
update: [],
|
|
1207
|
+
})
|
|
1208
|
+
@TableColumn({
|
|
1209
|
+
required: false,
|
|
1210
|
+
type: TableColumnType.Date,
|
|
1211
|
+
title: "AI Access Configured At",
|
|
1212
|
+
description:
|
|
1213
|
+
"When OneUptime AI access to this Docker host was first configured by anyone saving an AI access setting. Set by the server; never cleared, so a Docker AI agent that registers later never overwrites a setting an operator chose.",
|
|
1214
|
+
})
|
|
1215
|
+
@Column({
|
|
1216
|
+
type: ColumnType.Date,
|
|
1217
|
+
nullable: true,
|
|
1218
|
+
})
|
|
1219
|
+
public aiAccessConfiguredAt?: Date = undefined;
|
|
1007
1220
|
}
|
|
@@ -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,
|
|
@@ -1120,4 +1121,216 @@ export default class DockerSwarmCluster extends BaseModel {
|
|
|
1120
1121
|
nullable: true,
|
|
1121
1122
|
})
|
|
1122
1123
|
public telemetryRetentionConfig?: TelemetryRetentionConfig = undefined;
|
|
1124
|
+
|
|
1125
|
+
/*
|
|
1126
|
+
* OneUptime AI access to this Docker Swarm cluster through its Docker Swarm AI agent (a resource AI
|
|
1127
|
+
* agent, ResourceAiAgent). The settings are plain columns written through
|
|
1128
|
+
* ordinary CRUD, so they exist before any agent registers. The columns
|
|
1129
|
+
* keep the Docker Swarm cluster's own update ACL: anyone who may edit the Docker Swarm cluster may make
|
|
1130
|
+
* AI do LESS; making it do MORE is refused by the service unless the
|
|
1131
|
+
* caller may author a FullAuto auto-remediation rule. The aiAccess*
|
|
1132
|
+
* columns are written only by the server.
|
|
1133
|
+
*/
|
|
1134
|
+
@ColumnAccessControl({
|
|
1135
|
+
create: [],
|
|
1136
|
+
read: [
|
|
1137
|
+
Permission.ProjectOwner,
|
|
1138
|
+
Permission.ProjectAdmin,
|
|
1139
|
+
Permission.ProjectMember,
|
|
1140
|
+
Permission.Viewer,
|
|
1141
|
+
Permission.SettingsAdmin,
|
|
1142
|
+
Permission.SettingsMember,
|
|
1143
|
+
Permission.SettingsViewer,
|
|
1144
|
+
Permission.ReadDockerSwarmCluster,
|
|
1145
|
+
],
|
|
1146
|
+
update: [
|
|
1147
|
+
Permission.ProjectOwner,
|
|
1148
|
+
Permission.ProjectAdmin,
|
|
1149
|
+
Permission.ProjectMember,
|
|
1150
|
+
Permission.SettingsAdmin,
|
|
1151
|
+
Permission.SettingsMember,
|
|
1152
|
+
Permission.EditDockerSwarmCluster,
|
|
1153
|
+
],
|
|
1154
|
+
})
|
|
1155
|
+
@TableColumn({
|
|
1156
|
+
isDefaultValueColumn: true,
|
|
1157
|
+
required: true,
|
|
1158
|
+
type: TableColumnType.Boolean,
|
|
1159
|
+
title: "Let AI Investigate With Read-Only Commands",
|
|
1160
|
+
description:
|
|
1161
|
+
"When on, OneUptime AI runs read-only commands (docker service ls, service ps, service logs, node ls) on this Docker Swarm cluster, through its Docker Swarm 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 Docker Swarm cluster can turn it on or off.",
|
|
1162
|
+
defaultValue: false,
|
|
1163
|
+
})
|
|
1164
|
+
@Column({
|
|
1165
|
+
type: ColumnType.Boolean,
|
|
1166
|
+
nullable: false,
|
|
1167
|
+
default: false,
|
|
1168
|
+
})
|
|
1169
|
+
public isAiInvestigationEnabled?: boolean = undefined;
|
|
1170
|
+
|
|
1171
|
+
@ColumnAccessControl({
|
|
1172
|
+
create: [],
|
|
1173
|
+
read: [
|
|
1174
|
+
Permission.ProjectOwner,
|
|
1175
|
+
Permission.ProjectAdmin,
|
|
1176
|
+
Permission.ProjectMember,
|
|
1177
|
+
Permission.Viewer,
|
|
1178
|
+
Permission.SettingsAdmin,
|
|
1179
|
+
Permission.SettingsMember,
|
|
1180
|
+
Permission.SettingsViewer,
|
|
1181
|
+
Permission.ReadDockerSwarmCluster,
|
|
1182
|
+
],
|
|
1183
|
+
update: [
|
|
1184
|
+
Permission.ProjectOwner,
|
|
1185
|
+
Permission.ProjectAdmin,
|
|
1186
|
+
Permission.ProjectMember,
|
|
1187
|
+
Permission.SettingsAdmin,
|
|
1188
|
+
Permission.SettingsMember,
|
|
1189
|
+
Permission.EditDockerSwarmCluster,
|
|
1190
|
+
],
|
|
1191
|
+
})
|
|
1192
|
+
@TableColumn({
|
|
1193
|
+
isDefaultValueColumn: true,
|
|
1194
|
+
required: true,
|
|
1195
|
+
type: TableColumnType.ShortText,
|
|
1196
|
+
title: "AI Remediation Mode",
|
|
1197
|
+
/*
|
|
1198
|
+
* The API and Terraform docs for the mode: the same semantics as the
|
|
1199
|
+
* ResourceAiRemediationMode doc comment in
|
|
1200
|
+
* Types/ResourceAiAgent/ResourceAiAccess.ts (the canonical text).
|
|
1201
|
+
*/
|
|
1202
|
+
description:
|
|
1203
|
+
"Disabled: AI never proposes or runs a change on this Docker Swarm 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 Docker Swarm 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 Docker Swarm cluster can lower the mode; raising it needs Project Owner, Project Admin or Edit Auto Remediation Rule.",
|
|
1204
|
+
defaultValue: ResourceAiRemediationMode.Disabled,
|
|
1205
|
+
example: ResourceAiRemediationMode.RequireApproval,
|
|
1206
|
+
})
|
|
1207
|
+
@Column({
|
|
1208
|
+
type: ColumnType.ShortText,
|
|
1209
|
+
length: ColumnLength.ShortText,
|
|
1210
|
+
nullable: false,
|
|
1211
|
+
default: ResourceAiRemediationMode.Disabled,
|
|
1212
|
+
})
|
|
1213
|
+
public aiRemediationMode?: ResourceAiRemediationMode = undefined;
|
|
1214
|
+
|
|
1215
|
+
@ColumnAccessControl({
|
|
1216
|
+
create: [],
|
|
1217
|
+
read: [
|
|
1218
|
+
Permission.ProjectOwner,
|
|
1219
|
+
Permission.ProjectAdmin,
|
|
1220
|
+
Permission.ProjectMember,
|
|
1221
|
+
Permission.Viewer,
|
|
1222
|
+
Permission.SettingsAdmin,
|
|
1223
|
+
Permission.SettingsMember,
|
|
1224
|
+
Permission.SettingsViewer,
|
|
1225
|
+
Permission.ReadDockerSwarmCluster,
|
|
1226
|
+
],
|
|
1227
|
+
update: [
|
|
1228
|
+
Permission.ProjectOwner,
|
|
1229
|
+
Permission.ProjectAdmin,
|
|
1230
|
+
Permission.ProjectMember,
|
|
1231
|
+
Permission.SettingsAdmin,
|
|
1232
|
+
Permission.SettingsMember,
|
|
1233
|
+
Permission.EditDockerSwarmCluster,
|
|
1234
|
+
],
|
|
1235
|
+
})
|
|
1236
|
+
@TableColumn({
|
|
1237
|
+
type: TableColumnType.JSON,
|
|
1238
|
+
required: false,
|
|
1239
|
+
title: "AI Command Allowlist",
|
|
1240
|
+
description:
|
|
1241
|
+
"Optional JSON array of command patterns that Automatic mode may run on this Docker Swarm cluster without approval even though they are riskier changes. Each pattern is one command line for this Docker Swarm cluster's agent (docker) 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 Docker Swarm 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 Docker Swarm cluster can remove patterns or clear the list.",
|
|
1242
|
+
})
|
|
1243
|
+
@Column({
|
|
1244
|
+
type: ColumnType.JSON,
|
|
1245
|
+
nullable: true,
|
|
1246
|
+
})
|
|
1247
|
+
public aiCommandAllowlist?: Array<string> = undefined;
|
|
1248
|
+
|
|
1249
|
+
@ColumnAccessControl({
|
|
1250
|
+
create: [],
|
|
1251
|
+
read: [
|
|
1252
|
+
Permission.ProjectOwner,
|
|
1253
|
+
Permission.ProjectAdmin,
|
|
1254
|
+
Permission.ProjectMember,
|
|
1255
|
+
Permission.Viewer,
|
|
1256
|
+
Permission.SettingsAdmin,
|
|
1257
|
+
Permission.SettingsMember,
|
|
1258
|
+
Permission.SettingsViewer,
|
|
1259
|
+
Permission.ReadDockerSwarmCluster,
|
|
1260
|
+
],
|
|
1261
|
+
update: [],
|
|
1262
|
+
})
|
|
1263
|
+
@TableColumn({
|
|
1264
|
+
required: false,
|
|
1265
|
+
type: TableColumnType.Date,
|
|
1266
|
+
title: "AI Access Last Verified At",
|
|
1267
|
+
description:
|
|
1268
|
+
"When a command from OneUptime AI last succeeded on this Docker Swarm cluster through its Docker Swarm AI agent. Set by the server.",
|
|
1269
|
+
})
|
|
1270
|
+
@Column({
|
|
1271
|
+
type: ColumnType.Date,
|
|
1272
|
+
nullable: true,
|
|
1273
|
+
})
|
|
1274
|
+
public aiAccessLastVerifiedAt?: Date = undefined;
|
|
1275
|
+
|
|
1276
|
+
@ColumnAccessControl({
|
|
1277
|
+
create: [],
|
|
1278
|
+
read: [
|
|
1279
|
+
Permission.ProjectOwner,
|
|
1280
|
+
Permission.ProjectAdmin,
|
|
1281
|
+
Permission.ProjectMember,
|
|
1282
|
+
Permission.Viewer,
|
|
1283
|
+
Permission.SettingsAdmin,
|
|
1284
|
+
Permission.SettingsMember,
|
|
1285
|
+
Permission.SettingsViewer,
|
|
1286
|
+
Permission.ReadDockerSwarmCluster,
|
|
1287
|
+
],
|
|
1288
|
+
update: [],
|
|
1289
|
+
})
|
|
1290
|
+
@TableColumn({
|
|
1291
|
+
required: false,
|
|
1292
|
+
type: TableColumnType.LongText,
|
|
1293
|
+
title: "AI Access Last Error",
|
|
1294
|
+
description:
|
|
1295
|
+
"The most recent failure OneUptime AI hit while running a command on this Docker Swarm cluster, kept until the next successful command. Set by the server.",
|
|
1296
|
+
})
|
|
1297
|
+
@Column({
|
|
1298
|
+
type: ColumnType.LongText,
|
|
1299
|
+
nullable: true,
|
|
1300
|
+
})
|
|
1301
|
+
public aiAccessLastError?: string = undefined;
|
|
1302
|
+
|
|
1303
|
+
/*
|
|
1304
|
+
* When this Docker Swarm cluster's AI access was first configured — by anyone writing an
|
|
1305
|
+
* AI access setting. Only the server writes it, and nothing ever clears
|
|
1306
|
+
* it. A registering Docker Swarm AI agent reads it to tell "never configured" (it may
|
|
1307
|
+
* apply its first-connection defaults) from "an operator chose settings,
|
|
1308
|
+
* perhaps before installing the agent" (every setting stays as chosen).
|
|
1309
|
+
*/
|
|
1310
|
+
@ColumnAccessControl({
|
|
1311
|
+
create: [],
|
|
1312
|
+
read: [
|
|
1313
|
+
Permission.ProjectOwner,
|
|
1314
|
+
Permission.ProjectAdmin,
|
|
1315
|
+
Permission.ProjectMember,
|
|
1316
|
+
Permission.Viewer,
|
|
1317
|
+
Permission.SettingsAdmin,
|
|
1318
|
+
Permission.SettingsMember,
|
|
1319
|
+
Permission.SettingsViewer,
|
|
1320
|
+
Permission.ReadDockerSwarmCluster,
|
|
1321
|
+
],
|
|
1322
|
+
update: [],
|
|
1323
|
+
})
|
|
1324
|
+
@TableColumn({
|
|
1325
|
+
required: false,
|
|
1326
|
+
type: TableColumnType.Date,
|
|
1327
|
+
title: "AI Access Configured At",
|
|
1328
|
+
description:
|
|
1329
|
+
"When OneUptime AI access to this Docker Swarm cluster was first configured by anyone saving an AI access setting. Set by the server; never cleared, so a Docker Swarm AI agent that registers later never overwrites a setting an operator chose.",
|
|
1330
|
+
})
|
|
1331
|
+
@Column({
|
|
1332
|
+
type: ColumnType.Date,
|
|
1333
|
+
nullable: true,
|
|
1334
|
+
})
|
|
1335
|
+
public aiAccessConfiguredAt?: Date = undefined;
|
|
1123
1336
|
}
|
|
@@ -1056,7 +1056,7 @@ export default class GlobalConfig extends GlobalConfigModel {
|
|
|
1056
1056
|
type: TableColumnType.Number,
|
|
1057
1057
|
title: "Monitor Metric Retention Days",
|
|
1058
1058
|
description:
|
|
1059
|
-
"Number of days to retain monitor metrics
|
|
1059
|
+
"Number of days to retain monitor metrics, the oneuptime.slo.* metrics SLO evaluations post and the oneuptime.rum.session.replay.budget.* metrics the session replay budget sweep posts. Metrics older than this will be automatically deleted. Default is 30 days.",
|
|
1060
1060
|
})
|
|
1061
1061
|
@Column({
|
|
1062
1062
|
type: ColumnType.Number,
|
|
@@ -22,6 +22,7 @@ import UniqueColumnBy from "../../Types/Database/UniqueColumnBy";
|
|
|
22
22
|
import IconProp from "../../Types/Icon/IconProp";
|
|
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,
|
|
@@ -1587,4 +1588,216 @@ export default class Host extends BaseModel {
|
|
|
1587
1588
|
length: ColumnLength.ShortText,
|
|
1588
1589
|
})
|
|
1589
1590
|
public cloudAccountId?: string = undefined;
|
|
1591
|
+
|
|
1592
|
+
/*
|
|
1593
|
+
* OneUptime AI access to this host through its Host AI agent (a resource AI
|
|
1594
|
+
* agent, ResourceAiAgent). The settings are plain columns written through
|
|
1595
|
+
* ordinary CRUD, so they exist before any agent registers. The columns
|
|
1596
|
+
* keep the host's own update ACL: anyone who may edit the host may make
|
|
1597
|
+
* AI do LESS; making it do MORE is refused by the service unless the
|
|
1598
|
+
* caller may author a FullAuto auto-remediation rule. The aiAccess*
|
|
1599
|
+
* columns are written only by the server.
|
|
1600
|
+
*/
|
|
1601
|
+
@ColumnAccessControl({
|
|
1602
|
+
create: [],
|
|
1603
|
+
read: [
|
|
1604
|
+
Permission.ProjectOwner,
|
|
1605
|
+
Permission.ProjectAdmin,
|
|
1606
|
+
Permission.ProjectMember,
|
|
1607
|
+
Permission.Viewer,
|
|
1608
|
+
Permission.SettingsAdmin,
|
|
1609
|
+
Permission.SettingsMember,
|
|
1610
|
+
Permission.SettingsViewer,
|
|
1611
|
+
Permission.ReadHost,
|
|
1612
|
+
],
|
|
1613
|
+
update: [
|
|
1614
|
+
Permission.ProjectOwner,
|
|
1615
|
+
Permission.ProjectAdmin,
|
|
1616
|
+
Permission.ProjectMember,
|
|
1617
|
+
Permission.SettingsAdmin,
|
|
1618
|
+
Permission.SettingsMember,
|
|
1619
|
+
Permission.EditHost,
|
|
1620
|
+
],
|
|
1621
|
+
})
|
|
1622
|
+
@TableColumn({
|
|
1623
|
+
isDefaultValueColumn: true,
|
|
1624
|
+
required: true,
|
|
1625
|
+
type: TableColumnType.Boolean,
|
|
1626
|
+
title: "Let AI Investigate With Read-Only Commands",
|
|
1627
|
+
description:
|
|
1628
|
+
"When on, OneUptime AI runs read-only commands (systemctl status, journalctl, df, free, uptime, ps, ss) on this host, through its Host 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 host can turn it on or off.",
|
|
1629
|
+
defaultValue: false,
|
|
1630
|
+
})
|
|
1631
|
+
@Column({
|
|
1632
|
+
type: ColumnType.Boolean,
|
|
1633
|
+
nullable: false,
|
|
1634
|
+
default: false,
|
|
1635
|
+
})
|
|
1636
|
+
public isAiInvestigationEnabled?: boolean = undefined;
|
|
1637
|
+
|
|
1638
|
+
@ColumnAccessControl({
|
|
1639
|
+
create: [],
|
|
1640
|
+
read: [
|
|
1641
|
+
Permission.ProjectOwner,
|
|
1642
|
+
Permission.ProjectAdmin,
|
|
1643
|
+
Permission.ProjectMember,
|
|
1644
|
+
Permission.Viewer,
|
|
1645
|
+
Permission.SettingsAdmin,
|
|
1646
|
+
Permission.SettingsMember,
|
|
1647
|
+
Permission.SettingsViewer,
|
|
1648
|
+
Permission.ReadHost,
|
|
1649
|
+
],
|
|
1650
|
+
update: [
|
|
1651
|
+
Permission.ProjectOwner,
|
|
1652
|
+
Permission.ProjectAdmin,
|
|
1653
|
+
Permission.ProjectMember,
|
|
1654
|
+
Permission.SettingsAdmin,
|
|
1655
|
+
Permission.SettingsMember,
|
|
1656
|
+
Permission.EditHost,
|
|
1657
|
+
],
|
|
1658
|
+
})
|
|
1659
|
+
@TableColumn({
|
|
1660
|
+
isDefaultValueColumn: true,
|
|
1661
|
+
required: true,
|
|
1662
|
+
type: TableColumnType.ShortText,
|
|
1663
|
+
title: "AI Remediation Mode",
|
|
1664
|
+
/*
|
|
1665
|
+
* The API and Terraform docs for the mode: the same semantics as the
|
|
1666
|
+
* ResourceAiRemediationMode doc comment in
|
|
1667
|
+
* Types/ResourceAiAgent/ResourceAiAccess.ts (the canonical text).
|
|
1668
|
+
*/
|
|
1669
|
+
description:
|
|
1670
|
+
"Disabled: AI never proposes or runs a change on this host. 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 host'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 host can lower the mode; raising it needs Project Owner, Project Admin or Edit Auto Remediation Rule.",
|
|
1671
|
+
defaultValue: ResourceAiRemediationMode.Disabled,
|
|
1672
|
+
example: ResourceAiRemediationMode.RequireApproval,
|
|
1673
|
+
})
|
|
1674
|
+
@Column({
|
|
1675
|
+
type: ColumnType.ShortText,
|
|
1676
|
+
length: ColumnLength.ShortText,
|
|
1677
|
+
nullable: false,
|
|
1678
|
+
default: ResourceAiRemediationMode.Disabled,
|
|
1679
|
+
})
|
|
1680
|
+
public aiRemediationMode?: ResourceAiRemediationMode = undefined;
|
|
1681
|
+
|
|
1682
|
+
@ColumnAccessControl({
|
|
1683
|
+
create: [],
|
|
1684
|
+
read: [
|
|
1685
|
+
Permission.ProjectOwner,
|
|
1686
|
+
Permission.ProjectAdmin,
|
|
1687
|
+
Permission.ProjectMember,
|
|
1688
|
+
Permission.Viewer,
|
|
1689
|
+
Permission.SettingsAdmin,
|
|
1690
|
+
Permission.SettingsMember,
|
|
1691
|
+
Permission.SettingsViewer,
|
|
1692
|
+
Permission.ReadHost,
|
|
1693
|
+
],
|
|
1694
|
+
update: [
|
|
1695
|
+
Permission.ProjectOwner,
|
|
1696
|
+
Permission.ProjectAdmin,
|
|
1697
|
+
Permission.ProjectMember,
|
|
1698
|
+
Permission.SettingsAdmin,
|
|
1699
|
+
Permission.SettingsMember,
|
|
1700
|
+
Permission.EditHost,
|
|
1701
|
+
],
|
|
1702
|
+
})
|
|
1703
|
+
@TableColumn({
|
|
1704
|
+
type: TableColumnType.JSON,
|
|
1705
|
+
required: false,
|
|
1706
|
+
title: "AI Command Allowlist",
|
|
1707
|
+
description:
|
|
1708
|
+
"Optional JSON array of command patterns that Automatic mode may run on this host without approval even though they are riskier changes. Each pattern is one command line for this host's agent (systemctl, journalctl and the other host programs it may run) 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 host 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 host can remove patterns or clear the list.",
|
|
1709
|
+
})
|
|
1710
|
+
@Column({
|
|
1711
|
+
type: ColumnType.JSON,
|
|
1712
|
+
nullable: true,
|
|
1713
|
+
})
|
|
1714
|
+
public aiCommandAllowlist?: Array<string> = undefined;
|
|
1715
|
+
|
|
1716
|
+
@ColumnAccessControl({
|
|
1717
|
+
create: [],
|
|
1718
|
+
read: [
|
|
1719
|
+
Permission.ProjectOwner,
|
|
1720
|
+
Permission.ProjectAdmin,
|
|
1721
|
+
Permission.ProjectMember,
|
|
1722
|
+
Permission.Viewer,
|
|
1723
|
+
Permission.SettingsAdmin,
|
|
1724
|
+
Permission.SettingsMember,
|
|
1725
|
+
Permission.SettingsViewer,
|
|
1726
|
+
Permission.ReadHost,
|
|
1727
|
+
],
|
|
1728
|
+
update: [],
|
|
1729
|
+
})
|
|
1730
|
+
@TableColumn({
|
|
1731
|
+
required: false,
|
|
1732
|
+
type: TableColumnType.Date,
|
|
1733
|
+
title: "AI Access Last Verified At",
|
|
1734
|
+
description:
|
|
1735
|
+
"When a command from OneUptime AI last succeeded on this host through its Host AI agent. Set by the server.",
|
|
1736
|
+
})
|
|
1737
|
+
@Column({
|
|
1738
|
+
type: ColumnType.Date,
|
|
1739
|
+
nullable: true,
|
|
1740
|
+
})
|
|
1741
|
+
public aiAccessLastVerifiedAt?: Date = undefined;
|
|
1742
|
+
|
|
1743
|
+
@ColumnAccessControl({
|
|
1744
|
+
create: [],
|
|
1745
|
+
read: [
|
|
1746
|
+
Permission.ProjectOwner,
|
|
1747
|
+
Permission.ProjectAdmin,
|
|
1748
|
+
Permission.ProjectMember,
|
|
1749
|
+
Permission.Viewer,
|
|
1750
|
+
Permission.SettingsAdmin,
|
|
1751
|
+
Permission.SettingsMember,
|
|
1752
|
+
Permission.SettingsViewer,
|
|
1753
|
+
Permission.ReadHost,
|
|
1754
|
+
],
|
|
1755
|
+
update: [],
|
|
1756
|
+
})
|
|
1757
|
+
@TableColumn({
|
|
1758
|
+
required: false,
|
|
1759
|
+
type: TableColumnType.LongText,
|
|
1760
|
+
title: "AI Access Last Error",
|
|
1761
|
+
description:
|
|
1762
|
+
"The most recent failure OneUptime AI hit while running a command on this host, kept until the next successful command. Set by the server.",
|
|
1763
|
+
})
|
|
1764
|
+
@Column({
|
|
1765
|
+
type: ColumnType.LongText,
|
|
1766
|
+
nullable: true,
|
|
1767
|
+
})
|
|
1768
|
+
public aiAccessLastError?: string = undefined;
|
|
1769
|
+
|
|
1770
|
+
/*
|
|
1771
|
+
* When this host's AI access was first configured — by anyone writing an
|
|
1772
|
+
* AI access setting. Only the server writes it, and nothing ever clears
|
|
1773
|
+
* it. A registering Host AI agent reads it to tell "never configured" (it may
|
|
1774
|
+
* apply its first-connection defaults) from "an operator chose settings,
|
|
1775
|
+
* perhaps before installing the agent" (every setting stays as chosen).
|
|
1776
|
+
*/
|
|
1777
|
+
@ColumnAccessControl({
|
|
1778
|
+
create: [],
|
|
1779
|
+
read: [
|
|
1780
|
+
Permission.ProjectOwner,
|
|
1781
|
+
Permission.ProjectAdmin,
|
|
1782
|
+
Permission.ProjectMember,
|
|
1783
|
+
Permission.Viewer,
|
|
1784
|
+
Permission.SettingsAdmin,
|
|
1785
|
+
Permission.SettingsMember,
|
|
1786
|
+
Permission.SettingsViewer,
|
|
1787
|
+
Permission.ReadHost,
|
|
1788
|
+
],
|
|
1789
|
+
update: [],
|
|
1790
|
+
})
|
|
1791
|
+
@TableColumn({
|
|
1792
|
+
required: false,
|
|
1793
|
+
type: TableColumnType.Date,
|
|
1794
|
+
title: "AI Access Configured At",
|
|
1795
|
+
description:
|
|
1796
|
+
"When OneUptime AI access to this host was first configured by anyone saving an AI access setting. Set by the server; never cleared, so a Host AI agent that registers later never overwrites a setting an operator chose.",
|
|
1797
|
+
})
|
|
1798
|
+
@Column({
|
|
1799
|
+
type: ColumnType.Date,
|
|
1800
|
+
nullable: true,
|
|
1801
|
+
})
|
|
1802
|
+
public aiAccessConfiguredAt?: Date = undefined;
|
|
1590
1803
|
}
|