@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,1033 @@
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
+ DEFAULT_VMWARE_INSTALL_METHOD,
8
+ VMWARE_AGENT_COLLECTOR_CONFIG,
9
+ VMWARE_AGENT_COMPOSE_FILE,
10
+ VMWARE_AGENT_CONTAINER,
11
+ VMWARE_AGENT_INSTALL_DIR,
12
+ VMWARE_AGENT_RAW_URL,
13
+ VMWARE_AGENT_SOURCE_URL,
14
+ VMWARE_AI_AGENT_CONTAINER,
15
+ VMWARE_EXAMPLE_VCENTER_NAME,
16
+ VMWARE_INSTALL_METHODS,
17
+ VMwareInstallMethod,
18
+ getVMwareEnvFile,
19
+ getVMwareInstallScriptCommand,
20
+ getVMwareSetupGuide,
21
+ resolveVMwareInstallMethod,
22
+ } from "../../../../App/FeatureSet/Dashboard/src/Pages/VMware/Utils/DocumentationMarkdown";
23
+ import {
24
+ SETUP_GUIDE_API_KEY_PLACEHOLDER,
25
+ SETUP_GUIDE_URL_PLACEHOLDER,
26
+ SetupGuideContent,
27
+ SetupGuideOption,
28
+ SetupGuideStep,
29
+ SetupGuideStepVariant,
30
+ SetupGuideTopic,
31
+ codeBlock,
32
+ getSetupGuideCodeBlocks,
33
+ getSetupGuideMarkdown,
34
+ } from "../../../../App/FeatureSet/Dashboard/src/Components/SetupGuide/SetupGuide";
35
+
36
+ /*
37
+ * The VMware agent guide asks how to install the agent — the install script
38
+ * or Docker Compose — and shows only that path. These tests pin, for both:
39
+ *
40
+ * - the reader's URL and key in every command and file that needs them,
41
+ * and never a placeholder key in the install script's environment (the
42
+ * script would write it into .env as the key);
43
+ * - the read-only vSphere user, propagated from the vCenter root (without
44
+ * propagation the inventory is silently empty);
45
+ * - the .env quoting rule Docker Compose actually applies — vSphere
46
+ * passwords routinely contain `$` and `#`;
47
+ * - that the compose file and collector config the guide shows ARE the
48
+ * shipped files, and every variable, file, container and script it
49
+ * names exists in agents/VMwareAgent.
50
+ */
51
+
52
+ const REPO_ROOT: string = path.resolve(__dirname, "../../../../..");
53
+ const AGENT_DIR: string = path.join(REPO_ROOT, "agents", "VMwareAgent");
54
+ const DOCS_DIR: string = path.join(
55
+ REPO_ROOT,
56
+ "packages",
57
+ "App",
58
+ "FeatureSet",
59
+ "Docs",
60
+ "Content",
61
+ "en",
62
+ );
63
+
64
+ const URL: string = "https://oneuptime.example.com";
65
+ const KEY: string = "tik_secret_123";
66
+
67
+ // What ObjectID.generate() mints: the E2E spec greps the page for one.
68
+ const UUID_KEY: string = "0f8fad5b-d9cb-469f-a165-70867728950e";
69
+
70
+ const METHOD_KEYS: Array<VMwareInstallMethod> = VMWARE_INSTALL_METHODS.map(
71
+ (option: SetupGuideOption<VMwareInstallMethod>): VMwareInstallMethod => {
72
+ return option.key;
73
+ },
74
+ );
75
+
76
+ interface GuideOverrides {
77
+ oneuptimeUrl?: string;
78
+ apiKey?: string;
79
+ hasApiKey?: boolean;
80
+ vcenterName?: string;
81
+ }
82
+
83
+ const guideFor: (
84
+ method: VMwareInstallMethod,
85
+ overrides?: GuideOverrides,
86
+ ) => SetupGuideContent = (
87
+ method: VMwareInstallMethod,
88
+ overrides?: GuideOverrides,
89
+ ): SetupGuideContent => {
90
+ const apiKey: string = overrides?.apiKey ?? KEY;
91
+ return getVMwareSetupGuide({
92
+ oneuptimeUrl: overrides?.oneuptimeUrl ?? URL,
93
+ apiKey: apiKey,
94
+ hasApiKey:
95
+ overrides?.hasApiKey ?? apiKey !== SETUP_GUIDE_API_KEY_PLACEHOLDER,
96
+ method: method,
97
+ vcenterName: overrides?.vcenterName,
98
+ });
99
+ };
100
+
101
+ const noKeyGuideFor: (method: VMwareInstallMethod) => SetupGuideContent = (
102
+ method: VMwareInstallMethod,
103
+ ): SetupGuideContent => {
104
+ return guideFor(method, {
105
+ apiKey: SETUP_GUIDE_API_KEY_PLACEHOLDER,
106
+ hasApiKey: false,
107
+ });
108
+ };
109
+
110
+ const stepTitled: (
111
+ guide: SetupGuideContent,
112
+ title: string,
113
+ ) => SetupGuideStep = (
114
+ guide: SetupGuideContent,
115
+ title: string,
116
+ ): SetupGuideStep => {
117
+ const step: SetupGuideStep | undefined = guide.steps.find(
118
+ (candidate: SetupGuideStep): boolean => {
119
+ return candidate.title === title;
120
+ },
121
+ );
122
+ if (!step) {
123
+ throw new Error(`No step titled "${title}"`);
124
+ }
125
+ return step;
126
+ };
127
+
128
+ const topicTitled: (
129
+ topics: Array<SetupGuideTopic> | undefined,
130
+ title: string,
131
+ ) => SetupGuideTopic = (
132
+ topics: Array<SetupGuideTopic> | undefined,
133
+ title: string,
134
+ ): SetupGuideTopic => {
135
+ const topic: SetupGuideTopic | undefined = (topics || []).find(
136
+ (candidate: SetupGuideTopic): boolean => {
137
+ return candidate.title === title;
138
+ },
139
+ );
140
+ if (!topic) {
141
+ throw new Error(`No topic titled "${title}"`);
142
+ }
143
+ return topic;
144
+ };
145
+
146
+ const topicTitles: (
147
+ topics: Array<SetupGuideTopic> | undefined,
148
+ ) => Array<string> = (
149
+ topics: Array<SetupGuideTopic> | undefined,
150
+ ): Array<string> => {
151
+ return (topics || []).map((topic: SetupGuideTopic): string => {
152
+ return topic.title;
153
+ });
154
+ };
155
+
156
+ // Everything a step shows: its description, its markdown and every tab.
157
+ const stepText: (step: SetupGuideStep) => string = (
158
+ step: SetupGuideStep,
159
+ ): string => {
160
+ return [
161
+ step.description || "",
162
+ step.markdown || "",
163
+ ...(step.variants || []).map((variant: SetupGuideStepVariant): string => {
164
+ return variant.markdown;
165
+ }),
166
+ ].join("\n");
167
+ };
168
+
169
+ const stepsText: (guide: SetupGuideContent) => string = (
170
+ guide: SetupGuideContent,
171
+ ): string => {
172
+ return guide.steps.map(stepText).join("\n");
173
+ };
174
+
175
+ const installStep: (guide: SetupGuideContent) => string = (
176
+ guide: SetupGuideContent,
177
+ ): string => {
178
+ return stepTitled(guide, "Install the agent").markdown || "";
179
+ };
180
+
181
+ const variantTitled: (
182
+ step: SetupGuideStep,
183
+ label: string,
184
+ ) => SetupGuideStepVariant = (
185
+ step: SetupGuideStep,
186
+ label: string,
187
+ ): SetupGuideStepVariant => {
188
+ const variant: SetupGuideStepVariant | undefined = (step.variants || []).find(
189
+ (candidate: SetupGuideStepVariant): boolean => {
190
+ return candidate.label === label;
191
+ },
192
+ );
193
+ if (!variant) {
194
+ throw new Error(`No tab labelled "${label}"`);
195
+ }
196
+ return variant;
197
+ };
198
+
199
+ // The .env block of the Docker Compose install.
200
+ const envFileOf: (guide: SetupGuideContent) => string = (
201
+ guide: SetupGuideContent,
202
+ ): string => {
203
+ const block: string | undefined = getSetupGuideCodeBlocks(guide).find(
204
+ (candidate: string): boolean => {
205
+ return candidate.startsWith("ONEUPTIME_URL=");
206
+ },
207
+ );
208
+ if (!block) {
209
+ throw new Error("The guide has no .env block");
210
+ }
211
+ return block.trimEnd();
212
+ };
213
+
214
+ const readAgentFile: (name: string) => string = (name: string): string => {
215
+ return fs.readFileSync(path.join(AGENT_DIR, name), "utf8");
216
+ };
217
+
218
+ const composeFile: () => Record<string, any> = (): Record<string, any> => {
219
+ return yaml.load(readAgentFile("docker-compose.yml")) as Record<string, any>;
220
+ };
221
+
222
+ // Variables a compose service reads from .env: `${NAME}` and `${NAME:-x}`.
223
+ const composeVariables: (serviceName: string) => Map<string, string | null> = (
224
+ serviceName: string,
225
+ ): Map<string, string | null> => {
226
+ const environment: Array<string> =
227
+ composeFile()["services"][serviceName]["environment"];
228
+ const variables: Map<string, string | null> = new Map();
229
+ for (const entry of environment) {
230
+ for (const match of entry.matchAll(/\$\{([A-Z0-9_]+)(?::-([^}]*))?\}/g)) {
231
+ variables.set(match[1]!, match[2] ?? null);
232
+ }
233
+ }
234
+ return variables;
235
+ };
236
+
237
+ // The rows of the guide's environment variable table.
238
+ const envTableRows: (
239
+ guide: SetupGuideContent,
240
+ ) => Map<string, { required: string; description: string }> = (
241
+ guide: SetupGuideContent,
242
+ ): Map<string, { required: string; description: string }> => {
243
+ const markdown: string = topicTitled(
244
+ guide.advanced,
245
+ "Environment variables",
246
+ ).markdown;
247
+ const rows: Map<string, { required: string; description: string }> =
248
+ new Map();
249
+ for (const match of markdown.matchAll(
250
+ /^\| `([A-Z0-9_]+)` \| ([^|]+) \| (.*) \|$/gm,
251
+ )) {
252
+ rows.set(match[1]!, {
253
+ required: match[2]!.trim(),
254
+ description: match[3]!,
255
+ });
256
+ }
257
+ return rows;
258
+ };
259
+
260
+ describe("the install method picker", () => {
261
+ test("offers the install script first, then Docker Compose", () => {
262
+ expect(METHOD_KEYS).toEqual(["install-script", "docker-compose"]);
263
+ expect(DEFAULT_VMWARE_INSTALL_METHOD).toBe("install-script");
264
+ expect(
265
+ VMWARE_INSTALL_METHODS.map(
266
+ (option: SetupGuideOption<VMwareInstallMethod>): string => {
267
+ return option.label;
268
+ },
269
+ ),
270
+ ).toEqual(["Install script", "Docker Compose"]);
271
+ });
272
+
273
+ test("recommends only the install script", () => {
274
+ expect(VMWARE_INSTALL_METHODS[0]!.badge).toBe("Recommended");
275
+ expect(VMWARE_INSTALL_METHODS[1]!.badge).toBeUndefined();
276
+ });
277
+
278
+ test("every method has a one-line description", () => {
279
+ for (const option of VMWARE_INSTALL_METHODS) {
280
+ expect((option.description || "").length).toBeGreaterThan(0);
281
+ expect(option.description).not.toContain("\n");
282
+ }
283
+ // The E2E specs pick the other option by /^Docker Compose/.
284
+ expect(VMWARE_INSTALL_METHODS[0]!.description).not.toContain(
285
+ "Docker Compose",
286
+ );
287
+ });
288
+
289
+ test("an unknown or missing method resolves to the install script", () => {
290
+ for (const value of [undefined, null, "", "ova", "Docker Compose"]) {
291
+ expect(resolveVMwareInstallMethod(value)).toBe("install-script");
292
+ }
293
+ expect(resolveVMwareInstallMethod("docker-compose")).toBe("docker-compose");
294
+ });
295
+ });
296
+
297
+ describe.each(METHOD_KEYS)("the %s guide", (method: VMwareInstallMethod) => {
298
+ const guide: SetupGuideContent = guideFor(method);
299
+ const markdown: string = getSetupGuideMarkdown(guide);
300
+
301
+ test("is three steps after the key: read-only user, install, verify", () => {
302
+ expect(
303
+ guide.steps.map((step: SetupGuideStep): string => {
304
+ return step.title;
305
+ }),
306
+ ).toEqual([
307
+ "Create a read-only vSphere user",
308
+ "Install the agent",
309
+ "Verify the installation",
310
+ ]);
311
+ });
312
+
313
+ test("every step has a plain one-sentence description", () => {
314
+ for (const step of guide.steps) {
315
+ expect(step.description).toBeTruthy();
316
+ // Descriptions render as plain text, so no markdown.
317
+ expect(step.description).not.toMatch(/[`*[\]]/);
318
+ expect(step.description).not.toContain("\n");
319
+ }
320
+ });
321
+
322
+ test("lists what must be in place first", () => {
323
+ const prerequisites: string = (guide.prerequisites || []).join("\n");
324
+ expect(guide.prerequisites!.length).toBeGreaterThanOrEqual(2);
325
+ expect(guide.prerequisites!.length).toBeLessThanOrEqual(4);
326
+ expect(prerequisites).toContain("Docker Engine 20.10+");
327
+ expect(prerequisites).toContain("TCP 443");
328
+ expect(prerequisites).toContain("**7.0 or later**");
329
+ expect(prerequisites).toContain("One agent per vCenter Server");
330
+ });
331
+
332
+ test("the user step offers the vSphere Client, govc and a standalone host as tabs", () => {
333
+ const user: SetupGuideStep = stepTitled(
334
+ guide,
335
+ "Create a read-only vSphere user",
336
+ );
337
+ expect(
338
+ (user.variants || []).map((variant: SetupGuideStepVariant): string => {
339
+ return variant.label;
340
+ }),
341
+ ).toEqual(["vSphere Client", "govc", "Standalone ESXi"]);
342
+ });
343
+
344
+ test("the verify step checks the collector and waits for one collection", () => {
345
+ const verify: string =
346
+ stepTitled(guide, "Verify the installation").markdown || "";
347
+ expect(verify).toContain("docker compose ps");
348
+ expect(verify).toContain(
349
+ `docker compose logs -f ${VMWARE_AGENT_CONTAINER}`,
350
+ );
351
+ expect(verify).toContain(
352
+ "Everything is ready. Begin running and processing data.",
353
+ );
354
+ expect(verify).toContain(
355
+ "nothing is sent until the first full inventory walk completes",
356
+ );
357
+ expect(verify).toContain(VMWARE_AI_AGENT_CONTAINER);
358
+ expect(verify.includes(`cd ${VMWARE_AGENT_INSTALL_DIR}`)).toBe(
359
+ method === "install-script",
360
+ );
361
+ });
362
+
363
+ test("keeps configuration options out of the first-run steps", () => {
364
+ const steps: string = stepsText(guide);
365
+ for (const advanced of [
366
+ "syslog",
367
+ "oneuptime.label.",
368
+ "docker compose pull",
369
+ "docker compose down",
370
+ "max_query_metrics",
371
+ "send_batch_size",
372
+ ]) {
373
+ expect(steps).not.toContain(advanced);
374
+ }
375
+ });
376
+
377
+ test("has Advanced topics for settings, files, data, power state, syslog, labels, AI and upgrades", () => {
378
+ expect(topicTitles(guide.advanced)).toEqual([
379
+ "Environment variables",
380
+ "The agent's configuration files",
381
+ "What the agent collects",
382
+ "How VM power state is worked out",
383
+ "Ship ESXi syslog",
384
+ "Tag the vCenter with project labels",
385
+ "OneUptime AI agent",
386
+ "Upgrade or uninstall the agent",
387
+ ]);
388
+ });
389
+
390
+ test("every Advanced topic has a plain one-line summary", () => {
391
+ for (const topic of guide.advanced || []) {
392
+ expect(topic.summary).toBeTruthy();
393
+ // Summaries render as plain text, so no markdown.
394
+ expect(topic.summary).not.toMatch(/[`*[\]]/);
395
+ expect(topic.summary).not.toContain("\n");
396
+ }
397
+ });
398
+
399
+ test("troubleshooting starts with the diagnostic script and covers the known problems", () => {
400
+ expect(topicTitles(guide.troubleshooting)).toEqual([
401
+ "Run the diagnostic script first",
402
+ 'vCenter shows as "Disconnected"',
403
+ "No vCenter appears, or no metrics",
404
+ "vCenter rejects the login",
405
+ "x509 or other TLS errors",
406
+ "Hosts appear but no VMs, datastores or clusters",
407
+ "Every VM shows as powered off",
408
+ "Collections are slow on a large inventory",
409
+ "vCenter appears under the wrong name",
410
+ ]);
411
+ });
412
+
413
+ test("the diagnostic script is the agent's own, run against this install", () => {
414
+ const script: string = topicTitled(
415
+ guide.troubleshooting,
416
+ "Run the diagnostic script first",
417
+ ).markdown;
418
+ expect(script).toContain(
419
+ `curl -sSL ${VMWARE_AGENT_RAW_URL}/troubleshoot.sh -o troubleshoot.sh`,
420
+ );
421
+ if (method === "install-script") {
422
+ expect(script).toContain("\nbash troubleshoot.sh\n");
423
+ } else {
424
+ expect(script).toContain('bash troubleshoot.sh -d "$PWD"');
425
+ }
426
+ });
427
+
428
+ test("tests reachability from the agent's own network namespace", () => {
429
+ expect(
430
+ topicTitled(guide.troubleshooting, "No vCenter appears, or no metrics")
431
+ .markdown,
432
+ ).toContain(
433
+ codeBlock(
434
+ "bash",
435
+ `docker run --rm --network container:${VMWARE_AGENT_CONTAINER} curlimages/curl -sk https://<vcenter-host>/sdk/vimServiceVersions.xml`,
436
+ ),
437
+ );
438
+ });
439
+
440
+ test("gives the Docker Compose .env quoting rule", () => {
441
+ const login: string = topicTitled(
442
+ guide.troubleshooting,
443
+ "vCenter rejects the login",
444
+ ).markdown;
445
+ expect(login).toContain(
446
+ "a password containing `$`, `#`, spaces or quotes must be **single-quoted**",
447
+ );
448
+ expect(login).toContain("`VCENTER_PASSWORD='p@ss$word'`");
449
+ expect(login).toContain("every `$` written as `$$`");
450
+ // One backslash, as the reader types it.
451
+ expect(login).toContain('`"` / `\\` escaped with a backslash');
452
+ expect(login).toContain("`DOMAIN\\user`");
453
+ expect(markdown).not.toContain("DOMAIN\\\\user");
454
+ });
455
+
456
+ test("the environment table carries the reader's URL and the quoting rule", () => {
457
+ const table: string = topicTitled(
458
+ guide.advanced,
459
+ "Environment variables",
460
+ ).markdown;
461
+ expect(table).toContain(`(e.g. \`${URL}\`)`);
462
+ expect(table).toContain("single-quote it in `.env`");
463
+ });
464
+
465
+ test("shows the shipped compose file and collector config verbatim", () => {
466
+ const files: string = topicTitled(
467
+ guide.advanced,
468
+ "The agent's configuration files",
469
+ ).markdown;
470
+ expect(files).toContain(codeBlock("yaml", VMWARE_AGENT_COMPOSE_FILE));
471
+ expect(files).toContain(codeBlock("yaml", VMWARE_AGENT_COLLECTOR_CONFIG));
472
+ });
473
+
474
+ test("commands in the agent's folder run where this method installs it", () => {
475
+ const composeCommand: RegExp = /^docker compose /m;
476
+ let checked: number = 0;
477
+ for (const block of getSetupGuideCodeBlocks({
478
+ steps: [],
479
+ advanced: guide.advanced,
480
+ })) {
481
+ if (composeCommand.test(block)) {
482
+ expect(block.startsWith(`cd ${VMWARE_AGENT_INSTALL_DIR}\n`)).toBe(
483
+ method === "install-script",
484
+ );
485
+ checked++;
486
+ }
487
+ }
488
+ expect(checked).toBeGreaterThanOrEqual(4);
489
+ if (method === "docker-compose") {
490
+ expect(markdown).not.toContain(VMWARE_AGENT_INSTALL_DIR);
491
+ }
492
+ });
493
+
494
+ test("the AI agent topic stays read-only and protects the vCenter appliance", () => {
495
+ const ai: string = topicTitled(
496
+ guide.advanced,
497
+ "OneUptime AI agent",
498
+ ).markdown;
499
+ expect(ai).toContain("ONEUPTIME_AI_ALLOW_WRITES=true");
500
+ expect(ai).toContain(
501
+ "`ONEUPTIME_AI_VCENTER_USERNAME` / `ONEUPTIME_AI_VCENTER_PASSWORD`",
502
+ );
503
+ expect(ai).toContain("`ONEUPTIME_AI_PROTECTED_TARGETS`");
504
+ expect(ai).toContain(
505
+ `docker exec ${VMWARE_AI_AGENT_CONTAINER} wget -qO- http://127.0.0.1:3877/status`,
506
+ );
507
+ expect(ai).toContain("(/docs/ai/infrastructure-ai-agents#vmware-vcenter)");
508
+ });
509
+
510
+ test("the upgrade topic refreshes the pinned files the way this method can", () => {
511
+ const upgrade: string = topicTitled(
512
+ guide.advanced,
513
+ "Upgrade or uninstall the agent",
514
+ ).markdown;
515
+ if (method === "install-script") {
516
+ expect(upgrade).toContain("re-run the install script");
517
+ } else {
518
+ expect(upgrade).toContain(
519
+ "download `docker-compose.yml` and `otel-collector-config.yaml` again",
520
+ );
521
+ expect(upgrade).not.toContain("install script");
522
+ }
523
+ });
524
+
525
+ test("links to the VMware agent and monitor documentation", () => {
526
+ expect(guide.links).toEqual([
527
+ { title: "VMware agent documentation", url: "/docs/telemetry/vmware" },
528
+ {
529
+ title: "VMware monitors and alerts",
530
+ url: "/docs/monitor/vmware-monitor",
531
+ },
532
+ ]);
533
+ });
534
+
535
+ test("every documentation link points at a page, and anchor, that exists", () => {
536
+ const links: Array<string> = Array.from(
537
+ markdown.matchAll(/\]\((\/docs\/[^)\s]+)\)/g),
538
+ ).map((match: RegExpMatchArray): string => {
539
+ return match[1]!;
540
+ });
541
+ expect(links.length).toBeGreaterThanOrEqual(3);
542
+ for (const link of links) {
543
+ const parts: Array<string> = link.replace(/^\/docs\//, "").split("#");
544
+ const anchor: string | undefined = parts[1];
545
+ const file: string = path.join(DOCS_DIR, `${parts[0]}.md`);
546
+ expect({ link, exists: fs.existsSync(file) }).toEqual({
547
+ link,
548
+ exists: true,
549
+ });
550
+ if (anchor) {
551
+ const headings: Array<string> = Array.from(
552
+ fs.readFileSync(file, "utf8").matchAll(/^#+ (.+)$/gm),
553
+ ).map((match: RegExpMatchArray): string => {
554
+ return markdownSlugify(match[1]!);
555
+ });
556
+ expect(headings).toContain(anchor);
557
+ }
558
+ }
559
+ });
560
+ });
561
+
562
+ describe("the read-only vSphere user", () => {
563
+ const user: SetupGuideStep = stepTitled(
564
+ guideFor("install-script"),
565
+ "Create a read-only vSphere user",
566
+ );
567
+
568
+ test("the vSphere Client tab grants Read-Only on the vCenter root, propagated", () => {
569
+ const client: string = variantTitled(user, "vSphere Client").markdown;
570
+ expect(client).toContain(
571
+ "*Menu → Administration → Single Sign On → Users and Groups*",
572
+ );
573
+ expect(client).toContain("`oneuptime@vsphere.local`");
574
+ expect(client).toContain("set the role to **Read-Only**");
575
+ expect(client).toContain("tick **Propagate to children**");
576
+ expect(client).toContain("Propagation is the part people miss.");
577
+ });
578
+
579
+ test("the govc tab creates the user and propagates the role from /", () => {
580
+ expect(variantTitled(user, "govc").markdown).toContain(
581
+ codeBlock(
582
+ "bash",
583
+ [
584
+ "govc sso.user.create -p 'a-strong-password' -R ReadOnly oneuptime",
585
+ "govc permissions.set -principal oneuptime@vsphere.local -role ReadOnly -propagate=true /",
586
+ ].join("\n"),
587
+ ),
588
+ );
589
+ });
590
+
591
+ test("the standalone ESXi tab uses the Host Client and the host as the endpoint", () => {
592
+ const esxi: string = variantTitled(user, "Standalone ESXi").markdown;
593
+ expect(esxi).toContain(
594
+ "*Host → Manage → Security & Users → Users* in the ESXi Host Client",
595
+ );
596
+ expect(esxi).toContain("*Host → Manage → Security & Users → Permissions*");
597
+ expect(esxi).toContain("`https://esxi01.example.com`");
598
+ });
599
+ });
600
+
601
+ describe("the install script", () => {
602
+ test("carries the reader's URL and key on the command line", () => {
603
+ expect(
604
+ getVMwareInstallScriptCommand({
605
+ oneuptimeUrl: URL,
606
+ apiKey: KEY,
607
+ hasApiKey: true,
608
+ }),
609
+ ).toBe(
610
+ [
611
+ "curl -sSL https://raw.githubusercontent.com/OneUptime/oneuptime/master/agents/VMwareAgent/install.sh -o install.sh",
612
+ `ONEUPTIME_URL=${URL} ONEUPTIME_TELEMETRY_INGESTION_KEY=${KEY} bash install.sh`,
613
+ ].join("\n"),
614
+ );
615
+ expect(installStep(guideFor("install-script"))).toContain(
616
+ codeBlock(
617
+ "bash",
618
+ getVMwareInstallScriptCommand({
619
+ oneuptimeUrl: URL,
620
+ apiKey: KEY,
621
+ hasApiKey: true,
622
+ }),
623
+ ),
624
+ );
625
+ });
626
+
627
+ test("quotes values the shell would otherwise change", () => {
628
+ expect(
629
+ getVMwareInstallScriptCommand({
630
+ oneuptimeUrl: URL,
631
+ apiKey: "a$b",
632
+ hasApiKey: true,
633
+ }),
634
+ ).toContain("ONEUPTIME_TELEMETRY_INGESTION_KEY='a$b' bash install.sh");
635
+ });
636
+
637
+ test("never puts the placeholder key into the script's environment", () => {
638
+ for (const hasApiKey of [false, true]) {
639
+ const command: string = getVMwareInstallScriptCommand({
640
+ oneuptimeUrl: URL,
641
+ apiKey: SETUP_GUIDE_API_KEY_PLACEHOLDER,
642
+ hasApiKey: hasApiKey,
643
+ });
644
+ expect(command).not.toContain("ONEUPTIME_");
645
+ expect(command.split("\n")[1]).toBe("bash install.sh");
646
+ }
647
+ });
648
+
649
+ test("leaves the URL to the prompt while the dashboard does not know it", () => {
650
+ const command: string = getVMwareInstallScriptCommand({
651
+ oneuptimeUrl: SETUP_GUIDE_URL_PLACEHOLDER,
652
+ apiKey: KEY,
653
+ hasApiKey: true,
654
+ });
655
+ expect(command).not.toContain("ONEUPTIME_URL");
656
+ expect(command).toContain(`ONEUPTIME_TELEMETRY_INGESTION_KEY=${KEY}`);
657
+ });
658
+
659
+ test("before a key is picked, says the script asks for the URL and key", () => {
660
+ const guide: SetupGuideContent = noKeyGuideFor("install-script");
661
+ expect(installStep(guide)).toContain(
662
+ "The script asks for your OneUptime URL and ingestion key, both shown in step 1",
663
+ );
664
+ expect(getSetupGuideMarkdown(guide)).not.toContain(
665
+ SETUP_GUIDE_API_KEY_PLACEHOLDER,
666
+ );
667
+ });
668
+
669
+ test("says what the script asks for, where it installs, and how it quotes", () => {
670
+ const install: string = installStep(guideFor("install-script"));
671
+ expect(install).toContain(
672
+ "The command already carries your OneUptime URL and ingestion key.",
673
+ );
674
+ for (const prompt of [
675
+ "**vCenter name**",
676
+ "**vCenter endpoint**",
677
+ "**The read-only user and its password**",
678
+ "**TLS verification**",
679
+ "**collection interval**",
680
+ "**OneUptime AI agent**",
681
+ ]) {
682
+ expect(install).toContain(prompt);
683
+ }
684
+ expect(install).toContain(
685
+ `It installs to \`${VMWARE_AGENT_INSTALL_DIR}\`, writes a \`0600\` \`.env\` file`,
686
+ );
687
+ expect(install).toContain(
688
+ "a password containing `$`, `#`, spaces or quotes works exactly as typed",
689
+ );
690
+ expect(install).toContain(
691
+ "re-running the script reuses everything in an existing `.env`",
692
+ );
693
+ });
694
+
695
+ test("shows none of the Docker Compose instructions", () => {
696
+ const guide: SetupGuideContent = guideFor("install-script");
697
+ const markdown: string = getSetupGuideMarkdown(guide);
698
+ expect(markdown).not.toContain("curl -fsSLO");
699
+ expect(markdown).not.toContain("mkdir oneuptime-vmware-agent");
700
+ expect(markdown).not.toContain("chmod 600 .env");
701
+ expect(() => {
702
+ return envFileOf(guide);
703
+ }).toThrow("The guide has no .env block");
704
+ });
705
+ });
706
+
707
+ describe("the Docker Compose install", () => {
708
+ const guide: SetupGuideContent = guideFor("docker-compose");
709
+ const install: string = installStep(guide);
710
+
711
+ test("downloads the two files, writes .env, makes it private, then starts the agent", () => {
712
+ const download: number = install.indexOf(
713
+ `curl -fsSLO ${VMWARE_AGENT_RAW_URL}/docker-compose.yml`,
714
+ );
715
+ const config: number = install.indexOf(
716
+ `curl -fsSLO ${VMWARE_AGENT_RAW_URL}/otel-collector-config.yaml`,
717
+ );
718
+ const env: number = install.indexOf("ONEUPTIME_URL=");
719
+ const start: number = install.indexOf(
720
+ codeBlock("bash", "chmod 600 .env\ndocker compose up -d"),
721
+ );
722
+ expect(download).toBeGreaterThan(-1);
723
+ expect(config).toBeGreaterThan(download);
724
+ expect(env).toBeGreaterThan(config);
725
+ expect(start).toBeGreaterThan(env);
726
+ expect(install).toContain(
727
+ `[VMwareAgent directory](${VMWARE_AGENT_SOURCE_URL})`,
728
+ );
729
+ });
730
+
731
+ test("the .env file carries the reader's URL and key, and a single-quoted password", () => {
732
+ const expected: string = [
733
+ `ONEUPTIME_URL=${URL}`,
734
+ `ONEUPTIME_TELEMETRY_INGESTION_KEY=${KEY}`,
735
+ `VMWARE_VCENTER_NAME=${VMWARE_EXAMPLE_VCENTER_NAME}`,
736
+ "VCENTER_ENDPOINT=https://vcsa.example.com",
737
+ "VCENTER_USERNAME=oneuptime@vsphere.local",
738
+ "VCENTER_PASSWORD='a-strong-password'",
739
+ "VCENTER_INSECURE_SKIP_VERIFY=true",
740
+ "VCENTER_COLLECTION_INTERVAL=2m",
741
+ ].join("\n");
742
+ expect(envFileOf(guide)).toBe(expected);
743
+ expect(
744
+ getVMwareEnvFile({
745
+ oneuptimeUrl: URL,
746
+ apiKey: KEY,
747
+ vcenterName: VMWARE_EXAMPLE_VCENTER_NAME,
748
+ }),
749
+ ).toBe(expected);
750
+ expect(install).toContain("Keep the password in single quotes");
751
+ });
752
+
753
+ test("shows the placeholder, and where to pick a key, until one is picked", () => {
754
+ const noKey: SetupGuideContent = noKeyGuideFor("docker-compose");
755
+ expect(envFileOf(noKey)).toContain(
756
+ `ONEUPTIME_TELEMETRY_INGESTION_KEY=${SETUP_GUIDE_API_KEY_PLACEHOLDER}`,
757
+ );
758
+ expect(installStep(noKey)).toContain("Pick an ingestion key in step 1");
759
+ expect(install).not.toContain("Pick an ingestion key in step 1");
760
+ expect(getSetupGuideMarkdown(guide)).not.toContain(
761
+ SETUP_GUIDE_API_KEY_PLACEHOLDER,
762
+ );
763
+ });
764
+
765
+ test("shows none of the install script's instructions", () => {
766
+ // The shipped compose file, shown verbatim, mentions install.sh itself.
767
+ const prose: string = getSetupGuideMarkdown({
768
+ ...guide,
769
+ advanced: (guide.advanced || []).filter(
770
+ (topic: SetupGuideTopic): boolean => {
771
+ return topic.title !== "The agent's configuration files";
772
+ },
773
+ ),
774
+ });
775
+ expect(prose).not.toContain("install.sh");
776
+ expect(prose).not.toContain("install script");
777
+ expect(getSetupGuideMarkdown(guide)).not.toContain(
778
+ VMWARE_AGENT_INSTALL_DIR,
779
+ );
780
+ });
781
+
782
+ test("renders what the skipped E2E spec reads off the page", () => {
783
+ /*
784
+ * VMwareProduct.spec.ts picks Docker Compose after creating a key, then
785
+ * reads the page for these; the install script (the default) must still
786
+ * carry the key for the spec that reads it back out.
787
+ */
788
+ const withKey: string = getSetupGuideMarkdown(
789
+ guideFor("docker-compose", {
790
+ oneuptimeUrl: "http://localhost",
791
+ apiKey: UUID_KEY,
792
+ }),
793
+ );
794
+ expect(withKey).toMatch(/ONEUPTIME_URL=http/);
795
+ expect(withKey).toContain("VMWARE_VCENTER_NAME=my-vcenter");
796
+ expect(withKey).toContain("docker compose up -d");
797
+ expect(withKey).not.toContain("<YOUR_API_KEY>");
798
+ expect(
799
+ withKey.match(
800
+ /ONEUPTIME_TELEMETRY_INGESTION_KEY=([0-9a-fA-F-]{36})/,
801
+ )?.[1],
802
+ ).toBe(UUID_KEY);
803
+
804
+ const byDefault: string = getSetupGuideMarkdown(
805
+ guideFor(DEFAULT_VMWARE_INSTALL_METHOD, {
806
+ oneuptimeUrl: "http://localhost",
807
+ apiKey: UUID_KEY,
808
+ }),
809
+ );
810
+ expect(
811
+ byDefault.match(
812
+ /ONEUPTIME_TELEMETRY_INGESTION_KEY=([0-9a-fA-F-]{36})/,
813
+ )?.[1],
814
+ ).toBe(UUID_KEY);
815
+ });
816
+ });
817
+
818
+ describe("the vCenter name", () => {
819
+ test("a product page suggests a name and says to replace it", () => {
820
+ expect(installStep(guideFor("docker-compose"))).toContain(
821
+ `Replace \`${VMWARE_EXAMPLE_VCENTER_NAME}\` with a name for this vCenter`,
822
+ );
823
+ });
824
+
825
+ test("a vCenter's own tab writes its name into .env and says to keep it", () => {
826
+ const guide: SetupGuideContent = guideFor("docker-compose", {
827
+ vcenterName: "vcenter-prod",
828
+ });
829
+ expect(envFileOf(guide)).toContain("VMWARE_VCENTER_NAME=vcenter-prod");
830
+ expect(installStep(guide)).toContain(
831
+ "This installs the agent for **`vcenter-prod`**",
832
+ );
833
+ expect(installStep(guide)).not.toContain("Replace `");
834
+ expect(
835
+ topicTitled(guide.troubleshooting, "vCenter appears under the wrong name")
836
+ .markdown,
837
+ ).toContain("This vCenter is **`vcenter-prod`**.");
838
+ });
839
+
840
+ test("the install script is told to enter a known name exactly", () => {
841
+ const install: string = installStep(
842
+ guideFor("install-script", { vcenterName: "vcenter-prod" }),
843
+ );
844
+ expect(install).toContain("enter **`vcenter-prod`** exactly");
845
+ expect(install).not.toContain("VMWARE_VCENTER_NAME=");
846
+ });
847
+
848
+ test("a name the .env file would misread is quoted, and a blank one is unknown", () => {
849
+ expect(
850
+ envFileOf(guideFor("docker-compose", { vcenterName: "prod $vc" })),
851
+ ).toContain("VMWARE_VCENTER_NAME='prod $vc'");
852
+ expect(
853
+ envFileOf(guideFor("docker-compose", { vcenterName: " " })),
854
+ ).toContain(`VMWARE_VCENTER_NAME=${VMWARE_EXAMPLE_VCENTER_NAME}`);
855
+ });
856
+ });
857
+
858
+ describe("drift guards against agents/VMwareAgent", () => {
859
+ test("the compose file is the shipped file, byte for byte", () => {
860
+ expect(VMWARE_AGENT_COMPOSE_FILE).toBe(readAgentFile("docker-compose.yml"));
861
+ });
862
+
863
+ test("the collector config is the shipped file, byte for byte", () => {
864
+ expect(VMWARE_AGENT_COLLECTOR_CONFIG).toBe(
865
+ readAgentFile("otel-collector-config.yaml"),
866
+ );
867
+ });
868
+
869
+ test("the batch settings the guide explains are the config's", () => {
870
+ const config: Record<string, any> = yaml.load(
871
+ VMWARE_AGENT_COLLECTOR_CONFIG,
872
+ ) as Record<string, any>;
873
+ expect(config["processors"]["batch"]["send_batch_size"]).toBe(8192);
874
+ expect(
875
+ config["processors"]["batch"]["send_batch_max_size"],
876
+ ).toBeUndefined();
877
+ expect(config["receivers"]["vcenter"]["max_query_metrics"]).toBe(256);
878
+ expect(config["processors"]["memory_limiter"]["limit_mib"]).toBe(512);
879
+ expect(config["processors"]["resource"]["attributes"][0]).toEqual({
880
+ key: "vmware.vcenter.name",
881
+ value: "${env:VMWARE_VCENTER_NAME}",
882
+ action: "upsert",
883
+ });
884
+ });
885
+
886
+ test("the environment table documents exactly what the collector reads", () => {
887
+ const collector: Map<string, string | null> = composeVariables(
888
+ VMWARE_AGENT_CONTAINER,
889
+ );
890
+ for (const method of METHOD_KEYS) {
891
+ expect(Array.from(envTableRows(guideFor(method)).keys()).sort()).toEqual(
892
+ Array.from(collector.keys()).sort(),
893
+ );
894
+ }
895
+ });
896
+
897
+ test("the defaults the table gives are the compose file's", () => {
898
+ const collector: Map<string, string | null> = composeVariables(
899
+ VMWARE_AGENT_CONTAINER,
900
+ );
901
+ const rows: Map<string, { required: string; description: string }> =
902
+ envTableRows(guideFor("docker-compose"));
903
+ let checked: number = 0;
904
+ for (const [name, row] of rows) {
905
+ const stated: RegExpMatchArray | null = row.description.match(
906
+ /\(default: `([^`]+)`\)/,
907
+ );
908
+ if (stated) {
909
+ expect({ name, default: collector.get(name) }).toEqual({
910
+ name,
911
+ default: stated[1],
912
+ });
913
+ checked++;
914
+ }
915
+ }
916
+ expect(checked).toBe(3);
917
+ });
918
+
919
+ test("the .env block sets exactly the variables the collector reads", () => {
920
+ const names: Array<string> = envFileOf(guideFor("docker-compose"))
921
+ .split("\n")
922
+ .map((line: string): string => {
923
+ return line.split("=")[0]!;
924
+ });
925
+ expect(names.sort()).toEqual(
926
+ Array.from(composeVariables(VMWARE_AGENT_CONTAINER).keys()).sort(),
927
+ );
928
+ });
929
+
930
+ test("the AI agent variables the guide names are the AI agent's", () => {
931
+ const aiVariables: Map<string, string | null> = composeVariables(
932
+ VMWARE_AI_AGENT_CONTAINER,
933
+ );
934
+ const ai: string = topicTitled(
935
+ guideFor("docker-compose").advanced,
936
+ "OneUptime AI agent",
937
+ ).markdown;
938
+ const named: Array<string> = Array.from(
939
+ ai.matchAll(/`([A-Z][A-Z0-9_]+)(?:=[^`]*)?`/g),
940
+ ).map((match: RegExpMatchArray): string => {
941
+ return match[1]!;
942
+ });
943
+ expect(named.length).toBeGreaterThan(4);
944
+ for (const name of named) {
945
+ expect({ name, read: aiVariables.has(name) }).toEqual({
946
+ name,
947
+ read: true,
948
+ });
949
+ }
950
+ });
951
+
952
+ test("the install script writes every variable of the table to .env, quoted for Compose", () => {
953
+ const script: string = readAgentFile("install.sh");
954
+ for (const name of Array.from(
955
+ envTableRows(guideFor("install-script")).keys(),
956
+ )) {
957
+ expect(script).toMatch(new RegExp(`^${name}=`, "m"));
958
+ }
959
+ expect(script).toContain(
960
+ 'VCENTER_PASSWORD=$(compose_env_quote "$VCENTER_PASSWORD")',
961
+ );
962
+ });
963
+
964
+ test("the install script honours a preset URL and key, which prefilling relies on", () => {
965
+ const script: string = readAgentFile("install.sh");
966
+ for (const name of ["ONEUPTIME_URL", "ONEUPTIME_TELEMETRY_INGESTION_KEY"]) {
967
+ expect(script).toMatch(
968
+ new RegExp(`if \\[ -z "\\$${name}" \\]; then\\s*\\n\\s*read -rp`),
969
+ );
970
+ }
971
+ });
972
+
973
+ test("the install script installs where the guide says and asks what it says", () => {
974
+ const script: string = readAgentFile("install.sh");
975
+ expect(script).toContain(
976
+ `INSTALL_DIR="\${INSTALL_DIR:-${VMWARE_AGENT_INSTALL_DIR}}"`,
977
+ );
978
+ expect(script).toContain(`REPO_BASE="${VMWARE_AGENT_RAW_URL}"`);
979
+ expect(script).toContain('read -rsp "vSphere password: "');
980
+ expect(script).toContain("Skip TLS certificate verification for vCenter?");
981
+ expect(script).toContain("Collection interval");
982
+ expect(script).toContain("Also let it apply fixes");
983
+ expect(script).toContain('chmod 600 "$ENV_FILE"');
984
+ expect(script).toContain("reusing it.");
985
+ });
986
+
987
+ test("every file the guide downloads exists in the agent's directory", () => {
988
+ const files: Set<string> = new Set();
989
+ for (const method of METHOD_KEYS) {
990
+ const markdown: string = getSetupGuideMarkdown(guideFor(method));
991
+ for (const match of markdown.matchAll(
992
+ /https:\/\/raw\.githubusercontent\.com\/OneUptime\/oneuptime\/master\/agents\/([A-Za-z]+)\/([A-Za-z0-9._-]+)/g,
993
+ )) {
994
+ expect(match[1]).toBe("VMwareAgent");
995
+ files.add(match[2]!);
996
+ }
997
+ }
998
+ expect(Array.from(files).sort()).toEqual([
999
+ "docker-compose.yml",
1000
+ "install.sh",
1001
+ "otel-collector-config.yaml",
1002
+ "troubleshoot.sh",
1003
+ ]);
1004
+ for (const file of files) {
1005
+ expect(fs.existsSync(path.join(AGENT_DIR, file))).toBe(true);
1006
+ }
1007
+ });
1008
+
1009
+ test("the containers the guide names are the compose file's", () => {
1010
+ const containers: Array<string> = Object.values(
1011
+ composeFile()["services"] as Record<string, Record<string, string>>,
1012
+ ).map((service: Record<string, string>): string => {
1013
+ return service["container_name"]!;
1014
+ });
1015
+ expect(containers.sort()).toEqual(
1016
+ [VMWARE_AGENT_CONTAINER, VMWARE_AI_AGENT_CONTAINER].sort(),
1017
+ );
1018
+ });
1019
+
1020
+ test("the lines the syslog topic uncomments are in the shipped files", () => {
1021
+ expect(VMWARE_AGENT_COMPOSE_FILE).toContain(" # ports:\n");
1022
+ expect(VMWARE_AGENT_COMPOSE_FILE).toContain(' # - "5514:5514/udp"\n');
1023
+ expect(VMWARE_AGENT_COLLECTOR_CONFIG).toContain(" # syslog/tcp:\n");
1024
+ expect(VMWARE_AGENT_COLLECTOR_CONFIG).toContain(" # syslog/udp:\n");
1025
+ expect(VMWARE_AGENT_COLLECTOR_CONFIG).toContain(" # logs:\n");
1026
+ });
1027
+
1028
+ test("the diagnostic script takes -d and defaults to the install directory", () => {
1029
+ const script: string = readAgentFile("troubleshoot.sh");
1030
+ expect(script).toContain('-d|--dir) DIR="${2:-}"; shift 2 ;;');
1031
+ expect(script).toContain(`DIR="${VMWARE_AGENT_INSTALL_DIR}"`);
1032
+ });
1033
+ });