@oneuptime/common 13.0.0 → 13.0.3

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 (1443) hide show
  1. package/Models/AnalyticsModels/RumSession.ts +34 -0
  2. package/Models/DatabaseModels/Alert.ts +55 -0
  3. package/Models/DatabaseModels/AlertEpisodeLabelRule.ts +2 -2
  4. package/Models/DatabaseModels/AlertEpisodeOnCallRule.ts +2 -2
  5. package/Models/DatabaseModels/AlertEpisodeOwnerRule.ts +2 -2
  6. package/Models/DatabaseModels/AlertEpisodePrivacyRule.ts +2 -2
  7. package/Models/DatabaseModels/AlertGroupingRule.ts +2 -2
  8. package/Models/DatabaseModels/AlertLabelRule.ts +2 -2
  9. package/Models/DatabaseModels/AlertOnCallRule.ts +2 -2
  10. package/Models/DatabaseModels/AlertOwnerRule.ts +2 -2
  11. package/Models/DatabaseModels/AlertPrivacyRule.ts +2 -2
  12. package/Models/DatabaseModels/AlertReminderRule.ts +6 -4
  13. package/Models/DatabaseModels/AutoRemediationRule.ts +2 -2
  14. package/Models/DatabaseModels/CephClusterLabelRule.ts +2 -2
  15. package/Models/DatabaseModels/CephClusterOwnerRule.ts +2 -2
  16. package/Models/DatabaseModels/CloudResource.ts +45 -7
  17. package/Models/DatabaseModels/CloudResourceLabelRule.ts +2 -2
  18. package/Models/DatabaseModels/CloudResourceOwnerRule.ts +2 -2
  19. package/Models/DatabaseModels/CodeRepository.ts +85 -0
  20. package/Models/DatabaseModels/DashboardLabelRule.ts +2 -2
  21. package/Models/DatabaseModels/DashboardOwnerRule.ts +2 -2
  22. package/Models/DatabaseModels/DatabaseBaseModel/RelationOnlyRuleBaseModel.ts +11 -0
  23. package/Models/DatabaseModels/DatabaseBaseModel/RuleBaseModel.ts +44 -0
  24. package/Models/DatabaseModels/DockerHostLabelRule.ts +2 -2
  25. package/Models/DatabaseModels/DockerHostOwnerRule.ts +2 -2
  26. package/Models/DatabaseModels/DockerSwarmClusterLabelRule.ts +2 -2
  27. package/Models/DatabaseModels/DockerSwarmClusterOwnerRule.ts +2 -2
  28. package/Models/DatabaseModels/GoogleSecOpsConnection.ts +57 -7
  29. package/Models/DatabaseModels/GoogleSecOpsConnectionRun.ts +263 -0
  30. package/Models/DatabaseModels/HostLabelRule.ts +2 -2
  31. package/Models/DatabaseModels/HostOwnerRule.ts +2 -2
  32. package/Models/DatabaseModels/Incident.ts +55 -0
  33. package/Models/DatabaseModels/IncidentEpisodeLabelRule.ts +2 -2
  34. package/Models/DatabaseModels/IncidentEpisodeOnCallRule.ts +2 -2
  35. package/Models/DatabaseModels/IncidentEpisodeOwnerRule.ts +2 -2
  36. package/Models/DatabaseModels/IncidentEpisodePrivacyRule.ts +2 -2
  37. package/Models/DatabaseModels/IncidentGroupingRule.ts +2 -2
  38. package/Models/DatabaseModels/IncidentLabelRule.ts +2 -2
  39. package/Models/DatabaseModels/IncidentOnCallRule.ts +2 -2
  40. package/Models/DatabaseModels/IncidentOwnerRule.ts +2 -2
  41. package/Models/DatabaseModels/IncidentPrivacyRule.ts +2 -2
  42. package/Models/DatabaseModels/IncidentReminderRule.ts +6 -4
  43. package/Models/DatabaseModels/IncidentSlaRule.ts +2 -2
  44. package/Models/DatabaseModels/IncomingCallPolicy.ts +3 -4
  45. package/Models/DatabaseModels/IncomingCallPolicyLabelRule.ts +2 -2
  46. package/Models/DatabaseModels/IncomingCallPolicyOwnerRule.ts +2 -2
  47. package/Models/DatabaseModels/IncomingCallPolicyPhoneNumber.ts +254 -0
  48. package/Models/DatabaseModels/Index.ts +18 -0
  49. package/Models/DatabaseModels/IoTFleetLabelRule.ts +2 -2
  50. package/Models/DatabaseModels/IoTFleetOwnerRule.ts +2 -2
  51. package/Models/DatabaseModels/KubernetesClusterLabelRule.ts +2 -2
  52. package/Models/DatabaseModels/KubernetesClusterOwnerRule.ts +2 -2
  53. package/Models/DatabaseModels/MonitorLabelRule.ts +2 -2
  54. package/Models/DatabaseModels/MonitorOwnerRule.ts +2 -2
  55. package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +2 -2
  56. package/Models/DatabaseModels/NetworkDeviceLabelRule.ts +2 -2
  57. package/Models/DatabaseModels/NetworkDeviceOwnerRule.ts +2 -2
  58. package/Models/DatabaseModels/NetworkSiteAssignmentRule.ts +2 -2
  59. package/Models/DatabaseModels/OnCallDutyPolicyLabelRule.ts +2 -2
  60. package/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.ts +2 -2
  61. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.ts +2 -2
  62. package/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.ts +2 -2
  63. package/Models/DatabaseModels/PodmanHostLabelRule.ts +2 -2
  64. package/Models/DatabaseModels/PodmanHostOwnerRule.ts +2 -2
  65. package/Models/DatabaseModels/ProxmoxClusterLabelRule.ts +2 -2
  66. package/Models/DatabaseModels/ProxmoxClusterOwnerRule.ts +2 -2
  67. package/Models/DatabaseModels/RumApplicationLabelRule.ts +2 -2
  68. package/Models/DatabaseModels/RumApplicationOwnerRule.ts +2 -2
  69. package/Models/DatabaseModels/RunbookLabelRule.ts +2 -2
  70. package/Models/DatabaseModels/RunbookOwnerRule.ts +2 -2
  71. package/Models/DatabaseModels/RunbookRule.ts +2 -2
  72. package/Models/DatabaseModels/ScheduledMaintenance.ts +55 -0
  73. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.ts +2 -2
  74. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.ts +2 -2
  75. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.ts +6 -4
  76. package/Models/DatabaseModels/ServerlessFunctionLabelRule.ts +2 -2
  77. package/Models/DatabaseModels/ServerlessFunctionOwnerRule.ts +2 -2
  78. package/Models/DatabaseModels/ServiceLabelRule.ts +2 -2
  79. package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.ts +283 -4
  80. package/Models/DatabaseModels/ServiceOwnerRule.ts +2 -2
  81. package/Models/DatabaseModels/StatusPageLabelRule.ts +2 -2
  82. package/Models/DatabaseModels/StatusPageMonitorRule.ts +2 -2
  83. package/Models/DatabaseModels/StatusPageOwnerRule.ts +2 -2
  84. package/Models/DatabaseModels/User.ts +51 -2
  85. package/Models/DatabaseModels/UserNotificationEmailRollupItem.ts +43 -2
  86. package/Models/DatabaseModels/UserWebAuthn.ts +17 -0
  87. package/Models/DatabaseModels/VMwareResource.ts +1149 -0
  88. package/Models/DatabaseModels/VMwareVCenter.ts +1122 -0
  89. package/Models/DatabaseModels/VMwareVCenterFeed.ts +625 -0
  90. package/Models/DatabaseModels/VMwareVCenterLabelRule.ts +514 -0
  91. package/Models/DatabaseModels/VMwareVCenterOwnerRule.ts +596 -0
  92. package/Models/DatabaseModels/VMwareVCenterOwnerTeam.ts +485 -0
  93. package/Models/DatabaseModels/VMwareVCenterOwnerUser.ts +484 -0
  94. package/Models/DatabaseModels/WorkflowLabelRule.ts +2 -2
  95. package/Models/DatabaseModels/WorkflowOwnerRule.ts +2 -2
  96. package/Models/DatabaseModels/WorkflowVariable.ts +22 -1
  97. package/Server/API/AIAgentDataAPI.ts +79 -4
  98. package/Server/API/AIAgentGitHubAPI.ts +523 -0
  99. package/Server/API/AIChatAPI.ts +20 -1
  100. package/Server/API/BillingAPI.ts +33 -0
  101. package/Server/API/DashboardAPI.ts +10 -0
  102. package/Server/API/GitHubAPI.ts +47 -5
  103. package/Server/API/GoogleSecOpsConnectionAPI.ts +79 -0
  104. package/Server/API/TelemetryAPI.ts +323 -2
  105. package/Server/API/UserWebAuthnAPI.ts +21 -1
  106. package/Server/API/VMwareResourceAPI.ts +143 -0
  107. package/Server/Infrastructure/Postgres/SchemaMigrations/1791800000000-SplitWebAuthnChallengeByPurpose.ts +68 -0
  108. package/Server/Infrastructure/Postgres/SchemaMigrations/1791900000000-AddSeverityAndStateToNotificationEmailRollup.ts +26 -0
  109. package/Server/Infrastructure/Postgres/SchemaMigrations/1792000000000-AddVMwareTables.ts +636 -0
  110. package/Server/Infrastructure/Postgres/SchemaMigrations/1792100000000-AddGitHubCommandSettingsToCodeRepository.ts +47 -0
  111. package/Server/Infrastructure/Postgres/SchemaMigrations/1792200000000-AddUserWebAuthnPurpose.ts +17 -0
  112. package/Server/Infrastructure/Postgres/SchemaMigrations/1792300000000-AddGoogleSecOpsDiagnostics.ts +83 -0
  113. package/Server/Infrastructure/Postgres/SchemaMigrations/1792400000000-AddSloBurnRateRuleIncidents.ts +111 -0
  114. package/Server/Infrastructure/Postgres/SchemaMigrations/1792500000000-AddConfigurableRuleCriteria.ts +644 -0
  115. package/Server/Infrastructure/Postgres/SchemaMigrations/1792600000000-AddIncomingCallPolicyPhoneNumbers.ts +72 -0
  116. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +18 -0
  117. package/Server/Middleware/IdentityRateLimit.ts +101 -0
  118. package/Server/Middleware/MultipartFormData.ts +46 -21
  119. package/Server/Services/AIRunService.ts +13 -0
  120. package/Server/Services/AlertEpisodeLabelRuleEngineService.ts +21 -0
  121. package/Server/Services/AlertEpisodeOnCallRuleEngineService.ts +21 -0
  122. package/Server/Services/AlertEpisodeOwnerRuleEngineService.ts +21 -0
  123. package/Server/Services/AlertEpisodePrivacyRuleEngineService.ts +21 -0
  124. package/Server/Services/AlertGroupingEngineService.ts +27 -0
  125. package/Server/Services/AlertLabelRuleEngineService.ts +27 -0
  126. package/Server/Services/AlertOnCallRuleEngineService.ts +27 -0
  127. package/Server/Services/AlertOwnerRuleEngineService.ts +27 -0
  128. package/Server/Services/AlertPrivacyRuleEngineService.ts +27 -0
  129. package/Server/Services/AlertReminderRuleService.ts +65 -33
  130. package/Server/Services/AutoRemediationRuleEngineService.ts +90 -8
  131. package/Server/Services/BillingPaymentMethodService.ts +99 -28
  132. package/Server/Services/BillingService.ts +287 -20
  133. package/Server/Services/CephClusterLabelRuleEngineService.ts +20 -0
  134. package/Server/Services/CephClusterOwnerRuleEngineService.ts +20 -0
  135. package/Server/Services/CloudResourceInstanceService.ts +70 -0
  136. package/Server/Services/CloudResourceLabelRuleEngineService.ts +20 -0
  137. package/Server/Services/CloudResourceOwnerRuleEngineService.ts +20 -0
  138. package/Server/Services/DashboardLabelRuleEngineService.ts +20 -0
  139. package/Server/Services/DashboardOwnerRuleEngineService.ts +20 -0
  140. package/Server/Services/DatabaseService.ts +409 -6
  141. package/Server/Services/DockerHostLabelRuleEngineService.ts +20 -0
  142. package/Server/Services/DockerHostOwnerRuleEngineService.ts +20 -0
  143. package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +23 -0
  144. package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +23 -0
  145. package/Server/Services/ExceptionAggregationService.ts +1 -0
  146. package/Server/Services/GoogleSecOpsConnectionRunService.ts +10 -0
  147. package/Server/Services/GoogleSecOpsConnectionService.ts +12 -0
  148. package/Server/Services/HostLabelRuleEngineService.ts +13 -0
  149. package/Server/Services/HostOwnerRuleEngineService.ts +13 -0
  150. package/Server/Services/IncidentEpisodeLabelRuleEngineService.ts +21 -0
  151. package/Server/Services/IncidentEpisodeOnCallRuleEngineService.ts +21 -0
  152. package/Server/Services/IncidentEpisodeOwnerRuleEngineService.ts +21 -0
  153. package/Server/Services/IncidentEpisodePrivacyRuleEngineService.ts +21 -0
  154. package/Server/Services/IncidentGroupingEngineService.ts +64 -13
  155. package/Server/Services/IncidentLabelRuleEngineService.ts +64 -9
  156. package/Server/Services/IncidentOnCallRuleEngineService.ts +64 -10
  157. package/Server/Services/IncidentOwnerRuleEngineService.ts +64 -10
  158. package/Server/Services/IncidentPrivacyRuleEngineService.ts +64 -10
  159. package/Server/Services/IncidentReminderRuleService.ts +66 -34
  160. package/Server/Services/IncidentSlaRuleService.ts +55 -12
  161. package/Server/Services/IncomingCallPolicyLabelRuleEngineService.ts +20 -0
  162. package/Server/Services/IncomingCallPolicyOwnerRuleEngineService.ts +20 -0
  163. package/Server/Services/IncomingCallPolicyPhoneNumberService.ts +184 -0
  164. package/Server/Services/IncomingCallPolicyService.ts +276 -5
  165. package/Server/Services/Index.ts +18 -0
  166. package/Server/Services/IoTFleetLabelRuleEngineService.ts +20 -0
  167. package/Server/Services/IoTFleetOwnerRuleEngineService.ts +20 -0
  168. package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +23 -0
  169. package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +23 -0
  170. package/Server/Services/LabelService.ts +50 -7
  171. package/Server/Services/LogAggregationService.ts +1 -0
  172. package/Server/Services/MetricAggregationService.ts +1 -0
  173. package/Server/Services/MobilePasskeyLoginService.ts +216 -0
  174. package/Server/Services/MonitorLabelRuleEngineService.ts +20 -0
  175. package/Server/Services/MonitorOwnerRuleEngineService.ts +20 -0
  176. package/Server/Services/MonitorService.ts +51 -1
  177. package/Server/Services/MonitorTemplateService.ts +91 -29
  178. package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +134 -1
  179. package/Server/Services/NetworkDeviceAutoImportRuleService.ts +269 -3
  180. package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +26 -0
  181. package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +25 -0
  182. package/Server/Services/NetworkDeviceService.ts +2 -0
  183. package/Server/Services/NetworkSiteAssignmentRuleService.ts +90 -1
  184. package/Server/Services/NetworkSiteService.ts +242 -29
  185. package/Server/Services/NetworkSiteTypeService.ts +177 -77
  186. package/Server/Services/OnCallDutyPolicyLabelRuleEngineService.ts +20 -0
  187. package/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.ts +20 -0
  188. package/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.ts +22 -0
  189. package/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.ts +22 -0
  190. package/Server/Services/OpenTelemetryIngestService.ts +17 -0
  191. package/Server/Services/PayAsYouGoBillingService.ts +446 -0
  192. package/Server/Services/PodmanHostLabelRuleEngineService.ts +20 -0
  193. package/Server/Services/PodmanHostOwnerRuleEngineService.ts +20 -0
  194. package/Server/Services/ProjectCallSMSConfigService.ts +156 -7
  195. package/Server/Services/ProjectService.ts +46 -2
  196. package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +25 -0
  197. package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +25 -0
  198. package/Server/Services/RumApplicationLabelRuleEngineService.ts +22 -0
  199. package/Server/Services/RumApplicationOwnerRuleEngineService.ts +22 -0
  200. package/Server/Services/RunbookLabelRuleEngineService.ts +20 -0
  201. package/Server/Services/RunbookOwnerRuleEngineService.ts +20 -0
  202. package/Server/Services/RunbookRuleEngineService.ts +18 -1
  203. package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +62 -10
  204. package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +62 -11
  205. package/Server/Services/ScheduledMaintenanceReminderRuleService.ts +48 -18
  206. package/Server/Services/ServerlessFunctionInstanceService.ts +71 -0
  207. package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +25 -0
  208. package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +25 -0
  209. package/Server/Services/ServiceLabelRuleEngineService.ts +20 -0
  210. package/Server/Services/ServiceLevelObjectiveBurnRateRuleService.ts +675 -12
  211. package/Server/Services/ServiceLevelObjectiveService.ts +55 -13
  212. package/Server/Services/ServiceOwnerRuleEngineService.ts +20 -0
  213. package/Server/Services/StatusPageLabelRuleEngineService.ts +20 -0
  214. package/Server/Services/StatusPageMonitorRuleEngineService.ts +31 -2
  215. package/Server/Services/StatusPageMonitorRuleService.ts +34 -1
  216. package/Server/Services/StatusPageOwnerRuleEngineService.ts +20 -0
  217. package/Server/Services/TeamMemberService.ts +96 -36
  218. package/Server/Services/TelemetryIngestionKeyService.ts +80 -10
  219. package/Server/Services/TelemetryUsageBillingService.ts +95 -5
  220. package/Server/Services/TraceAggregationService.ts +5 -4
  221. package/Server/Services/UserService.ts +23 -50
  222. package/Server/Services/UserWebAuthnService.ts +592 -133
  223. package/Server/Services/VMwareResourceService.ts +648 -0
  224. package/Server/Services/VMwareVCenterFeedService.ts +99 -0
  225. package/Server/Services/VMwareVCenterLabelRuleEngineService.ts +265 -0
  226. package/Server/Services/VMwareVCenterLabelRuleService.ts +14 -0
  227. package/Server/Services/VMwareVCenterOwnerRuleEngineService.ts +277 -0
  228. package/Server/Services/VMwareVCenterOwnerRuleService.ts +14 -0
  229. package/Server/Services/VMwareVCenterOwnerTeamService.ts +139 -0
  230. package/Server/Services/VMwareVCenterOwnerUserService.ts +133 -0
  231. package/Server/Services/VMwareVCenterService.ts +629 -0
  232. package/Server/Services/WorkflowLabelRuleEngineService.ts +20 -0
  233. package/Server/Services/WorkflowOwnerRuleEngineService.ts +20 -0
  234. package/Server/Services/WorkflowVariableService.ts +203 -0
  235. package/Server/Static/Brand/README.md +10 -5
  236. package/Server/Static/Brand/favicons/oneuptime-up-v1.svg +8 -0
  237. package/Server/Types/Billing/MeteredPlan/ActiveMonitoringMeteredPlan.ts +17 -0
  238. package/Server/Types/Billing/MeteredPlan/TelemetryMeteredPlan.ts +31 -1
  239. package/Server/Types/Database/QueryHelper.ts +88 -0
  240. package/Server/Utils/AI/Toolbox/SloTools.ts +19 -2
  241. package/Server/Utils/CodeRepository/GitHub/GitHub.ts +7 -0
  242. package/Server/Utils/CodeRepository/GitHub/GitHubAgentTaskTrigger.ts +341 -0
  243. package/Server/Utils/CodeRepository/GitHub/GitHubCommandAuthorizer.ts +274 -0
  244. package/Server/Utils/CodeRepository/GitHub/GitHubCommandParser.ts +375 -0
  245. package/Server/Utils/CodeRepository/GitHub/GitHubConversation.ts +846 -0
  246. package/Server/Utils/CodeRepository/GitHub/GitHubReplyComposer.ts +360 -0
  247. package/Server/Utils/CodeRepository/GitHub/GitHubRunReply.ts +421 -0
  248. package/Server/Utils/CodeRepository/GitHub/GitHubWebhookEvents.ts +140 -0
  249. package/Server/Utils/CodeRepository/GitHub/GitHubWebhookHandler.ts +906 -0
  250. package/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.ts +143 -0
  251. package/Server/Utils/DataSource/EgressGuard.ts +160 -15
  252. package/Server/Utils/Database/TruncateColumnValue.ts +1 -1
  253. package/Server/Utils/EmailRollup/EmailRollupFlushRunner.ts +2 -0
  254. package/Server/Utils/EmailRollup/EmailRollupRenderer.ts +33 -0
  255. package/Server/Utils/EmailRollup/EmailRollupWriter.ts +44 -0
  256. package/Server/Utils/IncomingCallPhoneNumber.ts +29 -16
  257. package/Server/Utils/LogRedaction.ts +2 -1
  258. package/Server/Utils/Monitor/MonitorAlert.ts +1 -1
  259. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +302 -3
  260. package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +26 -4
  261. package/Server/Utils/Monitor/MonitorResourceContext.ts +5 -3
  262. package/Server/Utils/Monitor/MonitorStepResourceIdentity.ts +14 -0
  263. package/Server/Utils/Monitor/MonitorTemplateUtil.ts +1 -0
  264. package/Server/Utils/Monitor/SeriesResourceLabels.ts +26 -0
  265. package/Server/Utils/Monitor/SeriesResourceLinker.ts +28 -5
  266. package/Server/Utils/Profiling.ts +13 -1
  267. package/Server/Utils/ResourceFeed/ResourceFeedUtil.ts +3 -3
  268. package/Server/Utils/Rules/MonitorRuleCriteriaCache.ts +38 -0
  269. package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +14 -9
  270. package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.ts +116 -84
  271. package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +594 -195
  272. package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.ts +466 -0
  273. package/Server/Utils/SessionReplay/SessionReplayReadService.ts +498 -0
  274. package/Server/Utils/Telemetry/EntityRegistry.ts +5 -0
  275. package/Server/Utils/Telemetry/ResourceHeartbeat.ts +2 -1
  276. package/Server/Utils/Telemetry/TelemetryEntity.ts +181 -1
  277. package/Server/Utils/Telemetry/VMwareSnapshotScan.ts +1352 -0
  278. package/Server/Utils/Telemetry.ts +3 -1
  279. package/Server/Utils/VendorAssets.ts +3 -0
  280. package/Tests/App/Accounts/LoginPasskey.test.tsx +529 -0
  281. package/Tests/App/Accounts/MobilePasskey.test.tsx +620 -0
  282. package/Tests/App/Accounts/PasswordRequirements.test.tsx +254 -0
  283. package/Tests/App/Accounts/RegisterPassword.test.tsx +553 -0
  284. package/Tests/App/Dashboard/AIInsightViewTriage.test.tsx +348 -0
  285. package/Tests/App/Dashboard/ArchiveResourceCard.test.tsx +476 -0
  286. package/Tests/App/Dashboard/AskAiAvailability.test.ts +224 -0
  287. package/Tests/App/Dashboard/AskAiDisabled.test.tsx +432 -0
  288. package/Tests/App/Dashboard/BackupCodes.test.tsx +414 -0
  289. package/Tests/App/Dashboard/BillingPaidUsageFlow.test.tsx +530 -0
  290. package/Tests/App/Dashboard/BillingPaymentMethodForm.test.tsx +195 -0
  291. package/Tests/App/Dashboard/BreadcrumbCoverage.test.tsx +199 -0
  292. package/Tests/App/Dashboard/CloudDocumentationCard.test.tsx +223 -0
  293. package/Tests/App/Dashboard/CloudDocumentationMarkdown.test.ts +215 -0
  294. package/Tests/App/Dashboard/CloudFleetSummary.test.ts +183 -0
  295. package/Tests/App/Dashboard/CloudFleetSummaryComponent.test.tsx +248 -0
  296. package/Tests/App/Dashboard/CloudResourceTelemetryScope.test.ts +215 -0
  297. package/Tests/App/Dashboard/CriteriaFilterDefaults.test.ts +3 -0
  298. package/Tests/App/Dashboard/DashboardHeaderRequests.test.tsx +441 -0
  299. package/Tests/App/Dashboard/DashboardLazyPages.test.tsx +883 -0
  300. package/Tests/App/Dashboard/DashboardPersistentSideMenuLayouts.test.tsx +702 -0
  301. package/Tests/App/Dashboard/DashboardToolbarPopupLayering.test.tsx +566 -0
  302. package/Tests/App/Dashboard/DiscoveryScanLivePage.test.tsx +376 -0
  303. package/Tests/App/Dashboard/DiscoveryScanLiveUpdates.test.tsx +642 -0
  304. package/Tests/App/Dashboard/DiscoveryScanProgress.test.tsx +267 -0
  305. package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +69 -231
  306. package/Tests/App/Dashboard/ExceptionsLandingRedirect.test.tsx +63 -0
  307. package/Tests/App/Dashboard/FeedOrdering.test.ts +150 -0
  308. package/Tests/App/Dashboard/GoogleSecOpsConnectionsErrors.test.tsx +423 -0
  309. package/Tests/App/Dashboard/GoogleSecOpsDiagnostics.test.tsx +724 -0
  310. package/Tests/App/Dashboard/InventoryItemSideMenu.test.tsx +155 -0
  311. package/Tests/App/Dashboard/InvestigationFeedRefresh.test.tsx +11 -0
  312. package/Tests/App/Dashboard/MonitorTemplateSyncFields.test.tsx +539 -0
  313. package/Tests/App/Dashboard/OnCallLayerCardOverrides.test.tsx +24 -7
  314. package/Tests/App/Dashboard/OnCallOverridePresentation.test.ts +496 -0
  315. package/Tests/App/Dashboard/OnCallScheduleOverrideClarity.test.tsx +677 -0
  316. package/Tests/App/Dashboard/OnCallSchedulePreviewOverrides.test.tsx +31 -3
  317. package/Tests/App/Dashboard/PaidUsageConsent.test.tsx +180 -0
  318. package/Tests/App/Dashboard/PasskeySettings.test.tsx +1364 -0
  319. package/Tests/App/Dashboard/PayAsYouGoConsentGate.test.tsx +176 -275
  320. package/Tests/App/Dashboard/PayAsYouGoNotices.test.tsx +380 -233
  321. package/Tests/App/Dashboard/ProductMenuBreadcrumbs.test.tsx +3 -23
  322. package/Tests/App/Dashboard/ResourceArchiveSettings.test.tsx +347 -0
  323. package/Tests/App/Dashboard/ResourceAuditLogsSideMenus.test.tsx +263 -0
  324. package/Tests/App/Dashboard/ResourceFeed.test.tsx +414 -17
  325. package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +8 -1
  326. package/Tests/App/Dashboard/RumSessionReplaySideMenu.test.tsx +138 -0
  327. package/Tests/App/Dashboard/SloDashboardTemplateWidgets.test.tsx +940 -0
  328. package/Tests/App/Dashboard/TelemetryIngestionKeyEdit.test.tsx +378 -0
  329. package/Tests/App/Dashboard/TelemetryIngestionKeyForm.test.tsx +735 -0
  330. package/Tests/App/Dashboard/TwoFactorStatus.test.tsx +427 -0
  331. package/Tests/App/Dashboard/VMwareDashboardWidgets.test.ts +573 -0
  332. package/Tests/App/Dashboard/WidgetCatalog.test.ts +2 -0
  333. package/Tests/App/Dashboard/WorkflowVariablesTable.test.tsx +768 -0
  334. package/Tests/App/StatusPage/BulkAddStatusPageMonitorsModal.test.tsx +13 -3
  335. package/Tests/App/StatusPage/StatusPageOverviewLiveAndSearch.test.tsx +532 -40
  336. package/Tests/App/StatusPage/StatusPageResourceSearchBox.test.tsx +19 -2
  337. package/Tests/Fixtures/MobilePasskeyUser.json +8 -0
  338. package/Tests/Models/AnalyticsModels/RumSessionReplayColumns.test.ts +127 -4
  339. package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +5 -4
  340. package/Tests/Models/DatabaseModels/IncomingCallPolicyPhoneNumber.test.ts +362 -0
  341. package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +25 -6
  342. package/Tests/Models/DatabaseModels/RuleBaseModel.test.ts +69 -0
  343. package/Tests/Models/DatabaseModels/StaticRuleCriteriaInheritance.test.ts +181 -0
  344. package/Tests/Models/DatabaseModels/VMwareModels.test.ts +1134 -0
  345. package/Tests/Models/RunnerVersionLabel.test.ts +4 -2
  346. package/Tests/Server/API/AIChatProvidersAIEnabled.test.ts +259 -0
  347. package/Tests/Server/API/AIChatRouteAuthorization.test.ts +31 -2
  348. package/Tests/Server/API/BillingPayAsYouGoStatus.test.ts +116 -0
  349. package/Tests/Server/API/DashboardPublicResourceListAPI.test.ts +29 -1
  350. package/Tests/Server/API/EnterpriseLicenseReportUserCount.test.ts +13 -2
  351. package/Tests/Server/API/GitHubWebhookSignature.test.ts +368 -0
  352. package/Tests/Server/API/GoogleSecOpsConnectionAPI.test.ts +248 -0
  353. package/Tests/Server/API/SessionReplayAPI.test.ts +1303 -145
  354. package/Tests/Server/API/UserTwoFactorSelfService.test.ts +407 -0
  355. package/Tests/Server/API/UserWebAuthnAuthenticationOptionsRoute.test.ts +330 -0
  356. package/Tests/Server/API/UserWebAuthnPasskeyAPI.test.ts +172 -0
  357. package/Tests/Server/API/VMwareResourceAPI.test.ts +546 -0
  358. package/Tests/Server/Infrastructure/Postgres/AddConfigurableRuleCriteriaMigration.test.ts +611 -0
  359. package/Tests/Server/Infrastructure/Postgres/UserNotificationEmailRollupMetadataMigration.test.ts +85 -0
  360. package/Tests/Server/Infrastructure/Postgres/UserNotificationEmailRollupTableMigration.test.ts +34 -3
  361. package/Tests/Server/Middleware/MultipartFormData.test.ts +61 -3
  362. package/Tests/Server/Middleware/PasskeyRateLimit.test.ts +141 -0
  363. package/Tests/Server/Middleware/TelemetryIngestionDisabled.test.ts +211 -0
  364. package/Tests/Server/Services/AlertIncidentRuleCriteriaEngineServices.test.ts +651 -0
  365. package/Tests/Server/Services/AutoImportRuleRearmRecentScans.test.ts +343 -0
  366. package/Tests/Server/Services/AutoImportRuleWriteRearmsScans.test.ts +381 -0
  367. package/Tests/Server/Services/AutoRemediationRuleEngineService.test.ts +79 -0
  368. package/Tests/Server/Services/BillingPaymentMethodServiceSync.test.ts +175 -0
  369. package/Tests/Server/Services/BillingService.test.ts +26 -11
  370. package/Tests/Server/Services/BillingServiceMeteredPaymentAuthorization.test.ts +245 -0
  371. package/Tests/Server/Services/BillingServicePaymentMethodReads.test.ts +362 -0
  372. package/Tests/Server/Services/CloudResourceInstanceStalePrune.test.ts +188 -0
  373. package/Tests/Server/Services/DatabaseServiceRelationOnlyRuleRollout.test.ts +330 -0
  374. package/Tests/Server/Services/DatabaseServiceRuleCriteriaValidation.test.ts +522 -0
  375. package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +16 -2
  376. package/Tests/Server/Services/GoogleSecOpsDiagnosticsModel.test.ts +153 -0
  377. package/Tests/Server/Services/HookFreeWriteLengthClamp.test.ts +13 -0
  378. package/Tests/Server/Services/IncidentSlaRuleCriteriaCorrelation.test.ts +99 -0
  379. package/Tests/Server/Services/IncomingCallPolicyPhoneNumberService.test.ts +1540 -0
  380. package/Tests/Server/Services/InventoryItemPromotionGate.test.ts +5 -0
  381. package/Tests/Server/Services/InventoryUpsertSchemaParity.test.ts +36 -0
  382. package/Tests/Server/Services/InventoryUpsertTruncationGuard.test.ts +151 -0
  383. package/Tests/Server/Services/MobilePasskeyLoginIntegration.test.ts +231 -0
  384. package/Tests/Server/Services/MobilePasskeyLoginService.test.ts +315 -0
  385. package/Tests/Server/Services/MonitorPayAsYouGoBilling.test.ts +302 -0
  386. package/Tests/Server/Services/MonitorTemplateServiceFieldSync.test.ts +994 -0
  387. package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +22 -0
  388. package/Tests/Server/Services/NetworkDeviceRuleEngines.test.ts +179 -2
  389. package/Tests/Server/Services/NetworkSiteAssignmentRuleService.test.ts +170 -0
  390. package/Tests/Server/Services/NetworkSiteService.test.ts +559 -53
  391. package/Tests/Server/Services/NetworkSiteTypeService.test.ts +122 -55
  392. package/Tests/Server/Services/OpenTelemetryResourceRetentionMemo.test.ts +7 -1
  393. package/Tests/Server/Services/PayAsYouGoBillingService.test.ts +857 -0
  394. package/Tests/Server/Services/PayAsYouGoStripeRateLimitBudget.test.ts +379 -0
  395. package/Tests/Server/Services/ProjectServiceExtendTrial.test.ts +99 -1
  396. package/Tests/Server/Services/ProjectServiceSubscriptionSeats.test.ts +134 -0
  397. package/Tests/Server/Services/ReminderRuleCriteria.test.ts +173 -0
  398. package/Tests/Server/Services/ResourceFeedServices.test.ts +3 -2
  399. package/Tests/Server/Services/ResourceRuleCriteriaEngineServices.test.ts +170 -0
  400. package/Tests/Server/Services/ResourceUpdateLastSeenLivenessFallback.test.ts +32 -6
  401. package/Tests/Server/Services/ScheduledMaintenanceRuleCriteriaCorrelation.test.ts +154 -0
  402. package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +363 -175
  403. package/Tests/Server/Services/ServerlessFunctionInstanceStalePrune.test.ts +200 -0
  404. package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleService.test.ts +2450 -470
  405. package/Tests/Server/Services/ServiceLevelObjectiveService.test.ts +464 -121
  406. package/Tests/Server/Services/StaticRuleCriteriaRuntimeCoverage.test.ts +281 -0
  407. package/Tests/Server/Services/StatusPageMonitorRuleEngineService.test.ts +132 -0
  408. package/Tests/Server/Services/StatusPageMonitorRuleHooks.test.ts +159 -14
  409. package/Tests/Server/Services/TeamMemberAutoAcceptInvitation.test.ts +3 -0
  410. package/Tests/Server/Services/TeamMemberBillingSeatSync.test.ts +762 -0
  411. package/Tests/Server/Services/TeamMemberInviteRegistrationToken.test.ts +3 -0
  412. package/Tests/Server/Services/TelemetryIngestionKeyPolicyResolution.test.ts +72 -0
  413. package/Tests/Server/Services/TelemetryIngestionKeyValidation.test.ts +17 -4
  414. package/Tests/Server/Services/TelemetryPayAsYouGoBilling.test.ts +355 -0
  415. package/Tests/Server/Services/TraceAnalyticsResourceDisplayNames.test.ts +41 -4
  416. package/Tests/Server/Services/UserEmailChangePasswordResetExpiry.test.ts +6 -8
  417. package/Tests/Server/Services/UserNotificationEmailRollupModels.test.ts +37 -0
  418. package/Tests/Server/Services/UserTwoFactorAuthAdmin.test.ts +203 -34
  419. package/Tests/Server/Services/UserWebAuthnPasskeyIntegration.test.ts +401 -0
  420. package/Tests/Server/Services/UserWebAuthnPasskeyService.test.ts +769 -0
  421. package/Tests/Server/Services/UserWebAuthnUserVerification.test.ts +649 -0
  422. package/Tests/Server/Services/VMwareResourceService.test.ts +945 -0
  423. package/Tests/Server/Services/VMwareVCenterService.test.ts +722 -0
  424. package/Tests/Server/Services/WorkflowVariableRenameUniqueness.test.ts +842 -0
  425. package/Tests/Server/TestingUtils/PasskeyHttpIntegration.ts +102 -0
  426. package/Tests/Server/TestingUtils/SecurityKey.ts +464 -0
  427. package/Tests/Server/TestingUtils/WebAuthnServiceMocks.ts +60 -0
  428. package/Tests/Server/Types/Billing/PayAsYouGoMeteredAuthorization.test.ts +573 -0
  429. package/Tests/Server/Types/Database/Permissions/ProjectCustomerSupportAccessColumn.test.ts +261 -0
  430. package/Tests/Server/Types/Database/Permissions/WorkflowVariableColumnPermission.test.ts +95 -0
  431. package/Tests/Server/Types/Database/QueryHelperJsonArrayObjects.test.ts +128 -0
  432. package/Tests/Server/Utils/AI/SloTools.test.ts +190 -1
  433. package/Tests/Server/Utils/AI/Toolbox/AIToolbox.test.ts +461 -0
  434. package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +25 -0
  435. package/Tests/Server/Utils/Billing/BillingFailureNoticeThrottle.test.ts +359 -0
  436. package/Tests/Server/Utils/CodeRepository/GitHub/GitHubWebhookEvents.test.ts +318 -0
  437. package/Tests/Server/Utils/CodeRepository/GitHubAgentTaskTrigger.test.ts +2101 -0
  438. package/Tests/Server/Utils/CodeRepository/GitHubCommandAuthorizer.test.ts +883 -0
  439. package/Tests/Server/Utils/CodeRepository/GitHubCommandParser.test.ts +1474 -0
  440. package/Tests/Server/Utils/CodeRepository/GitHubConversation.test.ts +1526 -0
  441. package/Tests/Server/Utils/CodeRepository/GitHubReplyComposer.test.ts +1389 -0
  442. package/Tests/Server/Utils/CodeRepository/GitHubRunReply.test.ts +1707 -0
  443. package/Tests/Server/Utils/CodeRepository/GitHubWebhookHandler.test.ts +2202 -0
  444. package/Tests/Server/Utils/CustomField/CustomFieldDefinitionMappingHooks.test.ts +220 -0
  445. package/Tests/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.test.ts +345 -0
  446. package/Tests/Server/Utils/Dashboard/SloTemplatePublicDashboard.test.ts +1043 -0
  447. package/Tests/Server/Utils/DataSource/EgressGuard.test.ts +896 -0
  448. package/Tests/Server/Utils/EmailRollup/EmailRollupMetadataIntegration.test.ts +246 -0
  449. package/Tests/Server/Utils/EmailRollup/EmailRollupRenderer.test.ts +299 -1
  450. package/Tests/Server/Utils/EmailRollup/EmailRollupTestHarness.ts +6 -0
  451. package/Tests/Server/Utils/EmailRollup/EmailRollupWriter.test.ts +185 -0
  452. package/Tests/Server/Utils/Execute.test.ts +302 -0
  453. package/Tests/Server/Utils/GracefulShutdown.test.ts +565 -0
  454. package/Tests/Server/Utils/IncomingCallPhoneNumber.test.ts +36 -20
  455. package/Tests/Server/Utils/LogRedaction.test.ts +33 -0
  456. package/Tests/Server/Utils/Monitor/CapturedMetricAttributeUtil.test.ts +2 -1
  457. package/Tests/Server/Utils/Monitor/Criteria/TelemetryStepMetricAlias.test.ts +10 -0
  458. package/Tests/Server/Utils/Monitor/MonitorAlertResourceLinking.test.ts +66 -1
  459. package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +362 -0
  460. package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +1 -0
  461. package/Tests/Server/Utils/Monitor/MonitorIncidentResourceLinking.test.ts +60 -1
  462. package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +60 -0
  463. package/Tests/Server/Utils/Monitor/MonitorRootCauseTargetResolution.test.ts +423 -0
  464. package/Tests/Server/Utils/Monitor/MonitorStepResourceIdentity.test.ts +6 -0
  465. package/Tests/Server/Utils/Monitor/MonitorSummaryPersistence.test.ts +1 -0
  466. package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1 -0
  467. package/Tests/Server/Utils/Monitor/SeriesResourceLinker.test.ts +46 -2
  468. package/Tests/Server/Utils/Monitor/SloTemplateMetricEmitterContract.test.ts +750 -0
  469. package/Tests/Server/Utils/ProductAnalytics.test.ts +404 -0
  470. package/Tests/Server/Utils/Profiling.test.ts +366 -0
  471. package/Tests/Server/Utils/Rules/MonitorRuleCriteriaCache.test.ts +99 -0
  472. package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +81 -45
  473. package/Tests/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.test.ts +711 -0
  474. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsClickhouseIntegration.test.ts +223 -0
  475. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsClient.test.ts +69 -1
  476. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsDiagnostics.test.ts +838 -0
  477. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsErrorHandling.test.ts +241 -28
  478. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsHttpIntegration.test.ts +651 -0
  479. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +11 -0
  480. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +13 -12
  481. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerHardening.test.ts +112 -127
  482. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsRequestContract.test.ts +12 -18
  483. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsResponseParsing.test.ts +43 -0
  484. package/Tests/Server/Utils/SessionReplay/SessionReplayReadServiceQueries.test.ts +558 -0
  485. package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +580 -0
  486. package/Tests/Server/Utils/Telemetry/VMwareSnapshotScan.test.ts +1748 -0
  487. package/Tests/Server/Utils/VendorAssets.test.ts +17 -0
  488. package/Tests/Types/Cloud/CloudPlatform.test.ts +574 -0
  489. package/Tests/Types/Dashboard/DashboardTemplateEditorialInvariants.test.ts +659 -0
  490. package/Tests/Types/Dashboard/DashboardTemplateInvariants.test.ts +97 -0
  491. package/Tests/Types/Dashboard/SloDashboardTemplate.test.ts +1179 -0
  492. package/Tests/Types/Database/AccessControl/OwnedThrough.test.ts +136 -0
  493. package/Tests/Types/Monitor/MetricAndProfileDefaultCriteria.test.ts +2 -0
  494. package/Tests/Types/Monitor/MonitorCriteriaMetricVariables.test.ts +9 -0
  495. package/Tests/Types/Monitor/MonitorStepDefaultTelemetryConfig.test.ts +1 -0
  496. package/Tests/Types/Monitor/MonitorStepInfraMonitorUtils.test.ts +53 -8
  497. package/Tests/Types/Monitor/MonitorStepInfrastructureMonitors.test.ts +97 -0
  498. package/Tests/Types/Monitor/MonitorStepMetricViewConfigUtil.test.ts +1 -0
  499. package/Tests/Types/Monitor/MonitorStepTemplateSyncFields.test.ts +107 -0
  500. package/Tests/Types/Monitor/MonitorTemplateSyncField.test.ts +172 -0
  501. package/Tests/Types/Monitor/MonitorType.test.ts +1 -0
  502. package/Tests/Types/Monitor/MonitorTypeKeywords.test.ts +2 -0
  503. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationAlertDebuggability.test.ts +1 -0
  504. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCatalog.test.ts +9 -0
  505. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCoverage.test.ts +1 -1
  506. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationNotificationMode.test.ts +1 -1
  507. package/Tests/Types/Monitor/SeriesContext/SeriesDebugHints.test.ts +131 -0
  508. package/Tests/Types/Monitor/SeriesContext/SeriesLabelDisplay.test.ts +10 -0
  509. package/Tests/Types/Monitor/VMwareAlertTemplates.test.ts +1608 -0
  510. package/Tests/Types/Monitor/VMwareMetricCatalog.test.ts +488 -0
  511. package/Tests/Types/OnCallDutyPolicy/OverrideProvenance.test.ts +295 -0
  512. package/Tests/Types/Rum/SessionReplayApiContracts.test.ts +180 -1
  513. package/Tests/Types/Runner/RunnerLiveStatus.test.ts +2 -2
  514. package/Tests/Types/SignupPassword.test.ts +205 -0
  515. package/Tests/Types/StatusPage/StatusPageLanguage.test.ts +44 -0
  516. package/Tests/Types/SupportedLanguages.test.ts +119 -0
  517. package/Tests/Types/Telemetry/EntityTypeGroups.test.ts +19 -0
  518. package/Tests/UI/ColorPickerBuild.test.ts +86 -0
  519. package/Tests/UI/Components/AiInvestigationSettingsCard.test.tsx +13 -6
  520. package/Tests/UI/Components/Alert.test.tsx +532 -93
  521. package/Tests/UI/Components/Breadcrumbs.test.tsx +32 -0
  522. package/Tests/UI/Components/Feed.test.tsx +241 -0
  523. package/Tests/UI/Components/Forms/BasicFormStepNavigation.test.tsx +368 -0
  524. package/Tests/UI/Components/Forms/FormSummary.test.tsx +454 -0
  525. package/Tests/UI/Components/Forms/ModelFormJsonColumns.test.tsx +290 -0
  526. package/Tests/UI/Components/Forms/ModelFormPreservesUserInput.test.tsx +937 -0
  527. package/Tests/UI/Components/Forms/ModelFormRuleCriteria.test.tsx +331 -0
  528. package/Tests/UI/Components/Forms/ModelFormWriteOnlyColumnSelect.test.tsx +230 -0
  529. package/Tests/UI/Components/Forms/ValidationFormSteps.test.ts +3 -4
  530. package/Tests/UI/Components/IconOpticalSize.test.tsx +79 -31
  531. package/Tests/UI/Components/LabelRuleImportExport.test.tsx +907 -0
  532. package/Tests/UI/Components/ModelTable/ModelTableCreateAfterEdit.test.tsx +514 -0
  533. package/Tests/UI/Components/ModelTable/ModelTableWrapContent.test.tsx +6 -6
  534. package/Tests/UI/Components/MonitorGraphs/Uptime.test.tsx +301 -0
  535. package/Tests/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.test.ts +2 -1
  536. package/Tests/UI/Components/NavBar.test.tsx +91 -2
  537. package/Tests/UI/Components/PencilButton.test.tsx +211 -0
  538. package/Tests/UI/Components/RuleCriteria/RuleCriteriaBuilder.test.tsx +510 -0
  539. package/Tests/UI/Components/RuleCriteria/RuleCriteriaModelTable.test.tsx +350 -0
  540. package/Tests/UI/Components/TableSortAndMobileColumns.test.tsx +50 -0
  541. package/Tests/UI/Components/Telemetry/TelemetryRetentionConfigForm.test.tsx +329 -0
  542. package/Tests/UI/Components/TooltipLazyContent.test.tsx +373 -0
  543. package/Tests/UI/Components/useFeedItems.test.tsx +107 -0
  544. package/Tests/UI/MicrosoftTeams/MicrosoftTeamsMessagingEndpointGuidance.test.tsx +43 -12
  545. package/Tests/UI/ReactDomBuild.test.ts +104 -0
  546. package/Tests/UI/ReactRouterSingletonBuild.test.ts +11 -1
  547. package/Tests/UI/Rum/ChunkLoader.test.ts +401 -0
  548. package/Tests/UI/Rum/RecordingHealthCard.test.tsx +1 -1
  549. package/Tests/UI/Rum/RecordingHealthStrip.test.tsx +7 -1
  550. package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +2 -0
  551. package/Tests/UI/Rum/ReplayEngine.test.ts +1069 -5
  552. package/Tests/UI/Rum/ReplayHeader.test.tsx +579 -2
  553. package/Tests/UI/Rum/ReplayPlayerChrome.test.tsx +23 -5
  554. package/Tests/UI/Rum/ReplayRail.test.tsx +143 -1
  555. package/Tests/UI/Rum/ReplayRenderBudget.test.tsx +338 -0
  556. package/Tests/UI/Rum/ReplaySignals.test.ts +179 -0
  557. package/Tests/UI/Rum/ReplayStage.test.tsx +210 -3
  558. package/Tests/UI/Rum/ReplayTimeline.test.tsx +180 -1
  559. package/Tests/UI/Rum/ReplayUserSessionsMenu.test.tsx +405 -0
  560. package/Tests/UI/Rum/SessionReplayEmptyState.test.tsx +13 -16
  561. package/Tests/UI/Rum/SessionReplayFacets.test.tsx +199 -0
  562. package/Tests/UI/Rum/SessionReplaySearchBar.test.tsx +58 -21
  563. package/Tests/UI/Rum/SessionReplaySetupGuide.test.tsx +2 -0
  564. package/Tests/UI/Rum/SessionReplayTable.test.tsx +717 -4
  565. package/Tests/UI/Rum/SessionReplayUsersPage.test.tsx +435 -0
  566. package/Tests/UI/Rum/SessionReplayUsersTable.test.tsx +577 -0
  567. package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +149 -1
  568. package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +30 -1
  569. package/Tests/UI/Utils/DashboardStackingLayers.test.ts +197 -0
  570. package/Tests/UI/Utils/LabelRuleImportExport.test.ts +738 -0
  571. package/Tests/UI/Utils/ModelAPITenantHeader.test.ts +109 -2
  572. package/Tests/UI/Utils/Navigation.test.ts +30 -0
  573. package/Tests/UI/Utils/UseDashboardGridDnd.test.tsx +7 -2
  574. package/Tests/UI/Utils/UserEmailRegistrationStatus.test.tsx +295 -0
  575. package/Tests/UI/Utils/WebAuthn.test.ts +265 -0
  576. package/Tests/Utils/Dashboard/Components/DashboardComponentDefaults.test.ts +5 -0
  577. package/Tests/Utils/Dashboard/Components/DashboardVMwareListComponents.test.ts +548 -0
  578. package/Tests/Utils/Dashboard/DashboardResourceListSharedArgs.test.ts +17 -3
  579. package/Tests/Utils/Dashboard/SloTemplateVariableScoping.test.ts +880 -0
  580. package/Tests/Utils/LabelRuleImportExport.test.ts +741 -0
  581. package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
  582. package/Tests/Utils/Monitor/MonitorTemplateSyncUtil.test.ts +590 -0
  583. package/Tests/Utils/NetworkDiscovery/AutoImportRuleMatcher.test.ts +93 -0
  584. package/Tests/Utils/NetworkSite/CidrMatchUtil.test.ts +138 -0
  585. package/Tests/Utils/NetworkSite/TypeHierarchyUtil.test.ts +174 -0
  586. package/Tests/Utils/RequestFailedDetails.test.ts +325 -0
  587. package/Tests/Utils/Rules/RuleCriteriaMatcher.test.ts +1424 -0
  588. package/Tests/Utils/Rum/SessionIdentity.test.ts +72 -0
  589. package/Tests/Utils/Slo/SloBurnRateRuleState.test.ts +374 -28
  590. package/Tests/Utils/Telemetry/CloudInstanceIdentity.test.ts +255 -0
  591. package/Tests/Utils/Telemetry/EntityRelationship.test.ts +167 -0
  592. package/Tests/Utils/Telemetry/OriginAllowList.test.ts +118 -0
  593. package/Tests/Utils/WebAuthnTestUtil.ts +79 -0
  594. package/Tests/__mocks__/simplewebauthn.js +33 -4
  595. package/Types/AI/CodeFixTaskContext.ts +122 -0
  596. package/Types/AI/CodeFixTaskType.ts +62 -0
  597. package/Types/Accounts/AccountsLanguage.ts +1 -0
  598. package/Types/AdminDashboard/AdminDashboardLanguage.ts +1 -0
  599. package/Types/Calendar/CalendarEvent.ts +16 -0
  600. package/Types/Cloud/CloudPlatform.ts +372 -0
  601. package/Types/CodeRepository/GitHubCommand.ts +69 -0
  602. package/Types/Dashboard/DashboardComponentType.ts +2 -0
  603. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +1 -0
  604. package/Types/Dashboard/DashboardComponents/DashboardVMwareHostListComponent.ts +23 -0
  605. package/Types/Dashboard/DashboardComponents/DashboardVMwareVirtualMachineListComponent.ts +30 -0
  606. package/Types/Dashboard/DashboardLanguage.ts +1 -0
  607. package/Types/Dashboard/DashboardTemplates.ts +779 -0
  608. package/Types/Docs/DocsLanguage.ts +1 -0
  609. package/Types/Exception/EgressGuardException.ts +65 -0
  610. package/Types/Icon/IconProp.ts +1 -0
  611. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +36 -0
  612. package/Types/Monitor/MonitorCriteriaInstance.ts +1 -0
  613. package/Types/Monitor/MonitorStep.ts +78 -17
  614. package/Types/Monitor/MonitorStepMetricViewConfigUtil.ts +1 -0
  615. package/Types/Monitor/MonitorStepVMwareMonitor.ts +127 -0
  616. package/Types/Monitor/MonitorTemplateSyncField.ts +291 -0
  617. package/Types/Monitor/MonitorType.ts +24 -0
  618. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.ts +33 -0
  619. package/Types/Monitor/Recommendation/MonitorRecommendationTypes.ts +2 -0
  620. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.ts +3 -0
  621. package/Types/Monitor/SeriesContext/SeriesDebugHints.ts +158 -0
  622. package/Types/Monitor/SeriesContext/SeriesLabelDisplay.ts +61 -0
  623. package/Types/Monitor/VMwareAlertTemplates.ts +1070 -0
  624. package/Types/Monitor/VMwareMetricCatalog.ts +914 -0
  625. package/Types/OnCallDutyPolicy/ScheduleShiftUtil.ts +29 -0
  626. package/Types/OnCallDutyPolicy/UserOverrideUtil.ts +16 -0
  627. package/Types/Password.ts +84 -5
  628. package/Types/Permission.ts +265 -0
  629. package/Types/Probe/RequestFailedDetails.ts +7 -0
  630. package/Types/Rules/RuleCriteria.ts +51 -0
  631. package/Types/Rules/RuleCriteriaFieldRegistry.ts +437 -0
  632. package/Types/Rum/SessionReplay.ts +75 -0
  633. package/Types/Rum/SessionReplayApi.ts +93 -0
  634. package/Types/Runner/RunnerLiveStatus.ts +1 -1
  635. package/Types/SecurityEvent/GoogleSecOpsDiagnostics.ts +56 -0
  636. package/Types/StatusPage/StatusPageLanguage.ts +1 -0
  637. package/Types/Telemetry/EntityType.ts +21 -0
  638. package/Types/Telemetry/ServiceType.ts +1 -0
  639. package/Typings/Index.d.ts +63 -0
  640. package/UI/Components/Alerts/Alert.tsx +102 -72
  641. package/UI/Components/Breadcrumbs/Breadcrumbs.tsx +2 -2
  642. package/UI/Components/Button/Button.tsx +4 -1
  643. package/UI/Components/Calendar/Calendar.css +78 -0
  644. package/UI/Components/Calendar/Calendar.tsx +28 -3
  645. package/UI/Components/Dropdown/Dropdown.tsx +2 -0
  646. package/UI/Components/Feed/Feed.tsx +15 -0
  647. package/UI/Components/Feed/useFeedItems.ts +227 -0
  648. package/UI/Components/Forms/BasicForm.tsx +86 -23
  649. package/UI/Components/Forms/Fields/ColorPicker.tsx +2 -1
  650. package/UI/Components/Forms/Fields/FormField.tsx +16 -3
  651. package/UI/Components/Forms/ModelForm.tsx +239 -6
  652. package/UI/Components/Forms/Types/Field.ts +8 -1
  653. package/UI/Components/Graphs/DayUptimeGraph.tsx +8 -10
  654. package/UI/Components/Icon/Icon.tsx +19 -35
  655. package/UI/Components/Input/Input.tsx +42 -7
  656. package/UI/Components/LabelRule/ImportLabelRulesModal.tsx +441 -0
  657. package/UI/Components/LabelRule/LabelRuleTable.tsx +142 -0
  658. package/UI/Components/ModelTable/BaseModelTable.tsx +22 -5
  659. package/UI/Components/ModelTable/ModelTable.tsx +33 -6
  660. package/UI/Components/MonitorGraphs/Uptime.tsx +17 -27
  661. package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +3 -1
  662. package/UI/Components/Navbar/NavBar.tsx +1 -0
  663. package/UI/Components/RuleCriteria/RuleCriteriaBuilder.tsx +735 -0
  664. package/UI/Components/RuleCriteria/RuleCriteriaModelForm.tsx +209 -0
  665. package/UI/Components/RuleCriteria/RuleCriteriaModelTable.tsx +205 -0
  666. package/UI/Components/RuleCriteria/RuleCriteriaSummary.tsx +123 -0
  667. package/UI/Components/Table/Table.tsx +3 -0
  668. package/UI/Components/Table/TableBody.tsx +3 -0
  669. package/UI/Components/Table/TableRow.tsx +8 -2
  670. package/UI/Components/Telemetry/TelemetryRetentionConfigForm.tsx +14 -2
  671. package/UI/Components/Tooltip/Tooltip.tsx +52 -6
  672. package/UI/Styles/Theme.css +1 -0
  673. package/UI/Utils/DashboardStackingLayers.ts +85 -0
  674. package/UI/Utils/LabelRuleImportExport.ts +418 -0
  675. package/UI/Utils/ModelAPI/ModelAPI.ts +4 -3
  676. package/UI/Utils/Navigation.ts +1 -2
  677. package/UI/Utils/TelemetryService.ts +4 -3
  678. package/UI/Utils/UseDashboardGridDnd.ts +4 -1
  679. package/UI/Utils/UserEmailRegistrationStatus.ts +33 -5
  680. package/UI/Utils/WebAuthn.ts +220 -0
  681. package/UI/esbuild-config.js +50 -0
  682. package/Utils/API.ts +34 -0
  683. package/Utils/Dashboard/Components/DashboardVMwareHostListComponent.ts +38 -0
  684. package/Utils/Dashboard/Components/DashboardVMwareResourceListShared.ts +70 -0
  685. package/Utils/Dashboard/Components/DashboardVMwareVirtualMachineListComponent.ts +76 -0
  686. package/Utils/Dashboard/Components/Index.ts +16 -0
  687. package/Utils/Faker.ts +93 -6
  688. package/Utils/LabelRuleImportExport.ts +789 -0
  689. package/Utils/Monitor/MonitorTemplateSyncUtil.ts +164 -0
  690. package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +108 -8
  691. package/Utils/NetworkDiscovery/DiscoveryScanStatus.ts +8 -0
  692. package/Utils/NetworkSite/CidrMatchUtil.ts +102 -0
  693. package/Utils/NetworkSite/TypeHierarchyUtil.ts +152 -2
  694. package/Utils/Rules/RuleCriteriaMatcher.ts +931 -0
  695. package/Utils/Rum/SessionIdentity.ts +16 -0
  696. package/Utils/Slo/SloBurnRateRuleState.ts +87 -33
  697. package/Utils/Telemetry/CloudInstanceIdentity.ts +94 -0
  698. package/Utils/Telemetry/EntityKey.ts +19 -0
  699. package/Utils/Telemetry/EntityRelationship.ts +19 -0
  700. package/Utils/Telemetry/OriginAllowList.ts +74 -0
  701. package/build/dist/Models/AnalyticsModels/RumSession.js +32 -0
  702. package/build/dist/Models/AnalyticsModels/RumSession.js.map +1 -1
  703. package/build/dist/Models/DatabaseModels/Alert.js +54 -0
  704. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  705. package/build/dist/Models/DatabaseModels/AlertEpisodeLabelRule.js +2 -2
  706. package/build/dist/Models/DatabaseModels/AlertEpisodeLabelRule.js.map +1 -1
  707. package/build/dist/Models/DatabaseModels/AlertEpisodeOnCallRule.js +2 -2
  708. package/build/dist/Models/DatabaseModels/AlertEpisodeOnCallRule.js.map +1 -1
  709. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerRule.js +2 -2
  710. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerRule.js.map +1 -1
  711. package/build/dist/Models/DatabaseModels/AlertEpisodePrivacyRule.js +2 -2
  712. package/build/dist/Models/DatabaseModels/AlertEpisodePrivacyRule.js.map +1 -1
  713. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js +2 -2
  714. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js.map +1 -1
  715. package/build/dist/Models/DatabaseModels/AlertLabelRule.js +2 -2
  716. package/build/dist/Models/DatabaseModels/AlertLabelRule.js.map +1 -1
  717. package/build/dist/Models/DatabaseModels/AlertOnCallRule.js +2 -2
  718. package/build/dist/Models/DatabaseModels/AlertOnCallRule.js.map +1 -1
  719. package/build/dist/Models/DatabaseModels/AlertOwnerRule.js +2 -2
  720. package/build/dist/Models/DatabaseModels/AlertOwnerRule.js.map +1 -1
  721. package/build/dist/Models/DatabaseModels/AlertPrivacyRule.js +2 -2
  722. package/build/dist/Models/DatabaseModels/AlertPrivacyRule.js.map +1 -1
  723. package/build/dist/Models/DatabaseModels/AlertReminderRule.js +6 -5
  724. package/build/dist/Models/DatabaseModels/AlertReminderRule.js.map +1 -1
  725. package/build/dist/Models/DatabaseModels/AutoRemediationRule.js +2 -2
  726. package/build/dist/Models/DatabaseModels/AutoRemediationRule.js.map +1 -1
  727. package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js +2 -2
  728. package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js.map +1 -1
  729. package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js +2 -2
  730. package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js.map +1 -1
  731. package/build/dist/Models/DatabaseModels/CloudResource.js +44 -7
  732. package/build/dist/Models/DatabaseModels/CloudResource.js.map +1 -1
  733. package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js +2 -2
  734. package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js.map +1 -1
  735. package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js +2 -2
  736. package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js.map +1 -1
  737. package/build/dist/Models/DatabaseModels/CodeRepository.js +87 -0
  738. package/build/dist/Models/DatabaseModels/CodeRepository.js.map +1 -1
  739. package/build/dist/Models/DatabaseModels/DashboardLabelRule.js +2 -2
  740. package/build/dist/Models/DatabaseModels/DashboardLabelRule.js.map +1 -1
  741. package/build/dist/Models/DatabaseModels/DashboardOwnerRule.js +2 -2
  742. package/build/dist/Models/DatabaseModels/DashboardOwnerRule.js.map +1 -1
  743. package/build/dist/Models/DatabaseModels/DatabaseBaseModel/RelationOnlyRuleBaseModel.js +12 -0
  744. package/build/dist/Models/DatabaseModels/DatabaseBaseModel/RelationOnlyRuleBaseModel.js.map +1 -0
  745. package/build/dist/Models/DatabaseModels/DatabaseBaseModel/RuleBaseModel.js +50 -0
  746. package/build/dist/Models/DatabaseModels/DatabaseBaseModel/RuleBaseModel.js.map +1 -0
  747. package/build/dist/Models/DatabaseModels/DockerHostLabelRule.js +2 -2
  748. package/build/dist/Models/DatabaseModels/DockerHostLabelRule.js.map +1 -1
  749. package/build/dist/Models/DatabaseModels/DockerHostOwnerRule.js +2 -2
  750. package/build/dist/Models/DatabaseModels/DockerHostOwnerRule.js.map +1 -1
  751. package/build/dist/Models/DatabaseModels/DockerSwarmClusterLabelRule.js +2 -2
  752. package/build/dist/Models/DatabaseModels/DockerSwarmClusterLabelRule.js.map +1 -1
  753. package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerRule.js +2 -2
  754. package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerRule.js.map +1 -1
  755. package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +60 -7
  756. package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
  757. package/build/dist/Models/DatabaseModels/GoogleSecOpsConnectionRun.js +287 -0
  758. package/build/dist/Models/DatabaseModels/GoogleSecOpsConnectionRun.js.map +1 -0
  759. package/build/dist/Models/DatabaseModels/HostLabelRule.js +2 -2
  760. package/build/dist/Models/DatabaseModels/HostLabelRule.js.map +1 -1
  761. package/build/dist/Models/DatabaseModels/HostOwnerRule.js +2 -2
  762. package/build/dist/Models/DatabaseModels/HostOwnerRule.js.map +1 -1
  763. package/build/dist/Models/DatabaseModels/Incident.js +54 -0
  764. package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
  765. package/build/dist/Models/DatabaseModels/IncidentEpisodeLabelRule.js +2 -2
  766. package/build/dist/Models/DatabaseModels/IncidentEpisodeLabelRule.js.map +1 -1
  767. package/build/dist/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +2 -2
  768. package/build/dist/Models/DatabaseModels/IncidentEpisodeOnCallRule.js.map +1 -1
  769. package/build/dist/Models/DatabaseModels/IncidentEpisodeOwnerRule.js +2 -2
  770. package/build/dist/Models/DatabaseModels/IncidentEpisodeOwnerRule.js.map +1 -1
  771. package/build/dist/Models/DatabaseModels/IncidentEpisodePrivacyRule.js +2 -2
  772. package/build/dist/Models/DatabaseModels/IncidentEpisodePrivacyRule.js.map +1 -1
  773. package/build/dist/Models/DatabaseModels/IncidentGroupingRule.js +2 -2
  774. package/build/dist/Models/DatabaseModels/IncidentGroupingRule.js.map +1 -1
  775. package/build/dist/Models/DatabaseModels/IncidentLabelRule.js +2 -2
  776. package/build/dist/Models/DatabaseModels/IncidentLabelRule.js.map +1 -1
  777. package/build/dist/Models/DatabaseModels/IncidentOnCallRule.js +2 -2
  778. package/build/dist/Models/DatabaseModels/IncidentOnCallRule.js.map +1 -1
  779. package/build/dist/Models/DatabaseModels/IncidentOwnerRule.js +2 -2
  780. package/build/dist/Models/DatabaseModels/IncidentOwnerRule.js.map +1 -1
  781. package/build/dist/Models/DatabaseModels/IncidentPrivacyRule.js +2 -2
  782. package/build/dist/Models/DatabaseModels/IncidentPrivacyRule.js.map +1 -1
  783. package/build/dist/Models/DatabaseModels/IncidentReminderRule.js +6 -5
  784. package/build/dist/Models/DatabaseModels/IncidentReminderRule.js.map +1 -1
  785. package/build/dist/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  786. package/build/dist/Models/DatabaseModels/IncidentSlaRule.js.map +1 -1
  787. package/build/dist/Models/DatabaseModels/IncomingCallPolicy.js +3 -4
  788. package/build/dist/Models/DatabaseModels/IncomingCallPolicy.js.map +1 -1
  789. package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js +2 -2
  790. package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js.map +1 -1
  791. package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js +2 -2
  792. package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js.map +1 -1
  793. package/build/dist/Models/DatabaseModels/IncomingCallPolicyPhoneNumber.js +277 -0
  794. package/build/dist/Models/DatabaseModels/IncomingCallPolicyPhoneNumber.js.map +1 -0
  795. package/build/dist/Models/DatabaseModels/Index.js +18 -0
  796. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  797. package/build/dist/Models/DatabaseModels/IoTFleetLabelRule.js +2 -2
  798. package/build/dist/Models/DatabaseModels/IoTFleetLabelRule.js.map +1 -1
  799. package/build/dist/Models/DatabaseModels/IoTFleetOwnerRule.js +2 -2
  800. package/build/dist/Models/DatabaseModels/IoTFleetOwnerRule.js.map +1 -1
  801. package/build/dist/Models/DatabaseModels/KubernetesClusterLabelRule.js +2 -2
  802. package/build/dist/Models/DatabaseModels/KubernetesClusterLabelRule.js.map +1 -1
  803. package/build/dist/Models/DatabaseModels/KubernetesClusterOwnerRule.js +2 -2
  804. package/build/dist/Models/DatabaseModels/KubernetesClusterOwnerRule.js.map +1 -1
  805. package/build/dist/Models/DatabaseModels/MonitorLabelRule.js +2 -2
  806. package/build/dist/Models/DatabaseModels/MonitorLabelRule.js.map +1 -1
  807. package/build/dist/Models/DatabaseModels/MonitorOwnerRule.js +2 -2
  808. package/build/dist/Models/DatabaseModels/MonitorOwnerRule.js.map +1 -1
  809. package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +2 -2
  810. package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
  811. package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js +2 -2
  812. package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js.map +1 -1
  813. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js +2 -2
  814. package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js.map +1 -1
  815. package/build/dist/Models/DatabaseModels/NetworkSiteAssignmentRule.js +2 -2
  816. package/build/dist/Models/DatabaseModels/NetworkSiteAssignmentRule.js.map +1 -1
  817. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js +2 -2
  818. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js.map +1 -1
  819. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js +2 -2
  820. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js.map +1 -1
  821. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js +2 -2
  822. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js.map +1 -1
  823. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js +2 -2
  824. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js.map +1 -1
  825. package/build/dist/Models/DatabaseModels/PodmanHostLabelRule.js +2 -2
  826. package/build/dist/Models/DatabaseModels/PodmanHostLabelRule.js.map +1 -1
  827. package/build/dist/Models/DatabaseModels/PodmanHostOwnerRule.js +2 -2
  828. package/build/dist/Models/DatabaseModels/PodmanHostOwnerRule.js.map +1 -1
  829. package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js +2 -2
  830. package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js.map +1 -1
  831. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js +2 -2
  832. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js.map +1 -1
  833. package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js +2 -2
  834. package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js.map +1 -1
  835. package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js +2 -2
  836. package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js.map +1 -1
  837. package/build/dist/Models/DatabaseModels/RunbookLabelRule.js +2 -2
  838. package/build/dist/Models/DatabaseModels/RunbookLabelRule.js.map +1 -1
  839. package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js +2 -2
  840. package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js.map +1 -1
  841. package/build/dist/Models/DatabaseModels/RunbookRule.js +2 -2
  842. package/build/dist/Models/DatabaseModels/RunbookRule.js.map +1 -1
  843. package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +54 -0
  844. package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
  845. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +2 -2
  846. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js.map +1 -1
  847. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +2 -2
  848. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js.map +1 -1
  849. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +6 -5
  850. package/build/dist/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js.map +1 -1
  851. package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js +2 -2
  852. package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js.map +1 -1
  853. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js +2 -2
  854. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js.map +1 -1
  855. package/build/dist/Models/DatabaseModels/ServiceLabelRule.js +2 -2
  856. package/build/dist/Models/DatabaseModels/ServiceLabelRule.js.map +1 -1
  857. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +281 -4
  858. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js.map +1 -1
  859. package/build/dist/Models/DatabaseModels/ServiceOwnerRule.js +2 -2
  860. package/build/dist/Models/DatabaseModels/ServiceOwnerRule.js.map +1 -1
  861. package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js +2 -2
  862. package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js.map +1 -1
  863. package/build/dist/Models/DatabaseModels/StatusPageMonitorRule.js +2 -2
  864. package/build/dist/Models/DatabaseModels/StatusPageMonitorRule.js.map +1 -1
  865. package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js +2 -2
  866. package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js.map +1 -1
  867. package/build/dist/Models/DatabaseModels/User.js +57 -4
  868. package/build/dist/Models/DatabaseModels/User.js.map +1 -1
  869. package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupItem.js +47 -2
  870. package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupItem.js.map +1 -1
  871. package/build/dist/Models/DatabaseModels/UserWebAuthn.js +18 -0
  872. package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -1
  873. package/build/dist/Models/DatabaseModels/VMwareResource.js +1201 -0
  874. package/build/dist/Models/DatabaseModels/VMwareResource.js.map +1 -0
  875. package/build/dist/Models/DatabaseModels/VMwareVCenter.js +1149 -0
  876. package/build/dist/Models/DatabaseModels/VMwareVCenter.js.map +1 -0
  877. package/build/dist/Models/DatabaseModels/VMwareVCenterFeed.js +648 -0
  878. package/build/dist/Models/DatabaseModels/VMwareVCenterFeed.js.map +1 -0
  879. package/build/dist/Models/DatabaseModels/VMwareVCenterLabelRule.js +522 -0
  880. package/build/dist/Models/DatabaseModels/VMwareVCenterLabelRule.js.map +1 -0
  881. package/build/dist/Models/DatabaseModels/VMwareVCenterOwnerRule.js +603 -0
  882. package/build/dist/Models/DatabaseModels/VMwareVCenterOwnerRule.js.map +1 -0
  883. package/build/dist/Models/DatabaseModels/VMwareVCenterOwnerTeam.js +503 -0
  884. package/build/dist/Models/DatabaseModels/VMwareVCenterOwnerTeam.js.map +1 -0
  885. package/build/dist/Models/DatabaseModels/VMwareVCenterOwnerUser.js +502 -0
  886. package/build/dist/Models/DatabaseModels/VMwareVCenterOwnerUser.js.map +1 -0
  887. package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js +2 -2
  888. package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js.map +1 -1
  889. package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js +2 -2
  890. package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js.map +1 -1
  891. package/build/dist/Models/DatabaseModels/WorkflowVariable.js +22 -1
  892. package/build/dist/Models/DatabaseModels/WorkflowVariable.js.map +1 -1
  893. package/build/dist/Server/API/AIAgentDataAPI.js +63 -3
  894. package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
  895. package/build/dist/Server/API/AIAgentGitHubAPI.js +363 -0
  896. package/build/dist/Server/API/AIAgentGitHubAPI.js.map +1 -0
  897. package/build/dist/Server/API/AIChatAPI.js +19 -1
  898. package/build/dist/Server/API/AIChatAPI.js.map +1 -1
  899. package/build/dist/Server/API/BillingAPI.js +22 -0
  900. package/build/dist/Server/API/BillingAPI.js.map +1 -1
  901. package/build/dist/Server/API/DashboardAPI.js +10 -0
  902. package/build/dist/Server/API/DashboardAPI.js.map +1 -1
  903. package/build/dist/Server/API/GitHubAPI.js +33 -5
  904. package/build/dist/Server/API/GitHubAPI.js.map +1 -1
  905. package/build/dist/Server/API/GoogleSecOpsConnectionAPI.js +56 -0
  906. package/build/dist/Server/API/GoogleSecOpsConnectionAPI.js.map +1 -0
  907. package/build/dist/Server/API/TelemetryAPI.js +211 -4
  908. package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
  909. package/build/dist/Server/API/UserWebAuthnAPI.js +17 -1
  910. package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
  911. package/build/dist/Server/API/VMwareResourceAPI.js +106 -0
  912. package/build/dist/Server/API/VMwareResourceAPI.js.map +1 -0
  913. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791800000000-SplitWebAuthnChallengeByPurpose.js +41 -0
  914. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791800000000-SplitWebAuthnChallengeByPurpose.js.map +1 -0
  915. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791900000000-AddSeverityAndStateToNotificationEmailRollup.js +14 -0
  916. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791900000000-AddSeverityAndStateToNotificationEmailRollup.js.map +1 -0
  917. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792000000000-AddVMwareTables.js +241 -0
  918. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792000000000-AddVMwareTables.js.map +1 -0
  919. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792100000000-AddGitHubCommandSettingsToCodeRepository.js +36 -0
  920. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792100000000-AddGitHubCommandSettingsToCodeRepository.js.map +1 -0
  921. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792200000000-AddUserWebAuthnPurpose.js +12 -0
  922. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792200000000-AddUserWebAuthnPurpose.js.map +1 -0
  923. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792300000000-AddGoogleSecOpsDiagnostics.js +34 -0
  924. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792300000000-AddGoogleSecOpsDiagnostics.js.map +1 -0
  925. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792400000000-AddSloBurnRateRuleIncidents.js +60 -0
  926. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792400000000-AddSloBurnRateRuleIncidents.js.map +1 -0
  927. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792500000000-AddConfigurableRuleCriteria.js +301 -0
  928. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792500000000-AddConfigurableRuleCriteria.js.map +1 -0
  929. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792600000000-AddIncomingCallPolicyPhoneNumbers.js +30 -0
  930. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792600000000-AddIncomingCallPolicyPhoneNumbers.js.map +1 -0
  931. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +18 -0
  932. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  933. package/build/dist/Server/Middleware/IdentityRateLimit.js +80 -0
  934. package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
  935. package/build/dist/Server/Middleware/MultipartFormData.js +38 -21
  936. package/build/dist/Server/Middleware/MultipartFormData.js.map +1 -1
  937. package/build/dist/Server/Services/AIRunService.js +14 -1
  938. package/build/dist/Server/Services/AIRunService.js.map +1 -1
  939. package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js +17 -0
  940. package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js.map +1 -1
  941. package/build/dist/Server/Services/AlertEpisodeOnCallRuleEngineService.js +17 -0
  942. package/build/dist/Server/Services/AlertEpisodeOnCallRuleEngineService.js.map +1 -1
  943. package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js +17 -0
  944. package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js.map +1 -1
  945. package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js +17 -0
  946. package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js.map +1 -1
  947. package/build/dist/Server/Services/AlertGroupingEngineService.js +21 -0
  948. package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
  949. package/build/dist/Server/Services/AlertLabelRuleEngineService.js +21 -0
  950. package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
  951. package/build/dist/Server/Services/AlertOnCallRuleEngineService.js +21 -0
  952. package/build/dist/Server/Services/AlertOnCallRuleEngineService.js.map +1 -1
  953. package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +21 -0
  954. package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
  955. package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js +21 -0
  956. package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js.map +1 -1
  957. package/build/dist/Server/Services/AlertReminderRuleService.js +44 -26
  958. package/build/dist/Server/Services/AlertReminderRuleService.js.map +1 -1
  959. package/build/dist/Server/Services/AutoRemediationRuleEngineService.js +54 -11
  960. package/build/dist/Server/Services/AutoRemediationRuleEngineService.js.map +1 -1
  961. package/build/dist/Server/Services/BillingPaymentMethodService.js +71 -21
  962. package/build/dist/Server/Services/BillingPaymentMethodService.js.map +1 -1
  963. package/build/dist/Server/Services/BillingService.js +210 -22
  964. package/build/dist/Server/Services/BillingService.js.map +1 -1
  965. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +16 -0
  966. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
  967. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +16 -0
  968. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
  969. package/build/dist/Server/Services/CloudResourceInstanceService.js +66 -0
  970. package/build/dist/Server/Services/CloudResourceInstanceService.js.map +1 -1
  971. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +16 -0
  972. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
  973. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +16 -0
  974. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
  975. package/build/dist/Server/Services/DashboardLabelRuleEngineService.js +16 -0
  976. package/build/dist/Server/Services/DashboardLabelRuleEngineService.js.map +1 -1
  977. package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js +16 -0
  978. package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js.map +1 -1
  979. package/build/dist/Server/Services/DatabaseService.js +235 -10
  980. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  981. package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +16 -0
  982. package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
  983. package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +16 -0
  984. package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
  985. package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +16 -0
  986. package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
  987. package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +16 -0
  988. package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
  989. package/build/dist/Server/Services/ExceptionAggregationService.js +1 -0
  990. package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
  991. package/build/dist/Server/Services/GoogleSecOpsConnectionRunService.js +9 -0
  992. package/build/dist/Server/Services/GoogleSecOpsConnectionRunService.js.map +1 -0
  993. package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +7 -0
  994. package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +1 -1
  995. package/build/dist/Server/Services/HostLabelRuleEngineService.js +12 -0
  996. package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
  997. package/build/dist/Server/Services/HostOwnerRuleEngineService.js +12 -0
  998. package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
  999. package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js +17 -0
  1000. package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js.map +1 -1
  1001. package/build/dist/Server/Services/IncidentEpisodeOnCallRuleEngineService.js +17 -0
  1002. package/build/dist/Server/Services/IncidentEpisodeOnCallRuleEngineService.js.map +1 -1
  1003. package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js +17 -0
  1004. package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js.map +1 -1
  1005. package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js +17 -0
  1006. package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js.map +1 -1
  1007. package/build/dist/Server/Services/IncidentGroupingEngineService.js +39 -13
  1008. package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
  1009. package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +39 -9
  1010. package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
  1011. package/build/dist/Server/Services/IncidentOnCallRuleEngineService.js +39 -10
  1012. package/build/dist/Server/Services/IncidentOnCallRuleEngineService.js.map +1 -1
  1013. package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +39 -10
  1014. package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
  1015. package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js +39 -10
  1016. package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js.map +1 -1
  1017. package/build/dist/Server/Services/IncidentReminderRuleService.js +44 -26
  1018. package/build/dist/Server/Services/IncidentReminderRuleService.js.map +1 -1
  1019. package/build/dist/Server/Services/IncidentSlaRuleService.js +33 -12
  1020. package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
  1021. package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js +16 -0
  1022. package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js.map +1 -1
  1023. package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js +16 -0
  1024. package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js.map +1 -1
  1025. package/build/dist/Server/Services/IncomingCallPolicyPhoneNumberService.js +127 -0
  1026. package/build/dist/Server/Services/IncomingCallPolicyPhoneNumberService.js.map +1 -0
  1027. package/build/dist/Server/Services/IncomingCallPolicyService.js +187 -4
  1028. package/build/dist/Server/Services/IncomingCallPolicyService.js.map +1 -1
  1029. package/build/dist/Server/Services/Index.js +18 -0
  1030. package/build/dist/Server/Services/Index.js.map +1 -1
  1031. package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js +16 -0
  1032. package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js.map +1 -1
  1033. package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js +16 -0
  1034. package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js.map +1 -1
  1035. package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +16 -0
  1036. package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
  1037. package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +16 -0
  1038. package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
  1039. package/build/dist/Server/Services/LabelService.js +39 -7
  1040. package/build/dist/Server/Services/LabelService.js.map +1 -1
  1041. package/build/dist/Server/Services/LogAggregationService.js +1 -0
  1042. package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
  1043. package/build/dist/Server/Services/MetricAggregationService.js +1 -0
  1044. package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
  1045. package/build/dist/Server/Services/MobilePasskeyLoginService.js +137 -0
  1046. package/build/dist/Server/Services/MobilePasskeyLoginService.js.map +1 -0
  1047. package/build/dist/Server/Services/MonitorLabelRuleEngineService.js +16 -0
  1048. package/build/dist/Server/Services/MonitorLabelRuleEngineService.js.map +1 -1
  1049. package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js +16 -0
  1050. package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js.map +1 -1
  1051. package/build/dist/Server/Services/MonitorService.js +34 -1
  1052. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  1053. package/build/dist/Server/Services/MonitorTemplateService.js +64 -26
  1054. package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
  1055. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +126 -1
  1056. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
  1057. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +199 -3
  1058. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
  1059. package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +17 -0
  1060. package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -1
  1061. package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +16 -0
  1062. package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -1
  1063. package/build/dist/Server/Services/NetworkDeviceService.js +2 -0
  1064. package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
  1065. package/build/dist/Server/Services/NetworkSiteAssignmentRuleService.js +56 -1
  1066. package/build/dist/Server/Services/NetworkSiteAssignmentRuleService.js.map +1 -1
  1067. package/build/dist/Server/Services/NetworkSiteService.js +187 -22
  1068. package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
  1069. package/build/dist/Server/Services/NetworkSiteTypeService.js +126 -51
  1070. package/build/dist/Server/Services/NetworkSiteTypeService.js.map +1 -1
  1071. package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js +16 -0
  1072. package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js.map +1 -1
  1073. package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js +16 -0
  1074. package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js.map +1 -1
  1075. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js +16 -0
  1076. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js.map +1 -1
  1077. package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js +16 -0
  1078. package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js.map +1 -1
  1079. package/build/dist/Server/Services/OpenTelemetryIngestService.js +28 -13
  1080. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  1081. package/build/dist/Server/Services/PayAsYouGoBillingService.js +297 -0
  1082. package/build/dist/Server/Services/PayAsYouGoBillingService.js.map +1 -0
  1083. package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +16 -0
  1084. package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
  1085. package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +16 -0
  1086. package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
  1087. package/build/dist/Server/Services/ProjectCallSMSConfigService.js +115 -6
  1088. package/build/dist/Server/Services/ProjectCallSMSConfigService.js.map +1 -1
  1089. package/build/dist/Server/Services/ProjectService.js +38 -2
  1090. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  1091. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +16 -0
  1092. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
  1093. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +16 -0
  1094. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
  1095. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +16 -0
  1096. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -1
  1097. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +16 -0
  1098. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -1
  1099. package/build/dist/Server/Services/RunbookLabelRuleEngineService.js +16 -0
  1100. package/build/dist/Server/Services/RunbookLabelRuleEngineService.js.map +1 -1
  1101. package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js +16 -0
  1102. package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js.map +1 -1
  1103. package/build/dist/Server/Services/RunbookRuleEngineService.js +12 -0
  1104. package/build/dist/Server/Services/RunbookRuleEngineService.js.map +1 -1
  1105. package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +38 -9
  1106. package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
  1107. package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +38 -10
  1108. package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
  1109. package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js +32 -14
  1110. package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js.map +1 -1
  1111. package/build/dist/Server/Services/ServerlessFunctionInstanceService.js +66 -0
  1112. package/build/dist/Server/Services/ServerlessFunctionInstanceService.js.map +1 -1
  1113. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +16 -0
  1114. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -1
  1115. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +16 -0
  1116. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -1
  1117. package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +16 -0
  1118. package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
  1119. package/build/dist/Server/Services/ServiceLevelObjectiveBurnRateRuleService.js +554 -12
  1120. package/build/dist/Server/Services/ServiceLevelObjectiveBurnRateRuleService.js.map +1 -1
  1121. package/build/dist/Server/Services/ServiceLevelObjectiveService.js +50 -14
  1122. package/build/dist/Server/Services/ServiceLevelObjectiveService.js.map +1 -1
  1123. package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +16 -0
  1124. package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
  1125. package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js +16 -0
  1126. package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js.map +1 -1
  1127. package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js +25 -2
  1128. package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js.map +1 -1
  1129. package/build/dist/Server/Services/StatusPageMonitorRuleService.js +19 -1
  1130. package/build/dist/Server/Services/StatusPageMonitorRuleService.js.map +1 -1
  1131. package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js +16 -0
  1132. package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js.map +1 -1
  1133. package/build/dist/Server/Services/TeamMemberService.js +85 -28
  1134. package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
  1135. package/build/dist/Server/Services/TelemetryIngestionKeyService.js +61 -10
  1136. package/build/dist/Server/Services/TelemetryIngestionKeyService.js.map +1 -1
  1137. package/build/dist/Server/Services/TelemetryUsageBillingService.js +62 -5
  1138. package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
  1139. package/build/dist/Server/Services/TraceAggregationService.js +5 -4
  1140. package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
  1141. package/build/dist/Server/Services/UserService.js +14 -49
  1142. package/build/dist/Server/Services/UserService.js.map +1 -1
  1143. package/build/dist/Server/Services/UserWebAuthnService.js +345 -113
  1144. package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -1
  1145. package/build/dist/Server/Services/VMwareResourceService.js +395 -0
  1146. package/build/dist/Server/Services/VMwareResourceService.js.map +1 -0
  1147. package/build/dist/Server/Services/VMwareVCenterFeedService.js +89 -0
  1148. package/build/dist/Server/Services/VMwareVCenterFeedService.js.map +1 -0
  1149. package/build/dist/Server/Services/VMwareVCenterLabelRuleEngineService.js +213 -0
  1150. package/build/dist/Server/Services/VMwareVCenterLabelRuleEngineService.js.map +1 -0
  1151. package/build/dist/Server/Services/VMwareVCenterLabelRuleService.js +13 -0
  1152. package/build/dist/Server/Services/VMwareVCenterLabelRuleService.js.map +1 -0
  1153. package/build/dist/Server/Services/VMwareVCenterOwnerRuleEngineService.js +230 -0
  1154. package/build/dist/Server/Services/VMwareVCenterOwnerRuleEngineService.js.map +1 -0
  1155. package/build/dist/Server/Services/VMwareVCenterOwnerRuleService.js +13 -0
  1156. package/build/dist/Server/Services/VMwareVCenterOwnerRuleService.js.map +1 -0
  1157. package/build/dist/Server/Services/VMwareVCenterOwnerTeamService.js +129 -0
  1158. package/build/dist/Server/Services/VMwareVCenterOwnerTeamService.js.map +1 -0
  1159. package/build/dist/Server/Services/VMwareVCenterOwnerUserService.js +122 -0
  1160. package/build/dist/Server/Services/VMwareVCenterOwnerUserService.js.map +1 -0
  1161. package/build/dist/Server/Services/VMwareVCenterService.js +533 -0
  1162. package/build/dist/Server/Services/VMwareVCenterService.js.map +1 -0
  1163. package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js +16 -0
  1164. package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js.map +1 -1
  1165. package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js +16 -0
  1166. package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js.map +1 -1
  1167. package/build/dist/Server/Services/WorkflowVariableService.js +169 -0
  1168. package/build/dist/Server/Services/WorkflowVariableService.js.map +1 -1
  1169. package/build/dist/Server/Types/Billing/MeteredPlan/ActiveMonitoringMeteredPlan.js +12 -1
  1170. package/build/dist/Server/Types/Billing/MeteredPlan/ActiveMonitoringMeteredPlan.js.map +1 -1
  1171. package/build/dist/Server/Types/Billing/MeteredPlan/TelemetryMeteredPlan.js +25 -2
  1172. package/build/dist/Server/Types/Billing/MeteredPlan/TelemetryMeteredPlan.js.map +1 -1
  1173. package/build/dist/Server/Types/Database/QueryHelper.js +67 -0
  1174. package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
  1175. package/build/dist/Server/Utils/AI/Toolbox/SloTools.js +21 -4
  1176. package/build/dist/Server/Utils/AI/Toolbox/SloTools.js.map +1 -1
  1177. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
  1178. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubAgentTaskTrigger.js +275 -0
  1179. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubAgentTaskTrigger.js.map +1 -0
  1180. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubCommandAuthorizer.js +226 -0
  1181. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubCommandAuthorizer.js.map +1 -0
  1182. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubCommandParser.js +297 -0
  1183. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubCommandParser.js.map +1 -0
  1184. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubConversation.js +582 -0
  1185. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubConversation.js.map +1 -0
  1186. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubReplyComposer.js +275 -0
  1187. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubReplyComposer.js.map +1 -0
  1188. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubRunReply.js +365 -0
  1189. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubRunReply.js.map +1 -0
  1190. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubWebhookEvents.js +103 -0
  1191. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubWebhookEvents.js.map +1 -0
  1192. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubWebhookHandler.js +661 -0
  1193. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHubWebhookHandler.js.map +1 -0
  1194. package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js +113 -0
  1195. package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js.map +1 -1
  1196. package/build/dist/Server/Utils/DataSource/EgressGuard.js +99 -15
  1197. package/build/dist/Server/Utils/DataSource/EgressGuard.js.map +1 -1
  1198. package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js +2 -0
  1199. package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js.map +1 -1
  1200. package/build/dist/Server/Utils/EmailRollup/EmailRollupRenderer.js +18 -0
  1201. package/build/dist/Server/Utils/EmailRollup/EmailRollupRenderer.js.map +1 -1
  1202. package/build/dist/Server/Utils/EmailRollup/EmailRollupWriter.js +31 -2
  1203. package/build/dist/Server/Utils/EmailRollup/EmailRollupWriter.js.map +1 -1
  1204. package/build/dist/Server/Utils/IncomingCallPhoneNumber.js +9 -3
  1205. package/build/dist/Server/Utils/IncomingCallPhoneNumber.js.map +1 -1
  1206. package/build/dist/Server/Utils/LogRedaction.js +2 -1
  1207. package/build/dist/Server/Utils/LogRedaction.js.map +1 -1
  1208. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +1 -1
  1209. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +219 -4
  1210. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  1211. package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +12 -4
  1212. package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
  1213. package/build/dist/Server/Utils/Monitor/MonitorResourceContext.js +5 -3
  1214. package/build/dist/Server/Utils/Monitor/MonitorResourceContext.js.map +1 -1
  1215. package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js +22 -9
  1216. package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js.map +1 -1
  1217. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +1 -0
  1218. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
  1219. package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +21 -0
  1220. package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
  1221. package/build/dist/Server/Utils/Monitor/SeriesResourceLinker.js +21 -6
  1222. package/build/dist/Server/Utils/Monitor/SeriesResourceLinker.js.map +1 -1
  1223. package/build/dist/Server/Utils/Profiling.js +10 -1
  1224. package/build/dist/Server/Utils/Profiling.js.map +1 -1
  1225. package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js +3 -3
  1226. package/build/dist/Server/Utils/Rules/MonitorRuleCriteriaCache.js +30 -0
  1227. package/build/dist/Server/Utils/Rules/MonitorRuleCriteriaCache.js.map +1 -0
  1228. package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +9 -9
  1229. package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -1
  1230. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js +92 -71
  1231. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +1 -1
  1232. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +428 -143
  1233. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -1
  1234. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.js +376 -0
  1235. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.js.map +1 -0
  1236. package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js +344 -0
  1237. package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js.map +1 -1
  1238. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +5 -0
  1239. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
  1240. package/build/dist/Server/Utils/Telemetry/ResourceHeartbeat.js.map +1 -1
  1241. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +136 -1
  1242. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
  1243. package/build/dist/Server/Utils/Telemetry/VMwareSnapshotScan.js +933 -0
  1244. package/build/dist/Server/Utils/Telemetry/VMwareSnapshotScan.js.map +1 -0
  1245. package/build/dist/Server/Utils/Telemetry.js +1 -1
  1246. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  1247. package/build/dist/Server/Utils/VendorAssets.js +2 -0
  1248. package/build/dist/Server/Utils/VendorAssets.js.map +1 -1
  1249. package/build/dist/Types/AI/CodeFixTaskContext.js +40 -0
  1250. package/build/dist/Types/AI/CodeFixTaskContext.js.map +1 -1
  1251. package/build/dist/Types/AI/CodeFixTaskType.js +57 -0
  1252. package/build/dist/Types/AI/CodeFixTaskType.js.map +1 -1
  1253. package/build/dist/Types/Accounts/AccountsLanguage.js +1 -0
  1254. package/build/dist/Types/Accounts/AccountsLanguage.js.map +1 -1
  1255. package/build/dist/Types/AdminDashboard/AdminDashboardLanguage.js +1 -0
  1256. package/build/dist/Types/AdminDashboard/AdminDashboardLanguage.js.map +1 -1
  1257. package/build/dist/Types/Cloud/CloudPlatform.js +277 -0
  1258. package/build/dist/Types/Cloud/CloudPlatform.js.map +1 -0
  1259. package/build/dist/Types/CodeRepository/GitHubCommand.js +52 -0
  1260. package/build/dist/Types/CodeRepository/GitHubCommand.js.map +1 -0
  1261. package/build/dist/Types/Dashboard/DashboardComponentType.js +2 -0
  1262. package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
  1263. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +1 -0
  1264. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  1265. package/build/dist/Types/Dashboard/DashboardComponents/DashboardVMwareHostListComponent.js +2 -0
  1266. package/build/dist/Types/Dashboard/DashboardComponents/DashboardVMwareHostListComponent.js.map +1 -0
  1267. package/build/dist/Types/Dashboard/DashboardComponents/DashboardVMwareVirtualMachineListComponent.js +2 -0
  1268. package/build/dist/Types/Dashboard/DashboardComponents/DashboardVMwareVirtualMachineListComponent.js.map +1 -0
  1269. package/build/dist/Types/Dashboard/DashboardLanguage.js +1 -0
  1270. package/build/dist/Types/Dashboard/DashboardLanguage.js.map +1 -1
  1271. package/build/dist/Types/Dashboard/DashboardTemplates.js +711 -0
  1272. package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
  1273. package/build/dist/Types/Docs/DocsLanguage.js +1 -0
  1274. package/build/dist/Types/Docs/DocsLanguage.js.map +1 -1
  1275. package/build/dist/Types/Exception/EgressGuardException.js +59 -0
  1276. package/build/dist/Types/Exception/EgressGuardException.js.map +1 -0
  1277. package/build/dist/Types/Icon/IconProp.js +1 -0
  1278. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  1279. package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +1 -0
  1280. package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
  1281. package/build/dist/Types/Monitor/MonitorStep.js +61 -18
  1282. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  1283. package/build/dist/Types/Monitor/MonitorStepMetricViewConfigUtil.js +1 -0
  1284. package/build/dist/Types/Monitor/MonitorStepMetricViewConfigUtil.js.map +1 -1
  1285. package/build/dist/Types/Monitor/MonitorStepVMwareMonitor.js +71 -0
  1286. package/build/dist/Types/Monitor/MonitorStepVMwareMonitor.js.map +1 -0
  1287. package/build/dist/Types/Monitor/MonitorTemplateSyncField.js +211 -0
  1288. package/build/dist/Types/Monitor/MonitorTemplateSyncField.js.map +1 -0
  1289. package/build/dist/Types/Monitor/MonitorType.js +23 -0
  1290. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  1291. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +28 -0
  1292. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js.map +1 -1
  1293. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +1 -0
  1294. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js.map +1 -1
  1295. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +2 -0
  1296. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js.map +1 -1
  1297. package/build/dist/Types/Monitor/SeriesContext/SeriesDebugHints.js +120 -0
  1298. package/build/dist/Types/Monitor/SeriesContext/SeriesDebugHints.js.map +1 -1
  1299. package/build/dist/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +60 -0
  1300. package/build/dist/Types/Monitor/SeriesContext/SeriesLabelDisplay.js.map +1 -1
  1301. package/build/dist/Types/Monitor/VMwareAlertTemplates.js +775 -0
  1302. package/build/dist/Types/Monitor/VMwareAlertTemplates.js.map +1 -0
  1303. package/build/dist/Types/Monitor/VMwareMetricCatalog.js +799 -0
  1304. package/build/dist/Types/Monitor/VMwareMetricCatalog.js.map +1 -0
  1305. package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js +25 -0
  1306. package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js.map +1 -1
  1307. package/build/dist/Types/OnCallDutyPolicy/UserOverrideUtil.js +5 -0
  1308. package/build/dist/Types/OnCallDutyPolicy/UserOverrideUtil.js.map +1 -1
  1309. package/build/dist/Types/Password.js +63 -5
  1310. package/build/dist/Types/Password.js.map +1 -1
  1311. package/build/dist/Types/Permission.js +234 -0
  1312. package/build/dist/Types/Permission.js.map +1 -1
  1313. package/build/dist/Types/Probe/RequestFailedDetails.js +7 -0
  1314. package/build/dist/Types/Probe/RequestFailedDetails.js.map +1 -1
  1315. package/build/dist/Types/Rules/RuleCriteria.js +18 -0
  1316. package/build/dist/Types/Rules/RuleCriteria.js.map +1 -0
  1317. package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js +426 -0
  1318. package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js.map +1 -0
  1319. package/build/dist/Types/Rum/SessionReplay.js +64 -0
  1320. package/build/dist/Types/Rum/SessionReplay.js.map +1 -1
  1321. package/build/dist/Types/Rum/SessionReplayApi.js.map +1 -1
  1322. package/build/dist/Types/SecurityEvent/GoogleSecOpsDiagnostics.js +2 -0
  1323. package/build/dist/Types/SecurityEvent/GoogleSecOpsDiagnostics.js.map +1 -0
  1324. package/build/dist/Types/StatusPage/StatusPageLanguage.js +1 -0
  1325. package/build/dist/Types/StatusPage/StatusPageLanguage.js.map +1 -1
  1326. package/build/dist/Types/Telemetry/EntityType.js +21 -0
  1327. package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
  1328. package/build/dist/Types/Telemetry/ServiceType.js +1 -0
  1329. package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
  1330. package/build/dist/UI/Components/Alerts/Alert.js +63 -41
  1331. package/build/dist/UI/Components/Alerts/Alert.js.map +1 -1
  1332. package/build/dist/UI/Components/Breadcrumbs/Breadcrumbs.js +2 -2
  1333. package/build/dist/UI/Components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  1334. package/build/dist/UI/Components/Button/Button.js +3 -1
  1335. package/build/dist/UI/Components/Button/Button.js.map +1 -1
  1336. package/build/dist/UI/Components/Calendar/Calendar.js +24 -4
  1337. package/build/dist/UI/Components/Calendar/Calendar.js.map +1 -1
  1338. package/build/dist/UI/Components/Dropdown/Dropdown.js +1 -1
  1339. package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
  1340. package/build/dist/UI/Components/Feed/Feed.js +4 -1
  1341. package/build/dist/UI/Components/Feed/Feed.js.map +1 -1
  1342. package/build/dist/UI/Components/Feed/useFeedItems.js +137 -0
  1343. package/build/dist/UI/Components/Feed/useFeedItems.js.map +1 -0
  1344. package/build/dist/UI/Components/Forms/BasicForm.js +66 -22
  1345. package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
  1346. package/build/dist/UI/Components/Forms/Fields/ColorPicker.js +1 -1
  1347. package/build/dist/UI/Components/Forms/Fields/ColorPicker.js.map +1 -1
  1348. package/build/dist/UI/Components/Forms/Fields/FormField.js +10 -3
  1349. package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
  1350. package/build/dist/UI/Components/Forms/ModelForm.js +154 -7
  1351. package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
  1352. package/build/dist/UI/Components/Graphs/DayUptimeGraph.js +5 -6
  1353. package/build/dist/UI/Components/Graphs/DayUptimeGraph.js.map +1 -1
  1354. package/build/dist/UI/Components/Icon/Icon.js +17 -35
  1355. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  1356. package/build/dist/UI/Components/Input/Input.js +37 -8
  1357. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  1358. package/build/dist/UI/Components/LabelRule/ImportLabelRulesModal.js +228 -0
  1359. package/build/dist/UI/Components/LabelRule/ImportLabelRulesModal.js.map +1 -0
  1360. package/build/dist/UI/Components/LabelRule/LabelRuleTable.js +102 -0
  1361. package/build/dist/UI/Components/LabelRule/LabelRuleTable.js.map +1 -0
  1362. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +15 -2
  1363. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  1364. package/build/dist/UI/Components/ModelTable/ModelTable.js +25 -6
  1365. package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
  1366. package/build/dist/UI/Components/MonitorGraphs/Uptime.js +14 -15
  1367. package/build/dist/UI/Components/MonitorGraphs/Uptime.js.map +1 -1
  1368. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +2 -0
  1369. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
  1370. package/build/dist/UI/Components/Navbar/NavBar.js +1 -0
  1371. package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
  1372. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaBuilder.js +383 -0
  1373. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaBuilder.js.map +1 -0
  1374. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaModelForm.js +124 -0
  1375. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaModelForm.js.map +1 -0
  1376. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaModelTable.js +126 -0
  1377. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaModelTable.js.map +1 -0
  1378. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaSummary.js +63 -0
  1379. package/build/dist/UI/Components/RuleCriteria/RuleCriteriaSummary.js.map +1 -0
  1380. package/build/dist/UI/Components/Table/Table.js +1 -1
  1381. package/build/dist/UI/Components/Table/Table.js.map +1 -1
  1382. package/build/dist/UI/Components/Table/TableBody.js +4 -2
  1383. package/build/dist/UI/Components/Table/TableBody.js.map +1 -1
  1384. package/build/dist/UI/Components/Table/TableRow.js +3 -2
  1385. package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
  1386. package/build/dist/UI/Components/Telemetry/TelemetryRetentionConfigForm.js +14 -2
  1387. package/build/dist/UI/Components/Telemetry/TelemetryRetentionConfigForm.js.map +1 -1
  1388. package/build/dist/UI/Components/Tooltip/Tooltip.js +33 -4
  1389. package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
  1390. package/build/dist/UI/Utils/DashboardStackingLayers.js +44 -0
  1391. package/build/dist/UI/Utils/DashboardStackingLayers.js.map +1 -0
  1392. package/build/dist/UI/Utils/LabelRuleImportExport.js +271 -0
  1393. package/build/dist/UI/Utils/LabelRuleImportExport.js.map +1 -0
  1394. package/build/dist/UI/Utils/ModelAPI/ModelAPI.js +4 -4
  1395. package/build/dist/UI/Utils/ModelAPI/ModelAPI.js.map +1 -1
  1396. package/build/dist/UI/Utils/Navigation.js.map +1 -1
  1397. package/build/dist/UI/Utils/TelemetryService.js +3 -2
  1398. package/build/dist/UI/Utils/TelemetryService.js.map +1 -1
  1399. package/build/dist/UI/Utils/UseDashboardGridDnd.js +2 -1
  1400. package/build/dist/UI/Utils/UseDashboardGridDnd.js.map +1 -1
  1401. package/build/dist/UI/Utils/UserEmailRegistrationStatus.js +21 -4
  1402. package/build/dist/UI/Utils/UserEmailRegistrationStatus.js.map +1 -1
  1403. package/build/dist/UI/Utils/WebAuthn.js +121 -0
  1404. package/build/dist/UI/Utils/WebAuthn.js.map +1 -0
  1405. package/build/dist/Utils/API.js +29 -0
  1406. package/build/dist/Utils/API.js.map +1 -1
  1407. package/build/dist/Utils/Dashboard/Components/DashboardVMwareHostListComponent.js +33 -0
  1408. package/build/dist/Utils/Dashboard/Components/DashboardVMwareHostListComponent.js.map +1 -0
  1409. package/build/dist/Utils/Dashboard/Components/DashboardVMwareResourceListShared.js +54 -0
  1410. package/build/dist/Utils/Dashboard/Components/DashboardVMwareResourceListShared.js.map +1 -0
  1411. package/build/dist/Utils/Dashboard/Components/DashboardVMwareVirtualMachineListComponent.js +60 -0
  1412. package/build/dist/Utils/Dashboard/Components/DashboardVMwareVirtualMachineListComponent.js.map +1 -0
  1413. package/build/dist/Utils/Dashboard/Components/Index.js +8 -0
  1414. package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
  1415. package/build/dist/Utils/Faker.js +76 -6
  1416. package/build/dist/Utils/Faker.js.map +1 -1
  1417. package/build/dist/Utils/LabelRuleImportExport.js +510 -0
  1418. package/build/dist/Utils/LabelRuleImportExport.js.map +1 -0
  1419. package/build/dist/Utils/Monitor/MonitorTemplateSyncUtil.js +110 -0
  1420. package/build/dist/Utils/Monitor/MonitorTemplateSyncUtil.js.map +1 -0
  1421. package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js +81 -5
  1422. package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
  1423. package/build/dist/Utils/NetworkDiscovery/DiscoveryScanStatus.js +6 -0
  1424. package/build/dist/Utils/NetworkDiscovery/DiscoveryScanStatus.js.map +1 -1
  1425. package/build/dist/Utils/NetworkSite/CidrMatchUtil.js +77 -0
  1426. package/build/dist/Utils/NetworkSite/CidrMatchUtil.js.map +1 -1
  1427. package/build/dist/Utils/NetworkSite/TypeHierarchyUtil.js +109 -2
  1428. package/build/dist/Utils/NetworkSite/TypeHierarchyUtil.js.map +1 -1
  1429. package/build/dist/Utils/Rules/RuleCriteriaMatcher.js +526 -0
  1430. package/build/dist/Utils/Rules/RuleCriteriaMatcher.js.map +1 -0
  1431. package/build/dist/Utils/Rum/SessionIdentity.js +13 -1
  1432. package/build/dist/Utils/Rum/SessionIdentity.js.map +1 -1
  1433. package/build/dist/Utils/Slo/SloBurnRateRuleState.js +28 -15
  1434. package/build/dist/Utils/Slo/SloBurnRateRuleState.js.map +1 -1
  1435. package/build/dist/Utils/Telemetry/CloudInstanceIdentity.js +88 -0
  1436. package/build/dist/Utils/Telemetry/CloudInstanceIdentity.js.map +1 -0
  1437. package/build/dist/Utils/Telemetry/EntityKey.js +15 -0
  1438. package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
  1439. package/build/dist/Utils/Telemetry/EntityRelationship.js +13 -0
  1440. package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
  1441. package/build/dist/Utils/Telemetry/OriginAllowList.js +61 -0
  1442. package/build/dist/Utils/Telemetry/OriginAllowList.js.map +1 -1
  1443. package/package.json +20 -20
