@oneuptime/common 14.0.10 → 14.0.11

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.
Files changed (837) hide show
  1. package/Models/DatabaseModels/AIConversation.ts +127 -1
  2. package/Models/DatabaseModels/CephCluster.ts +12 -0
  3. package/Models/DatabaseModels/CloudResource.ts +12 -0
  4. package/Models/DatabaseModels/DatabaseServer.ts +12 -0
  5. package/Models/DatabaseModels/DockerHost.ts +12 -0
  6. package/Models/DatabaseModels/DockerSwarmCluster.ts +12 -0
  7. package/Models/DatabaseModels/GlobalOidc.ts +0 -4
  8. package/Models/DatabaseModels/GlobalOidcProject.ts +0 -4
  9. package/Models/DatabaseModels/GlobalSso.ts +0 -4
  10. package/Models/DatabaseModels/GlobalSsoProject.ts +0 -4
  11. package/Models/DatabaseModels/Host.ts +12 -0
  12. package/Models/DatabaseModels/IncidentForm.ts +594 -0
  13. package/Models/DatabaseModels/IncidentFormSubmission.ts +283 -0
  14. package/Models/DatabaseModels/IncidentTemplate.ts +59 -0
  15. package/Models/DatabaseModels/Index.ts +14 -0
  16. package/Models/DatabaseModels/IoTFleet.ts +12 -0
  17. package/Models/DatabaseModels/KubernetesCluster.ts +12 -0
  18. package/Models/DatabaseModels/MessageQueue.ts +1102 -0
  19. package/Models/DatabaseModels/MessageQueueLabelRule.ts +553 -0
  20. package/Models/DatabaseModels/MessageQueueOwnerRule.ts +633 -0
  21. package/Models/DatabaseModels/MessageQueueOwnerTeam.ts +491 -0
  22. package/Models/DatabaseModels/MessageQueueOwnerUser.ts +490 -0
  23. package/Models/DatabaseModels/PodmanHost.ts +12 -0
  24. package/Models/DatabaseModels/Project.ts +59 -0
  25. package/Models/DatabaseModels/ProjectOidc.ts +0 -4
  26. package/Models/DatabaseModels/ProjectSso.ts +0 -4
  27. package/Models/DatabaseModels/ProxmoxCluster.ts +12 -0
  28. package/Models/DatabaseModels/RumApplication.ts +12 -0
  29. package/Models/DatabaseModels/ServerlessFunction.ts +12 -0
  30. package/Models/DatabaseModels/Service.ts +12 -0
  31. package/Models/DatabaseModels/StatusPageOidc.ts +0 -4
  32. package/Models/DatabaseModels/StatusPageSso.ts +0 -4
  33. package/Models/DatabaseModels/TeamComplianceSetting.ts +47 -2
  34. package/Models/DatabaseModels/VMwareVCenter.ts +12 -0
  35. package/Server/API/AIChatAPI.ts +13 -114
  36. package/Server/API/AIInvestigationAPI.ts +3 -3
  37. package/Server/API/AIInvestigationConversationAPI.ts +266 -0
  38. package/Server/API/IncidentFormAPI.ts +376 -0
  39. package/Server/API/ProjectOIDC.ts +16 -25
  40. package/Server/API/ProjectSSO.ts +16 -24
  41. package/Server/API/StatusPageAPI.ts +42 -77
  42. package/Server/Enterprise/EnterpriseEdition.ts +93 -28
  43. package/Server/Enterprise/EnterpriseFeature.ts +25 -3
  44. package/Server/Enterprise/EnterpriseLicenseSnapshot.ts +1 -1
  45. package/Server/Enterprise/EnterpriseServerModule.ts +4 -1
  46. package/Server/EnvironmentConfig.ts +1 -1
  47. package/Server/Infrastructure/Postgres/SchemaMigrations/1796400000000-AddIncidentForms.ts +129 -0
  48. package/Server/Infrastructure/Postgres/SchemaMigrations/1796500000000-AddTeamComplianceRuleNotificationChannels.ts +52 -0
  49. package/Server/Infrastructure/Postgres/SchemaMigrations/1796600000000-AddAIInvestigationConversationAndTimeLimits.ts +75 -0
  50. package/Server/Infrastructure/Postgres/SchemaMigrations/1796700000000-AddMessageQueueTables.ts +477 -0
  51. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
  52. package/Server/Middleware/IncidentFormRateLimit.ts +847 -0
  53. package/Server/Middleware/UserAuthorization.ts +16 -38
  54. package/Server/Services/AIService.ts +10 -13
  55. package/Server/Services/IncidentCustomFieldService.ts +112 -2
  56. package/Server/Services/IncidentEpisodeMemberService.ts +24 -4
  57. package/Server/Services/IncidentEpisodeService.ts +10 -1
  58. package/Server/Services/IncidentFormService.ts +1566 -0
  59. package/Server/Services/IncidentFormSubmissionService.ts +97 -0
  60. package/Server/Services/IncidentGroupingEngineService.ts +45 -8
  61. package/Server/Services/IncidentService.ts +123 -5
  62. package/Server/Services/IncidentTemplateService.ts +22 -0
  63. package/Server/Services/Index.ts +14 -0
  64. package/Server/Services/MessageQueueLabelRuleEngineService.ts +321 -0
  65. package/Server/Services/MessageQueueLabelRuleService.ts +14 -0
  66. package/Server/Services/MessageQueueOwnerRuleEngineService.ts +412 -0
  67. package/Server/Services/MessageQueueOwnerRuleService.ts +14 -0
  68. package/Server/Services/MessageQueueOwnerTeamService.ts +62 -0
  69. package/Server/Services/MessageQueueOwnerUserService.ts +62 -0
  70. package/Server/Services/MessageQueueService.ts +1463 -0
  71. package/Server/Services/OpenTelemetryIngestService.ts +37 -4
  72. package/Server/Services/ProjectService.ts +0 -59
  73. package/Server/Services/StatusPagePrivateUserService.ts +1 -4
  74. package/Server/Services/StatusPageService.ts +1 -51
  75. package/Server/Services/TeamComplianceSettingService.ts +163 -42
  76. package/Server/Services/UserNotificationRuleService.ts +8 -1
  77. package/Server/Services/WorkspaceNotificationSummaryService.ts +12 -3
  78. package/Server/Types/Database/Permissions/CreatePermission.ts +17 -3
  79. package/Server/Types/Database/Permissions/EditionPermission.ts +140 -38
  80. package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +16 -0
  81. package/Server/Types/Database/Permissions/TablePermission.ts +3 -3
  82. package/Server/Types/Database/Permissions/UpdatePermission.ts +20 -6
  83. package/Server/Utils/AI/Chat/AgentContextCompactor.ts +200 -0
  84. package/Server/Utils/AI/Chat/ChatAgentRunner.ts +307 -48
  85. package/Server/Utils/AI/Chat/ChatRunCancellation.ts +156 -0
  86. package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +78 -18
  87. package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +1 -1
  88. package/Server/Utils/AI/Chat/ToolOutputPager.ts +322 -0
  89. package/Server/Utils/AI/ClusterAccess/KubectlInvestigationToolkit.ts +88 -30
  90. package/Server/Utils/AI/ClusterAccess/KubectlJobRunner.ts +13 -1
  91. package/Server/Utils/AI/CodeFix/CodeFixReadiness.ts +0 -32
  92. package/Server/Utils/AI/CodeFix/FixRunBudget.ts +27 -25
  93. package/Server/Utils/AI/Remediation/RemediationCommandTools.ts +7 -1
  94. package/Server/Utils/AI/Remediation/RemediationExecutionRunner.ts +34 -14
  95. package/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.ts +69 -24
  96. package/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.ts +9 -0
  97. package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +53 -10
  98. package/Server/Utils/AI/SRE/AlertInvestigationRunner.ts +27 -10
  99. package/Server/Utils/AI/SRE/IncidentInvestigationRunner.ts +27 -10
  100. package/Server/Utils/AI/SRE/InvestigationQueue.ts +16 -19
  101. package/Server/Utils/AI/SRE/InvestigationThread.ts +646 -0
  102. package/Server/Utils/AI/SRE/InvestigationThreadService.ts +715 -0
  103. package/Server/Utils/AI/Toolbox/Serializer.ts +10 -3
  104. package/Server/Utils/EditionEnforcement.ts +19 -202
  105. package/Server/Utils/LLM/LLMService.ts +259 -63
  106. package/Server/Utils/RelaxedScimTeamLocksReport.ts +245 -0
  107. package/Server/Utils/Rules/RuleRun/RuleRunRegistry.ts +25 -0
  108. package/Server/Utils/SameOriginRequest.ts +203 -0
  109. package/Server/Utils/TeamMember/ProjectLeaveResourceCleanup.ts +2 -0
  110. package/Server/Utils/Telemetry/EntityRegistry.ts +4 -1
  111. package/Server/Utils/Telemetry/MessageQueueDiscovery.ts +1402 -0
  112. package/Server/Utils/Telemetry/ResourceEntityFilter.ts +4 -1
  113. package/Server/Utils/VendorAssets.ts +3 -3
  114. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +3 -1
  115. package/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.ts +3 -1
  116. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +10 -1
  117. package/Tests/App/Accounts/IncidentFormPage.test.tsx +2036 -0
  118. package/Tests/App/Accounts/IncidentFormServerMessages.test.ts +119 -0
  119. package/Tests/App/Accounts/IncidentFormUtils.test.ts +1157 -0
  120. package/Tests/App/Accounts/LoginPasskey.test.tsx +6 -4
  121. package/Tests/App/Accounts/LoginSso.test.tsx +724 -0
  122. package/Tests/App/AdminDashboard/AdminAuthenticationRequireSso.test.tsx +338 -0
  123. package/Tests/App/AdminDashboard/AdminAuthenticationSsoCardLocales.test.tsx +331 -0
  124. package/Tests/App/AdminDashboard/AdminEnterprisePluginPage.test.tsx +47 -33
  125. package/Tests/App/AdminDashboard/GlobalSsoOidcPages.test.tsx +1021 -0
  126. package/Tests/App/Dashboard/AffectedResourcesDisplay.test.tsx +876 -78
  127. package/Tests/App/Dashboard/AffectedResourcesSlo.test.tsx +20 -3
  128. package/Tests/App/Dashboard/CephProxmoxVMwareDocumentationCards.test.tsx +359 -0
  129. package/Tests/App/Dashboard/CephSetupGuide.test.ts +961 -0
  130. package/Tests/App/Dashboard/CloudDocumentationCard.test.tsx +381 -95
  131. package/Tests/App/Dashboard/CloudSetupGuide.test.ts +1463 -0
  132. package/Tests/App/Dashboard/ClusterAccessNotice.test.tsx +174 -12
  133. package/Tests/App/Dashboard/ContainerSetupGuideCards.test.tsx +345 -0
  134. package/Tests/App/Dashboard/CoreListEmptyStates.test.tsx +501 -0
  135. package/Tests/App/Dashboard/DashboardLazyPages.test.tsx +0 -1
  136. package/Tests/App/Dashboard/DatabaseDocumentationCard.test.tsx +400 -0
  137. package/Tests/App/Dashboard/DatabaseDocumentationMarkdown.test.ts +5 -0
  138. package/Tests/App/Dashboard/DatabaseSetupGuide.test.ts +1869 -0
  139. package/Tests/App/Dashboard/DatabaseTelemetryScope.test.ts +44 -0
  140. package/Tests/App/Dashboard/DatabaseTelemetryTabs.test.tsx +50 -9
  141. package/Tests/App/Dashboard/DockerSetupGuide.test.ts +899 -0
  142. package/Tests/App/Dashboard/DockerSwarmSetupGuide.test.ts +964 -0
  143. package/Tests/App/Dashboard/EnterpriseFeatureUpgrade.test.tsx +141 -7
  144. package/Tests/App/Dashboard/EnterprisePluginPage.test.tsx +52 -39
  145. package/Tests/App/Dashboard/EventOverviewPages.test.tsx +7 -1
  146. package/Tests/App/Dashboard/GettingStartedTaskRoutes.test.tsx +331 -0
  147. package/Tests/App/Dashboard/HomeOverviewStatsFirstRun.test.tsx +925 -0
  148. package/Tests/App/Dashboard/HostDocumentationCard.test.tsx +225 -0
  149. package/Tests/App/Dashboard/HostSetupGuide.test.ts +1183 -0
  150. package/Tests/App/Dashboard/IdentityEnterpriseShells.test.tsx +69 -45
  151. package/Tests/App/Dashboard/IncidentCreateTemplateCustomFieldSettings.test.tsx +745 -0
  152. package/Tests/App/Dashboard/IncidentCreateTemplateOwners.test.tsx +414 -0
  153. package/Tests/App/Dashboard/IncidentCustomFieldCreateSettingsForm.test.ts +1042 -0
  154. package/Tests/App/Dashboard/IncidentCustomFieldSettingsCard.test.tsx +1816 -0
  155. package/Tests/App/Dashboard/IncidentFormPlan.test.ts +89 -0
  156. package/Tests/App/Dashboard/IncidentFormShareLinkCard.test.tsx +846 -0
  157. package/Tests/App/Dashboard/IncidentFormsPages.test.tsx +1324 -0
  158. package/Tests/App/Dashboard/IncidentTemplateCustomFieldSettings.test.tsx +630 -0
  159. package/Tests/App/Dashboard/IncidentsSideMenu.test.tsx +13 -0
  160. package/Tests/App/Dashboard/IncomingEmailMonitorLinkVerifyHint.test.tsx +104 -0
  161. package/Tests/App/Dashboard/InvestigationConversation.test.tsx +1107 -0
  162. package/Tests/App/Dashboard/InvestigationConversationData.test.ts +546 -0
  163. package/Tests/App/Dashboard/InvestigationEvidenceList.test.tsx +170 -5
  164. package/Tests/App/Dashboard/InvestigationNotStarted.test.tsx +207 -2
  165. package/Tests/App/Dashboard/InvestigationPanel.test.tsx +729 -34
  166. package/Tests/App/Dashboard/InvestigationPanelStatus.test.tsx +9 -21
  167. package/Tests/App/Dashboard/InvestigationReportView.test.tsx +274 -37
  168. package/Tests/App/Dashboard/InvestigationStatusBadge.test.tsx +130 -0
  169. package/Tests/App/Dashboard/IoTDocumentationCard.test.tsx +218 -0
  170. package/Tests/App/Dashboard/IoTSetupGuide.test.ts +1124 -0
  171. package/Tests/App/Dashboard/KubernetesClusterAiAccessSettings.test.ts +20 -6
  172. package/Tests/App/Dashboard/KubernetesClusterAiDocumentationMarkdown.test.ts +107 -83
  173. package/Tests/App/Dashboard/KubernetesSetupGuide.test.ts +787 -0
  174. package/Tests/App/Dashboard/MessageQueueBreadcrumbs.test.tsx +228 -0
  175. package/Tests/App/Dashboard/MessageQueueBrokerHealth.test.tsx +1538 -0
  176. package/Tests/App/Dashboard/MessageQueueBrokerHealthMetricChart.test.tsx +969 -0
  177. package/Tests/App/Dashboard/MessageQueueBrokerHealthReads.test.ts +889 -0
  178. package/Tests/App/Dashboard/MessageQueueBrokerMetricsReach.test.ts +236 -0
  179. package/Tests/App/Dashboard/MessageQueueDocumentationCard.test.tsx +479 -0
  180. package/Tests/App/Dashboard/MessageQueueListPages.test.tsx +1232 -0
  181. package/Tests/App/Dashboard/MessageQueueMetricDescriptions.test.ts +244 -0
  182. package/Tests/App/Dashboard/MessageQueueMonitorLink.test.ts +952 -0
  183. package/Tests/App/Dashboard/MessageQueueMonitorLinkMonitorCreate.test.tsx +859 -0
  184. package/Tests/App/Dashboard/MessageQueueOverview.test.tsx +1773 -0
  185. package/Tests/App/Dashboard/MessageQueueOverviewPresentation.test.ts +196 -0
  186. package/Tests/App/Dashboard/MessageQueuePresentation.test.ts +799 -0
  187. package/Tests/App/Dashboard/MessageQueueProducersConsumers.test.tsx +680 -0
  188. package/Tests/App/Dashboard/MessageQueueRoutes.test.tsx +383 -0
  189. package/Tests/App/Dashboard/MessageQueueRulePages.test.tsx +278 -0
  190. package/Tests/App/Dashboard/MessageQueueSetupGuide.test.ts +2778 -0
  191. package/Tests/App/Dashboard/MessageQueueSideMenus.test.tsx +273 -0
  192. package/Tests/App/Dashboard/MessageQueueSpanPopulations.test.ts +930 -0
  193. package/Tests/App/Dashboard/MessageQueueSpanStore.ts +351 -0
  194. package/Tests/App/Dashboard/MessageQueueTelemetryScope.test.ts +375 -0
  195. package/Tests/App/Dashboard/MessageQueueTelemetryScopeTabs.test.tsx +668 -0
  196. package/Tests/App/Dashboard/MessageQueueViewPages.test.tsx +685 -0
  197. package/Tests/App/Dashboard/MonitorAndHomeNotOperationalMenus.test.tsx +342 -0
  198. package/Tests/App/Dashboard/MonitorCreateFirstRunDefaults.test.tsx +623 -0
  199. package/Tests/App/Dashboard/MonitorCreateFromMonitorBackedDevice.test.tsx +442 -0
  200. package/Tests/App/Dashboard/MonitorLogsPageViewSummary.test.tsx +814 -0
  201. package/Tests/App/Dashboard/MonitorSetupCardBodies.test.tsx +246 -0
  202. package/Tests/App/Dashboard/NavigationSearchKeywords.test.tsx +8 -0
  203. package/Tests/App/Dashboard/OnboardingSsoEmptyState.test.tsx +27 -12
  204. package/Tests/App/Dashboard/PlanGatedPage.test.tsx +292 -0
  205. package/Tests/App/Dashboard/PodmanSetupGuide.test.ts +948 -0
  206. package/Tests/App/Dashboard/ProductOrientation.test.tsx +5 -4
  207. package/Tests/App/Dashboard/ProductSettingsSectionCollapsed.test.tsx +266 -0
  208. package/Tests/App/Dashboard/ProxmoxSetupGuide.test.ts +1318 -0
  209. package/Tests/App/Dashboard/ResourceAiAgentAttentionServerParity.test.ts +555 -0
  210. package/Tests/App/Dashboard/ResourceAiAgentPage.test.tsx +298 -9
  211. package/Tests/App/Dashboard/ResourceAiAgentStatus.test.ts +453 -0
  212. package/Tests/App/Dashboard/ResourceArchiveSettings.test.tsx +16 -0
  213. package/Tests/App/Dashboard/ResourceConnectionGuideCard.test.tsx +444 -0
  214. package/Tests/App/Dashboard/ResourceConnectionGuideOverviewsInfra.test.tsx +798 -0
  215. package/Tests/App/Dashboard/ResourceConnectionGuideOverviewsPlatforms.test.tsx +717 -0
  216. package/Tests/App/Dashboard/ResourceConnectionGuides.test.ts +981 -0
  217. package/Tests/App/Dashboard/ResourceConnectionState.test.ts +132 -0
  218. package/Tests/App/Dashboard/RumDocumentationCard.test.tsx +293 -0
  219. package/Tests/App/Dashboard/RumSessionReplayRetentionSettings.test.tsx +467 -0
  220. package/Tests/App/Dashboard/RumSetupGuide.test.ts +758 -0
  221. package/Tests/App/Dashboard/ScheduledMaintenanceOverviewPage.test.tsx +25 -0
  222. package/Tests/App/Dashboard/ServerlessDocumentationCard.test.tsx +254 -0
  223. package/Tests/App/Dashboard/ServerlessSetupGuide.test.ts +1074 -0
  224. package/Tests/App/Dashboard/SetupGuide.test.ts +246 -0
  225. package/Tests/App/Dashboard/SetupGuideCard.test.tsx +756 -0
  226. package/Tests/App/Dashboard/SloListSideMenu.test.tsx +120 -0
  227. package/Tests/App/Dashboard/SsoPages.test.tsx +833 -0
  228. package/Tests/App/Dashboard/TelemetryDocumentation.test.tsx +253 -0
  229. package/Tests/App/Dashboard/TelemetryRetentionShells.test.tsx +730 -0
  230. package/Tests/App/Dashboard/VMwareSetupGuide.test.ts +1033 -0
  231. package/Tests/App/StatusPage/StatusPageSsoEmptyState.test.tsx +87 -7
  232. package/Tests/Models/DatabaseModels/DatabaseServerModels.test.ts +28 -9
  233. package/Tests/Models/DatabaseModels/IncidentFormModel.test.ts +1250 -0
  234. package/Tests/Models/DatabaseModels/MessageQueueModels.test.ts +1983 -0
  235. package/Tests/Models/DatabaseModels/StaticRuleCriteriaInheritance.test.ts +4 -2
  236. package/Tests/Models/DatabaseModels/TeamComplianceSettingModel.test.ts +190 -14
  237. package/Tests/Models/IncidentTemplateCustomFieldSettingsColumn.test.ts +291 -0
  238. package/Tests/Server/API/AIInvestigationConversationAPI.test.ts +412 -0
  239. package/Tests/Server/API/GlobalConfigLicense.test.ts +38 -9
  240. package/Tests/Server/API/IncidentFormAPI.test.ts +942 -0
  241. package/Tests/Server/API/IncidentFormPublicRoutes.test.ts +1653 -0
  242. package/Tests/Server/API/KubernetesClusterAiAccessAPI.test.ts +2 -1
  243. package/Tests/Server/API/{SsoProviderListingsEdition.test.ts → SsoProviderListings.test.ts} +164 -110
  244. package/Tests/Server/Enterprise/EnterpriseEdition.test.ts +76 -54
  245. package/Tests/Server/Enterprise/EnterpriseFeatureActive.test.ts +125 -42
  246. package/Tests/Server/Enterprise/EnterpriseLicenseSnapshot.test.ts +36 -10
  247. package/Tests/Server/Enterprise/EnterpriseModelFeatureMap.test.ts +51 -9
  248. package/Tests/Server/Enterprise/FakeEnterpriseModule.ts +13 -8
  249. package/Tests/Server/Enterprise/SsoInCommunityEdition.test.ts +540 -0
  250. package/Tests/Server/Infrastructure/Postgres/AddConfigurableRuleCriteriaMigration.test.ts +3 -0
  251. package/Tests/Server/Infrastructure/Postgres/AddIncidentFormsMigration.test.ts +438 -0
  252. package/Tests/Server/Infrastructure/Postgres/AddTeamComplianceRuleNotificationChannelsMigration.test.ts +255 -0
  253. package/Tests/Server/Infrastructure/Postgres/MessageQueueTablesMigration.test.ts +637 -0
  254. package/Tests/Server/Middleware/IncidentFormRateLimit.test.ts +1630 -0
  255. package/Tests/Server/Middleware/UserAuthorization.test.ts +16 -17
  256. package/Tests/Server/Middleware/UserAuthorizationSsoEnforcement.test.ts +544 -0
  257. package/Tests/Server/Services/AIServiceDailyBudget.test.ts +37 -8
  258. package/Tests/Server/Services/IncidentCreatedFeedTitle.test.ts +212 -0
  259. package/Tests/Server/Services/IncidentCustomFieldDeleteFormQuestions.test.ts +297 -0
  260. package/Tests/Server/Services/IncidentFormOwnersCreatedNotification.test.ts +497 -0
  261. package/Tests/Server/Services/IncidentFormPostgres.test.ts +958 -0
  262. package/Tests/Server/Services/IncidentFormPublicForm.test.ts +1260 -0
  263. package/Tests/Server/Services/IncidentFormPublicSubmission.test.ts +2520 -0
  264. package/Tests/Server/Services/IncidentFormRegistration.test.ts +159 -0
  265. package/Tests/Server/Services/IncidentFormService.test.ts +663 -0
  266. package/Tests/Server/Services/IncidentFormSubmissionService.test.ts +430 -0
  267. package/Tests/Server/Services/IncidentFormSubmissionTemplateBranch.test.ts +473 -0
  268. package/Tests/Server/Services/IncidentGroupingTemplateSubstitution.test.ts +81 -0
  269. package/Tests/Server/Services/IncidentTemplateCustomFieldSettings.test.ts +262 -0
  270. package/Tests/Server/Services/IncidentTemplateOwnersOnDeclare.test.ts +566 -0
  271. package/Tests/Server/Services/IncidentTitleMarkdownSinks.test.ts +640 -0
  272. package/Tests/Server/Services/LlmLogServiceTokenAggregateParams.test.ts +3 -3
  273. package/Tests/Server/Services/MessageQueueOwnerServices.test.ts +440 -0
  274. package/Tests/Server/Services/MessageQueueRegistries.test.ts +577 -0
  275. package/Tests/Server/Services/MessageQueueRuleEngines.test.ts +900 -0
  276. package/Tests/Server/Services/MessageQueueService.test.ts +2210 -0
  277. package/Tests/Server/Services/MessageQueueSqlPostgres.test.ts +1271 -0
  278. package/Tests/Server/Services/OpenTelemetryResourceRetentionMemo.test.ts +28 -1
  279. package/Tests/Server/Services/OpenTelemetryRetentionOverrideEdition.test.ts +474 -0
  280. package/Tests/Server/Services/OpenTelemetryServiceResolutionCache.test.ts +21 -0
  281. package/Tests/Server/Services/OwnerRowUniqueness.test.ts +3 -0
  282. package/Tests/Server/Services/ProjectServiceAuditLogLicense.test.ts +0 -1
  283. package/Tests/Server/Services/RuleRun/LabelRuleEnginesGroupBRun.test.ts +56 -6
  284. package/Tests/Server/Services/RuleRun/OwnerRuleEnginesGroupBRun.test.ts +30 -1
  285. package/Tests/Server/Services/SsoRequirementReads.test.ts +454 -0
  286. package/Tests/Server/Services/SsoRequirementWrites.test.ts +529 -0
  287. package/Tests/Server/Services/StaticRuleCriteriaRuntimeCoverage.test.ts +3 -3
  288. package/Tests/Server/Services/StatusPagePrivateUserInvitationPolicy.test.ts +107 -89
  289. package/Tests/Server/Services/TeamComplianceSettingPostgres.test.ts +1068 -176
  290. package/Tests/Server/Services/TeamComplianceSettingService.test.ts +1962 -200
  291. package/Tests/Server/Types/Database/Permissions/EditionPermission.test.ts +654 -297
  292. package/Tests/Server/Types/Database/Permissions/RetentionOverrideColumns.test.ts +784 -0
  293. package/Tests/Server/Types/Database/Permissions/SsoScalePlanGate.test.ts +418 -0
  294. package/Tests/Server/Utils/AI/AIAlertGating.test.ts +0 -1
  295. package/Tests/Server/Utils/AI/AIInvestigationEngineRunLimits.test.ts +136 -0
  296. package/Tests/Server/Utils/AI/AIInvestigationQueue.test.ts +15 -14
  297. package/Tests/Server/Utils/AI/AgentContextCompactor.test.ts +351 -0
  298. package/Tests/Server/Utils/AI/ChatAgentRunnerSharedThread.test.ts +842 -0
  299. package/Tests/Server/Utils/AI/ChatRunCancellation.test.ts +195 -0
  300. package/Tests/Server/Utils/AI/CodeFixReadiness.test.ts +10 -57
  301. package/Tests/Server/Utils/AI/FixRunBudget.test.ts +20 -24
  302. package/Tests/Server/Utils/AI/Insights/InvestigationQueueInsightSubject.test.ts +7 -30
  303. package/Tests/Server/Utils/AI/InvestigationClusterAccessWiring.test.ts +225 -29
  304. package/Tests/Server/Utils/AI/InvestigationInfrastructureAccessWiring.test.ts +266 -25
  305. package/Tests/Server/Utils/AI/InvestigationThread.test.ts +580 -0
  306. package/Tests/Server/Utils/AI/InvestigationThreadService.test.ts +801 -0
  307. package/Tests/Server/Utils/AI/KubectlInvestigationToolkit.test.ts +525 -43
  308. package/Tests/Server/Utils/AI/KubectlJobRunner.test.ts +4 -2
  309. package/Tests/Server/Utils/AI/LLMServiceUnreachableProvider.test.ts +435 -0
  310. package/Tests/Server/Utils/AI/ObservabilityAssistantLimits.test.ts +462 -0
  311. package/Tests/Server/Utils/AI/RemediationExecutionRunner.test.ts +14 -25
  312. package/Tests/Server/Utils/AI/RemediationExecutionRunnerResourceMode.test.ts +2 -0
  313. package/Tests/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.test.ts +297 -15
  314. package/Tests/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.test.ts +10 -6
  315. package/Tests/Server/Utils/AI/ToolOutputPager.test.ts +382 -0
  316. package/Tests/Server/Utils/AI/ToolResultSerializer.test.ts +23 -4
  317. package/Tests/Server/Utils/AI/Toolbox/LogTools.test.ts +25 -6
  318. package/Tests/Server/Utils/AI/Toolbox/Serializer.test.ts +14 -3
  319. package/Tests/Server/Utils/EditionEnforcement.test.ts +107 -147
  320. package/Tests/Server/Utils/{CommunityEditionSsoReport.test.ts → RelaxedScimTeamLocksReport.test.ts} +212 -208
  321. package/Tests/Server/Utils/SameOriginRequest.test.ts +372 -0
  322. package/Tests/Server/Utils/Telemetry/EntityRegistry.test.ts +20 -0
  323. package/Tests/Server/Utils/Telemetry/MessageQueueDiscovery.test.ts +2590 -0
  324. package/Tests/Server/Utils/Telemetry/MessageQueueSpanQueryTwin.ts +246 -0
  325. package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +23 -0
  326. package/Tests/Types/AI/AIAgentRunLimits.test.ts +255 -0
  327. package/Tests/Types/Code/JsonSyntax.test.ts +1300 -0
  328. package/Tests/Types/CustomField/CustomFieldCreateSettings.test.ts +1113 -0
  329. package/Tests/Types/CustomField/CustomFieldMappingCatalog.test.ts +91 -0
  330. package/Tests/Types/CustomField/CustomFieldValueValidator.test.ts +30 -0
  331. package/Tests/Types/Incident/IncidentFormIpAllowlist.test.ts +227 -0
  332. package/Tests/Types/Incident/IncidentFormPublic.test.ts +1916 -0
  333. package/Tests/Types/MessageQueue/MessageQueueEntityKey.test.ts +916 -0
  334. package/Tests/Types/MessageQueue/MessageQueueIdentity.test.ts +567 -0
  335. package/Tests/Types/MessageQueue/MessageQueueManualIdentity.test.ts +686 -0
  336. package/Tests/Types/MessageQueue/MessageQueueMetricCatalog.test.ts +1726 -0
  337. package/Tests/Types/MessageQueue/MessageQueueMetricResolution.test.ts +1758 -0
  338. package/Tests/Types/MessageQueue/MessagingInstrumentationFixtures.test.ts +4686 -0
  339. package/Tests/Types/MessageQueue/MessagingSystem.test.ts +840 -0
  340. package/Tests/Types/MessageQueue/MessagingTelemetryFixtures.ts +3287 -0
  341. package/Tests/Types/MessageQueue/MessagingTelemetryResolver.test.ts +2966 -0
  342. package/Tests/Types/Monitor/MessageQueueAlertTemplates.test.ts +5401 -0
  343. package/Tests/Types/Monitor/MetricEngineFold.ts +154 -0
  344. package/Tests/Types/ResourceAiAgent/ResourceAiAccess.test.ts +5 -3
  345. package/Tests/Types/Team/ComplianceRule.test.ts +588 -37
  346. package/Tests/Types/Team/TeamComplianceStatus.test.ts +64 -11
  347. package/Tests/Types/XML.test.ts +51 -0
  348. package/Tests/UI/Components/CodeEditor/CodeEditor.test.tsx +2362 -0
  349. package/Tests/UI/Components/CodeEditor/CodeEditorCommands.test.ts +810 -0
  350. package/Tests/UI/Components/CodeEditor/CodeEditorHighlight.test.ts +338 -0
  351. package/Tests/UI/Components/CodeEditor/CodeEditorLanguages.test.ts +222 -0
  352. package/Tests/UI/Components/CodeEditor/CodeEditorStyles.test.ts +807 -0
  353. package/Tests/UI/Components/CodeEditor/NoMonaco.test.ts +245 -0
  354. package/Tests/UI/Components/CodeEditor/YamlEditor.test.tsx +729 -0
  355. package/Tests/UI/Components/CopyTextButton.test.tsx +76 -0
  356. package/Tests/UI/Components/EditionLabelLapseCopy.ts +51 -14
  357. package/Tests/UI/Components/EditionLabelLicenseStatus.test.tsx +131 -23
  358. package/Tests/UI/Components/ErrorMessageAction.test.tsx +142 -0
  359. package/Tests/UI/Components/FacetSidebarInScope.test.tsx +459 -0
  360. package/Tests/UI/Components/FacetValuesInScope.test.ts +270 -0
  361. package/Tests/UI/Components/Forms/FormFieldCodeEditors.test.tsx +294 -0
  362. package/Tests/UI/Components/Forms/FormFieldMarkdown.test.tsx +126 -0
  363. package/Tests/UI/Components/Forms/FormFieldYaml.test.tsx +22 -75
  364. package/Tests/UI/Components/Forms/ModelFormOnBeforeCreateMiscData.test.tsx +254 -0
  365. package/Tests/UI/Components/Icon.test.tsx +32 -0
  366. package/Tests/UI/Components/Input.test.tsx +31 -0
  367. package/Tests/UI/Components/LockedFilterChipScope.test.tsx +501 -0
  368. package/Tests/UI/Components/MarkdownConverters.test.ts +253 -1
  369. package/Tests/UI/Components/MarkdownEditor.test.tsx +2785 -2
  370. package/Tests/UI/Components/MarkdownEditorHistory.test.ts +243 -0
  371. package/Tests/UI/Components/MarkdownListEditing.test.ts +1118 -0
  372. package/Tests/UI/Components/MarkdownPaste.test.ts +1180 -0
  373. package/Tests/UI/Components/MarkdownViewerCopy.test.tsx +466 -0
  374. package/Tests/UI/Components/MarkdownVisualEditing.test.ts +1089 -0
  375. package/Tests/UI/Components/ModelTable/BaseModelTableEmptyStateAction.test.tsx +623 -0
  376. package/Tests/UI/Components/ResetObjectID.test.tsx +282 -0
  377. package/Tests/UI/Components/RuleCriteria/RuleCriteriaModelTable.test.tsx +3 -3
  378. package/Tests/UI/Components/Table/EmptyTableMessage.test.ts +439 -0
  379. package/Tests/UI/Components/Table/TableEmptyState.test.tsx +352 -0
  380. package/Tests/UI/Components/TableRowMobileTitles.test.tsx +78 -0
  381. package/Tests/UI/Components/TextArea.test.tsx +19 -0
  382. package/Tests/UI/Components/Workflow/ModelColumnEditor.render.test.tsx +12 -29
  383. package/Tests/UI/Components/fixtures/MarkdownPasteFixtures.ts +460 -0
  384. package/Tests/UI/EsbuildConfig.test.ts +115 -39
  385. package/Tests/UI/EsbuildEnterpriseAlias.test.ts +4 -4
  386. package/Tests/UI/Monitor/MonitorLogSummaryRender.test.tsx +377 -0
  387. package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +81 -1
  388. package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +17 -0
  389. package/Tests/Utils/LabelRuleImportExport.test.ts +5 -0
  390. package/Tests/Utils/Markdown/DashboardMarkdownRenderer.ts +81 -0
  391. package/Tests/Utils/Markdown/UntrustedMarkdown.test.ts +1339 -0
  392. package/Tests/Utils/Monitor/MonitorLogSummaryUtil.test.ts +862 -0
  393. package/Types/AI/AIAgentRunLimits.ts +146 -0
  394. package/Types/Code/CodeType.ts +2 -0
  395. package/Types/Code/JsonSyntax.ts +923 -0
  396. package/Types/CustomField/CustomFieldCreateSettings.ts +549 -0
  397. package/Types/CustomField/CustomFieldMappingCatalog.ts +77 -0
  398. package/Types/CustomField/CustomFieldValueValidator.ts +10 -7
  399. package/Types/EnterpriseLicense/EnterpriseLicensePeriods.ts +1 -1
  400. package/Types/Icon/IconProp.ts +2 -0
  401. package/Types/Incident/IncidentFormIpAllowlist.ts +206 -0
  402. package/Types/Incident/IncidentFormPublic.ts +1145 -0
  403. package/Types/Kubernetes/KubernetesClusterAiAccess.ts +10 -3
  404. package/Types/MessageQueue/MessageQueueIdentity.ts +256 -0
  405. package/Types/MessageQueue/MessageQueueManualIdentity.ts +325 -0
  406. package/Types/MessageQueue/MessageQueueMetricCatalog.ts +1357 -0
  407. package/Types/MessageQueue/MessagingSystem.ts +518 -0
  408. package/Types/MessageQueue/MessagingTelemetryResolver.ts +2311 -0
  409. package/Types/Monitor/MessageQueueAlertTemplates.ts +2128 -0
  410. package/Types/Permission.ts +310 -0
  411. package/Types/ResourceAiAgent/ResourceAiAccess.ts +10 -4
  412. package/Types/Rules/RuleCriteriaFieldRegistry.ts +12 -0
  413. package/Types/Rules/RuleRun.ts +4 -0
  414. package/Types/Team/ComplianceNotificationChannel.ts +4 -3
  415. package/Types/Team/ComplianceRule.ts +71 -18
  416. package/Types/Team/ComplianceRuleType.ts +2 -2
  417. package/Types/Team/TeamComplianceStatus.ts +6 -2
  418. package/Types/Telemetry/EntityType.ts +16 -0
  419. package/Types/Telemetry/LockedFilterDetail.ts +22 -0
  420. package/Types/XML.ts +26 -0
  421. package/UI/Components/CodeEditor/CodeEditor.css +379 -0
  422. package/UI/Components/CodeEditor/CodeEditor.tsx +1128 -294
  423. package/UI/Components/CodeEditor/CodeEditorCommands.ts +774 -0
  424. package/UI/Components/CodeEditor/CodeEditorHighlight.ts +106 -0
  425. package/UI/Components/CodeEditor/CodeEditorLanguages.ts +164 -0
  426. package/UI/Components/CodeEditor/YamlEditor.tsx +28 -326
  427. package/UI/Components/CopyTextButton/CopyTextButton.tsx +5 -1
  428. package/UI/Components/CustomFields/CustomFieldModelFormFields.tsx +6 -25
  429. package/UI/Components/EditionLabel/EditionLabel.tsx +14 -13
  430. package/UI/Components/ErrorMessage/ErrorMessage.tsx +11 -1
  431. package/UI/Components/Forms/Fields/FormField.tsx +8 -0
  432. package/UI/Components/Forms/Types/Field.ts +8 -0
  433. package/UI/Components/Icon/Icon.tsx +18 -0
  434. package/UI/Components/Input/Input.tsx +11 -4
  435. package/UI/Components/LogsViewer/LogsViewer.tsx +4 -0
  436. package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +21 -3
  437. package/UI/Components/Markdown.tsx/MarkdownConverters.ts +0 -0
  438. package/UI/Components/Markdown.tsx/MarkdownEditor.tsx +877 -79
  439. package/UI/Components/Markdown.tsx/MarkdownEditorHistory.ts +284 -0
  440. package/UI/Components/Markdown.tsx/MarkdownListEditing.ts +1362 -0
  441. package/UI/Components/Markdown.tsx/MarkdownPaste.ts +1326 -0
  442. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +106 -10
  443. package/UI/Components/Markdown.tsx/MarkdownVisualEditing.ts +1032 -0
  444. package/UI/Components/ModelTable/BaseModelTable.tsx +85 -7
  445. package/UI/Components/ResetObjectID/ResetObjectID.tsx +35 -9
  446. package/UI/Components/Table/EmptyTableMessage.ts +81 -0
  447. package/UI/Components/Table/Table.tsx +50 -21
  448. package/UI/Components/Table/TableRow.tsx +9 -1
  449. package/UI/Components/TelemetryViewer/FacetVisibility.ts +97 -2
  450. package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +13 -0
  451. package/UI/Components/TelemetryViewer/components/LockedFilterChip.tsx +214 -7
  452. package/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.tsx +21 -3
  453. package/UI/Components/TextArea/TextArea.tsx +9 -2
  454. package/UI/Components/Workflow/ModelFieldPicker.tsx +10 -12
  455. package/UI/Styles/Theme.css +8 -0
  456. package/UI/esbuild-config.js +2 -32
  457. package/Utils/LabelRuleImportExport.ts +2 -0
  458. package/Utils/Markdown/UntrustedMarkdown.ts +1513 -0
  459. package/Utils/Monitor/IncomingEmailMonitorRequestUtil.ts +41 -0
  460. package/Utils/Monitor/MonitorLogSummaryUtil.ts +212 -0
  461. package/Utils/Telemetry/EntityKey.ts +48 -0
  462. package/build/dist/Models/DatabaseModels/AIConversation.js +125 -1
  463. package/build/dist/Models/DatabaseModels/AIConversation.js.map +1 -1
  464. package/build/dist/Models/DatabaseModels/CephCluster.js +12 -0
  465. package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -1
  466. package/build/dist/Models/DatabaseModels/CloudResource.js +12 -0
  467. package/build/dist/Models/DatabaseModels/CloudResource.js.map +1 -1
  468. package/build/dist/Models/DatabaseModels/DatabaseServer.js +12 -0
  469. package/build/dist/Models/DatabaseModels/DatabaseServer.js.map +1 -1
  470. package/build/dist/Models/DatabaseModels/DockerHost.js +12 -0
  471. package/build/dist/Models/DatabaseModels/DockerHost.js.map +1 -1
  472. package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js +12 -0
  473. package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js.map +1 -1
  474. package/build/dist/Models/DatabaseModels/GlobalOidc.js +0 -4
  475. package/build/dist/Models/DatabaseModels/GlobalOidc.js.map +1 -1
  476. package/build/dist/Models/DatabaseModels/GlobalOidcProject.js +0 -4
  477. package/build/dist/Models/DatabaseModels/GlobalOidcProject.js.map +1 -1
  478. package/build/dist/Models/DatabaseModels/GlobalSso.js +0 -4
  479. package/build/dist/Models/DatabaseModels/GlobalSso.js.map +1 -1
  480. package/build/dist/Models/DatabaseModels/GlobalSsoProject.js +0 -4
  481. package/build/dist/Models/DatabaseModels/GlobalSsoProject.js.map +1 -1
  482. package/build/dist/Models/DatabaseModels/Host.js +12 -0
  483. package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
  484. package/build/dist/Models/DatabaseModels/IncidentForm.js +605 -0
  485. package/build/dist/Models/DatabaseModels/IncidentForm.js.map +1 -0
  486. package/build/dist/Models/DatabaseModels/IncidentFormSubmission.js +299 -0
  487. package/build/dist/Models/DatabaseModels/IncidentFormSubmission.js.map +1 -0
  488. package/build/dist/Models/DatabaseModels/IncidentTemplate.js +60 -0
  489. package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
  490. package/build/dist/Models/DatabaseModels/Index.js +14 -0
  491. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  492. package/build/dist/Models/DatabaseModels/IoTFleet.js +12 -0
  493. package/build/dist/Models/DatabaseModels/IoTFleet.js.map +1 -1
  494. package/build/dist/Models/DatabaseModels/KubernetesCluster.js +12 -0
  495. package/build/dist/Models/DatabaseModels/KubernetesCluster.js.map +1 -1
  496. package/build/dist/Models/DatabaseModels/MessageQueue.js +1106 -0
  497. package/build/dist/Models/DatabaseModels/MessageQueue.js.map +1 -0
  498. package/build/dist/Models/DatabaseModels/MessageQueueLabelRule.js +562 -0
  499. package/build/dist/Models/DatabaseModels/MessageQueueLabelRule.js.map +1 -0
  500. package/build/dist/Models/DatabaseModels/MessageQueueOwnerRule.js +643 -0
  501. package/build/dist/Models/DatabaseModels/MessageQueueOwnerRule.js.map +1 -0
  502. package/build/dist/Models/DatabaseModels/MessageQueueOwnerTeam.js +506 -0
  503. package/build/dist/Models/DatabaseModels/MessageQueueOwnerTeam.js.map +1 -0
  504. package/build/dist/Models/DatabaseModels/MessageQueueOwnerUser.js +505 -0
  505. package/build/dist/Models/DatabaseModels/MessageQueueOwnerUser.js.map +1 -0
  506. package/build/dist/Models/DatabaseModels/PodmanHost.js +12 -0
  507. package/build/dist/Models/DatabaseModels/PodmanHost.js.map +1 -1
  508. package/build/dist/Models/DatabaseModels/Project.js +61 -0
  509. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  510. package/build/dist/Models/DatabaseModels/ProjectOidc.js +0 -4
  511. package/build/dist/Models/DatabaseModels/ProjectOidc.js.map +1 -1
  512. package/build/dist/Models/DatabaseModels/ProjectSso.js +0 -4
  513. package/build/dist/Models/DatabaseModels/ProjectSso.js.map +1 -1
  514. package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +12 -0
  515. package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -1
  516. package/build/dist/Models/DatabaseModels/RumApplication.js +12 -0
  517. package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -1
  518. package/build/dist/Models/DatabaseModels/ServerlessFunction.js +12 -0
  519. package/build/dist/Models/DatabaseModels/ServerlessFunction.js.map +1 -1
  520. package/build/dist/Models/DatabaseModels/Service.js +12 -0
  521. package/build/dist/Models/DatabaseModels/Service.js.map +1 -1
  522. package/build/dist/Models/DatabaseModels/StatusPageOidc.js +0 -4
  523. package/build/dist/Models/DatabaseModels/StatusPageOidc.js.map +1 -1
  524. package/build/dist/Models/DatabaseModels/StatusPageSso.js +0 -4
  525. package/build/dist/Models/DatabaseModels/StatusPageSso.js.map +1 -1
  526. package/build/dist/Models/DatabaseModels/TeamComplianceSetting.js +49 -3
  527. package/build/dist/Models/DatabaseModels/TeamComplianceSetting.js.map +1 -1
  528. package/build/dist/Models/DatabaseModels/VMwareVCenter.js +12 -0
  529. package/build/dist/Models/DatabaseModels/VMwareVCenter.js.map +1 -1
  530. package/build/dist/Server/API/AIChatAPI.js +9 -103
  531. package/build/dist/Server/API/AIChatAPI.js.map +1 -1
  532. package/build/dist/Server/API/AIInvestigationAPI.js +3 -3
  533. package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
  534. package/build/dist/Server/API/AIInvestigationConversationAPI.js +162 -0
  535. package/build/dist/Server/API/AIInvestigationConversationAPI.js.map +1 -0
  536. package/build/dist/Server/API/IncidentFormAPI.js +245 -0
  537. package/build/dist/Server/API/IncidentFormAPI.js.map +1 -0
  538. package/build/dist/Server/API/ProjectOIDC.js +16 -24
  539. package/build/dist/Server/API/ProjectOIDC.js.map +1 -1
  540. package/build/dist/Server/API/ProjectSSO.js +16 -24
  541. package/build/dist/Server/API/ProjectSSO.js.map +1 -1
  542. package/build/dist/Server/API/StatusPageAPI.js +42 -75
  543. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  544. package/build/dist/Server/Enterprise/EnterpriseEdition.js +79 -25
  545. package/build/dist/Server/Enterprise/EnterpriseEdition.js.map +1 -1
  546. package/build/dist/Server/Enterprise/EnterpriseFeature.js +24 -3
  547. package/build/dist/Server/Enterprise/EnterpriseFeature.js.map +1 -1
  548. package/build/dist/Server/Enterprise/EnterpriseLicenseSnapshot.js +1 -1
  549. package/build/dist/Server/Enterprise/EnterpriseServerModule.js.map +1 -1
  550. package/build/dist/Server/EnvironmentConfig.js +1 -1
  551. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796400000000-AddIncidentForms.js +63 -0
  552. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796400000000-AddIncidentForms.js.map +1 -0
  553. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796500000000-AddTeamComplianceRuleNotificationChannels.js +41 -0
  554. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796500000000-AddTeamComplianceRuleNotificationChannels.js.map +1 -0
  555. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796600000000-AddAIInvestigationConversationAndTimeLimits.js +40 -0
  556. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796600000000-AddAIInvestigationConversationAndTimeLimits.js.map +1 -0
  557. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796700000000-AddMessageQueueTables.js +183 -0
  558. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796700000000-AddMessageQueueTables.js.map +1 -0
  559. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
  560. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  561. package/build/dist/Server/Middleware/IncidentFormRateLimit.js +559 -0
  562. package/build/dist/Server/Middleware/IncidentFormRateLimit.js.map +1 -0
  563. package/build/dist/Server/Middleware/UserAuthorization.js +11 -30
  564. package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
  565. package/build/dist/Server/Services/AIService.js +10 -13
  566. package/build/dist/Server/Services/AIService.js.map +1 -1
  567. package/build/dist/Server/Services/IncidentCustomFieldService.js +83 -0
  568. package/build/dist/Server/Services/IncidentCustomFieldService.js.map +1 -1
  569. package/build/dist/Server/Services/IncidentEpisodeMemberService.js +8 -4
  570. package/build/dist/Server/Services/IncidentEpisodeMemberService.js.map +1 -1
  571. package/build/dist/Server/Services/IncidentEpisodeService.js +10 -1
  572. package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
  573. package/build/dist/Server/Services/IncidentFormService.js +1202 -0
  574. package/build/dist/Server/Services/IncidentFormService.js.map +1 -0
  575. package/build/dist/Server/Services/IncidentFormSubmissionService.js +91 -0
  576. package/build/dist/Server/Services/IncidentFormSubmissionService.js.map +1 -0
  577. package/build/dist/Server/Services/IncidentGroupingEngineService.js +20 -8
  578. package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
  579. package/build/dist/Server/Services/IncidentService.js +106 -4
  580. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  581. package/build/dist/Server/Services/IncidentTemplateService.js +18 -0
  582. package/build/dist/Server/Services/IncidentTemplateService.js.map +1 -1
  583. package/build/dist/Server/Services/Index.js +14 -0
  584. package/build/dist/Server/Services/Index.js.map +1 -1
  585. package/build/dist/Server/Services/MessageQueueLabelRuleEngineService.js +262 -0
  586. package/build/dist/Server/Services/MessageQueueLabelRuleEngineService.js.map +1 -0
  587. package/build/dist/Server/Services/MessageQueueLabelRuleService.js +13 -0
  588. package/build/dist/Server/Services/MessageQueueLabelRuleService.js.map +1 -0
  589. package/build/dist/Server/Services/MessageQueueOwnerRuleEngineService.js +334 -0
  590. package/build/dist/Server/Services/MessageQueueOwnerRuleEngineService.js.map +1 -0
  591. package/build/dist/Server/Services/MessageQueueOwnerRuleService.js +13 -0
  592. package/build/dist/Server/Services/MessageQueueOwnerRuleService.js.map +1 -0
  593. package/build/dist/Server/Services/MessageQueueOwnerTeamService.js +62 -0
  594. package/build/dist/Server/Services/MessageQueueOwnerTeamService.js.map +1 -0
  595. package/build/dist/Server/Services/MessageQueueOwnerUserService.js +62 -0
  596. package/build/dist/Server/Services/MessageQueueOwnerUserService.js.map +1 -0
  597. package/build/dist/Server/Services/MessageQueueService.js +1140 -0
  598. package/build/dist/Server/Services/MessageQueueService.js.map +1 -0
  599. package/build/dist/Server/Services/OpenTelemetryIngestService.js +25 -4
  600. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  601. package/build/dist/Server/Services/ProjectService.js +0 -54
  602. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  603. package/build/dist/Server/Services/StatusPagePrivateUserService.js +1 -4
  604. package/build/dist/Server/Services/StatusPagePrivateUserService.js.map +1 -1
  605. package/build/dist/Server/Services/StatusPageService.js +0 -46
  606. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  607. package/build/dist/Server/Services/TeamComplianceSettingService.js +120 -31
  608. package/build/dist/Server/Services/TeamComplianceSettingService.js.map +1 -1
  609. package/build/dist/Server/Services/UserNotificationRuleService.js +8 -1
  610. package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
  611. package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js +12 -3
  612. package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js.map +1 -1
  613. package/build/dist/Server/Types/Database/Permissions/CreatePermission.js +6 -3
  614. package/build/dist/Server/Types/Database/Permissions/CreatePermission.js.map +1 -1
  615. package/build/dist/Server/Types/Database/Permissions/EditionPermission.js +109 -37
  616. package/build/dist/Server/Types/Database/Permissions/EditionPermission.js.map +1 -1
  617. package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +16 -0
  618. package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
  619. package/build/dist/Server/Types/Database/Permissions/TablePermission.js +3 -3
  620. package/build/dist/Server/Types/Database/Permissions/UpdatePermission.js +9 -6
  621. package/build/dist/Server/Types/Database/Permissions/UpdatePermission.js.map +1 -1
  622. package/build/dist/Server/Utils/AI/Chat/AgentContextCompactor.js +128 -0
  623. package/build/dist/Server/Utils/AI/Chat/AgentContextCompactor.js.map +1 -0
  624. package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js +192 -50
  625. package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js.map +1 -1
  626. package/build/dist/Server/Utils/AI/Chat/ChatRunCancellation.js +133 -0
  627. package/build/dist/Server/Utils/AI/Chat/ChatRunCancellation.js.map +1 -0
  628. package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js +53 -13
  629. package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js.map +1 -1
  630. package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +1 -1
  631. package/build/dist/Server/Utils/AI/Chat/ToolOutputPager.js +206 -0
  632. package/build/dist/Server/Utils/AI/Chat/ToolOutputPager.js.map +1 -0
  633. package/build/dist/Server/Utils/AI/ClusterAccess/KubectlInvestigationToolkit.js +53 -26
  634. package/build/dist/Server/Utils/AI/ClusterAccess/KubectlInvestigationToolkit.js.map +1 -1
  635. package/build/dist/Server/Utils/AI/ClusterAccess/KubectlJobRunner.js +4 -2
  636. package/build/dist/Server/Utils/AI/ClusterAccess/KubectlJobRunner.js.map +1 -1
  637. package/build/dist/Server/Utils/AI/CodeFix/CodeFixReadiness.js +1 -29
  638. package/build/dist/Server/Utils/AI/CodeFix/CodeFixReadiness.js.map +1 -1
  639. package/build/dist/Server/Utils/AI/CodeFix/FixRunBudget.js +24 -24
  640. package/build/dist/Server/Utils/AI/CodeFix/FixRunBudget.js.map +1 -1
  641. package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js +7 -2
  642. package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js.map +1 -1
  643. package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js +29 -14
  644. package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js.map +1 -1
  645. package/build/dist/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.js +38 -14
  646. package/build/dist/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.js.map +1 -1
  647. package/build/dist/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.js +2 -0
  648. package/build/dist/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.js.map +1 -1
  649. package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +40 -10
  650. package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -1
  651. package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js +19 -7
  652. package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js.map +1 -1
  653. package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js +19 -7
  654. package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js.map +1 -1
  655. package/build/dist/Server/Utils/AI/SRE/InvestigationQueue.js +15 -18
  656. package/build/dist/Server/Utils/AI/SRE/InvestigationQueue.js.map +1 -1
  657. package/build/dist/Server/Utils/AI/SRE/InvestigationThread.js +412 -0
  658. package/build/dist/Server/Utils/AI/SRE/InvestigationThread.js.map +1 -0
  659. package/build/dist/Server/Utils/AI/SRE/InvestigationThreadService.js +495 -0
  660. package/build/dist/Server/Utils/AI/SRE/InvestigationThreadService.js.map +1 -0
  661. package/build/dist/Server/Utils/AI/Toolbox/Serializer.js +10 -3
  662. package/build/dist/Server/Utils/AI/Toolbox/Serializer.js.map +1 -1
  663. package/build/dist/Server/Utils/EditionEnforcement.js +20 -158
  664. package/build/dist/Server/Utils/EditionEnforcement.js.map +1 -1
  665. package/build/dist/Server/Utils/LLM/LLMService.js +193 -54
  666. package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
  667. package/build/dist/Server/Utils/RelaxedScimTeamLocksReport.js +160 -0
  668. package/build/dist/Server/Utils/RelaxedScimTeamLocksReport.js.map +1 -0
  669. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js +25 -0
  670. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js.map +1 -1
  671. package/build/dist/Server/Utils/SameOriginRequest.js +151 -0
  672. package/build/dist/Server/Utils/SameOriginRequest.js.map +1 -0
  673. package/build/dist/Server/Utils/TeamMember/ProjectLeaveResourceCleanup.js +2 -0
  674. package/build/dist/Server/Utils/TeamMember/ProjectLeaveResourceCleanup.js.map +1 -1
  675. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +4 -1
  676. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
  677. package/build/dist/Server/Utils/Telemetry/MessageQueueDiscovery.js +1015 -0
  678. package/build/dist/Server/Utils/Telemetry/MessageQueueDiscovery.js.map +1 -0
  679. package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js +4 -1
  680. package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js.map +1 -1
  681. package/build/dist/Server/Utils/VendorAssets.js +3 -3
  682. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +3 -1
  683. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
  684. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.js +3 -1
  685. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.js.map +1 -1
  686. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +10 -1
  687. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  688. package/build/dist/Types/AI/AIAgentRunLimits.js +91 -0
  689. package/build/dist/Types/AI/AIAgentRunLimits.js.map +1 -0
  690. package/build/dist/Types/Code/CodeType.js +2 -0
  691. package/build/dist/Types/Code/CodeType.js.map +1 -1
  692. package/build/dist/Types/Code/JsonSyntax.js +604 -0
  693. package/build/dist/Types/Code/JsonSyntax.js.map +1 -0
  694. package/build/dist/Types/CustomField/CustomFieldCreateSettings.js +310 -0
  695. package/build/dist/Types/CustomField/CustomFieldCreateSettings.js.map +1 -0
  696. package/build/dist/Types/CustomField/CustomFieldMappingCatalog.js +38 -0
  697. package/build/dist/Types/CustomField/CustomFieldMappingCatalog.js.map +1 -1
  698. package/build/dist/Types/CustomField/CustomFieldValueValidator.js +10 -7
  699. package/build/dist/Types/CustomField/CustomFieldValueValidator.js.map +1 -1
  700. package/build/dist/Types/EnterpriseLicense/EnterpriseLicensePeriods.js +1 -1
  701. package/build/dist/Types/Icon/IconProp.js +2 -0
  702. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  703. package/build/dist/Types/Incident/IncidentFormIpAllowlist.js +119 -0
  704. package/build/dist/Types/Incident/IncidentFormIpAllowlist.js.map +1 -0
  705. package/build/dist/Types/Incident/IncidentFormPublic.js +678 -0
  706. package/build/dist/Types/Incident/IncidentFormPublic.js.map +1 -0
  707. package/build/dist/Types/Kubernetes/KubernetesClusterAiAccess.js +10 -3
  708. package/build/dist/Types/Kubernetes/KubernetesClusterAiAccess.js.map +1 -1
  709. package/build/dist/Types/MessageQueue/MessageQueueIdentity.js +184 -0
  710. package/build/dist/Types/MessageQueue/MessageQueueIdentity.js.map +1 -0
  711. package/build/dist/Types/MessageQueue/MessageQueueManualIdentity.js +190 -0
  712. package/build/dist/Types/MessageQueue/MessageQueueManualIdentity.js.map +1 -0
  713. package/build/dist/Types/MessageQueue/MessageQueueMetricCatalog.js +1057 -0
  714. package/build/dist/Types/MessageQueue/MessageQueueMetricCatalog.js.map +1 -0
  715. package/build/dist/Types/MessageQueue/MessagingSystem.js +394 -0
  716. package/build/dist/Types/MessageQueue/MessagingSystem.js.map +1 -0
  717. package/build/dist/Types/MessageQueue/MessagingTelemetryResolver.js +1768 -0
  718. package/build/dist/Types/MessageQueue/MessagingTelemetryResolver.js.map +1 -0
  719. package/build/dist/Types/Monitor/MessageQueueAlertTemplates.js +1207 -0
  720. package/build/dist/Types/Monitor/MessageQueueAlertTemplates.js.map +1 -0
  721. package/build/dist/Types/Permission.js +274 -0
  722. package/build/dist/Types/Permission.js.map +1 -1
  723. package/build/dist/Types/ResourceAiAgent/ResourceAiAccess.js +10 -4
  724. package/build/dist/Types/ResourceAiAgent/ResourceAiAccess.js.map +1 -1
  725. package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
  726. package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js.map +1 -1
  727. package/build/dist/Types/Rules/RuleRun.js +4 -0
  728. package/build/dist/Types/Rules/RuleRun.js.map +1 -1
  729. package/build/dist/Types/Team/ComplianceNotificationChannel.js +4 -3
  730. package/build/dist/Types/Team/ComplianceNotificationChannel.js.map +1 -1
  731. package/build/dist/Types/Team/ComplianceRule.js +48 -14
  732. package/build/dist/Types/Team/ComplianceRule.js.map +1 -1
  733. package/build/dist/Types/Team/ComplianceRuleType.js +2 -2
  734. package/build/dist/Types/Telemetry/EntityType.js +16 -0
  735. package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
  736. package/build/dist/Types/XML.js +23 -0
  737. package/build/dist/Types/XML.js.map +1 -1
  738. package/build/dist/UI/Components/CodeEditor/CodeEditor.js +641 -266
  739. package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
  740. package/build/dist/UI/Components/CodeEditor/CodeEditorCommands.js +464 -0
  741. package/build/dist/UI/Components/CodeEditor/CodeEditorCommands.js.map +1 -0
  742. package/build/dist/UI/Components/CodeEditor/CodeEditorHighlight.js +69 -0
  743. package/build/dist/UI/Components/CodeEditor/CodeEditorHighlight.js.map +1 -0
  744. package/build/dist/UI/Components/CodeEditor/CodeEditorLanguages.js +108 -0
  745. package/build/dist/UI/Components/CodeEditor/CodeEditorLanguages.js.map +1 -0
  746. package/build/dist/UI/Components/CodeEditor/YamlEditor.js +14 -186
  747. package/build/dist/UI/Components/CodeEditor/YamlEditor.js.map +1 -1
  748. package/build/dist/UI/Components/CopyTextButton/CopyTextButton.js +5 -1
  749. package/build/dist/UI/Components/CopyTextButton/CopyTextButton.js.map +1 -1
  750. package/build/dist/UI/Components/CustomFields/CustomFieldModelFormFields.js +5 -14
  751. package/build/dist/UI/Components/CustomFields/CustomFieldModelFormFields.js.map +1 -1
  752. package/build/dist/UI/Components/EditionLabel/EditionLabel.js +14 -13
  753. package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
  754. package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js +1 -1
  755. package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js.map +1 -1
  756. package/build/dist/UI/Components/Forms/Fields/FormField.js +8 -3
  757. package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
  758. package/build/dist/UI/Components/Icon/Icon.js +8 -0
  759. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  760. package/build/dist/UI/Components/Input/Input.js +11 -3
  761. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  762. package/build/dist/UI/Components/LogsViewer/LogsViewer.js +2 -1
  763. package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
  764. package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +14 -4
  765. package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
  766. package/build/dist/UI/Components/Markdown.tsx/MarkdownConverters.js +0 -0
  767. package/build/dist/UI/Components/Markdown.tsx/MarkdownConverters.js.map +1 -1
  768. package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js +710 -65
  769. package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js.map +1 -1
  770. package/build/dist/UI/Components/Markdown.tsx/MarkdownEditorHistory.js +238 -0
  771. package/build/dist/UI/Components/Markdown.tsx/MarkdownEditorHistory.js.map +1 -0
  772. package/build/dist/UI/Components/Markdown.tsx/MarkdownListEditing.js +1028 -0
  773. package/build/dist/UI/Components/Markdown.tsx/MarkdownListEditing.js.map +1 -0
  774. package/build/dist/UI/Components/Markdown.tsx/MarkdownPaste.js +1088 -0
  775. package/build/dist/UI/Components/Markdown.tsx/MarkdownPaste.js.map +1 -0
  776. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +70 -10
  777. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
  778. package/build/dist/UI/Components/Markdown.tsx/MarkdownVisualEditing.js +887 -0
  779. package/build/dist/UI/Components/Markdown.tsx/MarkdownVisualEditing.js.map +1 -0
  780. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +57 -6
  781. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  782. package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js +7 -5
  783. package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js.map +1 -1
  784. package/build/dist/UI/Components/Table/EmptyTableMessage.js +51 -0
  785. package/build/dist/UI/Components/Table/EmptyTableMessage.js.map +1 -0
  786. package/build/dist/UI/Components/Table/Table.js +30 -11
  787. package/build/dist/UI/Components/Table/Table.js.map +1 -1
  788. package/build/dist/UI/Components/Table/TableRow.js +9 -2
  789. package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
  790. package/build/dist/UI/Components/TelemetryViewer/FacetVisibility.js +63 -1
  791. package/build/dist/UI/Components/TelemetryViewer/FacetVisibility.js.map +1 -1
  792. package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +4 -2
  793. package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
  794. package/build/dist/UI/Components/TelemetryViewer/components/LockedFilterChip.js +91 -10
  795. package/build/dist/UI/Components/TelemetryViewer/components/LockedFilterChip.js.map +1 -1
  796. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js +14 -4
  797. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js.map +1 -1
  798. package/build/dist/UI/Components/TextArea/TextArea.js +9 -3
  799. package/build/dist/UI/Components/TextArea/TextArea.js.map +1 -1
  800. package/build/dist/UI/Components/Workflow/ModelFieldPicker.js +1 -2
  801. package/build/dist/UI/Components/Workflow/ModelFieldPicker.js.map +1 -1
  802. package/build/dist/Utils/LabelRuleImportExport.js +2 -0
  803. package/build/dist/Utils/LabelRuleImportExport.js.map +1 -1
  804. package/build/dist/Utils/Markdown/UntrustedMarkdown.js +988 -0
  805. package/build/dist/Utils/Markdown/UntrustedMarkdown.js.map +1 -0
  806. package/build/dist/Utils/Monitor/IncomingEmailMonitorRequestUtil.js +34 -0
  807. package/build/dist/Utils/Monitor/IncomingEmailMonitorRequestUtil.js.map +1 -0
  808. package/build/dist/Utils/Monitor/MonitorLogSummaryUtil.js +148 -0
  809. package/build/dist/Utils/Monitor/MonitorLogSummaryUtil.js.map +1 -0
  810. package/build/dist/Utils/Telemetry/EntityKey.js +36 -0
  811. package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
  812. package/package.json +1 -3
  813. package/Server/Utils/CommunityEditionSsoReport.ts +0 -361
  814. package/Tests/App/Accounts/LoginSsoEdition.test.tsx +0 -616
  815. package/Tests/App/AdminDashboard/AdminAuthenticationSsoEdition.test.tsx +0 -217
  816. package/Tests/App/AdminDashboard/GlobalSSOEnterpriseShells.test.tsx +0 -271
  817. package/Tests/App/Dashboard/CloudDocumentationMarkdown.test.ts +0 -215
  818. package/Tests/App/Dashboard/TelemetryResourceRetentionSettings.test.tsx +0 -784
  819. package/Tests/Server/Middleware/UserAuthorizationEditionEnforcement.test.ts +0 -518
  820. package/Tests/Server/Services/SsoRequirementReadMasking.test.ts +0 -419
  821. package/Tests/Server/Services/SsoRequirementWriteGuard.test.ts +0 -769
  822. package/Tests/UI/Components/CodeEditor.test.tsx +0 -638
  823. package/Tests/UI/Components/MonacoLoader.test.ts +0 -67
  824. package/Tests/UI/Components/MonacoRuntime.test.ts +0 -121
  825. package/Tests/UI/Components/Telemetry/TelemetryRetentionConfigForm.test.tsx +0 -329
  826. package/Tests/UI/Components/YamlEditor.test.tsx +0 -847
  827. package/UI/Components/CodeEditor/MonacoLoader.ts +0 -36
  828. package/UI/Components/Telemetry/TelemetryRetentionConfigForm.tsx +0 -319
  829. package/UI/Components/Telemetry/TelemetryRetentionConfigSummary.tsx +0 -223
  830. package/build/dist/Server/Utils/CommunityEditionSsoReport.js +0 -223
  831. package/build/dist/Server/Utils/CommunityEditionSsoReport.js.map +0 -1
  832. package/build/dist/UI/Components/CodeEditor/MonacoLoader.js +0 -34
  833. package/build/dist/UI/Components/CodeEditor/MonacoLoader.js.map +0 -1
  834. package/build/dist/UI/Components/Telemetry/TelemetryRetentionConfigForm.js +0 -171
  835. package/build/dist/UI/Components/Telemetry/TelemetryRetentionConfigForm.js.map +0 -1
  836. package/build/dist/UI/Components/Telemetry/TelemetryRetentionConfigSummary.js +0 -119
  837. package/build/dist/UI/Components/Telemetry/TelemetryRetentionConfigSummary.js.map +0 -1
