@oneuptime/common 14.0.110 → 14.2.0

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 (527) hide show
  1. package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
  2. package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
  3. package/Models/DatabaseModels/AIRunRecording.js +181 -0
  4. package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
  5. package/Models/DatabaseModels/Alert.d.mts +1 -0
  6. package/Models/DatabaseModels/Alert.d.ts +1 -0
  7. package/Models/DatabaseModels/Alert.js +52 -2
  8. package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
  9. package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
  10. package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
  11. package/Models/DatabaseModels/DataStore.js +9 -0
  12. package/Models/DatabaseModels/EmailLog.js +2 -2
  13. package/Models/DatabaseModels/Form.js +3 -3
  14. package/Models/DatabaseModels/FormSubmission.js +4 -4
  15. package/Models/DatabaseModels/GlobalConfig.js +46 -45
  16. package/Models/DatabaseModels/Incident.d.mts +1 -0
  17. package/Models/DatabaseModels/Incident.d.ts +1 -0
  18. package/Models/DatabaseModels/Incident.js +53 -2
  19. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
  20. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
  21. package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
  22. package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
  23. package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  24. package/Models/DatabaseModels/Index.js +6 -0
  25. package/Models/DatabaseModels/InventoryItem.js +11 -0
  26. package/Models/DatabaseModels/Monitor.js +51 -17
  27. package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
  28. package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
  29. package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
  30. package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
  31. package/Models/DatabaseModels/MonitorProbe.js +22 -5
  32. package/Models/DatabaseModels/NetworkDevice.js +23 -7
  33. package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
  34. package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
  35. package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
  36. package/Models/DatabaseModels/NetworkInterface.js +5 -5
  37. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
  38. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
  39. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
  40. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
  41. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
  42. package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
  43. package/Models/DatabaseModels/Project.d.mts +1 -0
  44. package/Models/DatabaseModels/Project.d.ts +1 -0
  45. package/Models/DatabaseModels/Project.js +46 -3
  46. package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
  47. package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
  48. package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
  49. package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
  50. package/Models/DatabaseModels/RunbookExecution.js +2 -2
  51. package/Models/DatabaseModels/RunbookRule.js +6 -6
  52. package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
  53. package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
  54. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
  55. package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
  56. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
  57. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
  58. package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
  59. package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
  60. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
  61. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
  62. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
  63. package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
  64. package/Models/DatabaseModels/TeamMember.js +10 -1
  65. package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
  66. package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
  67. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  68. package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
  69. package/Server/Services/DatabaseService.d.mts +4 -1
  70. package/Server/Services/DatabaseService.d.ts +4 -1
  71. package/Server/Types/Database/CountBy.d.mts +1 -0
  72. package/Server/Types/Database/CountBy.d.ts +1 -0
  73. package/Server/Types/Database/UpdateLimit.d.mts +6 -0
  74. package/Server/Types/Database/UpdateLimit.d.ts +6 -0
  75. package/Types/AI/AIActionWords.d.mts +28 -2
  76. package/Types/AI/AIActionWords.d.ts +28 -2
  77. package/Types/AI/AIActionWords.js +235 -3
  78. package/Types/AI/AIActionWords.mjs +8 -0
  79. package/Types/AI/AIChatTypes.d.mts +3 -1
  80. package/Types/AI/AIChatTypes.d.ts +3 -1
  81. package/Types/AI/AIReadTableWords.d.mts +192 -0
  82. package/Types/AI/AIReadTableWords.d.ts +192 -0
  83. package/Types/AI/AIReadTableWords.js +368 -0
  84. package/Types/AI/AIReadTableWords.mjs +18 -0
  85. package/Types/AI/AiOutcomes.d.mts +57 -0
  86. package/Types/AI/AiOutcomes.d.ts +57 -0
  87. package/Types/AI/AiOutcomes.js +67 -0
  88. package/Types/AI/AiOutcomes.mjs +10 -0
  89. package/Types/AI/AiRunRefusal.d.mts +48 -0
  90. package/Types/AI/AiRunRefusal.d.ts +48 -0
  91. package/Types/AI/AiRunRefusal.js +208 -0
  92. package/Types/AI/AiRunRefusal.mjs +12 -0
  93. package/Types/AI/InvestigationRecording.d.mts +46 -0
  94. package/Types/AI/InvestigationRecording.d.ts +46 -0
  95. package/Types/AI/InvestigationRecording.js +42 -0
  96. package/Types/AI/InvestigationRecording.mjs +7 -0
  97. package/Types/AI/ResourceAiAccessPermissions.js +7 -18
  98. package/Types/API/HTTPResponse.d.mts +3 -0
  99. package/Types/API/HTTPResponse.d.ts +3 -0
  100. package/Types/API/HTTPResponse.js +15 -0
  101. package/Types/AuditLog/AuditLogActionLabel.js +19 -9
  102. package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
  103. package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
  104. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
  105. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
  106. package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -2
  107. package/Types/BaseDatabase/ListResult.d.mts +1 -0
  108. package/Types/BaseDatabase/ListResult.d.ts +1 -0
  109. package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
  110. package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
  111. package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
  112. package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
  113. package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
  114. package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
  115. package/Types/Cloud/CloudResourceHealth.js +405 -13
  116. package/Types/Cloud/CloudResourceHealth.mjs +28 -0
  117. package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
  118. package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
  119. package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
  120. package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
  121. package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
  122. package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
  123. package/Types/DataObservability/DataCheckRefusals.js +77 -0
  124. package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
  125. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
  126. package/Types/Date.d.mts +8 -1
  127. package/Types/Date.d.ts +8 -1
  128. package/Types/Date.js +61 -7
  129. package/Types/Date.mjs +1 -0
  130. package/Types/DateLanguage.d.mts +2 -0
  131. package/Types/DateLanguage.d.ts +2 -0
  132. package/Types/DateLanguage.js +8 -5
  133. package/Types/Email/EmailTemplateType.d.mts +1 -0
  134. package/Types/Email/EmailTemplateType.d.ts +1 -0
  135. package/Types/Email/EmailTemplateType.js +2 -0
  136. package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
  137. package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
  138. package/Types/Email/ServerEmailEnvironment.js +793 -0
  139. package/Types/Email/ServerEmailEnvironment.mjs +14 -0
  140. package/Types/Exception/AiRunRefusalException.d.mts +6 -0
  141. package/Types/Exception/AiRunRefusalException.d.ts +6 -0
  142. package/Types/Exception/AiRunRefusalException.js +23 -0
  143. package/Types/Exception/AiRunRefusalException.mjs +2 -0
  144. package/Types/Exception/EgressGuardException.js +1 -1
  145. package/Types/Exception/ErrorMessageRule.d.mts +1 -0
  146. package/Types/Exception/ErrorMessageRule.d.ts +1 -0
  147. package/Types/Exception/ErrorMessageRule.js +67 -13
  148. package/Types/Exception/ErrorMessageRule.mjs +1 -0
  149. package/Types/Exception/ExceptionMessages.d.mts +2 -0
  150. package/Types/Exception/ExceptionMessages.d.ts +2 -0
  151. package/Types/Exception/ExceptionMessages.js +2 -0
  152. package/Types/Form/FormTargetCatalog.js +2 -2
  153. package/Types/Form/FormTargetType.js +2 -2
  154. package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
  155. package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
  156. package/Types/Incident/PostmortemActionItemStatus.js +74 -0
  157. package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
  158. package/Types/JSONFunctions.js +10 -3
  159. package/Types/Link.d.mts +1 -0
  160. package/Types/Link.d.ts +1 -0
  161. package/Types/ListData.d.mts +2 -0
  162. package/Types/ListData.d.ts +2 -0
  163. package/Types/ListData.js +4 -0
  164. package/Types/MeaningKeys.d.mts +4 -0
  165. package/Types/MeaningKeys.d.ts +4 -0
  166. package/Types/MeaningKeys.js +74 -0
  167. package/Types/MeaningKeys.mjs +5 -0
  168. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  169. package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
  170. package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
  171. package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
  172. package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
  173. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
  174. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
  175. package/Types/Monitor/UptimeHistoryLabels.js +2 -2
  176. package/Types/Monitor/WhoIsTold.d.mts +3 -0
  177. package/Types/Monitor/WhoIsTold.d.ts +3 -0
  178. package/Types/Monitor/WhoIsTold.js +63 -13
  179. package/Types/NoBreakSpaces.d.mts +16 -0
  180. package/Types/NoBreakSpaces.d.ts +16 -0
  181. package/Types/NoBreakSpaces.js +419 -0
  182. package/Types/NoBreakSpaces.mjs +9 -0
  183. package/Types/NotificationRule/PagingLadder.d.mts +12 -0
  184. package/Types/NotificationRule/PagingLadder.d.ts +12 -0
  185. package/Types/NotificationRule/PagingLadder.js +159 -11
  186. package/Types/NotificationRule/PagingLadder.mjs +3 -0
  187. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
  188. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
  189. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
  190. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
  191. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
  192. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
  193. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
  194. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
  195. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
  196. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
  197. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
  198. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
  199. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
  200. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
  201. package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
  202. package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
  203. package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
  204. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
  205. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
  206. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
  207. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
  208. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
  209. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
  210. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
  211. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
  212. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
  213. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
  214. package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
  215. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  216. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
  217. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
  218. package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
  219. package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
  220. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
  221. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
  222. package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
  223. package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
  224. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
  225. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
  226. package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
  227. package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
  228. package/Types/OpenStack/OpenStackCapacity.js +12 -5
  229. package/Types/Permission.d.mts +4 -0
  230. package/Types/Permission.d.ts +4 -0
  231. package/Types/Permission.js +66 -10
  232. package/Types/Probe/ProbeCapability.d.mts +2 -1
  233. package/Types/Probe/ProbeCapability.d.ts +2 -1
  234. package/Types/Probe/ProbeCapability.js +10 -0
  235. package/Types/Product/ProductUsage.js +2 -1
  236. package/Types/Product/ProjectProductsAnswer.js +2 -1
  237. package/Types/ReaderLanguage.d.mts +1 -0
  238. package/Types/ReaderLanguage.d.ts +1 -0
  239. package/Types/ReaderLanguage.js +13 -1
  240. package/Types/ReaderLanguage.mjs +1 -0
  241. package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
  242. package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
  243. package/Types/ResourceAiAgent/AiResourceType.js +12 -0
  244. package/Types/Rules/RuleRun.js +2 -2
  245. package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
  246. package/Types/Rum/ProductAnalyticsEvents.js +13 -1
  247. package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
  248. package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
  249. package/Types/Rum/SessionReplayCustomEvents.js +12 -0
  250. package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
  251. package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
  252. package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
  253. package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
  254. package/Types/ServerSending/ServerSendingStatus.js +49 -2
  255. package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
  256. package/Types/SetupHealth/SetupHealth.d.mts +1 -0
  257. package/Types/SetupHealth/SetupHealth.d.ts +1 -0
  258. package/Types/SetupHealth/SetupHealth.js +13 -5
  259. package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
  260. package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
  261. package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
  262. package/Types/StatusPage/DefaultStatusNames.js +74 -28
  263. package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
  264. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
  265. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
  266. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
  267. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
  268. package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
  269. package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
  270. package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
  271. package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
  272. package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
  273. package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
  274. package/Types/Telemetry/CompatibleIngest.js +123 -0
  275. package/Types/Telemetry/CompatibleIngest.mjs +21 -0
  276. package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
  277. package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
  278. package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
  279. package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
  280. package/Types/TimezoneAlias.d.mts +1 -0
  281. package/Types/TimezoneAlias.d.ts +1 -0
  282. package/Types/TimezoneAlias.js +13 -0
  283. package/Types/Translator.d.mts +1 -0
  284. package/Types/Translator.d.ts +1 -0
  285. package/Types/Translator.js +470 -63
  286. package/Types/Translator.mjs +1 -0
  287. package/Types/UserSession/SessionLength.d.mts +33 -0
  288. package/Types/UserSession/SessionLength.d.ts +33 -0
  289. package/Types/UserSession/SessionLength.js +134 -5
  290. package/Types/UserSession/SessionLength.mjs +5 -0
  291. package/Types/Workflow/RunRecord.js +1 -1
  292. package/Types/Workflow/Templates.js +2 -2
  293. package/Types/Workflow/WorkflowStatus.js +21 -10
  294. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
  295. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
  296. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
  297. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
  298. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
  299. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
  300. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
  301. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
  302. package/Utils/AI/InvestigationReport.js +2 -2
  303. package/Utils/API.d.mts +0 -11
  304. package/Utils/API.d.ts +0 -11
  305. package/Utils/API.js +0 -432
  306. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
  307. package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
  308. package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
  309. package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
  310. package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
  311. package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
  312. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
  313. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
  314. package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
  315. package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
  316. package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
  317. package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
  318. package/Utils/DefaultRecordNames.d.mts +6 -0
  319. package/Utils/DefaultRecordNames.d.ts +6 -0
  320. package/Utils/DefaultRecordNames.js +122 -0
  321. package/Utils/DefaultRecordNames.mjs +6 -0
  322. package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
  323. package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
  324. package/Utils/Grok/Grok.js +7 -4
  325. package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
  326. package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
  327. package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
  328. package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
  329. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
  330. package/Utils/HostAddressUtil.d.mts +1 -0
  331. package/Utils/HostAddressUtil.d.ts +1 -0
  332. package/Utils/HostAddressUtil.js +30 -0
  333. package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
  334. package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
  335. package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
  336. package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
  337. package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
  338. package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
  339. package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
  340. package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
  341. package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
  342. package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
  343. package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
  344. package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
  345. package/Utils/LinearRegExp/LinearRegExp.js +5 -1
  346. package/Utils/LookupTable.d.mts +3 -0
  347. package/Utils/LookupTable.d.ts +3 -0
  348. package/Utils/LookupTable.js +61 -0
  349. package/Utils/LookupTable.mjs +3 -0
  350. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
  351. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
  352. package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
  353. package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
  354. package/Utils/Markdown/OverLongText.js +296 -2
  355. package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
  356. package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
  357. package/Utils/Markdown/SlowMarkdown.js +354 -4
  358. package/Utils/Markdown/SlowMarkdown.mjs +1 -0
  359. package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
  360. package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
  361. package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
  362. package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
  363. package/Utils/Metrics/MetricSeriesScope.js +5 -1
  364. package/Utils/Milliseconds.d.mts +7 -0
  365. package/Utils/Milliseconds.d.ts +7 -0
  366. package/Utils/Milliseconds.js +60 -0
  367. package/Utils/Milliseconds.mjs +4 -0
  368. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
  369. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
  370. package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
  371. package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
  372. package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
  373. package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
  374. package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
  375. package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
  376. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
  377. package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
  378. package/Utils/Monitor/MonitorRootCauseWording.d.mts +5 -0
  379. package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
  380. package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
  381. package/Utils/Monitor/MonitoringOff.d.mts +2 -0
  382. package/Utils/Monitor/MonitoringOff.d.ts +2 -0
  383. package/Utils/Monitor/MonitoringOff.js +21 -0
  384. package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
  385. package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
  386. package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
  387. package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
  388. package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
  389. package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
  390. package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
  391. package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
  392. package/Utils/Monitor/ProbeAgreementRule.js +58 -0
  393. package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
  394. package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
  395. package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
  396. package/Utils/Monitor/ProbeFailureReading.js +166 -0
  397. package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
  398. package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
  399. package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
  400. package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
  401. package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
  402. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
  403. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
  404. package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
  405. package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
  406. package/Utils/Project/NextNumber.js +1 -1
  407. package/Utils/PromQL/PromQLAst.d.mts +159 -0
  408. package/Utils/PromQL/PromQLAst.d.ts +159 -0
  409. package/Utils/PromQL/PromQLAst.js +118 -0
  410. package/Utils/PromQL/PromQLAst.mjs +12 -0
  411. package/Utils/PromQL/PromQLDuration.d.mts +2 -0
  412. package/Utils/PromQL/PromQLDuration.d.ts +2 -0
  413. package/Utils/PromQL/PromQLDuration.js +78 -0
  414. package/Utils/PromQL/PromQLDuration.mjs +3 -0
  415. package/Utils/PromQL/PromQLEngine.d.mts +15 -0
  416. package/Utils/PromQL/PromQLEngine.d.ts +15 -0
  417. package/Utils/PromQL/PromQLEngine.js +974 -0
  418. package/Utils/PromQL/PromQLEngine.mjs +7 -0
  419. package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
  420. package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
  421. package/Utils/PromQL/PromQLEngineTypes.js +10 -0
  422. package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
  423. package/Utils/PromQL/PromQLError.d.mts +11 -0
  424. package/Utils/PromQL/PromQLError.d.ts +11 -0
  425. package/Utils/PromQL/PromQLError.js +27 -0
  426. package/Utils/PromQL/PromQLError.mjs +3 -0
  427. package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
  428. package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
  429. package/Utils/PromQL/PromQLFunctionEvaluators.js +829 -0
  430. package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
  431. package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
  432. package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
  433. package/Utils/PromQL/PromQLFunctions.js +127 -0
  434. package/Utils/PromQL/PromQLFunctions.mjs +4 -0
  435. package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
  436. package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
  437. package/Utils/PromQL/PromQLLabelOrder.js +212 -0
  438. package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
  439. package/Utils/PromQL/PromQLLabels.d.mts +11 -0
  440. package/Utils/PromQL/PromQLLabels.d.ts +11 -0
  441. package/Utils/PromQL/PromQLLabels.js +219 -0
  442. package/Utils/PromQL/PromQLLabels.mjs +9 -0
  443. package/Utils/PromQL/PromQLLexer.d.mts +39 -0
  444. package/Utils/PromQL/PromQLLexer.d.ts +39 -0
  445. package/Utils/PromQL/PromQLLexer.js +391 -0
  446. package/Utils/PromQL/PromQLLexer.mjs +3 -0
  447. package/Utils/PromQL/PromQLMath.d.mts +19 -0
  448. package/Utils/PromQL/PromQLMath.d.ts +19 -0
  449. package/Utils/PromQL/PromQLMath.js +200 -0
  450. package/Utils/PromQL/PromQLMath.mjs +9 -0
  451. package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
  452. package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
  453. package/Utils/PromQL/PromQLMetricNames.js +205 -0
  454. package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
  455. package/Utils/PromQL/PromQLParser.d.mts +4 -0
  456. package/Utils/PromQL/PromQLParser.d.ts +4 -0
  457. package/Utils/PromQL/PromQLParser.js +836 -0
  458. package/Utils/PromQL/PromQLParser.mjs +4 -0
  459. package/Utils/PromQL/PromQLRegex.d.mts +20 -0
  460. package/Utils/PromQL/PromQLRegex.d.ts +20 -0
  461. package/Utils/PromQL/PromQLRegex.js +1014 -0
  462. package/Utils/PromQL/PromQLRegex.mjs +5 -0
  463. package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
  464. package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
  465. package/Utils/PromQL/PrometheusResponse.js +92 -0
  466. package/Utils/PromQL/PrometheusResponse.mjs +3 -0
  467. package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
  468. package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
  469. package/Utils/PromQL/RE2CharacterClass.js +532 -0
  470. package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
  471. package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
  472. package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
  473. package/Utils/RequestFailedDetailsUtil.js +452 -0
  474. package/Utils/RequestFailedDetailsUtil.mjs +2 -0
  475. package/Utils/Rum/PathInSentence.d.mts +5 -0
  476. package/Utils/Rum/PathInSentence.d.ts +5 -0
  477. package/Utils/Rum/PathInSentence.js +46 -0
  478. package/Utils/Rum/PathInSentence.mjs +6 -0
  479. package/Utils/Rum/UrlScrubber.d.mts +5 -1
  480. package/Utils/Rum/UrlScrubber.d.ts +5 -1
  481. package/Utils/Rum/UrlScrubber.js +153 -7
  482. package/Utils/Rum/UserFlow.d.mts +1 -1
  483. package/Utils/Rum/UserFlow.d.ts +1 -1
  484. package/Utils/Rum/UserFlow.js +202 -29
  485. package/Utils/Rum/UserFlow.mjs +1 -1
  486. package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
  487. package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
  488. package/Utils/Runbook/RunbookStepsSignature.js +30 -0
  489. package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
  490. package/Utils/Schema/TypeSchemas.js +6 -0
  491. package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
  492. package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
  493. package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
  494. package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
  495. package/Utils/Slo/SloDuration.d.mts +5 -2
  496. package/Utils/Slo/SloDuration.d.ts +5 -2
  497. package/Utils/Slo/SloDuration.js +11 -6
  498. package/Utils/Slo/SloHealth.js +1 -1
  499. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  500. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  501. package/Utils/Sms/OnCallPageSms.js +3 -1
  502. package/Utils/StateListType.d.mts +11 -0
  503. package/Utils/StateListType.d.ts +11 -0
  504. package/Utils/StateListType.js +21 -0
  505. package/Utils/StateListType.mjs +2 -0
  506. package/Utils/StateOrder.d.mts +8 -11
  507. package/Utils/StateOrder.d.ts +8 -11
  508. package/Utils/StateOrder.js +50 -88
  509. package/Utils/StateOrder.mjs +2 -0
  510. package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
  511. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
  512. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
  513. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
  514. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
  515. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
  516. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
  517. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
  518. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
  519. package/Utils/Syslog/SyslogMessageParser.js +16 -6
  520. package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
  521. package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
  522. package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
  523. package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
  524. package/Utils/ValueFormatter.d.mts +1 -0
  525. package/Utils/ValueFormatter.d.ts +1 -0
  526. package/Utils/ValueFormatter.js +258 -18
  527. package/package.json +1 -1