@@ -0,0 +1,1526 @@
1
+ /*
2
+ * ---------------------------------------------------------------------------
3
+ * GitHubConversation — the CONVERSATION half of the interactive GitHub App.
4
+ *
5
+ * Every method here writes into a repository OneUptime does not own, on behalf
6
+ * of whoever typed "@oneuptime <something>" into a thread that anyone with a
7
+ * GitHub account can post to. Four invariants are pinned below, and each one
8
+ * is a real incident if it regresses:
9
+ *
10
+ * 1. AUTHORIZATION FAILS CLOSED. getUserRepositoryPermission is the only
11
+ * question that decides whether a command runs at all — `author_association`
12
+ * on the webhook payload describes past activity, not permission. So every
13
+ * way this call can go wrong (404, 403, 500, a thrown request, an
14
+ * installation token that can no longer be minted) has to answer None.
15
+ * Refusing a command because GitHub was unreachable is a bad minute;
16
+ * running one because GitHub was unreachable is a stranger writing to
17
+ * someone else's repository. `role_name` is preferred over the
18
+ * backwards-compatible `permission` field for the same reason: that field
19
+ * flattens "triage" to "read" and "maintain" to "write", and Triage — which
20
+ * may label and close but may not push — must never be able to command the
21
+ * agent.
22
+ *
23
+ * 2. A REVIEW IS A COMMENT, NEVER AN APPROVAL. An APPROVE submitted by the app
24
+ * satisfies a branch protection rule, which turns an automated reviewer into
25
+ * an automated merger. The review's opinion belongs in its text.
26
+ *
27
+ * 3. NOTHING COSMETIC MAY FAIL A COMMAND, AND NOTHING MAY LOOP. A reaction
28
+ * that does not land returns false instead of throwing, and a comment
29
+ * written by ANY bot is recognised as one so the app never answers itself.
30
+ *
31
+ * 4. A FORK'S BRANCH IS NOT PUSHABLE. isFromFork gates the "revise this" path;
32
+ * a wrong answer either pushes nothing or creates a same-named branch in the
33
+ * BASE repository that the pull request does not point at.
34
+ *
35
+ * The installation-token cache is covered here too. That token is a live write
36
+ * credential for other people's repositories, so both halves matter: one token
37
+ * for a burst of calls, and never one installation's token on another
38
+ * installation's request.
39
+ * ---------------------------------------------------------------------------
40
+ */
41
+
42
+ import GitHubConversation, {
43
+ GitHubIssueComment,
44
+ GitHubPullRequestDetails,
45
+ GitHubReaction,
46
+ GitHubRepositoryPermission,
47
+ } from "../../../../Server/Utils/CodeRepository/GitHub/GitHubConversation";
48
+ import GitHubUtil, {
49
+ GitHubInstallationToken,
50
+ } from "../../../../Server/Utils/CodeRepository/GitHub/GitHub";
51
+ import logger from "../../../../Server/Utils/Logger";
52
+ import HTTPErrorResponse from "../../../../Types/API/HTTPErrorResponse";
53
+ import HTTPResponse from "../../../../Types/API/HTTPResponse";
54
+ import Headers from "../../../../Types/API/Headers";
55
+ import URL from "../../../../Types/API/URL";
56
+ import { JSONArray, JSONObject } from "../../../../Types/JSON";
57
+ import { afterEach, beforeEach, describe, expect, test } from "@jest/globals";
58
+
59
+ const getMock: jest.Mock = jest.fn();
60
+ const postMock: jest.Mock = jest.fn();
61
+ const patchMock: jest.Mock = jest.fn();
62
+
63
+ /*
64
+ * jest hoists this above the imports, so the factory runs before
65
+ * GitHubConversation is loaded. The mocks are only dereferenced inside the
66
+ * arrows — reading them in the factory body itself would hit the TDZ.
67
+ *
68
+ * The path is the one the source resolves to ("../../../../Utils/API" from
69
+ * Common/Server/Utils/CodeRepository/GitHub), reached from this file's own
70
+ * directory.
71
+ */
72
+ jest.mock("../../../../Utils/API", () => {
73
+ return {
74
+ __esModule: true,
75
+ default: {
76
+ get: (...args: Array<unknown>) => {
77
+ return getMock(...args);
78
+ },
79
+ post: (...args: Array<unknown>) => {
80
+ return postMock(...args);
81
+ },
82
+ patch: (...args: Array<unknown>) => {
83
+ return patchMock(...args);
84
+ },
85
+ },
86
+ };
87
+ });
88
+
89
+ const REPO: {
90
+ installationId: string;
91
+ organizationName: string;
92
+ repositoryName: string;
93
+ } = {
94
+ installationId: "installation-1",
95
+ organizationName: "acme",
96
+ repositoryName: "checkout",
97
+ };
98
+
99
+ let tokenSpy: jest.SpyInstance;
100
+ let warnSpy: jest.SpyInstance;
101
+ let debugSpy: jest.SpyInstance;
102
+
103
+ function installationToken(
104
+ token: string,
105
+ expiresInSeconds: number,
106
+ ): GitHubInstallationToken {
107
+ return {
108
+ token: token,
109
+ expiresAt: new Date(Date.now() + expiresInSeconds * 1000),
110
+ };
111
+ }
112
+
113
+ function okJson(data: JSONObject): HTTPResponse<JSONObject> {
114
+ return new HTTPResponse<JSONObject>(200, data, {});
115
+ }
116
+
117
+ function okArray(data: Array<JSONObject>): HTTPResponse<JSONArray> {
118
+ return new HTTPResponse<JSONArray>(200, data, {});
119
+ }
120
+
121
+ function errorResponse(
122
+ statusCode: number,
123
+ data: JSONObject,
124
+ ): HTTPErrorResponse {
125
+ return new HTTPErrorResponse(statusCode, data, {});
126
+ }
127
+
128
+ interface ApiCall {
129
+ url: URL;
130
+ data?: JSONObject | undefined;
131
+ headers: Headers;
132
+ }
133
+
134
+ // The Nth call's options object, 1-indexed so retries read the way they happen.
135
+ function callAt(
136
+ mock: jest.Mock,
137
+ callNumber: number,
138
+ methodName: string,
139
+ ): ApiCall {
140
+ const args: Array<ApiCall> | undefined = mock.mock.calls[callNumber - 1] as
141
+ | Array<ApiCall>
142
+ | undefined;
143
+
144
+ if (!args || !args[0]) {
145
+ throw new Error(`API.${methodName} was not called ${callNumber} time(s)`);
146
+ }
147
+
148
+ return args[0];
149
+ }
150
+
151
+ function postCall(callNumber: number): ApiCall {
152
+ return callAt(postMock, callNumber, "post");
153
+ }
154
+
155
+ function getCall(callNumber: number): ApiCall {
156
+ return callAt(getMock, callNumber, "get");
157
+ }
158
+
159
+ function patchCall(callNumber: number): ApiCall {
160
+ return callAt(patchMock, callNumber, "patch");
161
+ }
162
+
163
+ function postBody(callNumber: number): JSONObject {
164
+ return postCall(callNumber).data || {};
165
+ }
166
+
167
+ function everyPostedBody(): Array<JSONObject> {
168
+ return postMock.mock.calls.map((args: Array<unknown>): JSONObject => {
169
+ return (args[0] as ApiCall).data || {};
170
+ });
171
+ }
172
+
173
+ // GitHub's issue-comment shape, trimmed to the fields the mapper reads.
174
+ function commentJson(overrides: JSONObject): JSONObject {
175
+ return {
176
+ id: 555,
177
+ html_url: "https://github.com/acme/checkout/issues/42#issuecomment-555",
178
+ body: "on it",
179
+ user: { login: "octocat", type: "User" },
180
+ created_at: "2026-09-01T10:00:00Z",
181
+ ...overrides,
182
+ };
183
+ }
184
+
185
+ async function postAComment(body: string): Promise<GitHubIssueComment> {
186
+ return GitHubConversation.createIssueComment({
187
+ ...REPO,
188
+ issueNumber: 42,
189
+ body: body,
190
+ });
191
+ }
192
+
193
+ beforeEach(() => {
194
+ /*
195
+ * The token cache is a module-level Map, so without this the first case to
196
+ * mint a token would silently satisfy every case after it.
197
+ */
198
+ GitHubConversation.clearTokenCache();
199
+
200
+ getMock.mockReset();
201
+ postMock.mockReset();
202
+ patchMock.mockReset();
203
+
204
+ tokenSpy = jest
205
+ .spyOn(GitHubUtil, "getInstallationAccessToken")
206
+ .mockResolvedValue(installationToken("ghs_installation_1", 60 * 60));
207
+
208
+ warnSpy = jest.spyOn(logger, "warn").mockImplementation((): void => {
209
+ return undefined;
210
+ });
211
+
212
+ debugSpy = jest.spyOn(logger, "debug").mockImplementation((): void => {
213
+ return undefined;
214
+ });
215
+ });
216
+
217
+ afterEach(() => {
218
+ // Spies mutate shared module state that leaks between tests in one worker.
219
+ jest.restoreAllMocks();
220
+ });
221
+
222
+ describe("GitHubConversation", () => {
223
+ describe("slugifyAppName — the display name a mention has to match", () => {
224
+ test("lowercases a single-word app name", () => {
225
+ expect(GitHubConversation.slugifyAppName("OneUptime")).toBe("oneuptime");
226
+ });
227
+
228
+ /*
229
+ * The whole reason this exists: GITHUB_APP_NAME holds the DISPLAY name,
230
+ * and GitHub derives "@acme-ai-bot" from it. An app configured as
231
+ * "Acme AI Bot" that looked for "@Acme AI Bot" would never match a
232
+ * mention, and every command would be silently dropped.
233
+ */
234
+ test("turns each run of spaces in a display name into one hyphen", () => {
235
+ expect(GitHubConversation.slugifyAppName("Acme AI Bot")).toBe(
236
+ "acme-ai-bot",
237
+ );
238
+ expect(GitHubConversation.slugifyAppName("Acme AI Bot")).toBe(
239
+ "acme-ai-bot",
240
+ );
241
+ });
242
+
243
+ test("trims surrounding whitespace before slugifying", () => {
244
+ expect(GitHubConversation.slugifyAppName(" OneUptime ")).toBe(
245
+ "oneuptime",
246
+ );
247
+ });
248
+
249
+ test("drops leading and trailing punctuation instead of hyphenating it", () => {
250
+ expect(GitHubConversation.slugifyAppName(" ~OneUptime! ")).toBe(
251
+ "oneuptime",
252
+ );
253
+ expect(GitHubConversation.slugifyAppName("---OneUptime---")).toBe(
254
+ "oneuptime",
255
+ );
256
+ });
257
+
258
+ test("keeps digits, which are legal in a GitHub slug", () => {
259
+ expect(GitHubConversation.slugifyAppName("OneUptime 2")).toBe(
260
+ "oneuptime-2",
261
+ );
262
+ });
263
+
264
+ test("collapses emoji and other non-alphanumerics inside the name", () => {
265
+ expect(GitHubConversation.slugifyAppName("OneUptime 🚀 AI")).toBe(
266
+ "oneuptime-ai",
267
+ );
268
+ expect(GitHubConversation.slugifyAppName("One_Uptime/AI")).toBe(
269
+ "one-uptime-ai",
270
+ );
271
+ });
272
+
273
+ test("answers null for an empty, blank or missing app name", () => {
274
+ expect(GitHubConversation.slugifyAppName("")).toBeNull();
275
+ expect(GitHubConversation.slugifyAppName(" ")).toBeNull();
276
+ expect(GitHubConversation.slugifyAppName("\t\n")).toBeNull();
277
+ expect(GitHubConversation.slugifyAppName(null)).toBeNull();
278
+ });
279
+
280
+ /*
281
+ * A name with nothing sluggable left must answer null, never "". An empty
282
+ * slug would build a bot login of "[bot]", and isBotLogin("[bot]") is true
283
+ * for it — i.e. every bot on the platform would read as THIS app.
284
+ */
285
+ test("answers null when nothing sluggable survives, never an empty slug", () => {
286
+ expect(GitHubConversation.slugifyAppName("!!!")).toBeNull();
287
+ expect(GitHubConversation.slugifyAppName("---")).toBeNull();
288
+ expect(GitHubConversation.slugifyAppName("日本語")).toBeNull();
289
+ expect(GitHubConversation.slugifyAppName("🚀")).toBeNull();
290
+ });
291
+ });
292
+
293
+ describe("toBotLogin", () => {
294
+ test("appends GitHub's [bot] suffix to the slug", () => {
295
+ expect(GitHubConversation.toBotLogin("oneuptime")).toBe("oneuptime[bot]");
296
+ });
297
+
298
+ test("lowercases the slug, because GitHub's bot login is lowercase", () => {
299
+ expect(GitHubConversation.toBotLogin("OneUptime")).toBe("oneuptime[bot]");
300
+ });
301
+
302
+ test("composes with slugifyAppName to go from display name to bot login", () => {
303
+ const slug: string | null =
304
+ GitHubConversation.slugifyAppName("Acme AI Bot");
305
+
306
+ expect(slug).not.toBeNull();
307
+ expect(GitHubConversation.toBotLogin(slug as string)).toBe(
308
+ "acme-ai-bot[bot]",
309
+ );
310
+ });
311
+
312
+ test("round-trips: the login it builds is recognised as a bot login", () => {
313
+ expect(
314
+ GitHubConversation.isBotLogin(
315
+ GitHubConversation.toBotLogin("oneuptime"),
316
+ ),
317
+ ).toBe(true);
318
+ });
319
+ });
320
+
321
+ describe("isBotLogin — the loop guard", () => {
322
+ test("recognises this app's own login", () => {
323
+ expect(GitHubConversation.isBotLogin("oneuptime[bot]")).toBe(true);
324
+ });
325
+
326
+ /*
327
+ * Deliberately broad: two bots mentioning each other is the failure mode
328
+ * that burns a budget overnight, so ANY app's login counts.
329
+ */
330
+ test("recognises any other app's login too, not only this app's", () => {
331
+ expect(GitHubConversation.isBotLogin("dependabot[bot]")).toBe(true);
332
+ expect(GitHubConversation.isBotLogin("renovate[bot]")).toBe(true);
333
+ expect(GitHubConversation.isBotLogin("github-actions[bot]")).toBe(true);
334
+ });
335
+
336
+ test("is case-insensitive about the suffix", () => {
337
+ expect(GitHubConversation.isBotLogin("OneUptime[BOT]")).toBe(true);
338
+ expect(GitHubConversation.isBotLogin("OneUptime[Bot]")).toBe(true);
339
+ });
340
+
341
+ test("does not treat a human login as a bot", () => {
342
+ expect(GitHubConversation.isBotLogin("octocat")).toBe(false);
343
+ expect(GitHubConversation.isBotLogin("bot")).toBe(false);
344
+ expect(GitHubConversation.isBotLogin("not-a-bot")).toBe(false);
345
+ expect(GitHubConversation.isBotLogin("robot")).toBe(false);
346
+ });
347
+
348
+ /*
349
+ * The suffix has to be at the END. A human who put "[bot]" anywhere else
350
+ * in their login would otherwise have every command they type dropped.
351
+ */
352
+ test("only matches the suffix, not [bot] anywhere in the login", () => {
353
+ expect(GitHubConversation.isBotLogin("[bot]octocat")).toBe(false);
354
+ expect(GitHubConversation.isBotLogin("oct[bot]ocat")).toBe(false);
355
+ expect(GitHubConversation.isBotLogin("oneuptime[bot]-real")).toBe(false);
356
+ });
357
+
358
+ test("treats a missing login as human-unknown rather than throwing", () => {
359
+ expect(GitHubConversation.isBotLogin(null)).toBe(false);
360
+ expect(GitHubConversation.isBotLogin(undefined)).toBe(false);
361
+ expect(GitHubConversation.isBotLogin("")).toBe(false);
362
+ });
363
+ });
364
+
365
+ describe("canCommandApp — who may drive the agent", () => {
366
+ test("allows the three permissions that can already push", () => {
367
+ expect(
368
+ GitHubConversation.canCommandApp(GitHubRepositoryPermission.Write),
369
+ ).toBe(true);
370
+ expect(
371
+ GitHubConversation.canCommandApp(GitHubRepositoryPermission.Maintain),
372
+ ).toBe(true);
373
+ expect(
374
+ GitHubConversation.canCommandApp(GitHubRepositoryPermission.Admin),
375
+ ).toBe(true);
376
+ });
377
+
378
+ /*
379
+ * Read is anyone who can see the repository — on a public repository, the
380
+ * whole internet. Triage may label and close but may NOT push, so it must
381
+ * not be able to make the app push either.
382
+ */
383
+ test("refuses Read, Triage and None", () => {
384
+ expect(
385
+ GitHubConversation.canCommandApp(GitHubRepositoryPermission.Read),
386
+ ).toBe(false);
387
+ expect(
388
+ GitHubConversation.canCommandApp(GitHubRepositoryPermission.Triage),
389
+ ).toBe(false);
390
+ expect(
391
+ GitHubConversation.canCommandApp(GitHubRepositoryPermission.None),
392
+ ).toBe(false);
393
+ });
394
+
395
+ // A permission level added later defaults to refused until considered.
396
+ test("allows exactly three of the known permission levels", () => {
397
+ const allowed: Array<GitHubRepositoryPermission> = Object.values(
398
+ GitHubRepositoryPermission,
399
+ ).filter((permission: GitHubRepositoryPermission) => {
400
+ return GitHubConversation.canCommandApp(permission);
401
+ });
402
+
403
+ expect(allowed).toEqual([
404
+ GitHubRepositoryPermission.Write,
405
+ GitHubRepositoryPermission.Maintain,
406
+ GitHubRepositoryPermission.Admin,
407
+ ]);
408
+ });
409
+ });
410
+
411
+ describe("isFromFork — whether the head branch is pushable at all", () => {
412
+ function isFork(headRepositoryFullName: string | null): boolean {
413
+ return GitHubConversation.isFromFork({
414
+ headRepositoryFullName: headRepositoryFullName,
415
+ organizationName: "Acme",
416
+ repositoryName: "Checkout",
417
+ });
418
+ }
419
+
420
+ test("says no for a branch in the same repository", () => {
421
+ expect(isFork("Acme/Checkout")).toBe(false);
422
+ });
423
+
424
+ /*
425
+ * GitHub owner and repository names are case-insensitive, and the webhook
426
+ * payload's casing does not always match the configuration's. Treating a
427
+ * case difference as a fork would refuse every revision on a repository
428
+ * whose name was stored with different capitalisation.
429
+ */
430
+ test("compares owner and repository case-insensitively", () => {
431
+ expect(isFork("acme/checkout")).toBe(false);
432
+ expect(isFork("ACME/CHECKOUT")).toBe(false);
433
+ expect(isFork("aCmE/ChEcKoUt")).toBe(false);
434
+ });
435
+
436
+ test("says yes when the owner differs", () => {
437
+ expect(isFork("contributor/Checkout")).toBe(true);
438
+ expect(isFork("evil-acme/Checkout")).toBe(true);
439
+ });
440
+
441
+ test("says yes when the repository name differs", () => {
442
+ expect(isFork("Acme/Checkout-fork")).toBe(true);
443
+ expect(isFork("Acme/Check")).toBe(true);
444
+ expect(isFork("Acme/checkout2")).toBe(true);
445
+ });
446
+
447
+ /*
448
+ * GitHub reports a null head repository for a fork that has been deleted.
449
+ * That branch is certainly not one this installation can push to, so the
450
+ * answer has to be "fork" — the fail-closed direction.
451
+ */
452
+ test("treats a deleted fork (null head repository) as a fork", () => {
453
+ expect(isFork(null)).toBe(true);
454
+ });
455
+
456
+ test("treats an empty or whitespace-padded head repository as a fork", () => {
457
+ expect(isFork("")).toBe(true);
458
+ expect(isFork(" Acme/Checkout")).toBe(true);
459
+ expect(isFork("Acme/Checkout ")).toBe(true);
460
+ });
461
+ });
462
+
463
+ describe("getUserRepositoryPermission — the authorization question", () => {
464
+ function permissionOf(
465
+ username: string,
466
+ ): Promise<GitHubRepositoryPermission> {
467
+ return GitHubConversation.getUserRepositoryPermission({
468
+ ...REPO,
469
+ username: username,
470
+ });
471
+ }
472
+
473
+ /*
474
+ * The top-level `permission` field collapses "maintain" to "write" and
475
+ * "triage" to "read" for backwards compatibility, so role_name has to win.
476
+ */
477
+ test("prefers role_name so a maintainer is not flattened to write", async () => {
478
+ getMock.mockResolvedValueOnce(
479
+ okJson({ permission: "write", role_name: "maintain" }),
480
+ );
481
+
482
+ await expect(permissionOf("octocat")).resolves.toBe(
483
+ GitHubRepositoryPermission.Maintain,
484
+ );
485
+ });
486
+
487
+ /*
488
+ * The security-relevant half of the same preference. A triage user reads
489
+ * as "read" on the compatibility field; either way they may not command
490
+ * the app, and the answer must name the real role.
491
+ */
492
+ test("prefers role_name so a triage user is reported as Triage, and refused", async () => {
493
+ getMock.mockResolvedValueOnce(
494
+ okJson({ permission: "read", role_name: "triage" }),
495
+ );
496
+
497
+ const permission: GitHubRepositoryPermission =
498
+ await permissionOf("triager");
499
+
500
+ expect(permission).toBe(GitHubRepositoryPermission.Triage);
501
+ expect(GitHubConversation.canCommandApp(permission)).toBe(false);
502
+ });
503
+
504
+ test("reads an admin as Admin", async () => {
505
+ getMock.mockResolvedValueOnce(
506
+ okJson({ permission: "admin", role_name: "admin" }),
507
+ );
508
+
509
+ await expect(permissionOf("owner")).resolves.toBe(
510
+ GitHubRepositoryPermission.Admin,
511
+ );
512
+ });
513
+
514
+ test("falls back to the permission field when GitHub sends no role_name", async () => {
515
+ getMock.mockResolvedValueOnce(okJson({ permission: "write" }));
516
+
517
+ await expect(permissionOf("octocat")).resolves.toBe(
518
+ GitHubRepositoryPermission.Write,
519
+ );
520
+ });
521
+
522
+ test("lowercases whatever casing GitHub used", async () => {
523
+ getMock
524
+ .mockResolvedValueOnce(okJson({ permission: "WRITE" }))
525
+ .mockResolvedValueOnce(
526
+ okJson({ permission: "write", role_name: "Maintain" }),
527
+ );
528
+
529
+ await expect(permissionOf("octocat")).resolves.toBe(
530
+ GitHubRepositoryPermission.Write,
531
+ );
532
+ await expect(permissionOf("octocat")).resolves.toBe(
533
+ GitHubRepositoryPermission.Maintain,
534
+ );
535
+ });
536
+
537
+ /*
538
+ * An organization's custom role name is not one of GitHub's six. Falling
539
+ * back to the coarse field keeps a custom read-only role read-only rather
540
+ * than inventing a level for it.
541
+ */
542
+ test("falls back to the coarse field for an organization's custom role name", async () => {
543
+ getMock.mockResolvedValueOnce(
544
+ okJson({ permission: "read", role_name: "security-auditor" }),
545
+ );
546
+
547
+ const permission: GitHubRepositoryPermission =
548
+ await permissionOf("auditor");
549
+
550
+ expect(permission).toBe(GitHubRepositoryPermission.Read);
551
+ expect(GitHubConversation.canCommandApp(permission)).toBe(false);
552
+ });
553
+
554
+ test("answers None when neither field names a permission it knows", async () => {
555
+ getMock.mockResolvedValueOnce(
556
+ okJson({ permission: "banana", role_name: "banana" }),
557
+ );
558
+
559
+ await expect(permissionOf("octocat")).resolves.toBe(
560
+ GitHubRepositoryPermission.None,
561
+ );
562
+ });
563
+
564
+ test("answers None for a response body with no permission at all", async () => {
565
+ getMock.mockResolvedValueOnce(okJson({}));
566
+
567
+ await expect(permissionOf("octocat")).resolves.toBe(
568
+ GitHubRepositoryPermission.None,
569
+ );
570
+ });
571
+
572
+ /*
573
+ * 404 is GitHub's answer both for "not a collaborator" and for "no such
574
+ * user". Both are ordinary — the overwhelming majority of commands from
575
+ * strangers land here — and logging them as warnings would bury the real
576
+ * failures.
577
+ */
578
+ test("answers None for a 404 WITHOUT logging it as a problem", async () => {
579
+ getMock.mockResolvedValueOnce(
580
+ errorResponse(404, { message: "Not Found" }),
581
+ );
582
+
583
+ await expect(permissionOf("a-stranger")).resolves.toBe(
584
+ GitHubRepositoryPermission.None,
585
+ );
586
+
587
+ expect(warnSpy).not.toHaveBeenCalled();
588
+ });
589
+
590
+ test("answers None for a 403, and does say so in the log", async () => {
591
+ getMock.mockResolvedValueOnce(
592
+ errorResponse(403, { message: "Resource not accessible" }),
593
+ );
594
+
595
+ await expect(permissionOf("octocat")).resolves.toBe(
596
+ GitHubRepositoryPermission.None,
597
+ );
598
+
599
+ expect(warnSpy).toHaveBeenCalledTimes(1);
600
+ });
601
+
602
+ test("answers None for a 500 rather than letting the command through", async () => {
603
+ getMock.mockResolvedValueOnce(
604
+ errorResponse(500, { message: "Server Error" }),
605
+ );
606
+
607
+ await expect(permissionOf("octocat")).resolves.toBe(
608
+ GitHubRepositoryPermission.None,
609
+ );
610
+ });
611
+
612
+ /*
613
+ * The fail-closed property. A rejected request — DNS, TLS, a socket
614
+ * hang-up — must not propagate as an exception the caller might treat as
615
+ * "check skipped", and must never resolve to a usable permission.
616
+ */
617
+ test("answers None when the request throws instead of answering", async () => {
618
+ getMock.mockRejectedValueOnce(new Error("socket hang up"));
619
+
620
+ await expect(permissionOf("octocat")).resolves.toBe(
621
+ GitHubRepositoryPermission.None,
622
+ );
623
+ });
624
+
625
+ test("answers None when the installation token cannot be minted", async () => {
626
+ tokenSpy.mockRejectedValueOnce(new Error("installation not found"));
627
+
628
+ await expect(permissionOf("octocat")).resolves.toBe(
629
+ GitHubRepositoryPermission.None,
630
+ );
631
+
632
+ expect(getMock).not.toHaveBeenCalled();
633
+ });
634
+
635
+ test("asks the collaborator permission endpoint with the installation token", async () => {
636
+ getMock.mockResolvedValueOnce(okJson({ permission: "write" }));
637
+
638
+ await permissionOf("octocat");
639
+
640
+ expect(getCall(1).url.toString()).toBe(
641
+ "https://api.github.com/repos/acme/checkout/collaborators/octocat/permission",
642
+ );
643
+ expect(getCall(1).headers["Authorization"]).toBe(
644
+ "Bearer ghs_installation_1",
645
+ );
646
+ });
647
+
648
+ /*
649
+ * The username comes off a webhook payload, i.e. from whoever typed the
650
+ * comment. Encoding keeps it a single path segment, so it cannot walk out
651
+ * of /collaborators/ into another endpoint whose answer would be read as
652
+ * a permission.
653
+ */
654
+ test("url-encodes the username so it cannot escape the collaborators path", async () => {
655
+ getMock.mockResolvedValueOnce(okJson({ permission: "none" }));
656
+
657
+ await permissionOf("../../../orgs/acme/members");
658
+
659
+ const requestedUrl: string = getCall(1).url.toString();
660
+
661
+ expect(requestedUrl).toContain(
662
+ "/collaborators/..%2F..%2F..%2Forgs%2Facme%2Fmembers/permission",
663
+ );
664
+ expect(requestedUrl).not.toContain("/orgs/acme/members");
665
+ });
666
+
667
+ test("url-encodes a username with spaces or unicode rather than sending it raw", async () => {
668
+ getMock.mockResolvedValueOnce(okJson({ permission: "none" }));
669
+
670
+ await permissionOf("oct cat");
671
+
672
+ expect(getCall(1).url.toString()).toContain(
673
+ "/collaborators/oct%20cat/permission",
674
+ );
675
+ });
676
+ });
677
+
678
+ describe("createPullRequestReview — a comment, never an approval", () => {
679
+ const REVIEW_URL: string =
680
+ "https://api.github.com/repos/acme/checkout/pulls/12/reviews";
681
+
682
+ function reviewCreated(): HTTPResponse<JSONObject> {
683
+ return okJson({
684
+ html_url:
685
+ "https://github.com/acme/checkout/pull/12#pullrequestreview-9001",
686
+ });
687
+ }
688
+
689
+ function postReview(data: {
690
+ body?: string;
691
+ comments?: Array<{ path: string; line: number; body: string }>;
692
+ commitSha?: string | undefined;
693
+ }): Promise<string> {
694
+ return GitHubConversation.createPullRequestReview({
695
+ ...REPO,
696
+ pullRequestNumber: 12,
697
+ body: data.body ?? "Two things stood out.",
698
+ comments: data.comments ?? [],
699
+ commitSha: data.commitSha,
700
+ });
701
+ }
702
+
703
+ test("submits the review as an event of COMMENT", async () => {
704
+ postMock.mockResolvedValueOnce(reviewCreated());
705
+
706
+ await postReview({});
707
+
708
+ expect(postMock).toHaveBeenCalledTimes(1);
709
+ expect(postBody(1)["event"]).toBe("COMMENT");
710
+ });
711
+
712
+ /*
713
+ * An APPROVE from the app satisfies a branch protection rule, which makes
714
+ * the automated reviewer an automated merger. REQUEST_CHANGES is the other
715
+ * side of the same coin: it BLOCKS a merge until the app dismisses it.
716
+ */
717
+ test("never sends APPROVE or REQUEST_CHANGES, whatever the review text says", async () => {
718
+ postMock
719
+ .mockResolvedValueOnce(errorResponse(422, { message: "bad anchor" }))
720
+ .mockResolvedValueOnce(reviewCreated());
721
+
722
+ await postReview({
723
+ body: "LGTM — I approve of this, no changes requested.",
724
+ comments: [{ path: "src/a.ts", line: 3, body: "approve" }],
725
+ });
726
+
727
+ const serialized: string = JSON.stringify(everyPostedBody());
728
+
729
+ expect(serialized).not.toContain("APPROVE");
730
+ expect(serialized).not.toContain("REQUEST_CHANGES");
731
+
732
+ for (const body of everyPostedBody()) {
733
+ expect(body["event"]).toBe("COMMENT");
734
+ }
735
+ });
736
+
737
+ test("posts once, with no comments key, when there are no inline comments", async () => {
738
+ postMock.mockResolvedValueOnce(reviewCreated());
739
+
740
+ await postReview({ body: "Looks reasonable." });
741
+
742
+ expect(postMock).toHaveBeenCalledTimes(1);
743
+ expect(Object.keys(postBody(1))).not.toContain("comments");
744
+ expect(postBody(1)["body"]).toBe("Looks reasonable.");
745
+ });
746
+
747
+ test("anchors inline comments to the RIGHT side of the diff", async () => {
748
+ postMock.mockResolvedValueOnce(reviewCreated());
749
+
750
+ await postReview({
751
+ comments: [
752
+ { path: "src/checkout.ts", line: 42, body: "cart may be undefined" },
753
+ { path: "src/cart.ts", line: 7, body: "unused import" },
754
+ ],
755
+ });
756
+
757
+ expect(postBody(1)["comments"]).toEqual([
758
+ {
759
+ path: "src/checkout.ts",
760
+ line: 42,
761
+ side: "RIGHT",
762
+ body: "cart may be undefined",
763
+ },
764
+ { path: "src/cart.ts", line: 7, side: "RIGHT", body: "unused import" },
765
+ ]);
766
+ });
767
+
768
+ test("pins the review to the reviewed commit when a sha is given", async () => {
769
+ postMock.mockResolvedValueOnce(reviewCreated());
770
+
771
+ await postReview({ commitSha: "abc123" });
772
+
773
+ expect(postBody(1)["commit_id"]).toBe("abc123");
774
+ });
775
+
776
+ test("omits commit_id entirely when no sha is given", async () => {
777
+ postMock.mockResolvedValueOnce(reviewCreated());
778
+
779
+ await postReview({ commitSha: undefined });
780
+
781
+ expect(Object.keys(postBody(1))).not.toContain("commit_id");
782
+ });
783
+
784
+ test("posts to the pull request's reviews endpoint with the installation token", async () => {
785
+ postMock.mockResolvedValueOnce(reviewCreated());
786
+
787
+ await postReview({});
788
+
789
+ expect(postCall(1).url.toString()).toBe(REVIEW_URL);
790
+ expect(postCall(1).headers["Authorization"]).toBe(
791
+ "Bearer ghs_installation_1",
792
+ );
793
+ });
794
+
795
+ test("returns the review's html url", async () => {
796
+ postMock.mockResolvedValueOnce(reviewCreated());
797
+
798
+ await expect(postReview({})).resolves.toBe(
799
+ "https://github.com/acme/checkout/pull/12#pullrequestreview-9001",
800
+ );
801
+ });
802
+
803
+ test("returns an empty string when GitHub answers without an html url", async () => {
804
+ postMock.mockResolvedValueOnce(okJson({ id: 1 }));
805
+
806
+ await expect(postReview({})).resolves.toBe("");
807
+ });
808
+
809
+ test("sends a unicode review body through verbatim", async () => {
810
+ postMock.mockResolvedValueOnce(reviewCreated());
811
+
812
+ const body: string = "レビュー: `cart` は undefined になり得ます 🚨";
813
+
814
+ await postReview({ body: body });
815
+
816
+ expect(postBody(1)["body"]).toBe(body);
817
+ });
818
+
819
+ describe("when GitHub rejects the inline anchors", () => {
820
+ /*
821
+ * 422 is GitHub's answer for an anchor that is not part of the diff — a
822
+ * line the agent misjudged, a file whose patch was elided, a review
823
+ * racing a force-push. Losing the whole review to one bad anchor is far
824
+ * worse than losing the anchors.
825
+ */
826
+ test("retries with the body alone and succeeds", async () => {
827
+ postMock
828
+ .mockResolvedValueOnce(
829
+ errorResponse(422, {
830
+ message: "Validation Failed",
831
+ errors: [{ resource: "PullRequestReviewComment", field: "line" }],
832
+ }),
833
+ )
834
+ .mockResolvedValueOnce(reviewCreated());
835
+
836
+ await expect(
837
+ postReview({
838
+ comments: [{ path: "gone.ts", line: 999, body: "?" }],
839
+ }),
840
+ ).resolves.toBe(
841
+ "https://github.com/acme/checkout/pull/12#pullrequestreview-9001",
842
+ );
843
+
844
+ expect(postMock).toHaveBeenCalledTimes(2);
845
+ expect(Object.keys(postBody(2))).not.toContain("comments");
846
+ });
847
+
848
+ test("keeps the body, the event and the commit on the retry", async () => {
849
+ postMock
850
+ .mockResolvedValueOnce(errorResponse(422, { message: "nope" }))
851
+ .mockResolvedValueOnce(reviewCreated());
852
+
853
+ await postReview({
854
+ body: "The retry must still say this.",
855
+ comments: [{ path: "gone.ts", line: 999, body: "?" }],
856
+ commitSha: "abc123",
857
+ });
858
+
859
+ expect(postBody(2)).toEqual({
860
+ body: "The retry must still say this.",
861
+ event: "COMMENT",
862
+ commit_id: "abc123",
863
+ });
864
+ });
865
+
866
+ /*
867
+ * The dropped anchors are the one thing a reader of the posted review
868
+ * cannot see, so the log has to name the pull request they were dropped
869
+ * from — and say what happened instead, rather than reading as a failure.
870
+ */
871
+ test("logs which pull request lost its anchors, and that the body still went out", async () => {
872
+ postMock
873
+ .mockResolvedValueOnce(errorResponse(422, { message: "nope" }))
874
+ .mockResolvedValueOnce(reviewCreated());
875
+
876
+ await postReview({
877
+ comments: [{ path: "gone.ts", line: 999, body: "?" }],
878
+ });
879
+
880
+ const logged: string = String(debugSpy.mock.calls[0]?.[0] ?? "");
881
+
882
+ expect(logged).toContain("acme/checkout#12");
883
+ expect(logged).toContain("on its own");
884
+ expect(warnSpy).not.toHaveBeenCalled();
885
+ });
886
+
887
+ /*
888
+ * With no comments there is nothing to drop, so a retry would re-post an
889
+ * identical review — either a duplicate on the pull request or a second
890
+ * copy of the same failure in place of the real one.
891
+ */
892
+ test("does NOT retry a 422 when there were no inline comments to drop", async () => {
893
+ const failure: HTTPErrorResponse = errorResponse(422, {
894
+ message: "Validation Failed",
895
+ });
896
+
897
+ postMock.mockResolvedValueOnce(failure);
898
+
899
+ await expect(postReview({})).rejects.toBe(failure);
900
+
901
+ expect(postMock).toHaveBeenCalledTimes(1);
902
+ });
903
+
904
+ test("does NOT retry a failure that is not a 422", async () => {
905
+ const failure: HTTPErrorResponse = errorResponse(403, {
906
+ message: "Resource not accessible by integration",
907
+ });
908
+
909
+ postMock.mockResolvedValueOnce(failure);
910
+
911
+ await expect(
912
+ postReview({
913
+ comments: [{ path: "src/a.ts", line: 1, body: "?" }],
914
+ }),
915
+ ).rejects.toBe(failure);
916
+
917
+ expect(postMock).toHaveBeenCalledTimes(1);
918
+ });
919
+
920
+ test("surfaces the retry's own failure rather than the first one", async () => {
921
+ const retryFailure: HTTPErrorResponse = errorResponse(401, {
922
+ message: "Bad credentials",
923
+ });
924
+
925
+ postMock
926
+ .mockResolvedValueOnce(errorResponse(422, { message: "nope" }))
927
+ .mockResolvedValueOnce(retryFailure);
928
+
929
+ await expect(
930
+ postReview({
931
+ comments: [{ path: "src/a.ts", line: 1, body: "?" }],
932
+ }),
933
+ ).rejects.toBe(retryFailure);
934
+
935
+ expect(postMock).toHaveBeenCalledTimes(2);
936
+ });
937
+
938
+ test("retries at most once, never in a loop", async () => {
939
+ postMock
940
+ .mockResolvedValueOnce(errorResponse(422, { message: "nope" }))
941
+ .mockResolvedValueOnce(errorResponse(422, { message: "nope again" }));
942
+
943
+ await expect(
944
+ postReview({
945
+ comments: [{ path: "src/a.ts", line: 1, body: "?" }],
946
+ }),
947
+ ).rejects.toBeInstanceOf(HTTPErrorResponse);
948
+
949
+ expect(postMock).toHaveBeenCalledTimes(2);
950
+ });
951
+ });
952
+ });
953
+
954
+ describe("the installation token cache", () => {
955
+ beforeEach(() => {
956
+ postMock.mockResolvedValue(okJson(commentJson({})));
957
+ });
958
+
959
+ /*
960
+ * Answering one mention touches GitHub five or six times. Minting a fresh
961
+ * ghs_ token for each is pointless latency and a real slice of the
962
+ * installation's rate limit.
963
+ */
964
+ test("mints ONE token for two conversation calls in a row", async () => {
965
+ await postAComment("first");
966
+ await postAComment("second");
967
+
968
+ expect(tokenSpy).toHaveBeenCalledTimes(1);
969
+ expect(postMock).toHaveBeenCalledTimes(2);
970
+ expect(postCall(1).headers["Authorization"]).toBe(
971
+ "Bearer ghs_installation_1",
972
+ );
973
+ expect(postCall(2).headers["Authorization"]).toBe(
974
+ "Bearer ghs_installation_1",
975
+ );
976
+ });
977
+
978
+ /*
979
+ * The cache is keyed by installation. One shared entry would send one
980
+ * tenant's write credential to another tenant's repository — the single
981
+ * worst thing this file could do.
982
+ */
983
+ test("never reuses one installation's token on another installation's request", async () => {
984
+ tokenSpy
985
+ .mockResolvedValueOnce(installationToken("ghs_tenant_a", 60 * 60))
986
+ .mockResolvedValueOnce(installationToken("ghs_tenant_b", 60 * 60));
987
+
988
+ await GitHubConversation.createIssueComment({
989
+ installationId: "installation-a",
990
+ organizationName: "acme",
991
+ repositoryName: "checkout",
992
+ issueNumber: 1,
993
+ body: "hello",
994
+ });
995
+
996
+ await GitHubConversation.createIssueComment({
997
+ installationId: "installation-b",
998
+ organizationName: "other",
999
+ repositoryName: "shop",
1000
+ issueNumber: 1,
1001
+ body: "hello",
1002
+ });
1003
+
1004
+ expect(tokenSpy).toHaveBeenCalledTimes(2);
1005
+ expect(postCall(1).headers["Authorization"]).toBe("Bearer ghs_tenant_a");
1006
+ expect(postCall(2).headers["Authorization"]).toBe("Bearer ghs_tenant_b");
1007
+ });
1008
+
1009
+ test("re-mints a token GitHub has already expired", async () => {
1010
+ tokenSpy
1011
+ .mockResolvedValueOnce(installationToken("ghs_expired", -5 * 60))
1012
+ .mockResolvedValueOnce(installationToken("ghs_fresh", 60 * 60));
1013
+
1014
+ await postAComment("first");
1015
+ await postAComment("second");
1016
+
1017
+ expect(tokenSpy).toHaveBeenCalledTimes(2);
1018
+ expect(postCall(2).headers["Authorization"]).toBe("Bearer ghs_fresh");
1019
+ });
1020
+
1021
+ /*
1022
+ * The safety margin. A token with 30 seconds left passes a naive
1023
+ * "expiresAt > now" check and then expires between that check and the
1024
+ * request that uses it — a 401 on a command the user watched acknowledge.
1025
+ */
1026
+ test("re-mints a token that expires inside the safety margin", async () => {
1027
+ tokenSpy
1028
+ .mockResolvedValueOnce(installationToken("ghs_nearly_stale", 30))
1029
+ .mockResolvedValueOnce(installationToken("ghs_fresh", 60 * 60));
1030
+
1031
+ await postAComment("first");
1032
+ await postAComment("second");
1033
+
1034
+ expect(tokenSpy).toHaveBeenCalledTimes(2);
1035
+ expect(postCall(2).headers["Authorization"]).toBe("Bearer ghs_fresh");
1036
+ });
1037
+
1038
+ test("keeps a token that is comfortably clear of the margin", async () => {
1039
+ tokenSpy.mockResolvedValueOnce(installationToken("ghs_good", 5 * 60));
1040
+
1041
+ await postAComment("first");
1042
+ await postAComment("second");
1043
+
1044
+ expect(tokenSpy).toHaveBeenCalledTimes(1);
1045
+ expect(postCall(2).headers["Authorization"]).toBe("Bearer ghs_good");
1046
+ });
1047
+
1048
+ test("clearTokenCache forces the next call to mint again", async () => {
1049
+ await postAComment("first");
1050
+
1051
+ GitHubConversation.clearTokenCache();
1052
+
1053
+ await postAComment("second");
1054
+
1055
+ expect(tokenSpy).toHaveBeenCalledTimes(2);
1056
+ });
1057
+
1058
+ /*
1059
+ * Least privilege for the conversation path: it may write conversation
1060
+ * (GitHub routes pull request comments through the issues API) and
1061
+ * reviews, but only READ code. Anything that changes code goes through
1062
+ * GitHub.ts with its own, wider token.
1063
+ */
1064
+ test("asks for issues:write and pull_requests:write but only contents:read", async () => {
1065
+ await postAComment("first");
1066
+
1067
+ expect(tokenSpy).toHaveBeenCalledWith("installation-1", {
1068
+ permissions: {
1069
+ issues: "write",
1070
+ pull_requests: "write",
1071
+ contents: "read",
1072
+ metadata: "read",
1073
+ },
1074
+ });
1075
+ });
1076
+ });
1077
+
1078
+ describe("addReactionToComment / addReactionToIssue", () => {
1079
+ test("reacts on the comment and reports that it landed", async () => {
1080
+ postMock.mockResolvedValueOnce(okJson({ id: 1, content: "eyes" }));
1081
+
1082
+ await expect(
1083
+ GitHubConversation.addReactionToComment({
1084
+ ...REPO,
1085
+ commentId: 99,
1086
+ reaction: GitHubReaction.Eyes,
1087
+ }),
1088
+ ).resolves.toBe(true);
1089
+
1090
+ expect(postCall(1).url.toString()).toBe(
1091
+ "https://api.github.com/repos/acme/checkout/issues/comments/99/reactions",
1092
+ );
1093
+ expect(postBody(1)).toEqual({ content: "eyes" });
1094
+ });
1095
+
1096
+ /*
1097
+ * The issue route and the comment route differ by one path segment, and
1098
+ * reacting on the wrong one puts an emoji on an unrelated object — comment
1099
+ * ids and issue numbers are different id spaces.
1100
+ */
1101
+ test("reacts on the issue itself through the issue route", async () => {
1102
+ postMock.mockResolvedValueOnce(okJson({ id: 1, content: "rocket" }));
1103
+
1104
+ await expect(
1105
+ GitHubConversation.addReactionToIssue({
1106
+ ...REPO,
1107
+ issueNumber: 7,
1108
+ reaction: GitHubReaction.Rocket,
1109
+ }),
1110
+ ).resolves.toBe(true);
1111
+
1112
+ expect(postCall(1).url.toString()).toBe(
1113
+ "https://api.github.com/repos/acme/checkout/issues/7/reactions",
1114
+ );
1115
+ expect(postBody(1)).toEqual({ content: "rocket" });
1116
+ });
1117
+
1118
+ /*
1119
+ * A reaction is the cheapest acknowledgement there is, and it is never
1120
+ * worth failing a command over. Every failure below has to come back as
1121
+ * false — a throw here would abort a run the user had already been told
1122
+ * was starting.
1123
+ */
1124
+ test("returns false, without throwing, when GitHub refuses the reaction", async () => {
1125
+ postMock.mockResolvedValueOnce(
1126
+ errorResponse(403, { message: "Resource not accessible" }),
1127
+ );
1128
+
1129
+ await expect(
1130
+ GitHubConversation.addReactionToComment({
1131
+ ...REPO,
1132
+ commentId: 99,
1133
+ reaction: GitHubReaction.Confused,
1134
+ }),
1135
+ ).resolves.toBe(false);
1136
+ });
1137
+
1138
+ test("returns false when the request itself throws", async () => {
1139
+ postMock.mockRejectedValueOnce(new Error("socket hang up"));
1140
+
1141
+ await expect(
1142
+ GitHubConversation.addReactionToComment({
1143
+ ...REPO,
1144
+ commentId: 99,
1145
+ reaction: GitHubReaction.Eyes,
1146
+ }),
1147
+ ).resolves.toBe(false);
1148
+ });
1149
+
1150
+ test("returns false when the installation token cannot be minted", async () => {
1151
+ tokenSpy.mockRejectedValueOnce(new Error("installation not found"));
1152
+
1153
+ await expect(
1154
+ GitHubConversation.addReactionToIssue({
1155
+ ...REPO,
1156
+ issueNumber: 7,
1157
+ reaction: GitHubReaction.Eyes,
1158
+ }),
1159
+ ).resolves.toBe(false);
1160
+
1161
+ expect(postMock).not.toHaveBeenCalled();
1162
+ });
1163
+
1164
+ test("returns false for a 404 on a comment that has since been deleted", async () => {
1165
+ postMock.mockResolvedValueOnce(
1166
+ errorResponse(404, { message: "Not Found" }),
1167
+ );
1168
+
1169
+ await expect(
1170
+ GitHubConversation.addReactionToComment({
1171
+ ...REPO,
1172
+ commentId: 99,
1173
+ reaction: GitHubReaction.Confused,
1174
+ }),
1175
+ ).resolves.toBe(false);
1176
+ });
1177
+ });
1178
+
1179
+ describe("comment mapping — who wrote it, and is it a bot", () => {
1180
+ test("marks a comment as a bot when GitHub types the author as Bot", async () => {
1181
+ postMock.mockResolvedValueOnce(
1182
+ okJson(
1183
+ commentJson({ user: { login: "some-integration", type: "Bot" } }),
1184
+ ),
1185
+ );
1186
+
1187
+ const comment: GitHubIssueComment = await postAComment("hi");
1188
+
1189
+ expect(comment.isBot).toBe(true);
1190
+ expect(comment.authorLogin).toBe("some-integration");
1191
+ });
1192
+
1193
+ /*
1194
+ * The other half of the OR. Some payloads report a bot author as type
1195
+ * "User" while the login still carries the suffix, and either one alone
1196
+ * would let the app answer itself.
1197
+ */
1198
+ test("marks a comment as a bot when the login ends in [bot], whatever the type says", async () => {
1199
+ postMock.mockResolvedValueOnce(
1200
+ okJson(
1201
+ commentJson({ user: { login: "oneuptime[bot]", type: "User" } }),
1202
+ ),
1203
+ );
1204
+
1205
+ await expect(postAComment("hi")).resolves.toMatchObject({
1206
+ isBot: true,
1207
+ authorLogin: "oneuptime[bot]",
1208
+ });
1209
+ });
1210
+
1211
+ test("marks a bot login with unusual casing as a bot", async () => {
1212
+ postMock.mockResolvedValueOnce(
1213
+ okJson(commentJson({ user: { login: "Renovate[BOT]", type: "User" } })),
1214
+ );
1215
+
1216
+ await expect(postAComment("hi")).resolves.toMatchObject({ isBot: true });
1217
+ });
1218
+
1219
+ test("does not mark an ordinary human author as a bot", async () => {
1220
+ postMock.mockResolvedValueOnce(
1221
+ okJson(commentJson({ user: { login: "octocat", type: "User" } })),
1222
+ );
1223
+
1224
+ await expect(postAComment("hi")).resolves.toMatchObject({
1225
+ isBot: false,
1226
+ authorLogin: "octocat",
1227
+ });
1228
+ });
1229
+
1230
+ /*
1231
+ * The loop guard reads the AUTHOR, not the text. A human quoting the bot's
1232
+ * login must still be answered.
1233
+ */
1234
+ test("does not mark a human who merely mentions a bot login as a bot", async () => {
1235
+ postMock.mockResolvedValueOnce(
1236
+ okJson(
1237
+ commentJson({
1238
+ body: "cc @oneuptime[bot] — can you look?",
1239
+ user: { login: "carol", type: "User" },
1240
+ }),
1241
+ ),
1242
+ );
1243
+
1244
+ await expect(postAComment("hi")).resolves.toMatchObject({
1245
+ isBot: false,
1246
+ authorLogin: "carol",
1247
+ });
1248
+ });
1249
+
1250
+ test("survives a comment with no author object at all", async () => {
1251
+ postMock.mockResolvedValueOnce(okJson(commentJson({ user: null })));
1252
+
1253
+ await expect(postAComment("hi")).resolves.toMatchObject({
1254
+ isBot: false,
1255
+ authorLogin: "",
1256
+ });
1257
+ });
1258
+
1259
+ test("fills in safe defaults for a sparse comment payload", async () => {
1260
+ postMock.mockResolvedValueOnce(okJson({}));
1261
+
1262
+ await expect(postAComment("hi")).resolves.toEqual({
1263
+ commentId: 0,
1264
+ htmlUrl: "",
1265
+ body: "",
1266
+ authorLogin: "",
1267
+ isBot: false,
1268
+ createdAt: "",
1269
+ });
1270
+ });
1271
+
1272
+ test("throws when GitHub refuses the comment, unlike a reaction", async () => {
1273
+ const failure: HTTPErrorResponse = errorResponse(403, {
1274
+ message: "Resource not accessible by integration",
1275
+ });
1276
+
1277
+ postMock.mockResolvedValueOnce(failure);
1278
+
1279
+ await expect(postAComment("hi")).rejects.toBe(failure);
1280
+ });
1281
+ });
1282
+
1283
+ describe("updateIssueComment — one comment per command, edited in place", () => {
1284
+ /*
1285
+ * A long-running run that appended a comment per status change would turn
1286
+ * somebody's thread into a status log (and email every watcher each time).
1287
+ * The acknowledgement is EDITED instead.
1288
+ */
1289
+ test("patches the existing comment instead of posting a new one", async () => {
1290
+ patchMock.mockResolvedValueOnce(okJson(commentJson({ body: "done" })));
1291
+
1292
+ const comment: GitHubIssueComment =
1293
+ await GitHubConversation.updateIssueComment({
1294
+ ...REPO,
1295
+ commentId: 555,
1296
+ body: "done",
1297
+ });
1298
+
1299
+ expect(postMock).not.toHaveBeenCalled();
1300
+ expect(patchMock).toHaveBeenCalledTimes(1);
1301
+ expect(patchCall(1).url.toString()).toBe(
1302
+ "https://api.github.com/repos/acme/checkout/issues/comments/555",
1303
+ );
1304
+ expect(patchCall(1).data).toEqual({ body: "done" });
1305
+ expect(comment.body).toBe("done");
1306
+ });
1307
+
1308
+ test("throws when the edit is refused, so the caller does not report success", async () => {
1309
+ const failure: HTTPErrorResponse = errorResponse(410, {
1310
+ message: "Gone",
1311
+ });
1312
+
1313
+ patchMock.mockResolvedValueOnce(failure);
1314
+
1315
+ await expect(
1316
+ GitHubConversation.updateIssueComment({
1317
+ ...REPO,
1318
+ commentId: 555,
1319
+ body: "done",
1320
+ }),
1321
+ ).rejects.toBe(failure);
1322
+ });
1323
+ });
1324
+
1325
+ describe("listIssueComments — the thread the agent reads", () => {
1326
+ function commentsPage(): Array<JSONObject> {
1327
+ return [
1328
+ commentJson({ id: 1, body: "one", user: { login: "a", type: "User" } }),
1329
+ commentJson({
1330
+ id: 2,
1331
+ body: "two",
1332
+ user: { login: "oneuptime[bot]", type: "Bot" },
1333
+ }),
1334
+ commentJson({
1335
+ id: 3,
1336
+ body: "three",
1337
+ user: { login: "c", type: "User" },
1338
+ }),
1339
+ commentJson({
1340
+ id: 4,
1341
+ body: "four",
1342
+ user: { login: "d", type: "User" },
1343
+ }),
1344
+ ];
1345
+ }
1346
+
1347
+ /*
1348
+ * GitHub is asked for the NEWEST comments, not the first page of the
1349
+ * oldest. On a 200-comment issue the first page is the discussion from six
1350
+ * months ago, while the review feedback that prompted this run is on the
1351
+ * last page — so a reader that took page one would feed the agent
1352
+ * everything except the request it is answering.
1353
+ */
1354
+ test("asks GitHub for the newest comments, not the oldest page", async () => {
1355
+ getMock.mockResolvedValueOnce(okArray([]));
1356
+
1357
+ await GitHubConversation.listIssueComments({
1358
+ ...REPO,
1359
+ issueNumber: 42,
1360
+ maxComments: 5,
1361
+ });
1362
+
1363
+ const requestedUrl: string = getMock.mock.calls[0]![0].url.toString();
1364
+
1365
+ expect(requestedUrl).toContain("direction=desc");
1366
+ expect(requestedUrl).toContain("sort=created");
1367
+ });
1368
+
1369
+ /*
1370
+ * ...and then handed back OLDEST FIRST, so the agent reads the thread the
1371
+ * way a person would. The mock answers in the descending order GitHub
1372
+ * actually returns for that request, so this pins the whole round trip
1373
+ * rather than just the mapper.
1374
+ */
1375
+ test("returns the newest comments, re-ordered oldest first", async () => {
1376
+ getMock.mockResolvedValueOnce(okArray([...commentsPage()].reverse()));
1377
+
1378
+ const comments: Array<GitHubIssueComment> =
1379
+ await GitHubConversation.listIssueComments({
1380
+ ...REPO,
1381
+ issueNumber: 42,
1382
+ maxComments: 2,
1383
+ });
1384
+
1385
+ expect(
1386
+ comments.map((comment: GitHubIssueComment): string => {
1387
+ return comment.body;
1388
+ }),
1389
+ ).toEqual(["three", "four"]);
1390
+ });
1391
+
1392
+ // The app's own comments come back too; the caller decides what to do.
1393
+ test("returns the app's own comments, marked as bot-authored", async () => {
1394
+ getMock.mockResolvedValueOnce(okArray([...commentsPage()].reverse()));
1395
+
1396
+ const comments: Array<GitHubIssueComment> =
1397
+ await GitHubConversation.listIssueComments({
1398
+ ...REPO,
1399
+ issueNumber: 42,
1400
+ maxComments: 10,
1401
+ });
1402
+
1403
+ expect(comments).toHaveLength(4);
1404
+ expect(comments[1]?.isBot).toBe(true);
1405
+ expect(comments[0]?.isBot).toBe(false);
1406
+ });
1407
+
1408
+ /*
1409
+ * per_page is GitHub's hard maximum. Asking for more is refused outright,
1410
+ * which would lose the whole thread rather than truncate it.
1411
+ */
1412
+ test("never asks GitHub for more than 100 comments in a page", async () => {
1413
+ getMock.mockResolvedValueOnce(okArray(commentsPage()));
1414
+
1415
+ await GitHubConversation.listIssueComments({
1416
+ ...REPO,
1417
+ issueNumber: 42,
1418
+ maxComments: 5000,
1419
+ });
1420
+
1421
+ expect(getCall(1).url.toString()).toContain("per_page=100");
1422
+ });
1423
+
1424
+ test("survives a thread with no comments", async () => {
1425
+ getMock.mockResolvedValueOnce(okArray([]));
1426
+
1427
+ await expect(
1428
+ GitHubConversation.listIssueComments({
1429
+ ...REPO,
1430
+ issueNumber: 42,
1431
+ maxComments: 10,
1432
+ }),
1433
+ ).resolves.toEqual([]);
1434
+ });
1435
+ });
1436
+
1437
+ describe("getPullRequestDetails — feeding the fork check", () => {
1438
+ test("carries the head repository's full name through for the fork check", async () => {
1439
+ getMock.mockResolvedValueOnce(
1440
+ okJson({
1441
+ number: 12,
1442
+ head: {
1443
+ ref: "patch-1",
1444
+ sha: "abc123",
1445
+ repo: { full_name: "contributor/checkout" },
1446
+ },
1447
+ base: { ref: "main" },
1448
+ }),
1449
+ );
1450
+
1451
+ const pullRequest: GitHubPullRequestDetails =
1452
+ await GitHubConversation.getPullRequestDetails({
1453
+ ...REPO,
1454
+ pullRequestNumber: 12,
1455
+ });
1456
+
1457
+ expect(pullRequest.headRepositoryFullName).toBe("contributor/checkout");
1458
+ expect(
1459
+ GitHubConversation.isFromFork({
1460
+ headRepositoryFullName: pullRequest.headRepositoryFullName,
1461
+ organizationName: REPO.organizationName,
1462
+ repositoryName: REPO.repositoryName,
1463
+ }),
1464
+ ).toBe(true);
1465
+ });
1466
+
1467
+ /*
1468
+ * GitHub sends `head.repo: null` once the fork is deleted. Reading that
1469
+ * must not throw, and must produce the null that isFromFork treats as
1470
+ * "not pushable".
1471
+ */
1472
+ test("maps a deleted fork's head repository to null instead of throwing", async () => {
1473
+ getMock.mockResolvedValueOnce(
1474
+ okJson({
1475
+ number: 12,
1476
+ head: { ref: "patch-1", sha: "abc123", repo: null },
1477
+ base: { ref: "main" },
1478
+ }),
1479
+ );
1480
+
1481
+ const pullRequest: GitHubPullRequestDetails =
1482
+ await GitHubConversation.getPullRequestDetails({
1483
+ ...REPO,
1484
+ pullRequestNumber: 12,
1485
+ });
1486
+
1487
+ expect(pullRequest.headRepositoryFullName).toBeNull();
1488
+ expect(
1489
+ GitHubConversation.isFromFork({
1490
+ headRepositoryFullName: pullRequest.headRepositoryFullName,
1491
+ organizationName: REPO.organizationName,
1492
+ repositoryName: REPO.repositoryName,
1493
+ }),
1494
+ ).toBe(true);
1495
+ });
1496
+
1497
+ test("reports a same-repository branch as pushable", async () => {
1498
+ getMock.mockResolvedValueOnce(
1499
+ okJson({
1500
+ number: 12,
1501
+ head: {
1502
+ ref: "oneuptime-ai/fix",
1503
+ sha: "abc123",
1504
+ repo: { full_name: "Acme/Checkout" },
1505
+ },
1506
+ base: { ref: "main" },
1507
+ }),
1508
+ );
1509
+
1510
+ const pullRequest: GitHubPullRequestDetails =
1511
+ await GitHubConversation.getPullRequestDetails({
1512
+ ...REPO,
1513
+ pullRequestNumber: 12,
1514
+ });
1515
+
1516
+ expect(
1517
+ GitHubConversation.isFromFork({
1518
+ headRepositoryFullName: pullRequest.headRepositoryFullName,
1519
+ organizationName: REPO.organizationName,
1520
+ repositoryName: REPO.repositoryName,
1521
+ }),
1522
+ ).toBe(false);
1523
+ expect(pullRequest.headRefName).toBe("oneuptime-ai/fix");
1524
+ });
1525
+ });
1526
+ });