@@ -0,0 +1,961 @@
1
+ import { describe, expect, test } from "@jest/globals";
2
+ import fs from "fs";
3
+ import path from "path";
4
+ import yaml from "js-yaml";
5
+ import markdownSlugify from "../../../Server/Types/MarkdownSlugify";
6
+ import {
7
+ CEPH_AGENT_COLLECTOR_CONFIG,
8
+ CEPH_AGENT_CONTAINER,
9
+ CEPH_AGENT_INSTALL_DIR,
10
+ CEPH_AGENT_RAW_URL,
11
+ CEPH_AGENT_SOURCE_URL,
12
+ CEPH_AI_AGENT_CONTAINER,
13
+ CEPH_EXAMPLE_CLUSTER_NAME,
14
+ CEPH_EXAMPLE_MGR_ENDPOINTS,
15
+ CEPH_INSTALL_METHODS,
16
+ CephInstallMethod,
17
+ DEFAULT_CEPH_INSTALL_METHOD,
18
+ getCephInstallScriptCommand,
19
+ getCephSetupGuide,
20
+ resolveCephInstallMethod,
21
+ } from "../../../../App/FeatureSet/Dashboard/src/Pages/Ceph/Utils/DocumentationMarkdown";
22
+ import {
23
+ SETUP_GUIDE_API_KEY_PLACEHOLDER,
24
+ SETUP_GUIDE_URL_PLACEHOLDER,
25
+ SetupGuideContent,
26
+ SetupGuideOption,
27
+ SetupGuideStep,
28
+ SetupGuideTopic,
29
+ codeBlock,
30
+ getSetupGuideCodeBlocks,
31
+ getSetupGuideMarkdown,
32
+ } from "../../../../App/FeatureSet/Dashboard/src/Components/SetupGuide/SetupGuide";
33
+
34
+ /*
35
+ * The Ceph agent guide asks how to install the agent — the install script
36
+ * or Docker Compose — and shows only that path. These tests pin, for both:
37
+ *
38
+ * - the reader's URL and key in every command and file that needs them,
39
+ * and never a placeholder key in the install script's environment (the
40
+ * script would write it into .env as the key);
41
+ * - that each method shows only its own instructions;
42
+ * - that the collector config the guide shows IS the shipped file, and
43
+ * every variable, file, container and script it names exists in
44
+ * agents/CephAgent — the guide is how most people install the agent,
45
+ * so a drift there is a broken install, not a doc typo.
46
+ */
47
+
48
+ const REPO_ROOT: string = path.resolve(__dirname, "../../../../..");
49
+ const AGENT_DIR: string = path.join(REPO_ROOT, "agents", "CephAgent");
50
+ const DOCS_DIR: string = path.join(
51
+ REPO_ROOT,
52
+ "packages",
53
+ "App",
54
+ "FeatureSet",
55
+ "Docs",
56
+ "Content",
57
+ "en",
58
+ );
59
+
60
+ const URL: string = "https://oneuptime.example.com";
61
+ const KEY: string = "tik_secret_123";
62
+
63
+ // What ObjectID.generate() mints: the E2E spec greps the page for one.
64
+ const UUID_KEY: string = "0f8fad5b-d9cb-469f-a165-70867728950e";
65
+
66
+ const METHOD_KEYS: Array<CephInstallMethod> = CEPH_INSTALL_METHODS.map(
67
+ (option: SetupGuideOption<CephInstallMethod>): CephInstallMethod => {
68
+ return option.key;
69
+ },
70
+ );
71
+
72
+ interface GuideOverrides {
73
+ oneuptimeUrl?: string;
74
+ apiKey?: string;
75
+ hasApiKey?: boolean;
76
+ clusterName?: string;
77
+ }
78
+
79
+ const guideFor: (
80
+ method: CephInstallMethod,
81
+ overrides?: GuideOverrides,
82
+ ) => SetupGuideContent = (
83
+ method: CephInstallMethod,
84
+ overrides?: GuideOverrides,
85
+ ): SetupGuideContent => {
86
+ const apiKey: string = overrides?.apiKey ?? KEY;
87
+ return getCephSetupGuide({
88
+ oneuptimeUrl: overrides?.oneuptimeUrl ?? URL,
89
+ apiKey: apiKey,
90
+ hasApiKey:
91
+ overrides?.hasApiKey ?? apiKey !== SETUP_GUIDE_API_KEY_PLACEHOLDER,
92
+ method: method,
93
+ clusterName: overrides?.clusterName,
94
+ });
95
+ };
96
+
97
+ const noKeyGuideFor: (method: CephInstallMethod) => SetupGuideContent = (
98
+ method: CephInstallMethod,
99
+ ): SetupGuideContent => {
100
+ return guideFor(method, {
101
+ apiKey: SETUP_GUIDE_API_KEY_PLACEHOLDER,
102
+ hasApiKey: false,
103
+ });
104
+ };
105
+
106
+ const stepTitled: (
107
+ guide: SetupGuideContent,
108
+ title: string,
109
+ ) => SetupGuideStep = (
110
+ guide: SetupGuideContent,
111
+ title: string,
112
+ ): SetupGuideStep => {
113
+ const step: SetupGuideStep | undefined = guide.steps.find(
114
+ (candidate: SetupGuideStep): boolean => {
115
+ return candidate.title === title;
116
+ },
117
+ );
118
+ if (!step) {
119
+ throw new Error(`No step titled "${title}"`);
120
+ }
121
+ return step;
122
+ };
123
+
124
+ const topicTitled: (
125
+ topics: Array<SetupGuideTopic> | undefined,
126
+ title: string,
127
+ ) => SetupGuideTopic = (
128
+ topics: Array<SetupGuideTopic> | undefined,
129
+ title: string,
130
+ ): SetupGuideTopic => {
131
+ const topic: SetupGuideTopic | undefined = (topics || []).find(
132
+ (candidate: SetupGuideTopic): boolean => {
133
+ return candidate.title === title;
134
+ },
135
+ );
136
+ if (!topic) {
137
+ throw new Error(`No topic titled "${title}"`);
138
+ }
139
+ return topic;
140
+ };
141
+
142
+ const topicTitles: (
143
+ topics: Array<SetupGuideTopic> | undefined,
144
+ ) => Array<string> = (
145
+ topics: Array<SetupGuideTopic> | undefined,
146
+ ): Array<string> => {
147
+ return (topics || []).map((topic: SetupGuideTopic): string => {
148
+ return topic.title;
149
+ });
150
+ };
151
+
152
+ // Everything a step shows: its markdown and every tab.
153
+ const stepText: (step: SetupGuideStep) => string = (
154
+ step: SetupGuideStep,
155
+ ): string => {
156
+ return [
157
+ step.description || "",
158
+ step.markdown || "",
159
+ ...(step.variants || []).map(
160
+ (variant: { label: string; markdown: string }): string => {
161
+ return variant.markdown;
162
+ },
163
+ ),
164
+ ].join("\n");
165
+ };
166
+
167
+ const stepsText: (guide: SetupGuideContent) => string = (
168
+ guide: SetupGuideContent,
169
+ ): string => {
170
+ return guide.steps.map(stepText).join("\n");
171
+ };
172
+
173
+ const installStep: (guide: SetupGuideContent) => string = (
174
+ guide: SetupGuideContent,
175
+ ): string => {
176
+ return stepTitled(guide, "Install the agent").markdown || "";
177
+ };
178
+
179
+ // The .env block of the Docker Compose install.
180
+ const envFileOf: (guide: SetupGuideContent) => string = (
181
+ guide: SetupGuideContent,
182
+ ): string => {
183
+ const block: string | undefined = getSetupGuideCodeBlocks(guide).find(
184
+ (candidate: string): boolean => {
185
+ return candidate.startsWith("ONEUPTIME_URL=");
186
+ },
187
+ );
188
+ if (!block) {
189
+ throw new Error("The guide has no .env block");
190
+ }
191
+ return block.trimEnd();
192
+ };
193
+
194
+ const readAgentFile: (name: string) => string = (name: string): string => {
195
+ return fs.readFileSync(path.join(AGENT_DIR, name), "utf8");
196
+ };
197
+
198
+ // Variables a compose service reads from .env: `${NAME}` and `${NAME:-x}`.
199
+ const composeVariables: (serviceName: string) => Map<string, string | null> = (
200
+ serviceName: string,
201
+ ): Map<string, string | null> => {
202
+ const compose: Record<string, any> = yaml.load(
203
+ readAgentFile("docker-compose.yml"),
204
+ ) as Record<string, any>;
205
+ const environment: Array<string> =
206
+ compose["services"][serviceName]["environment"];
207
+ const variables: Map<string, string | null> = new Map();
208
+ for (const entry of environment) {
209
+ for (const match of entry.matchAll(/\$\{([A-Z0-9_]+)(?::-([^}]*))?\}/g)) {
210
+ variables.set(match[1]!, match[2] ?? null);
211
+ }
212
+ }
213
+ return variables;
214
+ };
215
+
216
+ // The rows of the guide's environment variable table.
217
+ const envTableRows: (
218
+ guide: SetupGuideContent,
219
+ ) => Map<string, { required: string; description: string }> = (
220
+ guide: SetupGuideContent,
221
+ ): Map<string, { required: string; description: string }> => {
222
+ const markdown: string = topicTitled(
223
+ guide.advanced,
224
+ "Environment variables",
225
+ ).markdown;
226
+ const rows: Map<string, { required: string; description: string }> =
227
+ new Map();
228
+ for (const match of markdown.matchAll(
229
+ /^\| `([A-Z0-9_]+)` \| ([^|]+) \| (.*) \|$/gm,
230
+ )) {
231
+ rows.set(match[1]!, {
232
+ required: match[2]!.trim(),
233
+ description: match[3]!,
234
+ });
235
+ }
236
+ return rows;
237
+ };
238
+
239
+ describe("the install method picker", () => {
240
+ test("offers the install script first, then Docker Compose", () => {
241
+ expect(METHOD_KEYS).toEqual(["install-script", "docker-compose"]);
242
+ expect(DEFAULT_CEPH_INSTALL_METHOD).toBe("install-script");
243
+ expect(
244
+ CEPH_INSTALL_METHODS.map(
245
+ (option: SetupGuideOption<CephInstallMethod>): string => {
246
+ return option.label;
247
+ },
248
+ ),
249
+ ).toEqual(["Install script", "Docker Compose"]);
250
+ });
251
+
252
+ test("recommends only the install script", () => {
253
+ expect(CEPH_INSTALL_METHODS[0]!.badge).toBe("Recommended");
254
+ expect(CEPH_INSTALL_METHODS[1]!.badge).toBeUndefined();
255
+ });
256
+
257
+ test("every method has a one-line description", () => {
258
+ for (const option of CEPH_INSTALL_METHODS) {
259
+ expect((option.description || "").length).toBeGreaterThan(0);
260
+ expect(option.description).not.toContain("\n");
261
+ }
262
+ });
263
+
264
+ test("only the Docker Compose option's name mentions Docker Compose", () => {
265
+ /*
266
+ * A radio's accessible name is its label plus its description, and the
267
+ * E2E specs pick this option by /^Docker Compose/.
268
+ */
269
+ expect(CEPH_INSTALL_METHODS[0]!.description).not.toContain(
270
+ "Docker Compose",
271
+ );
272
+ });
273
+
274
+ test("an unknown or missing method resolves to the install script", () => {
275
+ for (const value of [undefined, null, "", "helm", "DOCKER-COMPOSE"]) {
276
+ expect(resolveCephInstallMethod(value)).toBe("install-script");
277
+ }
278
+ expect(resolveCephInstallMethod("docker-compose")).toBe("docker-compose");
279
+ });
280
+ });
281
+
282
+ describe.each(METHOD_KEYS)("the %s guide", (method: CephInstallMethod) => {
283
+ const guide: SetupGuideContent = guideFor(method);
284
+ const markdown: string = getSetupGuideMarkdown(guide);
285
+
286
+ test("is three steps after the key: enable the module, install, verify", () => {
287
+ expect(
288
+ guide.steps.map((step: SetupGuideStep): string => {
289
+ return step.title;
290
+ }),
291
+ ).toEqual([
292
+ "Enable the mgr prometheus module",
293
+ "Install the agent",
294
+ "Verify the installation",
295
+ ]);
296
+ });
297
+
298
+ test("every step has a plain one-sentence description", () => {
299
+ for (const step of guide.steps) {
300
+ expect(step.description).toBeTruthy();
301
+ // Descriptions render as plain text, so no markdown.
302
+ expect(step.description).not.toMatch(/[`*[\]]/);
303
+ expect(step.description).not.toContain("\n");
304
+ }
305
+ });
306
+
307
+ test("enables the mgr prometheus module and lists every mgr", () => {
308
+ const enable: string =
309
+ stepTitled(guide, "Enable the mgr prometheus module").markdown || "";
310
+ expect(enable).toContain(
311
+ codeBlock("bash", "ceph mgr module enable prometheus"),
312
+ );
313
+ expect(enable).toContain("ceph mgr stat");
314
+ expect(enable).toContain("ceph orch ps --daemon-type mgr");
315
+ expect(enable).toContain("Only the **active** mgr returns metrics");
316
+ });
317
+
318
+ test("lists what must be in place first", () => {
319
+ const prerequisites: string = (guide.prerequisites || []).join("\n");
320
+ expect(guide.prerequisites!.length).toBeGreaterThanOrEqual(2);
321
+ expect(guide.prerequisites!.length).toBeLessThanOrEqual(4);
322
+ expect(prerequisites).toContain("Docker Engine 20.10+");
323
+ expect(prerequisites).toContain("Docker Compose v2");
324
+ expect(prerequisites).toContain("port 9283");
325
+ expect(prerequisites).toContain("`ceph` CLI");
326
+ });
327
+
328
+ test("the verify step checks the collector container and its ready line", () => {
329
+ const verify: string =
330
+ stepTitled(guide, "Verify the installation").markdown || "";
331
+ expect(verify).toContain(`docker ps --filter name=${CEPH_AGENT_CONTAINER}`);
332
+ expect(verify).toContain(`docker logs -f ${CEPH_AGENT_CONTAINER}`);
333
+ expect(verify).toContain(
334
+ "Everything is ready. Begin running and processing data.",
335
+ );
336
+ expect(verify).toContain("appears automatically in the **Ceph** section");
337
+ expect(verify).toContain(CEPH_AI_AGENT_CONTAINER);
338
+ });
339
+
340
+ test("keeps configuration options out of the first-run steps", () => {
341
+ const steps: string = stepsText(guide);
342
+ for (const advanced of [
343
+ "filelog",
344
+ "oneuptime.label.",
345
+ "docker compose pull",
346
+ "docker compose down",
347
+ "ceph auth get-or-create",
348
+ "honor_labels",
349
+ ]) {
350
+ expect(steps).not.toContain(advanced);
351
+ }
352
+ });
353
+
354
+ test("has Advanced topics for settings, config, logs, labels, data, AI and upgrades", () => {
355
+ expect(topicTitles(guide.advanced)).toEqual([
356
+ "Environment variables",
357
+ "How the agent scrapes, and its collector config",
358
+ "Ship the Ceph cluster log",
359
+ "Tag the cluster with project labels",
360
+ "What the agent collects",
361
+ "OneUptime AI agent",
362
+ "Upgrade or uninstall the agent",
363
+ ]);
364
+ });
365
+
366
+ test("every Advanced topic has a plain one-line summary", () => {
367
+ for (const topic of guide.advanced || []) {
368
+ expect(topic.summary).toBeTruthy();
369
+ // Summaries render as plain text, so no markdown.
370
+ expect(topic.summary).not.toMatch(/[`*[\]]/);
371
+ expect(topic.summary).not.toContain("\n");
372
+ }
373
+ });
374
+
375
+ test("troubleshooting starts with the diagnostic script and covers the known problems", () => {
376
+ expect(topicTitles(guide.troubleshooting)).toEqual([
377
+ "Run the diagnostic script first",
378
+ "No cluster appears in OneUptime",
379
+ 'Cluster shows as "Disconnected"',
380
+ "Metrics stop after a mgr failover",
381
+ "Scrape errors for standby mgrs in the collector logs",
382
+ "Cluster appears under the wrong name",
383
+ ]);
384
+ });
385
+
386
+ test("the diagnostic script is the agent's own, run against this install", () => {
387
+ const script: string = topicTitled(
388
+ guide.troubleshooting,
389
+ "Run the diagnostic script first",
390
+ ).markdown;
391
+ expect(script).toContain(
392
+ `curl -sSL ${CEPH_AGENT_RAW_URL}/troubleshoot.sh -o troubleshoot.sh`,
393
+ );
394
+ expect(script).toContain("GET /otlp/v1/validate");
395
+ if (method === "install-script") {
396
+ expect(script).toContain("\nbash troubleshoot.sh\n");
397
+ } else {
398
+ expect(script).toContain('bash troubleshoot.sh -d "$PWD"');
399
+ }
400
+ });
401
+
402
+ test("greps the collector's logs on stderr too", () => {
403
+ /*
404
+ * The collector logs to stderr, and `docker logs` keeps the streams
405
+ * apart, so a bare `| grep` would never see an error line.
406
+ */
407
+ const disconnected: string = topicTitled(
408
+ guide.troubleshooting,
409
+ 'Cluster shows as "Disconnected"',
410
+ ).markdown;
411
+ expect(disconnected).toContain(
412
+ `docker logs ${CEPH_AGENT_CONTAINER} 2>&1 | grep -i error`,
413
+ );
414
+ expect(markdown).not.toMatch(/docker logs \S+ \| grep/);
415
+ });
416
+
417
+ test("the environment table carries the reader's URL", () => {
418
+ expect(
419
+ topicTitled(guide.advanced, "Environment variables").markdown,
420
+ ).toContain(`(e.g. \`${URL}\`)`);
421
+ });
422
+
423
+ test("shows the shipped collector config verbatim", () => {
424
+ expect(
425
+ topicTitled(
426
+ guide.advanced,
427
+ "How the agent scrapes, and its collector config",
428
+ ).markdown,
429
+ ).toContain(codeBlock("yaml", CEPH_AGENT_COLLECTOR_CONFIG));
430
+ });
431
+
432
+ test("commands in the agent's folder run where this method installs it", () => {
433
+ const upgrade: string = topicTitled(
434
+ guide.advanced,
435
+ "Upgrade or uninstall the agent",
436
+ ).markdown;
437
+ if (method === "install-script") {
438
+ expect(upgrade).toContain(
439
+ codeBlock(
440
+ "bash",
441
+ `cd ${CEPH_AGENT_INSTALL_DIR}\ndocker compose pull\ndocker compose up -d`,
442
+ ),
443
+ );
444
+ expect(upgrade).toContain(
445
+ codeBlock("bash", `cd ${CEPH_AGENT_INSTALL_DIR}\ndocker compose down`),
446
+ );
447
+ // Every Compose command outside the steps first enters the folder.
448
+ const composeCommand: RegExp = /^docker compose /m;
449
+ for (const block of getSetupGuideCodeBlocks({
450
+ steps: [],
451
+ advanced: guide.advanced,
452
+ })) {
453
+ if (composeCommand.test(block)) {
454
+ expect(block.startsWith(`cd ${CEPH_AGENT_INSTALL_DIR}\n`)).toBe(true);
455
+ }
456
+ }
457
+ } else {
458
+ expect(upgrade).toContain(
459
+ codeBlock("bash", "docker compose pull\ndocker compose up -d"),
460
+ );
461
+ expect(upgrade).toContain("the one with `docker-compose.yml`");
462
+ expect(markdown).not.toContain(CEPH_AGENT_INSTALL_DIR);
463
+ }
464
+ });
465
+
466
+ test("the AI agent topic sets up its own read-only Ceph client", () => {
467
+ const ai: string = topicTitled(
468
+ guide.advanced,
469
+ "OneUptime AI agent",
470
+ ).markdown;
471
+ expect(ai).toContain(
472
+ "ceph auth get-or-create client.oneuptime-ai mon 'allow r' mgr 'allow r' osd 'allow r' -o ceph/ceph.client.oneuptime-ai.keyring",
473
+ );
474
+ expect(ai).toContain("ceph config generate-minimal-conf > ceph/ceph.conf");
475
+ expect(ai).toContain(
476
+ "sudo chown 1000:1000 ceph/ceph.client.oneuptime-ai.keyring",
477
+ );
478
+ expect(ai).toContain("**Never put the admin keyring there.**");
479
+ expect(ai).toContain("ONEUPTIME_AI_ALLOW_WRITES=true");
480
+ expect(ai).toContain(
481
+ `docker exec ${CEPH_AI_AGENT_CONTAINER} wget -qO- http://127.0.0.1:3877/status`,
482
+ );
483
+ expect(ai).toContain("(/docs/ai/infrastructure-ai-agents#ceph-clusters)");
484
+ expect(ai.includes("The install script offers to create them")).toBe(
485
+ method === "install-script",
486
+ );
487
+ });
488
+
489
+ test("links to the Ceph agent and monitor documentation", () => {
490
+ expect(guide.links).toEqual([
491
+ { title: "Ceph agent documentation", url: "/docs/telemetry/ceph" },
492
+ { title: "Ceph monitors and alerts", url: "/docs/monitor/ceph-monitor" },
493
+ ]);
494
+ });
495
+
496
+ test("every documentation link points at a page, and anchor, that exists", () => {
497
+ const links: Array<string> = [
498
+ ...(guide.links || []).map((link: { url: string }): string => {
499
+ return link.url;
500
+ }),
501
+ ...Array.from(markdown.matchAll(/\]\((\/docs\/[^)\s]+)\)/g)).map(
502
+ (match: RegExpMatchArray): string => {
503
+ return match[1]!;
504
+ },
505
+ ),
506
+ ];
507
+ expect(links.length).toBeGreaterThan(2);
508
+ for (const link of links) {
509
+ const parts: Array<string> = link.replace(/^\/docs\//, "").split("#");
510
+ const anchor: string | undefined = parts[1];
511
+ const file: string = path.join(DOCS_DIR, `${parts[0]}.md`);
512
+ expect({ link, exists: fs.existsSync(file) }).toEqual({
513
+ link,
514
+ exists: true,
515
+ });
516
+ if (anchor) {
517
+ const headings: Array<string> = Array.from(
518
+ fs.readFileSync(file, "utf8").matchAll(/^#+ (.+)$/gm),
519
+ ).map((match: RegExpMatchArray): string => {
520
+ return markdownSlugify(match[1]!);
521
+ });
522
+ expect(headings).toContain(anchor);
523
+ }
524
+ }
525
+ });
526
+ });
527
+
528
+ describe("the install script", () => {
529
+ test("carries the reader's URL and key on the command line", () => {
530
+ expect(
531
+ getCephInstallScriptCommand({
532
+ oneuptimeUrl: URL,
533
+ apiKey: KEY,
534
+ hasApiKey: true,
535
+ }),
536
+ ).toBe(
537
+ [
538
+ "curl -sSL https://raw.githubusercontent.com/OneUptime/oneuptime/master/agents/CephAgent/install.sh -o install.sh",
539
+ `ONEUPTIME_URL=${URL} ONEUPTIME_TELEMETRY_INGESTION_KEY=${KEY} bash install.sh`,
540
+ ].join("\n"),
541
+ );
542
+ });
543
+
544
+ test("is the command the install step shows", () => {
545
+ expect(installStep(guideFor("install-script"))).toContain(
546
+ codeBlock(
547
+ "bash",
548
+ getCephInstallScriptCommand({
549
+ oneuptimeUrl: URL,
550
+ apiKey: KEY,
551
+ hasApiKey: true,
552
+ }),
553
+ ),
554
+ );
555
+ });
556
+
557
+ test("quotes values the shell would otherwise change", () => {
558
+ const command: string = getCephInstallScriptCommand({
559
+ oneuptimeUrl: "https://oneuptime.example.com/a b",
560
+ apiKey: "it's$key",
561
+ hasApiKey: true,
562
+ });
563
+ expect(command).toContain(
564
+ "ONEUPTIME_URL='https://oneuptime.example.com/a b'",
565
+ );
566
+ expect(command).toContain(
567
+ "ONEUPTIME_TELEMETRY_INGESTION_KEY='it'\\''s$key'",
568
+ );
569
+ });
570
+
571
+ test("prefills nothing but the URL and the key", () => {
572
+ const command: string = getCephInstallScriptCommand({
573
+ oneuptimeUrl: URL,
574
+ apiKey: KEY,
575
+ hasApiKey: true,
576
+ });
577
+ const assignments: Array<string> = Array.from(
578
+ command.matchAll(/\b([A-Z_]+)=/g),
579
+ ).map((match: RegExpMatchArray): string => {
580
+ return match[1]!;
581
+ });
582
+ expect(assignments).toEqual([
583
+ "ONEUPTIME_URL",
584
+ "ONEUPTIME_TELEMETRY_INGESTION_KEY",
585
+ ]);
586
+ });
587
+
588
+ test("never puts the placeholder key into the script's environment", () => {
589
+ for (const hasApiKey of [false, true]) {
590
+ const command: string = getCephInstallScriptCommand({
591
+ oneuptimeUrl: URL,
592
+ apiKey: SETUP_GUIDE_API_KEY_PLACEHOLDER,
593
+ hasApiKey: hasApiKey,
594
+ });
595
+ expect(command).not.toContain("ONEUPTIME_");
596
+ expect(command).not.toContain(SETUP_GUIDE_API_KEY_PLACEHOLDER);
597
+ expect(command.split("\n")[1]).toBe("bash install.sh");
598
+ }
599
+ });
600
+
601
+ test("leaves the URL to the prompt while the dashboard does not know it", () => {
602
+ const command: string = getCephInstallScriptCommand({
603
+ oneuptimeUrl: SETUP_GUIDE_URL_PLACEHOLDER,
604
+ apiKey: KEY,
605
+ hasApiKey: true,
606
+ });
607
+ expect(command).not.toContain("ONEUPTIME_URL");
608
+ expect(command).toContain(
609
+ `ONEUPTIME_TELEMETRY_INGESTION_KEY=${KEY} bash install.sh`,
610
+ );
611
+ });
612
+
613
+ test("before a key is picked, the guide says the script asks for the URL and key", () => {
614
+ const guide: SetupGuideContent = noKeyGuideFor("install-script");
615
+ const install: string = installStep(guide);
616
+ expect(install).toContain(
617
+ "The script asks for your OneUptime URL and ingestion key, both shown in step 1",
618
+ );
619
+ expect(install).not.toContain("already carries");
620
+ // Nothing in this guide holds the key, so the placeholder never shows.
621
+ expect(getSetupGuideMarkdown(guide)).not.toContain(
622
+ SETUP_GUIDE_API_KEY_PLACEHOLDER,
623
+ );
624
+ });
625
+
626
+ test("with a key, the guide says the command already carries it", () => {
627
+ const install: string = installStep(guideFor("install-script"));
628
+ expect(install).toContain(
629
+ "The command already carries your OneUptime URL and ingestion key.",
630
+ );
631
+ expect(install).not.toContain("both shown in step 1");
632
+ });
633
+
634
+ test("says what the script asks for, where it installs, and how it runs", () => {
635
+ const install: string = installStep(guideFor("install-script"));
636
+ expect(install).toContain("**Cluster name**");
637
+ expect(install).toContain(
638
+ "**Mgr endpoints** — every mgr from the previous step as comma-separated `host:port`",
639
+ );
640
+ expect(install).toContain("The script adds the square brackets.");
641
+ expect(install).toContain("**OneUptime AI agent**");
642
+ expect(install).toContain(
643
+ `It installs to \`${CEPH_AGENT_INSTALL_DIR}\` and starts the agent with Docker Compose.`,
644
+ );
645
+ });
646
+
647
+ test("shows none of the Docker Compose instructions", () => {
648
+ const guide: SetupGuideContent = guideFor("install-script");
649
+ const markdown: string = getSetupGuideMarkdown(guide);
650
+ expect(markdown).not.toContain("curl -fsSLO");
651
+ expect(markdown).not.toContain("mkdir oneuptime-ceph-agent");
652
+ expect(markdown).not.toContain(
653
+ `CEPH_CLUSTER_NAME=${CEPH_EXAMPLE_CLUSTER_NAME}`,
654
+ );
655
+ // No .env file to write: the script writes it.
656
+ expect(() => {
657
+ return envFileOf(guide);
658
+ }).toThrow("The guide has no .env block");
659
+ expect(stepsText(guide)).not.toContain("CEPH_MGR_ENDPOINTS=");
660
+ });
661
+ });
662
+
663
+ describe("the Docker Compose install", () => {
664
+ const guide: SetupGuideContent = guideFor("docker-compose");
665
+ const install: string = installStep(guide);
666
+
667
+ test("downloads the two files, writes .env, then starts the agent", () => {
668
+ const download: number = install.indexOf(
669
+ `curl -fsSLO ${CEPH_AGENT_RAW_URL}/docker-compose.yml`,
670
+ );
671
+ const config: number = install.indexOf(
672
+ `curl -fsSLO ${CEPH_AGENT_RAW_URL}/otel-collector-config.yaml`,
673
+ );
674
+ const env: number = install.indexOf("ONEUPTIME_URL=");
675
+ const start: number = install.indexOf("docker compose up -d");
676
+ expect(download).toBeGreaterThan(-1);
677
+ expect(config).toBeGreaterThan(download);
678
+ expect(env).toBeGreaterThan(config);
679
+ expect(start).toBeGreaterThan(env);
680
+ expect(install).toContain(
681
+ `[CephAgent directory](${CEPH_AGENT_SOURCE_URL})`,
682
+ );
683
+ });
684
+
685
+ test("the .env file carries the reader's URL and key", () => {
686
+ expect(envFileOf(guide)).toBe(
687
+ [
688
+ `ONEUPTIME_URL=${URL}`,
689
+ `ONEUPTIME_TELEMETRY_INGESTION_KEY=${KEY}`,
690
+ `CEPH_CLUSTER_NAME=${CEPH_EXAMPLE_CLUSTER_NAME}`,
691
+ `CEPH_MGR_ENDPOINTS=${CEPH_EXAMPLE_MGR_ENDPOINTS}`,
692
+ ].join("\n"),
693
+ );
694
+ });
695
+
696
+ test("says to list every mgr in brackets", () => {
697
+ expect(install).toContain(
698
+ "List **every** mgr daemon in `CEPH_MGR_ENDPOINTS`, comma-separated and wrapped in square brackets",
699
+ );
700
+ });
701
+
702
+ test("shows the placeholder, and where to pick a key, until one is picked", () => {
703
+ const noKey: SetupGuideContent = noKeyGuideFor("docker-compose");
704
+ expect(envFileOf(noKey)).toContain(
705
+ `ONEUPTIME_TELEMETRY_INGESTION_KEY=${SETUP_GUIDE_API_KEY_PLACEHOLDER}`,
706
+ );
707
+ expect(installStep(noKey)).toContain("Pick an ingestion key in step 1");
708
+ expect(install).not.toContain("Pick an ingestion key in step 1");
709
+ expect(getSetupGuideMarkdown(guide)).not.toContain(
710
+ SETUP_GUIDE_API_KEY_PLACEHOLDER,
711
+ );
712
+ });
713
+
714
+ test("shows none of the install script's instructions", () => {
715
+ const markdown: string = getSetupGuideMarkdown(guide);
716
+ expect(markdown).not.toContain("install.sh");
717
+ expect(markdown).not.toContain("install script");
718
+ expect(markdown).not.toContain(CEPH_AGENT_INSTALL_DIR);
719
+ });
720
+
721
+ test("renders what the skipped E2E spec reads off the page", () => {
722
+ /*
723
+ * CephProduct.spec.ts picks Docker Compose after creating a key, then
724
+ * reads the page for these; the install script (the default) must
725
+ * still carry the key for the spec that reads it back out.
726
+ */
727
+ const withKey: string = getSetupGuideMarkdown(
728
+ guideFor("docker-compose", {
729
+ oneuptimeUrl: "http://localhost",
730
+ apiKey: UUID_KEY,
731
+ }),
732
+ );
733
+ expect(withKey).toMatch(/ONEUPTIME_URL=http/);
734
+ expect(withKey).toContain("CEPH_CLUSTER_NAME=my-ceph-cluster");
735
+ expect(withKey).toContain("docker compose up -d");
736
+ expect(withKey).not.toContain("<YOUR_API_KEY>");
737
+ expect(
738
+ withKey.match(
739
+ /ONEUPTIME_TELEMETRY_INGESTION_KEY=([0-9a-fA-F-]{36})/,
740
+ )?.[1],
741
+ ).toBe(UUID_KEY);
742
+
743
+ const byDefault: string = getSetupGuideMarkdown(
744
+ guideFor(DEFAULT_CEPH_INSTALL_METHOD, {
745
+ oneuptimeUrl: "http://localhost",
746
+ apiKey: UUID_KEY,
747
+ }),
748
+ );
749
+ expect(
750
+ byDefault.match(
751
+ /ONEUPTIME_TELEMETRY_INGESTION_KEY=([0-9a-fA-F-]{36})/,
752
+ )?.[1],
753
+ ).toBe(UUID_KEY);
754
+ });
755
+ });
756
+
757
+ describe("the cluster name", () => {
758
+ test("a product page suggests a name and says to replace it", () => {
759
+ const install: string = installStep(guideFor("docker-compose"));
760
+ expect(install).toContain(
761
+ `Replace \`${CEPH_EXAMPLE_CLUSTER_NAME}\` with a name for this cluster`,
762
+ );
763
+ expect(install).toContain("a new name registers a new cluster");
764
+ });
765
+
766
+ test("a cluster's own tab writes its name into .env and says to keep it", () => {
767
+ const guide: SetupGuideContent = guideFor("docker-compose", {
768
+ clusterName: "ceph-prod-eu",
769
+ });
770
+ expect(envFileOf(guide)).toContain("CEPH_CLUSTER_NAME=ceph-prod-eu");
771
+ expect(installStep(guide)).toContain(
772
+ "This installs the agent for **`ceph-prod-eu`**",
773
+ );
774
+ expect(installStep(guide)).not.toContain("Replace `");
775
+ expect(
776
+ topicTitled(guide.troubleshooting, "Cluster appears under the wrong name")
777
+ .markdown,
778
+ ).toContain("This cluster is **`ceph-prod-eu`**.");
779
+ });
780
+
781
+ test("the install script is told to enter a known name exactly", () => {
782
+ const install: string = installStep(
783
+ guideFor("install-script", { clusterName: "ceph-prod-eu" }),
784
+ );
785
+ expect(install).toContain("enter **`ceph-prod-eu`** exactly");
786
+ // Only the URL and the key are ever prefilled.
787
+ expect(install).not.toContain("CEPH_CLUSTER_NAME=");
788
+ });
789
+
790
+ test("a name the .env file would misread is quoted", () => {
791
+ expect(
792
+ envFileOf(guideFor("docker-compose", { clusterName: "prod ceph" })),
793
+ ).toContain("CEPH_CLUSTER_NAME='prod ceph'");
794
+ });
795
+
796
+ test("a blank name counts as unknown", () => {
797
+ expect(
798
+ envFileOf(guideFor("docker-compose", { clusterName: " " })),
799
+ ).toContain(`CEPH_CLUSTER_NAME=${CEPH_EXAMPLE_CLUSTER_NAME}`);
800
+ });
801
+ });
802
+
803
+ describe("drift guards against agents/CephAgent", () => {
804
+ test("the collector config is the shipped file, byte for byte", () => {
805
+ expect(CEPH_AGENT_COLLECTOR_CONFIG).toBe(
806
+ readAgentFile("otel-collector-config.yaml"),
807
+ );
808
+ });
809
+
810
+ test("the scrape behaviour the guide describes is the config's", () => {
811
+ const config: Record<string, any> = yaml.load(
812
+ CEPH_AGENT_COLLECTOR_CONFIG,
813
+ ) as Record<string, any>;
814
+ const job: Record<string, any> =
815
+ config["receivers"]["prometheus"]["config"]["scrape_configs"][0];
816
+ expect(job["honor_labels"]).toBe(true);
817
+ expect(job["scrape_interval"]).toBe("30s");
818
+ expect(job["static_configs"][0]["targets"]).toBe(
819
+ "${env:CEPH_MGR_ENDPOINTS}",
820
+ );
821
+ expect(config["processors"]["resource"]["attributes"][0]).toEqual({
822
+ key: "ceph.cluster.name",
823
+ value: "${env:CEPH_CLUSTER_NAME}",
824
+ action: "upsert",
825
+ });
826
+ });
827
+
828
+ test("the environment table documents exactly what the collector reads", () => {
829
+ const collector: Map<string, string | null> =
830
+ composeVariables(CEPH_AGENT_CONTAINER);
831
+ for (const method of METHOD_KEYS) {
832
+ const rows: Map<string, { required: string; description: string }> =
833
+ envTableRows(guideFor(method));
834
+ expect(Array.from(rows.keys()).sort()).toEqual(
835
+ Array.from(collector.keys()).sort(),
836
+ );
837
+ }
838
+ });
839
+
840
+ test("the defaults the table gives are the compose file's", () => {
841
+ const collector: Map<string, string | null> =
842
+ composeVariables(CEPH_AGENT_CONTAINER);
843
+ const rows: Map<string, { required: string; description: string }> =
844
+ envTableRows(guideFor("docker-compose"));
845
+ let checked: number = 0;
846
+ for (const [name, row] of rows) {
847
+ const stated: RegExpMatchArray | null = row.description.match(
848
+ /\(default: `([^`]+)`\)/,
849
+ );
850
+ if (stated) {
851
+ expect({ name, default: collector.get(name) }).toEqual({
852
+ name,
853
+ default: stated[1],
854
+ });
855
+ checked++;
856
+ }
857
+ }
858
+ expect(checked).toBeGreaterThan(0);
859
+ });
860
+
861
+ test("the .env block sets only variables the collector reads", () => {
862
+ const collector: Map<string, string | null> =
863
+ composeVariables(CEPH_AGENT_CONTAINER);
864
+ const names: Array<string> = envFileOf(guideFor("docker-compose"))
865
+ .split("\n")
866
+ .map((line: string): string => {
867
+ return line.split("=")[0]!;
868
+ });
869
+ expect(names.length).toBe(4);
870
+ for (const name of names) {
871
+ expect(collector.has(name)).toBe(true);
872
+ }
873
+ });
874
+
875
+ test("the install script writes every required variable to .env", () => {
876
+ const script: string = readAgentFile("install.sh");
877
+ const rows: Map<string, { required: string; description: string }> =
878
+ envTableRows(guideFor("install-script"));
879
+ for (const [name, row] of rows) {
880
+ if (row.required === "Yes") {
881
+ expect(script).toMatch(new RegExp(`^${name}=\\$${name}$`, "m"));
882
+ }
883
+ }
884
+ });
885
+
886
+ test("the install script honours a preset URL and key, which prefilling relies on", () => {
887
+ const script: string = readAgentFile("install.sh");
888
+ for (const name of ["ONEUPTIME_URL", "ONEUPTIME_TELEMETRY_INGESTION_KEY"]) {
889
+ expect(script).toMatch(
890
+ new RegExp(`if \\[ -z "\\$${name}" \\]; then\\s*\\n\\s*read -rp`),
891
+ );
892
+ }
893
+ });
894
+
895
+ test("the install script installs where the guide says and adds the brackets", () => {
896
+ const script: string = readAgentFile("install.sh");
897
+ expect(script).toContain(
898
+ `INSTALL_DIR="\${INSTALL_DIR:-${CEPH_AGENT_INSTALL_DIR}}"`,
899
+ );
900
+ expect(script).toContain(`REPO_BASE="${CEPH_AGENT_RAW_URL}"`);
901
+ expect(script).toContain('CEPH_MGR_ENDPOINTS="[$CEPH_MGR_ENDPOINTS]"');
902
+ expect(script).toContain("[ceph]");
903
+ });
904
+
905
+ test("every file the guide downloads exists in the agent's directory", () => {
906
+ const files: Set<string> = new Set();
907
+ for (const method of METHOD_KEYS) {
908
+ const markdown: string = getSetupGuideMarkdown(guideFor(method));
909
+ for (const match of markdown.matchAll(
910
+ /https:\/\/raw\.githubusercontent\.com\/OneUptime\/oneuptime\/master\/agents\/([A-Za-z]+)\/([A-Za-z0-9._-]+)/g,
911
+ )) {
912
+ expect(match[1]).toBe("CephAgent");
913
+ files.add(match[2]!);
914
+ }
915
+ }
916
+ expect(Array.from(files).sort()).toEqual([
917
+ "docker-compose.yml",
918
+ "install.sh",
919
+ "otel-collector-config.yaml",
920
+ "troubleshoot.sh",
921
+ ]);
922
+ for (const file of files) {
923
+ expect(fs.existsSync(path.join(AGENT_DIR, file))).toBe(true);
924
+ }
925
+ expect(CEPH_AGENT_SOURCE_URL).toMatch(/\/tree\/master\/agents\/CephAgent$/);
926
+ });
927
+
928
+ test("the containers the guide names are the compose file's", () => {
929
+ const compose: Record<string, any> = yaml.load(
930
+ readAgentFile("docker-compose.yml"),
931
+ ) as Record<string, any>;
932
+ const containers: Array<string> = Object.values(
933
+ compose["services"] as Record<string, Record<string, string>>,
934
+ ).map((service: Record<string, string>): string => {
935
+ return service["container_name"]!;
936
+ });
937
+ expect(containers).toContain(CEPH_AGENT_CONTAINER);
938
+ expect(containers).toContain(CEPH_AI_AGENT_CONTAINER);
939
+ });
940
+
941
+ test("the AI agent's client, keyring folder and status port are the compose file's", () => {
942
+ const compose: string = readAgentFile("docker-compose.yml");
943
+ expect(compose).toContain("CEPH_CLIENT_ID=${CEPH_CLIENT_ID:-oneuptime-ai}");
944
+ expect(compose).toContain("- ./ceph:/etc/ceph:ro");
945
+ expect(compose).toContain("http://127.0.0.1:3877/status/live");
946
+ });
947
+
948
+ test("the lines the cluster-log topic uncomments are in the shipped files", () => {
949
+ expect(readAgentFile("docker-compose.yml")).toContain(
950
+ "# - /var/log/ceph:/var/log/ceph:ro",
951
+ );
952
+ expect(CEPH_AGENT_COLLECTOR_CONFIG).toContain(" # filelog:\n");
953
+ expect(CEPH_AGENT_COLLECTOR_CONFIG).toContain(" # logs:\n");
954
+ });
955
+
956
+ test("the diagnostic script takes -d and defaults to the install directory", () => {
957
+ const script: string = readAgentFile("troubleshoot.sh");
958
+ expect(script).toContain('-d|--dir) DIR="${2:-}"; shift 2 ;;');
959
+ expect(script).toContain(`DIR="${CEPH_AGENT_INSTALL_DIR}"`);
960
+ });
961
+ });