@@ -0,0 +1,57 @@
1
+ export declare const AI_OUTCOMES_PATH: string;
2
+ export declare const AI_OUTCOMES_WEEK_COUNT: number;
3
+ export declare const AI_OUTCOMES_SCAN_LIMIT: number;
4
+ export interface AiOutcomesPages {
5
+ resolvedByAi: number;
6
+ recoveredOnItsOwn: number;
7
+ handledByPerson: number;
8
+ handedOff: number;
9
+ holdTimeRanOut: number;
10
+ pageNowPressed: number;
11
+ holding: number;
12
+ }
13
+ export interface AiOutcomesRemediationFixes {
14
+ verified: number;
15
+ failed: number;
16
+ pending: number;
17
+ skipped: number;
18
+ }
19
+ export interface AiOutcomesPullRequestFixes {
20
+ verified: number;
21
+ regressed: number;
22
+ watching: number;
23
+ awaitingDeploy: number;
24
+ unverifiable: number;
25
+ }
26
+ export interface AiOutcomesRootCauses {
27
+ confirmed: number;
28
+ partial: number;
29
+ wrong: number;
30
+ judgedByPeople: number;
31
+ completed: number;
32
+ }
33
+ export interface AiOutcomesWeek {
34
+ weekStart: string;
35
+ pagesAvoided: number;
36
+ pagesHeld: number;
37
+ fixesVerified: number;
38
+ fixesChecked: number;
39
+ rootCausesConfirmed: number;
40
+ rootCausesJudged: number;
41
+ }
42
+ export interface AiOutcomes {
43
+ windowStart: string;
44
+ windowEnd: string;
45
+ pages: AiOutcomesPages | null;
46
+ remediationFixes: AiOutcomesRemediationFixes | null;
47
+ pullRequestFixes: AiOutcomesPullRequestFixes | null;
48
+ rootCauses: AiOutcomesRootCauses | null;
49
+ weeks: Array<AiOutcomesWeek>;
50
+ isPartial: boolean;
51
+ }
52
+ export declare function getHeldPageCount(pages: AiOutcomesPages): number;
53
+ export declare function getVerifiedFixCount(outcomes: AiOutcomes): number;
54
+ export declare function getCheckedFixCount(outcomes: AiOutcomes): number;
55
+ export declare function getFixesBeingCheckedCount(outcomes: AiOutcomes): number;
56
+ export declare function getUncheckableFixCount(outcomes: AiOutcomes): number;
57
+ export declare function getJudgedRootCauseCount(rootCauses: AiOutcomesRootCauses): number;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /*
3
+ * AI RESULTS (issue #6800): what OneUptime AI's work came to for a project,
4
+ * in outcomes rather than activity - the pages it kept from waking people,
5
+ * the fixes it verified, and the root causes people confirmed - week by
6
+ * week, so a team can see whether it is getting better.
7
+ *
8
+ * Read on the server (Server/Utils/AI/Outcomes/AiOutcomesReader) behind the
9
+ * caller's own read access: a part the caller may not read is null and the
10
+ * page leaves it out. Every number comes with what it is out of, so a page
11
+ * never says "12 pages avoided" without "of 40 held".
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.AI_OUTCOMES_SCAN_LIMIT = exports.AI_OUTCOMES_WEEK_COUNT = exports.AI_OUTCOMES_PATH = void 0;
15
+ exports.getHeldPageCount = getHeldPageCount;
16
+ exports.getVerifiedFixCount = getVerifiedFixCount;
17
+ exports.getCheckedFixCount = getCheckedFixCount;
18
+ exports.getFixesBeingCheckedCount = getFixesBeingCheckedCount;
19
+ exports.getUncheckableFixCount = getUncheckableFixCount;
20
+ exports.getJudgedRootCauseCount = getJudgedRootCauseCount;
21
+ // The page's call: POST, {}.
22
+ exports.AI_OUTCOMES_PATH = "/ai-activity/outcomes";
23
+ // The weeks the page shows, newest last.
24
+ exports.AI_OUTCOMES_WEEK_COUNT = 12;
25
+ /*
26
+ * The most rows of each kind the page counts. Reaching it marks the
27
+ * outcomes partial, and the page says its numbers count the newest ones.
28
+ */
29
+ exports.AI_OUTCOMES_SCAN_LIMIT = 5000;
30
+ // Held pages that finished: every outcome but still holding.
31
+ function getHeldPageCount(pages) {
32
+ return (pages.resolvedByAi +
33
+ pages.recoveredOnItsOwn +
34
+ pages.handledByPerson +
35
+ pages.handedOff +
36
+ pages.holdTimeRanOut +
37
+ pages.pageNowPressed);
38
+ }
39
+ function getVerifiedFixCount(outcomes) {
40
+ var _a, _b;
41
+ return ((((_a = outcomes.remediationFixes) === null || _a === void 0 ? void 0 : _a.verified) || 0) +
42
+ (((_b = outcomes.pullRequestFixes) === null || _b === void 0 ? void 0 : _b.verified) || 0));
43
+ }
44
+ // Fixes whose check finished: verified, failed or regressed.
45
+ function getCheckedFixCount(outcomes) {
46
+ var _a, _b;
47
+ return (getVerifiedFixCount(outcomes) +
48
+ (((_a = outcomes.remediationFixes) === null || _a === void 0 ? void 0 : _a.failed) || 0) +
49
+ (((_b = outcomes.pullRequestFixes) === null || _b === void 0 ? void 0 : _b.regressed) || 0));
50
+ }
51
+ // Fixes still being checked: started, or shipped and watched.
52
+ function getFixesBeingCheckedCount(outcomes) {
53
+ var _a, _b, _c;
54
+ return ((((_a = outcomes.remediationFixes) === null || _a === void 0 ? void 0 : _a.pending) || 0) +
55
+ (((_b = outcomes.pullRequestFixes) === null || _b === void 0 ? void 0 : _b.watching) || 0) +
56
+ (((_c = outcomes.pullRequestFixes) === null || _c === void 0 ? void 0 : _c.awaitingDeploy) || 0));
57
+ }
58
+ // Fixes nothing could check.
59
+ function getUncheckableFixCount(outcomes) {
60
+ var _a, _b;
61
+ return ((((_a = outcomes.remediationFixes) === null || _a === void 0 ? void 0 : _a.skipped) || 0) +
62
+ (((_b = outcomes.pullRequestFixes) === null || _b === void 0 ? void 0 : _b.unverifiable) || 0));
63
+ }
64
+ // Investigations judged one way or another.
65
+ function getJudgedRootCauseCount(rootCauses) {
66
+ return rootCauses.confirmed + rootCauses.partial + rootCauses.wrong;
67
+ }
@@ -0,0 +1,10 @@
1
+ import commonJsModule from "./AiOutcomes.js";
2
+ export const AI_OUTCOMES_PATH = commonJsModule.AI_OUTCOMES_PATH;
3
+ export const AI_OUTCOMES_SCAN_LIMIT = commonJsModule.AI_OUTCOMES_SCAN_LIMIT;
4
+ export const AI_OUTCOMES_WEEK_COUNT = commonJsModule.AI_OUTCOMES_WEEK_COUNT;
5
+ export const getCheckedFixCount = commonJsModule.getCheckedFixCount;
6
+ export const getFixesBeingCheckedCount = commonJsModule.getFixesBeingCheckedCount;
7
+ export const getHeldPageCount = commonJsModule.getHeldPageCount;
8
+ export const getJudgedRootCauseCount = commonJsModule.getJudgedRootCauseCount;
9
+ export const getUncheckableFixCount = commonJsModule.getUncheckableFixCount;
10
+ export const getVerifiedFixCount = commonJsModule.getVerifiedFixCount;
@@ -0,0 +1,48 @@
1
+ import { JSONObject } from "../JSON.mjs";
2
+ import { RecordAiTokenLimitKind, RecordAiTokenLimitState } from "./RecordAiTokenLimit.mjs";
3
+ export declare enum AiRunRefusalCode {
4
+ IncidentNotFound = "incident_not_found",
5
+ AlertNotFound = "alert_not_found",
6
+ IncidentTryAgainNotAllowed = "incident_try_again_not_allowed",
7
+ AlertTryAgainNotAllowed = "alert_try_again_not_allowed",
8
+ IncidentInvestigateNowNotAllowed = "incident_investigate_now_not_allowed",
9
+ AlertInvestigateNowNotAllowed = "alert_investigate_now_not_allowed",
10
+ IncidentHasNoInvestigation = "incident_has_no_investigation",
11
+ AlertHasNoInvestigation = "alert_has_no_investigation",
12
+ IncidentInvestigationRunning = "incident_investigation_running",
13
+ AlertInvestigationRunning = "alert_investigation_running",
14
+ InvestigationFinished = "investigation_finished",
15
+ InvestigationNotQueued = "investigation_not_queued",
16
+ NotWaiting = "not_waiting",
17
+ AlreadyInvestigated = "already_investigated",
18
+ InvestigationNotStarted = "investigation_not_started",
19
+ AiOff = "ai_off",
20
+ NoProviderToInvestigate = "no_provider_to_investigate",
21
+ AiCreditsUsedUp = "ai_credits_used_up",
22
+ ProjectDailyLimitReached = "project_daily_limit_reached",
23
+ IncidentTokenLimitPaused = "incident_token_limit_paused",
24
+ IncidentTokenLimitUsedUp = "incident_token_limit_used_up",
25
+ AlertTokenLimitPaused = "alert_token_limit_paused",
26
+ AlertTokenLimitUsedUp = "alert_token_limit_used_up",
27
+ InsightNotFoundOrNoAccess = "insight_not_found_or_no_access",
28
+ InsightAlreadyResolved = "insight_already_resolved",
29
+ InsightAlreadyDismissed = "insight_already_dismissed",
30
+ InsightNotFound = "insight_not_found",
31
+ InsightTriageRunning = "insight_triage_running",
32
+ TriageFinished = "triage_finished",
33
+ InsightsOff = "insights_off",
34
+ NoProviderToTriage = "no_provider_to_triage",
35
+ TriageNotQueued = "triage_not_queued",
36
+ TriageNotStarted = "triage_not_started"
37
+ }
38
+ export declare const AI_RUN_REFUSALS: Readonly<Record<AiRunRefusalCode, string>>;
39
+ export declare const AI_RUN_REFUSAL_CODE_FIELD: string;
40
+ export declare function isAiRunRefusalCode(value: unknown): value is AiRunRefusalCode;
41
+ export declare function getAiRunRefusalMessage(code: AiRunRefusalCode): string;
42
+ export declare function readAiRunRefusalCode(body: JSONObject | null | undefined): AiRunRefusalCode | null;
43
+ export type AiRunRefusalSubject = "incident" | "alert";
44
+ export declare function getRecordNotFoundRefusal(subject: AiRunRefusalSubject): AiRunRefusalCode;
45
+ export declare function getNotAllowedRefusal(subject: AiRunRefusalSubject, action: "try_again" | "investigate_now"): AiRunRefusalCode;
46
+ export declare function getNoInvestigationRefusal(subject: AiRunRefusalSubject): AiRunRefusalCode;
47
+ export declare function getInvestigationRunningRefusal(subject: AiRunRefusalSubject): AiRunRefusalCode;
48
+ export declare function getRecordAiTokenLimitRefusal(kind: RecordAiTokenLimitKind, state?: Pick<RecordAiTokenLimitState, "limitInTokens"> | null | undefined): AiRunRefusalCode;
@@ -0,0 +1,48 @@
1
+ import { JSONObject } from "../JSON";
2
+ import { RecordAiTokenLimitKind, RecordAiTokenLimitState } from "./RecordAiTokenLimit";
3
+ export declare enum AiRunRefusalCode {
4
+ IncidentNotFound = "incident_not_found",
5
+ AlertNotFound = "alert_not_found",
6
+ IncidentTryAgainNotAllowed = "incident_try_again_not_allowed",
7
+ AlertTryAgainNotAllowed = "alert_try_again_not_allowed",
8
+ IncidentInvestigateNowNotAllowed = "incident_investigate_now_not_allowed",
9
+ AlertInvestigateNowNotAllowed = "alert_investigate_now_not_allowed",
10
+ IncidentHasNoInvestigation = "incident_has_no_investigation",
11
+ AlertHasNoInvestigation = "alert_has_no_investigation",
12
+ IncidentInvestigationRunning = "incident_investigation_running",
13
+ AlertInvestigationRunning = "alert_investigation_running",
14
+ InvestigationFinished = "investigation_finished",
15
+ InvestigationNotQueued = "investigation_not_queued",
16
+ NotWaiting = "not_waiting",
17
+ AlreadyInvestigated = "already_investigated",
18
+ InvestigationNotStarted = "investigation_not_started",
19
+ AiOff = "ai_off",
20
+ NoProviderToInvestigate = "no_provider_to_investigate",
21
+ AiCreditsUsedUp = "ai_credits_used_up",
22
+ ProjectDailyLimitReached = "project_daily_limit_reached",
23
+ IncidentTokenLimitPaused = "incident_token_limit_paused",
24
+ IncidentTokenLimitUsedUp = "incident_token_limit_used_up",
25
+ AlertTokenLimitPaused = "alert_token_limit_paused",
26
+ AlertTokenLimitUsedUp = "alert_token_limit_used_up",
27
+ InsightNotFoundOrNoAccess = "insight_not_found_or_no_access",
28
+ InsightAlreadyResolved = "insight_already_resolved",
29
+ InsightAlreadyDismissed = "insight_already_dismissed",
30
+ InsightNotFound = "insight_not_found",
31
+ InsightTriageRunning = "insight_triage_running",
32
+ TriageFinished = "triage_finished",
33
+ InsightsOff = "insights_off",
34
+ NoProviderToTriage = "no_provider_to_triage",
35
+ TriageNotQueued = "triage_not_queued",
36
+ TriageNotStarted = "triage_not_started"
37
+ }
38
+ export declare const AI_RUN_REFUSALS: Readonly<Record<AiRunRefusalCode, string>>;
39
+ export declare const AI_RUN_REFUSAL_CODE_FIELD: string;
40
+ export declare function isAiRunRefusalCode(value: unknown): value is AiRunRefusalCode;
41
+ export declare function getAiRunRefusalMessage(code: AiRunRefusalCode): string;
42
+ export declare function readAiRunRefusalCode(body: JSONObject | null | undefined): AiRunRefusalCode | null;
43
+ export type AiRunRefusalSubject = "incident" | "alert";
44
+ export declare function getRecordNotFoundRefusal(subject: AiRunRefusalSubject): AiRunRefusalCode;
45
+ export declare function getNotAllowedRefusal(subject: AiRunRefusalSubject, action: "try_again" | "investigate_now"): AiRunRefusalCode;
46
+ export declare function getNoInvestigationRefusal(subject: AiRunRefusalSubject): AiRunRefusalCode;
47
+ export declare function getInvestigationRunningRefusal(subject: AiRunRefusalSubject): AiRunRefusalCode;
48
+ export declare function getRecordAiTokenLimitRefusal(kind: RecordAiTokenLimitKind, state?: Pick<RecordAiTokenLimitState, "limitInTokens"> | null | undefined): AiRunRefusalCode;
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_RUN_REFUSAL_CODE_FIELD = exports.AI_RUN_REFUSALS = exports.AiRunRefusalCode = void 0;
4
+ exports.isAiRunRefusalCode = isAiRunRefusalCode;
5
+ exports.getAiRunRefusalMessage = getAiRunRefusalMessage;
6
+ exports.readAiRunRefusalCode = readAiRunRefusalCode;
7
+ exports.getRecordNotFoundRefusal = getRecordNotFoundRefusal;
8
+ exports.getNotAllowedRefusal = getNotAllowedRefusal;
9
+ exports.getNoInvestigationRefusal = getNoInvestigationRefusal;
10
+ exports.getInvestigationRunningRefusal = getInvestigationRunningRefusal;
11
+ exports.getRecordAiTokenLimitRefusal = getRecordAiTokenLimitRefusal;
12
+ const Translator_1 = require("../Translator");
13
+ const RecordAiTokenLimit_1 = require("./RecordAiTokenLimit");
14
+ /*
15
+ * WHY ONEUPTIME AI DID NOT START A RUN SOMEONE ASKED FOR, AS A CODE AND
16
+ * ONE SENTENCE (#7359).
17
+ *
18
+ * An incident's or alert's AI card has two buttons that ask the server to
19
+ * start an investigation - Try again on the failure notice, and Investigate
20
+ * now while a rule waits - and an AI insight's card has Try again for its
21
+ * triage. When the server refuses, the card shows why under the button.
22
+ * An AI insight's page refuses Confirm, Dismiss, Resolve and Reopen with
23
+ * the same codes when the insight is gone or closed already (#8052).
24
+ *
25
+ * The server answers the refusal as bad data (400) with its English
26
+ * sentence as the message, for the API and for older Dashboards, and with
27
+ * the refusal's code beside it (AI_RUN_REFUSAL_CODE_FIELD). The Dashboard
28
+ * words the code itself, in the reader's language (AiRunFailureWords'
29
+ * describeAiRunRefusal): the sentences below are its translation keys, so a
30
+ * sentence changed here is a new key every language must word before the
31
+ * Dashboard's extract test passes. A refusal of who may (403, no code) is
32
+ * one of these sentences too, and is worded by its text.
33
+ *
34
+ * Every refusal is one whole sentence per code - incident and alert each
35
+ * have their own, so a language words each its own way - and none carries
36
+ * a number or a name, so none needs values. The sentences that other
37
+ * messages share (the AI credits, the project's daily AI limits, a
38
+ * record's own daily AI token limit) are those messages, word for word: a
39
+ * test holds each to its source.
40
+ *
41
+ * Pure, with no Node or browser APIs: the server and the Dashboard both
42
+ * read it.
43
+ */
44
+ var AiRunRefusalCode;
45
+ (function (AiRunRefusalCode) {
46
+ // The record is gone, or the person may not read it.
47
+ AiRunRefusalCode["IncidentNotFound"] = "incident_not_found";
48
+ AiRunRefusalCode["AlertNotFound"] = "alert_not_found";
49
+ // The person may read the record but not change it (403).
50
+ AiRunRefusalCode["IncidentTryAgainNotAllowed"] = "incident_try_again_not_allowed";
51
+ AiRunRefusalCode["AlertTryAgainNotAllowed"] = "alert_try_again_not_allowed";
52
+ AiRunRefusalCode["IncidentInvestigateNowNotAllowed"] = "incident_investigate_now_not_allowed";
53
+ AiRunRefusalCode["AlertInvestigateNowNotAllowed"] = "alert_investigate_now_not_allowed";
54
+ // An investigation's Try again.
55
+ AiRunRefusalCode["IncidentHasNoInvestigation"] = "incident_has_no_investigation";
56
+ AiRunRefusalCode["AlertHasNoInvestigation"] = "alert_has_no_investigation";
57
+ AiRunRefusalCode["IncidentInvestigationRunning"] = "incident_investigation_running";
58
+ AiRunRefusalCode["AlertInvestigationRunning"] = "alert_investigation_running";
59
+ AiRunRefusalCode["InvestigationFinished"] = "investigation_finished";
60
+ AiRunRefusalCode["InvestigationNotQueued"] = "investigation_not_queued";
61
+ // Investigate now, while an investigation rule waits.
62
+ AiRunRefusalCode["NotWaiting"] = "not_waiting";
63
+ AiRunRefusalCode["AlreadyInvestigated"] = "already_investigated";
64
+ AiRunRefusalCode["InvestigationNotStarted"] = "investigation_not_started";
65
+ // What stops OneUptime AI for the whole project.
66
+ AiRunRefusalCode["AiOff"] = "ai_off";
67
+ AiRunRefusalCode["NoProviderToInvestigate"] = "no_provider_to_investigate";
68
+ AiRunRefusalCode["AiCreditsUsedUp"] = "ai_credits_used_up";
69
+ AiRunRefusalCode["ProjectDailyLimitReached"] = "project_daily_limit_reached";
70
+ // The incident's (alert's) own daily AI token limit (#7157).
71
+ AiRunRefusalCode["IncidentTokenLimitPaused"] = "incident_token_limit_paused";
72
+ AiRunRefusalCode["IncidentTokenLimitUsedUp"] = "incident_token_limit_used_up";
73
+ AiRunRefusalCode["AlertTokenLimitPaused"] = "alert_token_limit_paused";
74
+ AiRunRefusalCode["AlertTokenLimitUsedUp"] = "alert_token_limit_used_up";
75
+ /*
76
+ * An AI insight's page: Confirm, Dismiss, Resolve, Reopen, Run triage
77
+ * and Try again look the insight up first, and refuse alike for one
78
+ * that is gone and one the person may not read, so the answer never
79
+ * tells whether an id exists in another project (#8052).
80
+ */
81
+ AiRunRefusalCode["InsightNotFoundOrNoAccess"] = "insight_not_found_or_no_access";
82
+ /*
83
+ * Resolve, on a page left open while someone closed the insight
84
+ * elsewhere: a closed insight is never resolved again.
85
+ */
86
+ AiRunRefusalCode["InsightAlreadyResolved"] = "insight_already_resolved";
87
+ AiRunRefusalCode["InsightAlreadyDismissed"] = "insight_already_dismissed";
88
+ /*
89
+ * An AI insight's triage Try again - and Confirm, Dismiss, Resolve and
90
+ * Reopen when the insight went between the page's check and the change.
91
+ */
92
+ AiRunRefusalCode["InsightNotFound"] = "insight_not_found";
93
+ AiRunRefusalCode["InsightTriageRunning"] = "insight_triage_running";
94
+ AiRunRefusalCode["TriageFinished"] = "triage_finished";
95
+ AiRunRefusalCode["InsightsOff"] = "insights_off";
96
+ AiRunRefusalCode["NoProviderToTriage"] = "no_provider_to_triage";
97
+ AiRunRefusalCode["TriageNotQueued"] = "triage_not_queued";
98
+ AiRunRefusalCode["TriageNotStarted"] = "triage_not_started";
99
+ })(AiRunRefusalCode || (exports.AiRunRefusalCode = AiRunRefusalCode = {}));
100
+ // Each refusal's sentence: the server's message, and the Dashboard's key.
101
+ exports.AI_RUN_REFUSALS = {
102
+ [AiRunRefusalCode.IncidentNotFound]: (0, Translator_1.translationKey)("Incident not found (or you do not have access to it)."),
103
+ [AiRunRefusalCode.AlertNotFound]: (0, Translator_1.translationKey)("Alert not found (or you do not have access to it)."),
104
+ [AiRunRefusalCode.IncidentTryAgainNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this incident, so you cannot start its investigation again."),
105
+ [AiRunRefusalCode.AlertTryAgainNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this alert, so you cannot start its investigation again."),
106
+ [AiRunRefusalCode.IncidentInvestigateNowNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this incident, so you cannot start its investigation."),
107
+ [AiRunRefusalCode.AlertInvestigateNowNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this alert, so you cannot start its investigation."),
108
+ [AiRunRefusalCode.IncidentHasNoInvestigation]: (0, Translator_1.translationKey)("This incident has no investigation to try again."),
109
+ [AiRunRefusalCode.AlertHasNoInvestigation]: (0, Translator_1.translationKey)("This alert has no investigation to try again."),
110
+ [AiRunRefusalCode.IncidentInvestigationRunning]: (0, Translator_1.translationKey)("This incident's investigation is queued or running already."),
111
+ [AiRunRefusalCode.AlertInvestigationRunning]: (0, Translator_1.translationKey)("This alert's investigation is queued or running already."),
112
+ [AiRunRefusalCode.InvestigationFinished]: (0, Translator_1.translationKey)("Only an investigation that did not finish can be tried again."),
113
+ [AiRunRefusalCode.InvestigationNotQueued]: (0, Translator_1.translationKey)("The investigation could not start: the project may have reached its daily AI limit, which resets at midnight UTC. Try again later."),
114
+ [AiRunRefusalCode.NotWaiting]: (0, Translator_1.translationKey)("OneUptime AI is no longer waiting to investigate this. Refresh to see where it stands."),
115
+ [AiRunRefusalCode.AlreadyInvestigated]: (0, Translator_1.translationKey)("OneUptime AI has already started investigating this."),
116
+ [AiRunRefusalCode.InvestigationNotStarted]: (0, Translator_1.translationKey)("The investigation could not be started. Try again in a moment."),
117
+ [AiRunRefusalCode.AiOff]: (0, Translator_1.translationKey)("OneUptime AI is switched off for this project. A project owner or someone with Manage Billing can turn it on in Project Settings > AI > AI Features."),
118
+ [AiRunRefusalCode.NoProviderToInvestigate]: (0, Translator_1.translationKey)("This project has no LLM provider to investigate with. Add one in Project Settings > AI > LLM Providers, then try again."),
119
+ // PROJECT_AI_CREDITS_USED_UP_MESSAGE (Utils/Project/ProjectBalance).
120
+ [AiRunRefusalCode.AiCreditsUsedUp]: (0, Translator_1.translationKey)("This project's AI credits are used up. A project owner or someone with Manage Billing can add AI credits in Project Settings → AI → AI Credits."),
121
+ // Ends with ProjectAiDailyLimits.getWhoCanChangeSentence().
122
+ [AiRunRefusalCode.ProjectDailyLimitReached]: (0, Translator_1.translationKey)("The project reached its daily AI limit. OneUptime AI starts again at midnight UTC. A project owner or someone with Manage Billing can raise or remove the limit in Project Settings → AI → AI Features → More settings."),
123
+ // getRecordAiTokenLimitMessage (Types/AI/RecordAiTokenLimit), each kind.
124
+ [AiRunRefusalCode.IncidentTokenLimitPaused]: (0, Translator_1.translationKey)("The Daily Incident AI Token Limit is set to 0, which pauses automatic AI work for incidents. Raise it above 0 under Incidents → AI → Settings → More settings, or clear it, then try again."),
125
+ [AiRunRefusalCode.IncidentTokenLimitUsedUp]: (0, Translator_1.translationKey)("Automatic AI work for incidents used up today's Daily Incident AI Token Limit. Raise or clear it under Incidents → AI → Settings → More settings, or wait until midnight UTC, when it resets. Then try again."),
126
+ [AiRunRefusalCode.AlertTokenLimitPaused]: (0, Translator_1.translationKey)("The Daily Alert AI Token Limit is set to 0, which pauses automatic AI work for alerts. Raise it above 0 under Alerts → AI → Settings → More settings, or clear it, then try again."),
127
+ [AiRunRefusalCode.AlertTokenLimitUsedUp]: (0, Translator_1.translationKey)("Automatic AI work for alerts used up today's Daily Alert AI Token Limit. Raise or clear it under Alerts → AI → Settings → More settings, or wait until midnight UTC, when it resets. Then try again."),
128
+ [AiRunRefusalCode.InsightNotFoundOrNoAccess]: (0, Translator_1.translationKey)("AI insight not found (or you do not have access to it)."),
129
+ [AiRunRefusalCode.InsightAlreadyResolved]: (0, Translator_1.translationKey)("This AI insight is already resolved and cannot be resolved again."),
130
+ [AiRunRefusalCode.InsightAlreadyDismissed]: (0, Translator_1.translationKey)("This AI insight is already dismissed and cannot be resolved again."),
131
+ [AiRunRefusalCode.InsightNotFound]: (0, Translator_1.translationKey)("This AI insight no longer exists."),
132
+ [AiRunRefusalCode.InsightTriageRunning]: (0, Translator_1.translationKey)("This insight is being triaged already."),
133
+ [AiRunRefusalCode.TriageFinished]: (0, Translator_1.translationKey)("Only a triage that did not finish can be tried again."),
134
+ /*
135
+ * Only AI Insights' own switch is left to be off: a telemetry product's
136
+ * AI that works on the insight's kind is on (getLaneWorkingOn).
137
+ */
138
+ [AiRunRefusalCode.InsightsOff]: (0, Translator_1.translationKey)("AI Insights is switched off for this project, so no insight is triaged. A project owner or admin can turn on Watch telemetry for problems in AI → Insights → Settings."),
139
+ [AiRunRefusalCode.NoProviderToTriage]: (0, Translator_1.translationKey)("This project has no LLM provider to triage with. Add one in Project Settings > AI > LLM Providers, then try again."),
140
+ [AiRunRefusalCode.TriageNotQueued]: (0, Translator_1.translationKey)("The triage could not start: the project may have reached its daily AI limit, which resets at midnight UTC. Try again later."),
141
+ [AiRunRefusalCode.TriageNotStarted]: (0, Translator_1.translationKey)("The triage could not start. Try again in a moment."),
142
+ };
143
+ /*
144
+ * The field of a refused request's answer that carries the code, beside
145
+ * its message: { message: "...", refusalCode: "ai_off" }.
146
+ */
147
+ exports.AI_RUN_REFUSAL_CODE_FIELD = "refusalCode";
148
+ const AI_RUN_REFUSAL_CODES = new Set(Object.values(AiRunRefusalCode));
149
+ function isAiRunRefusalCode(value) {
150
+ return typeof value === "string" && AI_RUN_REFUSAL_CODES.has(value);
151
+ }
152
+ function getAiRunRefusalMessage(code) {
153
+ return exports.AI_RUN_REFUSALS[code];
154
+ }
155
+ /*
156
+ * The code of a refused request's answer, or null when it has none or one
157
+ * this version does not know (a newer server): the message is said then.
158
+ */
159
+ function readAiRunRefusalCode(body) {
160
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
161
+ return null;
162
+ }
163
+ const code = body[exports.AI_RUN_REFUSAL_CODE_FIELD];
164
+ return isAiRunRefusalCode(code) ? code : null;
165
+ }
166
+ // The record is gone, or the person may not read it.
167
+ function getRecordNotFoundRefusal(subject) {
168
+ return subject === "alert"
169
+ ? AiRunRefusalCode.AlertNotFound
170
+ : AiRunRefusalCode.IncidentNotFound;
171
+ }
172
+ // The person may read the record, not change it: which button they pressed.
173
+ function getNotAllowedRefusal(subject, action) {
174
+ if (action === "try_again") {
175
+ return subject === "alert"
176
+ ? AiRunRefusalCode.AlertTryAgainNotAllowed
177
+ : AiRunRefusalCode.IncidentTryAgainNotAllowed;
178
+ }
179
+ return subject === "alert"
180
+ ? AiRunRefusalCode.AlertInvestigateNowNotAllowed
181
+ : AiRunRefusalCode.IncidentInvestigateNowNotAllowed;
182
+ }
183
+ function getNoInvestigationRefusal(subject) {
184
+ return subject === "alert"
185
+ ? AiRunRefusalCode.AlertHasNoInvestigation
186
+ : AiRunRefusalCode.IncidentHasNoInvestigation;
187
+ }
188
+ function getInvestigationRunningRefusal(subject) {
189
+ return subject === "alert"
190
+ ? AiRunRefusalCode.AlertInvestigationRunning
191
+ : AiRunRefusalCode.IncidentInvestigationRunning;
192
+ }
193
+ /*
194
+ * The record's own daily AI token limit: paused (a limit of 0 or below)
195
+ * until someone raises it, or used up until midnight UTC. Without a state
196
+ * the limit is taken as used up, as getRecordAiTokenLimitMessage does.
197
+ */
198
+ function getRecordAiTokenLimitRefusal(kind, state) {
199
+ const isPaused = (0, RecordAiTokenLimit_1.isRecordAiTokenLimitPaused)(state === null || state === void 0 ? void 0 : state.limitInTokens);
200
+ if (kind === "alert") {
201
+ return isPaused
202
+ ? AiRunRefusalCode.AlertTokenLimitPaused
203
+ : AiRunRefusalCode.AlertTokenLimitUsedUp;
204
+ }
205
+ return isPaused
206
+ ? AiRunRefusalCode.IncidentTokenLimitPaused
207
+ : AiRunRefusalCode.IncidentTokenLimitUsedUp;
208
+ }
@@ -0,0 +1,12 @@
1
+ import commonJsModule from "./AiRunRefusal.js";
2
+ export const AI_RUN_REFUSALS = commonJsModule.AI_RUN_REFUSALS;
3
+ export const AI_RUN_REFUSAL_CODE_FIELD = commonJsModule.AI_RUN_REFUSAL_CODE_FIELD;
4
+ export const AiRunRefusalCode = commonJsModule.AiRunRefusalCode;
5
+ export const getAiRunRefusalMessage = commonJsModule.getAiRunRefusalMessage;
6
+ export const getInvestigationRunningRefusal = commonJsModule.getInvestigationRunningRefusal;
7
+ export const getNoInvestigationRefusal = commonJsModule.getNoInvestigationRefusal;
8
+ export const getNotAllowedRefusal = commonJsModule.getNotAllowedRefusal;
9
+ export const getRecordAiTokenLimitRefusal = commonJsModule.getRecordAiTokenLimitRefusal;
10
+ export const getRecordNotFoundRefusal = commonJsModule.getRecordNotFoundRefusal;
11
+ export const isAiRunRefusalCode = commonJsModule.isAiRunRefusalCode;
12
+ export const readAiRunRefusalCode = commonJsModule.readAiRunRefusalCode;
@@ -0,0 +1,46 @@
1
+ import { JSONObject } from "../JSON.mjs";
2
+ import { AIAgentRunLimits } from "./AIAgentRunLimits.mjs";
3
+ import { AIChatCitationTarget } from "./AIChatTypes.mjs";
4
+ import { AiContextActivity } from "./AiContext.mjs";
5
+ export declare const INVESTIGATION_RECORDING_VERSION: number;
6
+ export declare const INVESTIGATION_RECORDING_RETENTION_IN_DAYS: number;
7
+ export declare const INVESTIGATION_RECORDING_MAX_TOOL_CALLS: number;
8
+ export declare const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS: number;
9
+ export declare const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS: number;
10
+ export declare const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS: number;
11
+ export interface InvestigationRecordedToolDefinition {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: JSONObject;
15
+ }
16
+ export interface InvestigationRecordingInputs {
17
+ contextText: string;
18
+ additionalInstructions?: string | undefined;
19
+ personaOverride?: string | undefined;
20
+ questionOverride?: string | undefined;
21
+ aiContext: AiContextActivity | null;
22
+ promptTime: string;
23
+ runLimits: AIAgentRunLimits;
24
+ maxOutputTokens: number;
25
+ excludedToolNames: Array<string>;
26
+ extraTools: Array<InvestigationRecordedToolDefinition>;
27
+ providerName?: string | undefined;
28
+ modelName?: string | undefined;
29
+ }
30
+ export interface InvestigationRecordedToolCall {
31
+ toolName: string;
32
+ arguments: JSONObject;
33
+ success: boolean;
34
+ text: string | null;
35
+ rowCount?: number | undefined;
36
+ citationLabel?: string | undefined;
37
+ citationTarget?: AIChatCitationTarget | undefined;
38
+ isTruncated?: boolean | undefined;
39
+ durationMs?: number | undefined;
40
+ }
41
+ export interface InvestigationRecording {
42
+ version: number;
43
+ inputs: InvestigationRecordingInputs;
44
+ toolCalls: Array<InvestigationRecordedToolCall>;
45
+ toolCallsNotKept: number;
46
+ }
@@ -0,0 +1,46 @@
1
+ import { JSONObject } from "../JSON";
2
+ import { AIAgentRunLimits } from "./AIAgentRunLimits";
3
+ import { AIChatCitationTarget } from "./AIChatTypes";
4
+ import { AiContextActivity } from "./AiContext";
5
+ export declare const INVESTIGATION_RECORDING_VERSION: number;
6
+ export declare const INVESTIGATION_RECORDING_RETENTION_IN_DAYS: number;
7
+ export declare const INVESTIGATION_RECORDING_MAX_TOOL_CALLS: number;
8
+ export declare const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS: number;
9
+ export declare const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS: number;
10
+ export declare const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS: number;
11
+ export interface InvestigationRecordedToolDefinition {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: JSONObject;
15
+ }
16
+ export interface InvestigationRecordingInputs {
17
+ contextText: string;
18
+ additionalInstructions?: string | undefined;
19
+ personaOverride?: string | undefined;
20
+ questionOverride?: string | undefined;
21
+ aiContext: AiContextActivity | null;
22
+ promptTime: string;
23
+ runLimits: AIAgentRunLimits;
24
+ maxOutputTokens: number;
25
+ excludedToolNames: Array<string>;
26
+ extraTools: Array<InvestigationRecordedToolDefinition>;
27
+ providerName?: string | undefined;
28
+ modelName?: string | undefined;
29
+ }
30
+ export interface InvestigationRecordedToolCall {
31
+ toolName: string;
32
+ arguments: JSONObject;
33
+ success: boolean;
34
+ text: string | null;
35
+ rowCount?: number | undefined;
36
+ citationLabel?: string | undefined;
37
+ citationTarget?: AIChatCitationTarget | undefined;
38
+ isTruncated?: boolean | undefined;
39
+ durationMs?: number | undefined;
40
+ }
41
+ export interface InvestigationRecording {
42
+ version: number;
43
+ inputs: InvestigationRecordingInputs;
44
+ toolCalls: Array<InvestigationRecordedToolCall>;
45
+ toolCallsNotKept: number;
46
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_TOOL_CALLS = exports.INVESTIGATION_RECORDING_RETENTION_IN_DAYS = exports.INVESTIGATION_RECORDING_VERSION = void 0;
4
+ /*
5
+ * What an AI investigation saw, kept so it can be run again later on exactly
6
+ * the same data with another prompt or another model (issue #6800): the
7
+ * starting context the model was given, and every tool call it made with
8
+ * the text it was handed back. A replay (Server/Utils/AI/Eval/
9
+ * ReplayInvestigation) builds today's prompt around the same context and
10
+ * answers each tool call from here - never from the project's live data,
11
+ * which has moved on or aged out by then - so a change is scored on the
12
+ * evidence the original run had.
13
+ *
14
+ * Kept by the server only (AIRunRecording: no API reads it, no person can),
15
+ * for INVESTIGATION_RECORDING_RETENTION_IN_DAYS, and held to the caps below.
16
+ * What the model read is what the toolbox already redacted and cut to size,
17
+ * so nothing is kept that the model was not shown.
18
+ */
19
+ // The shape of a recording; a replay reads only the versions it knows.
20
+ exports.INVESTIGATION_RECORDING_VERSION = 1;
21
+ /*
22
+ * How long a recording is kept. Long enough to replay last month's
23
+ * investigations after a prompt or model change; short enough that what the
24
+ * tools returned does not outlive the telemetry it came from by much.
25
+ */
26
+ exports.INVESTIGATION_RECORDING_RETENTION_IN_DAYS = 30;
27
+ /*
28
+ * The caps. A run is recorded until one is reached; a tool call past them is
29
+ * kept without its text, or not kept at all, and a replay that comes to it
30
+ * counts it as not recorded rather than inventing an answer.
31
+ */
32
+ // The most tool calls one recording keeps.
33
+ exports.INVESTIGATION_RECORDING_MAX_TOOL_CALLS = 300;
34
+ /*
35
+ * The most characters of one tool result: well above what the toolbox hands
36
+ * the model (64 KB, Toolbox/Serializer), so a normal result always fits.
37
+ */
38
+ exports.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = 100000;
39
+ // The most characters of tool results one recording keeps, together.
40
+ exports.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = 1000000;
41
+ // The most characters of one tool call's arguments, as JSON.
42
+ exports.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = 10000;
@@ -0,0 +1,7 @@
1
+ import commonJsModule from "./InvestigationRecording.js";
2
+ export const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS;
3
+ export const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS;
4
+ export const INVESTIGATION_RECORDING_MAX_TOOL_CALLS = commonJsModule.INVESTIGATION_RECORDING_MAX_TOOL_CALLS;
5
+ export const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS;
6
+ export const INVESTIGATION_RECORDING_RETENTION_IN_DAYS = commonJsModule.INVESTIGATION_RECORDING_RETENTION_IN_DAYS;
7
+ export const INVESTIGATION_RECORDING_VERSION = commonJsModule.INVESTIGATION_RECORDING_VERSION;
@@ -76,26 +76,15 @@ exports.RESOURCE_AI_ACCESS_ADMIN_PERMISSIONS = [
76
76
  ];
77
77
  /*
78
78
  * How each resource type is named inside a sentence ("on this Docker host",
79
- * "on this database server"). AI_RESOURCE_TYPE_INFO's displayName starts
80
- * every name with a capital, which reads wrong mid-sentence for the two
81
- * types whose name is a common noun.
79
+ * "on this database server"): AI_RESOURCE_TYPE_INFO's sentenceName. Its
80
+ * displayName is a label, whose capital reads wrong mid-sentence for the
81
+ * two types whose name is a common noun. The AI Investigation card and the
82
+ * server's lines both name a kind by this word (#8133), and the Dashboard
83
+ * words each one in every language.
82
84
  */
83
- const RESOURCE_SENTENCE_NAMES = {
84
- [AiResourceType_1.default.DockerHost]: "Docker host",
85
- [AiResourceType_1.default.PodmanHost]: "Podman host",
86
- [AiResourceType_1.default.DockerSwarmCluster]: "Docker Swarm cluster",
87
- [AiResourceType_1.default.ProxmoxCluster]: "Proxmox cluster",
88
- [AiResourceType_1.default.VMwareVCenter]: "VMware vCenter",
89
- [AiResourceType_1.default.CephCluster]: "Ceph cluster",
90
- [AiResourceType_1.default.DatabaseServer]: "database server",
91
- [AiResourceType_1.default.Host]: "host",
92
- [AiResourceType_1.default.AwsAccount]: "AWS account",
93
- [AiResourceType_1.default.AzureSubscription]: "Azure subscription",
94
- [AiResourceType_1.default.GoogleCloudProject]: "Google Cloud project",
95
- [AiResourceType_1.default.OpenStackCloud]: "OpenStack cloud",
96
- };
97
85
  function getResourceSentenceName(resourceType) {
98
- return RESOURCE_SENTENCE_NAMES[resourceType] || "resource";
86
+ var _a;
87
+ return ((_a = AiResourceType_1.AI_RESOURCE_TYPE_INFO[resourceType]) === null || _a === void 0 ? void 0 : _a.sentenceName) || "resource";
99
88
  }
100
89
  // The name of the resource type's AI agent, for sentences ("the Docker AI agent").
101
90
  function getResourceAgentName(resourceType) {
@@ -27,6 +27,9 @@ export default class HTTPResponse<T extends JSONObjectOrArray | BaseModel | Arra
27
27
  private _hasMore;
28
28
  get hasMore(): boolean | undefined;
29
29
  set hasMore(v: boolean | undefined);
30
+ private _isCountCapped;
31
+ get isCountCapped(): boolean | undefined;
32
+ set isCountCapped(v: boolean | undefined);
30
33
  constructor(statusCode: number, data: JSONObject | Array<JSONObject>, headers: Headers);
31
34
  isSuccess(): boolean;
32
35
  isFailure(): boolean;