@oneuptime/common 14.1.0 → 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 (249) hide show
  1. package/Models/DatabaseModels/Alert.d.mts +1 -0
  2. package/Models/DatabaseModels/Alert.d.ts +1 -0
  3. package/Models/DatabaseModels/Alert.js +34 -0
  4. package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
  5. package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
  6. package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
  7. package/Models/DatabaseModels/Incident.d.mts +1 -0
  8. package/Models/DatabaseModels/Incident.d.ts +1 -0
  9. package/Models/DatabaseModels/Incident.js +35 -0
  10. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
  11. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
  12. package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
  13. package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
  14. package/Models/DatabaseModels/Index.js +2 -0
  15. package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
  16. package/Types/AI/AIActionWords.d.mts +3 -1
  17. package/Types/AI/AIActionWords.d.ts +3 -1
  18. package/Types/AI/AIActionWords.js +70 -1
  19. package/Types/AI/AIActionWords.mjs +2 -0
  20. package/Types/AI/AIChatTypes.d.mts +2 -1
  21. package/Types/AI/AIChatTypes.d.ts +2 -1
  22. package/Types/AI/AIReadTableWords.d.mts +192 -0
  23. package/Types/AI/AIReadTableWords.d.ts +192 -0
  24. package/Types/AI/AIReadTableWords.js +368 -0
  25. package/Types/AI/AIReadTableWords.mjs +18 -0
  26. package/Types/AI/AiRunRefusal.d.mts +3 -0
  27. package/Types/AI/AiRunRefusal.d.ts +3 -0
  28. package/Types/AI/AiRunRefusal.js +22 -1
  29. package/Types/AI/ResourceAiAccessPermissions.js +7 -18
  30. package/Types/AuditLog/AuditLogActionLabel.js +19 -9
  31. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -0
  32. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -0
  33. package/Types/BaseDatabase/AggregationIntervalUtil.js +123 -16
  34. package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
  35. package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
  36. package/Types/Cloud/CloudResourceHealth.js +405 -13
  37. package/Types/Cloud/CloudResourceHealth.mjs +28 -0
  38. package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
  39. package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
  40. package/Types/DataObservability/DataCheckRefusals.js +77 -0
  41. package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
  42. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
  43. package/Types/Date.d.mts +2 -0
  44. package/Types/Date.d.ts +2 -0
  45. package/Types/Date.js +22 -0
  46. package/Types/DateLanguage.d.mts +2 -0
  47. package/Types/DateLanguage.d.ts +2 -0
  48. package/Types/DateLanguage.js +8 -5
  49. package/Types/Email/EmailTemplateType.d.mts +1 -0
  50. package/Types/Email/EmailTemplateType.d.ts +1 -0
  51. package/Types/Email/EmailTemplateType.js +2 -0
  52. package/Types/Exception/EgressGuardException.js +1 -1
  53. package/Types/Exception/ErrorMessageRule.d.mts +1 -0
  54. package/Types/Exception/ErrorMessageRule.d.ts +1 -0
  55. package/Types/Exception/ErrorMessageRule.js +67 -13
  56. package/Types/Exception/ErrorMessageRule.mjs +1 -0
  57. package/Types/Exception/ExceptionMessages.d.mts +2 -0
  58. package/Types/Exception/ExceptionMessages.d.ts +2 -0
  59. package/Types/Exception/ExceptionMessages.js +2 -0
  60. package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
  61. package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
  62. package/Types/Incident/PostmortemActionItemStatus.js +74 -0
  63. package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
  64. package/Types/JSONFunctions.js +10 -3
  65. package/Types/Link.d.mts +1 -0
  66. package/Types/Link.d.ts +1 -0
  67. package/Types/MeaningKeys.d.mts +4 -0
  68. package/Types/MeaningKeys.d.ts +4 -0
  69. package/Types/MeaningKeys.js +74 -0
  70. package/Types/MeaningKeys.mjs +5 -0
  71. package/Types/Monitor/WhoIsTold.d.mts +3 -0
  72. package/Types/Monitor/WhoIsTold.d.ts +3 -0
  73. package/Types/Monitor/WhoIsTold.js +63 -13
  74. package/Types/NoBreakSpaces.d.mts +16 -0
  75. package/Types/NoBreakSpaces.d.ts +16 -0
  76. package/Types/NoBreakSpaces.js +419 -0
  77. package/Types/NoBreakSpaces.mjs +9 -0
  78. package/Types/NotificationRule/PagingLadder.d.mts +12 -0
  79. package/Types/NotificationRule/PagingLadder.d.ts +12 -0
  80. package/Types/NotificationRule/PagingLadder.js +159 -11
  81. package/Types/NotificationRule/PagingLadder.mjs +3 -0
  82. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
  83. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
  84. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
  85. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
  86. package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
  87. package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
  88. package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
  89. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
  90. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
  91. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
  92. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
  93. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
  94. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
  95. package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
  96. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  97. package/Types/OpenStack/OpenStackCapacity.js +12 -5
  98. package/Types/Permission.d.mts +4 -0
  99. package/Types/Permission.d.ts +4 -0
  100. package/Types/Permission.js +64 -8
  101. package/Types/Product/ProductUsage.js +2 -1
  102. package/Types/Product/ProjectProductsAnswer.js +2 -1
  103. package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
  104. package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
  105. package/Types/ResourceAiAgent/AiResourceType.js +12 -0
  106. package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
  107. package/Types/Rum/ProductAnalyticsEvents.js +13 -1
  108. package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
  109. package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
  110. package/Types/Rum/SessionReplayCustomEvents.js +12 -0
  111. package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
  112. package/Types/SetupHealth/SetupHealth.d.mts +1 -0
  113. package/Types/SetupHealth/SetupHealth.d.ts +1 -0
  114. package/Types/SetupHealth/SetupHealth.js +13 -5
  115. package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
  116. package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
  117. package/Types/StatusPage/DefaultStatusNames.js +74 -28
  118. package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
  119. package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
  120. package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
  121. package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
  122. package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
  123. package/Types/Translator.d.mts +1 -0
  124. package/Types/Translator.d.ts +1 -0
  125. package/Types/Translator.js +100 -19
  126. package/Types/Translator.mjs +1 -0
  127. package/Types/UserSession/SessionLength.d.mts +33 -0
  128. package/Types/UserSession/SessionLength.d.ts +33 -0
  129. package/Types/UserSession/SessionLength.js +134 -5
  130. package/Types/UserSession/SessionLength.mjs +5 -0
  131. package/Types/Workflow/WorkflowStatus.js +21 -10
  132. package/Utils/AI/InvestigationReport.js +2 -2
  133. package/Utils/API.d.mts +0 -11
  134. package/Utils/API.d.ts +0 -11
  135. package/Utils/API.js +0 -432
  136. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
  137. package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
  138. package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
  139. package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
  140. package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
  141. package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
  142. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
  143. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
  144. package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
  145. package/Utils/DefaultRecordNames.d.mts +6 -0
  146. package/Utils/DefaultRecordNames.d.ts +6 -0
  147. package/Utils/DefaultRecordNames.js +122 -0
  148. package/Utils/DefaultRecordNames.mjs +6 -0
  149. package/Utils/Grok/Grok.js +7 -4
  150. package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
  151. package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
  152. package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
  153. package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
  154. package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
  155. package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
  156. package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
  157. package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
  158. package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
  159. package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
  160. package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
  161. package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
  162. package/Utils/LookupTable.d.mts +3 -0
  163. package/Utils/LookupTable.d.ts +3 -0
  164. package/Utils/LookupTable.js +61 -0
  165. package/Utils/LookupTable.mjs +3 -0
  166. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
  167. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
  168. package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
  169. package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
  170. package/Utils/Markdown/OverLongText.js +296 -2
  171. package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
  172. package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
  173. package/Utils/Markdown/SlowMarkdown.js +354 -4
  174. package/Utils/Markdown/SlowMarkdown.mjs +1 -0
  175. package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
  176. package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
  177. package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
  178. package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
  179. package/Utils/Metrics/MetricSeriesScope.js +5 -1
  180. package/Utils/Monitor/MonitorRootCauseWording.d.mts +3 -0
  181. package/Utils/Monitor/MonitorRootCauseWording.d.ts +3 -0
  182. package/Utils/Monitor/MonitorRootCauseWording.js +100 -11
  183. package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
  184. package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
  185. package/Utils/Monitor/ProbeAgreementRule.js +58 -0
  186. package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
  187. package/Utils/Monitor/ProbeFailureReading.d.mts +4 -0
  188. package/Utils/Monitor/ProbeFailureReading.d.ts +4 -0
  189. package/Utils/Monitor/ProbeFailureReading.js +30 -1
  190. package/Utils/Monitor/ProbeFailureReading.mjs +1 -0
  191. package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
  192. package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
  193. package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
  194. package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
  195. package/Utils/PromQL/PromQLEngine.js +18 -9
  196. package/Utils/PromQL/PromQLFunctionEvaluators.js +114 -58
  197. package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
  198. package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
  199. package/Utils/PromQL/PromQLLabelOrder.js +212 -0
  200. package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
  201. package/Utils/PromQL/PromQLLabels.js +4 -3
  202. package/Utils/PromQL/PromQLMetricNames.js +8 -2
  203. package/Utils/PromQL/PromQLParser.js +11 -6
  204. package/Utils/PromQL/PromQLRegex.d.mts +11 -0
  205. package/Utils/PromQL/PromQLRegex.d.ts +11 -0
  206. package/Utils/PromQL/PromQLRegex.js +990 -50
  207. package/Utils/PromQL/PromQLRegex.mjs +3 -0
  208. package/Utils/PromQL/PrometheusResponse.js +3 -1
  209. package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
  210. package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
  211. package/Utils/PromQL/RE2CharacterClass.js +532 -0
  212. package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
  213. package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
  214. package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
  215. package/Utils/RequestFailedDetailsUtil.js +452 -0
  216. package/Utils/RequestFailedDetailsUtil.mjs +2 -0
  217. package/Utils/Rum/UrlScrubber.d.mts +1 -1
  218. package/Utils/Rum/UrlScrubber.d.ts +1 -1
  219. package/Utils/Rum/UrlScrubber.js +10 -4
  220. package/Utils/Rum/UserFlow.js +22 -4
  221. package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
  222. package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
  223. package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
  224. package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
  225. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  226. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  227. package/Utils/Sms/OnCallPageSms.js +3 -1
  228. package/Utils/StateListType.d.mts +11 -0
  229. package/Utils/StateListType.d.ts +11 -0
  230. package/Utils/StateListType.js +21 -0
  231. package/Utils/StateListType.mjs +2 -0
  232. package/Utils/StateOrder.d.mts +8 -11
  233. package/Utils/StateOrder.d.ts +8 -11
  234. package/Utils/StateOrder.js +49 -84
  235. package/Utils/StateOrder.mjs +2 -0
  236. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
  237. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
  238. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
  239. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
  240. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
  241. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
  242. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
  243. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
  244. package/Utils/Syslog/SyslogMessageParser.js +16 -6
  245. package/Utils/Telemetry/HeartbeatAvailability.js +16 -21
  246. package/Utils/ValueFormatter.d.mts +1 -0
  247. package/Utils/ValueFormatter.d.ts +1 -0
  248. package/Utils/ValueFormatter.js +258 -18
  249. package/package.json +1 -1
@@ -0,0 +1,368 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_READ_TABLE_TERMS = exports.AI_READ_TABLE_AND_CITATION_PLURAL_SENTENCES = exports.AI_READ_TABLE_AND_CITATION_SENTENCES = exports.AI_READ_CITATION_PLURALS = exports.AI_READ_CITATIONS = exports.AI_READ_PROBE_STATUSES = exports.AI_READ_WEB_VITAL_RATINGS = exports.AI_READ_CONTAINER_STATUSES = exports.AI_READ_PROFILE_KINDS = exports.AI_READ_TELEMETRY_TABLE_LINES = exports.AI_READ_WINDOW = exports.AI_READ_TELEMETRY_TABLE_TITLES = exports.AI_READ_RECORD_TABLE_TERMS = exports.AI_READ_RECORD_TABLE_CELLS = exports.AI_READ_RECORD_TABLE_PLURAL_SENTENCES = exports.AI_READ_RECORD_TABLE_LINES = exports.AI_READ_RECORD_TABLE_TITLES = void 0;
4
+ const Translator_1 = require("../Translator");
5
+ /*
6
+ * WHAT ASK AI'S TABLES AND SOURCES SAY, BESIDE THEIR DATA, IN EVERY
7
+ * READER'S LANGUAGE (issues #7977, #7979 and #7980).
8
+ *
9
+ * A read that lists records leaves a table under the answer, and every
10
+ * read leaves a chip under Sources that names what it read. Since #7394
11
+ * the monitors table said its title and the line under it in the
12
+ * reader's language ("Monitore (4)"), while every other table - who is on
13
+ * call, the status pages, the SLOs, the logs and traces - kept the
14
+ * server's English title ("On-call policies (3)", "Logs (25)") over
15
+ * column names in German, and each chip under it said "Monitors (4
16
+ * found)". These are their words, as sentences of Types/AI/AIActionWords
17
+ * (which lists them among the sentences it trusts):
18
+ *
19
+ * - a table's title - what it lists, and how many (a figure, written
20
+ * the reader's way) - and the line under it: what it holds, in what
21
+ * order, over which window;
22
+ * - the cells that are OneUptime's words, not data: a schedule's row in
23
+ * "who is on call", Yes and No, Public and Private, a timeline entry's
24
+ * kind, a container's or a probe's status;
25
+ * - a source's label: what a read looked at and how much it found.
26
+ *
27
+ * A name the project chose (a policy, a team, a status), a value the data
28
+ * holds (a service, a host, a group-by attribute) and a number are values
29
+ * inside the sentence, never translated. A window is two moments
30
+ * (AIActionMoment): the server stores them as the ISO text it always
31
+ * wrote, and the Dashboard writes them in the reader's language and time.
32
+ * The English of each sentence is what the table or the chip stores - the
33
+ * Markdown and PDF exports print it and the model reads it - so most of
34
+ * them say exactly what the tools wrote before.
35
+ *
36
+ * The extractor reads this file for the Dashboard's keys; every sentence
37
+ * is worded in every Dashboard language (AIActionCardsGuard).
38
+ */
39
+ /*
40
+ * ---------------------------------------------------------------------------
41
+ * The record tables (#7977): on-call, status pages, maintenance, SLOs,
42
+ * runbooks, teams, timelines, workflows, probes, AI, data and security.
43
+ * ---------------------------------------------------------------------------
44
+ */
45
+ exports.AI_READ_RECORD_TABLE_TITLES = {
46
+ onCallPolicies: (0, Translator_1.translationKey)("On-call policies ({{count}})"),
47
+ // Who each rule of one policy pages now, by the policy's name.
48
+ onCallNowForPolicy: (0, Translator_1.translationKey)("On-call now: {{policy}}"),
49
+ onCallNow: (0, Translator_1.translationKey)("On-call now"),
50
+ onCallPages: (0, Translator_1.translationKey)("On-call pages ({{count}})"),
51
+ statusPages: (0, Translator_1.translationKey)("Status pages ({{count}})"),
52
+ statusPageAnnouncements: (0, Translator_1.translationKey)("Status page announcements ({{count}})"),
53
+ // One record is a maintenance event (#6817); {{number}} is "#7".
54
+ maintenanceEvent: (0, Translator_1.translationKey)("Maintenance event {{number}}"),
55
+ scheduledMaintenance: (0, Translator_1.translationKey)("Scheduled maintenance ({{count}})"),
56
+ slos: (0, Translator_1.translationKey)("SLOs ({{count}})"),
57
+ // {{status}} is the SLO status the list was filtered to, as the SLO list names it.
58
+ slosInStatus: (0, Translator_1.translationKey)("{{status}} SLOs ({{count}})"),
59
+ runbook: (0, Translator_1.translationKey)("Runbook: {{name}}"),
60
+ runbooks: (0, Translator_1.translationKey)("Runbooks ({{count}})"),
61
+ team: (0, Translator_1.translationKey)("Team: {{name}}"),
62
+ teams: (0, Translator_1.translationKey)("Teams ({{count}})"),
63
+ // {{incident}} and {{alert}} are the record's number ("#42"), or its ID.
64
+ incidentTimeline: (0, Translator_1.translationKey)("Incident {{incident}} timeline"),
65
+ alertTimeline: (0, Translator_1.translationKey)("Alert {{alert}} timeline"),
66
+ workflowRecentRuns: (0, Translator_1.translationKey)('Workflow "{{name}}" — recent runs'),
67
+ workflows: (0, Translator_1.translationKey)("Workflows ({{count}})"),
68
+ probes: (0, Translator_1.translationKey)("Probes ({{count}})"),
69
+ incidentInvestigations: (0, Translator_1.translationKey)("AI investigations — Incident {{incident}}"),
70
+ alertInvestigations: (0, Translator_1.translationKey)("AI investigations — Alert {{alert}}"),
71
+ aiInsights: (0, Translator_1.translationKey)("AI insights ({{count}})"),
72
+ dataStores: (0, Translator_1.translationKey)("Data stores ({{count}})"),
73
+ dataSecurityIssues: (0, Translator_1.translationKey)("Data security issues ({{count}})"),
74
+ // {{principal}} is the user, role or key asked about, as named.
75
+ principalCanReach: (0, Translator_1.translationKey)('What "{{principal}}" can reach ({{count}})'),
76
+ securityCases: (0, Translator_1.translationKey)("Security cases ({{count}})"),
77
+ // {{known}} of the {{count}} values looked up are on a threat feed.
78
+ threatIntel: (0, Translator_1.translationKey)("Threat intel ({{known}} of {{count}} known-bad)"),
79
+ entityActivity: (0, Translator_1.translationKey)("Entity activity"),
80
+ };
81
+ /*
82
+ * The line under a record table's title, in about 40 English letters
83
+ * where it can be: the line is cut beside Open on a phone. A count of
84
+ * days or hours that is not a plural's is written short ("30d"), as the
85
+ * tools always wrote it; a language writes its own short unit, or the
86
+ * word for the count it nearly always has (Locales/ARABIC.md).
87
+ */
88
+ exports.AI_READ_RECORD_TABLE_LINES = {
89
+ onCallPolicyRules: (0, Translator_1.translationKey)("Who each escalation rule pages, in order"),
90
+ // ARCHIVED_ON_CALL_POLICY_NOTE (Toolbox/OnCallTools), which the model reads too.
91
+ onCallPolicyArchived: (0, Translator_1.translationKey)("This on-call policy is archived, so it pages no one: incidents and alerts that list it notify nobody through it. Unarchive it to use it again."),
92
+ onCallPagesInHours: (0, Translator_1.translationKey)("Policy executions and direct pages in the last {{hours}}h"),
93
+ onCallPagesInDays: (0, Translator_1.translationKey)("Policy executions and direct pages in the last {{days}}d"),
94
+ announcementsShownInDays: (0, Translator_1.translationKey)("Shown in the last {{days}}d"),
95
+ maintenanceWindows: (0, Translator_1.translationKey)("Windows overlapping the last {{past}}d and next {{upcoming}}d"),
96
+ sloCompliance: (0, Translator_1.translationKey)("Compliance columns are as of each SLO's last evaluation."),
97
+ // A page of a longer list: {{total}} is always more than {{shown}}.
98
+ runbooksShown: (0, Translator_1.translationKey)("Showing {{shown}} of {{total}} runbooks"),
99
+ teamsShown: (0, Translator_1.translationKey)("Showing {{shown}} of {{total}} teams"),
100
+ // ARCHIVED_WORKFLOW_NOTE (Toolbox/WorkflowProbeTools), which the model reads too.
101
+ workflowArchived: (0, Translator_1.translationKey)("This workflow is archived, so it does not run from any trigger. Unarchive it to run it again."),
102
+ workflowDisabled: (0, Translator_1.translationKey)("This workflow is disabled."),
103
+ workflowRunOutcomes: (0, Translator_1.translationKey)("Run outcomes from the last {{count}} runs across these workflows"),
104
+ probesDisconnected: (0, Translator_1.translationKey)("Disconnected = no heartbeat in the last {{minutes}} minutes"),
105
+ aiInsightsInDays: (0, Translator_1.translationKey)("Preventive findings seen in the last {{days}}d"),
106
+ };
107
+ exports.AI_READ_RECORD_TABLE_PLURAL_SENTENCES = {
108
+ // Who is on call now, over every schedule: how many schedules it lists.
109
+ onCallNowSchedules: {
110
+ one: (0, Translator_1.translationKey)("On-call now ({{count}} schedule)"),
111
+ other: (0, Translator_1.translationKey)("On-call now ({{count}} schedules)"),
112
+ },
113
+ // The window an entity's activity was read over.
114
+ entityActivityHours: {
115
+ one: (0, Translator_1.translationKey)("The last {{count}} hour"),
116
+ other: (0, Translator_1.translationKey)("The last {{count}} hours"),
117
+ },
118
+ };
119
+ /*
120
+ * A record table's cells that are OneUptime's words: who an on-call
121
+ * schedule or rule pages now, a page's trigger, a timeline entry. A name
122
+ * inside one is a value, as named.
123
+ */
124
+ exports.AI_READ_RECORD_TABLE_CELLS = {
125
+ // {{name}}, {{team}} and {{schedule}} are names as the project gave them.
126
+ schedule: (0, Translator_1.translationKey)("Schedule '{{name}}'"),
127
+ // {{order}} is the rule's place in the policy's order, a number.
128
+ ruleDirectResponder: (0, Translator_1.translationKey)("Rule {{order}} — direct responder"),
129
+ ruleTeam: (0, Translator_1.translationKey)("Rule {{order}} — team '{{team}}'"),
130
+ ruleNextInRotation: (0, Translator_1.translationKey)("Rule {{order}} — next in rotation of schedule '{{schedule}}'"),
131
+ ruleSchedule: (0, Translator_1.translationKey)("Rule {{order}} — schedule '{{schedule}}'"),
132
+ allMembersOfTeam: (0, Translator_1.translationKey)("All members of '{{team}}'"),
133
+ // Who a rule that pages the next in rotation pages: never {{name}}, on call now.
134
+ personAfterInRotation: (0, Translator_1.translationKey)("The person after {{name}} in the rotation"),
135
+ scheduleNotAccessible: (0, Translator_1.translationKey)("Schedule not accessible (no read access or deleted)"),
136
+ noEscalationRules: (0, Translator_1.translationKey)("No escalation rules configured"),
137
+ // A page with no on-call policy behind it (DIRECT_PAGE_POLICY_LABEL).
138
+ directPage: (0, Translator_1.translationKey)("Direct page (no on-call policy)"),
139
+ // {{number}} is "#42"; {{title}} the incident's or alert's own title.
140
+ triggeredByIncident: (0, Translator_1.translationKey)("Incident {{number}}: {{title}}"),
141
+ triggeredByIncidentUnnumbered: (0, Translator_1.translationKey)("Incident: {{title}}"),
142
+ triggeredByAlert: (0, Translator_1.translationKey)("Alert: {{title}}"),
143
+ triggeredByUser: (0, Translator_1.translationKey)("Manually triggered by {{name}}"),
144
+ noNotificationsRecorded: (0, Translator_1.translationKey)("No individual notifications recorded"),
145
+ // An SLO's rolling window, as the SLO list writes it: "Rolling 30d".
146
+ rollingWindow: (0, Translator_1.translationKey)("Rolling {{days}}d"),
147
+ // {{state}} is the state as the project named it; {{rootCause}} as written.
148
+ stateChangedTo: (0, Translator_1.translationKey)("State changed to {{state}}"),
149
+ stateChangedToWithRootCause: (0, Translator_1.translationKey)("State changed to {{state}}. Root cause: {{rootCause}}"),
150
+ };
151
+ /*
152
+ * A record table's cells that are a word of OneUptime's alone, beside the
153
+ * words the read cards say already (Yes, No, Public, Private, an SLO's
154
+ * status): a timeline entry's kind, a team member's standing, a threat
155
+ * feed's verdict.
156
+ */
157
+ exports.AI_READ_RECORD_TABLE_TERMS = {
158
+ stateChange: (0, Translator_1.translationKey)("State change"),
159
+ internalNote: (0, Translator_1.translationKey)("Internal note"),
160
+ publicNote: (0, Translator_1.translationKey)("Public note"),
161
+ feed: (0, Translator_1.translationKey)("Feed"),
162
+ teamMember: (0, Translator_1.translationKey)("Member"),
163
+ invitedNotAccepted: (0, Translator_1.translationKey)("Invited (not yet accepted)"),
164
+ knownBad: (0, Translator_1.translationKey)("Known-bad"),
165
+ noMatch: (0, Translator_1.translationKey)("No match"),
166
+ };
167
+ /*
168
+ * ---------------------------------------------------------------------------
169
+ * The telemetry tables (#7979): logs, traces, RUM, profiles, containers
170
+ * and security events. Their lines name the window they read.
171
+ * ---------------------------------------------------------------------------
172
+ */
173
+ exports.AI_READ_TELEMETRY_TABLE_TITLES = {
174
+ logs: (0, Translator_1.translationKey)("Logs ({{count}})"),
175
+ // {{groupBy}} is what the spans were grouped by, as asked: "service", "http.route".
176
+ traceAnalytics: (0, Translator_1.translationKey)("Trace analytics by {{groupBy}}"),
177
+ rumApplications: (0, Translator_1.translationKey)("RUM applications"),
178
+ rumWebVitals: (0, Translator_1.translationKey)("RUM web vitals"),
179
+ whereTheTimeGoes: (0, Translator_1.translationKey)("Where the time goes"),
180
+ whatGotSlower: (0, Translator_1.translationKey)("What got slower"),
181
+ // {{host}} is the host's name, as it reports it.
182
+ containersOfHost: (0, Translator_1.translationKey)("Containers of {{host}}"),
183
+ securityEvents: (0, Translator_1.translationKey)("Security Events ({{count}})"),
184
+ securityEventsByClass: (0, Translator_1.translationKey)("Security events by class and severity"),
185
+ };
186
+ /*
187
+ * A window: {{start}} and {{end}} are moments, which the Dashboard writes
188
+ * in the reader's language and time ("14. Sep., 17:49 – 18:49"). The
189
+ * window alone has no words of its own, so it reads the reader's way.
190
+ */
191
+ exports.AI_READ_WINDOW = "{{start}} – {{end}}";
192
+ exports.AI_READ_TELEMETRY_TABLE_LINES = {
193
+ // {{metric}} is the duration figure the rows are ranked by: "p95", "avg".
194
+ rankedBy: (0, Translator_1.translationKey)("Ranked by {{metric}} · {{start}} – {{end}}"),
195
+ averages: (0, Translator_1.translationKey)("Averages · {{start}} – {{end}}"),
196
+ // {{kind}} is what the profile measures (AI_READ_PROFILE_KINDS).
197
+ profileKindWindow: (0, Translator_1.translationKey)("{{kind}} · {{start}} to {{end}}"),
198
+ // Two windows, before and after: four moments.
199
+ profileWindows: (0, Translator_1.translationKey)("{{beforeStart}} to {{beforeEnd}} → {{afterStart}} to {{afterEnd}}"),
200
+ // The summary read only the newest events: its counts are a floor.
201
+ basedOnRecentEvents: (0, Translator_1.translationKey)("{{start}} – {{end}} (based on the most recent {{count}} events — counts are a floor)"),
202
+ };
203
+ /*
204
+ * What a continuous profile measures, as the profile tools name it in a
205
+ * sentence (Utils/Profiles/ProfileTypes' getProfileCategoryNoun).
206
+ */
207
+ exports.AI_READ_PROFILE_KINDS = [
208
+ (0, Translator_1.translationKey)("CPU time"),
209
+ (0, Translator_1.translationKey)("wall time"),
210
+ (0, Translator_1.translationKey)("memory in use"),
211
+ (0, Translator_1.translationKey)("memory allocations"),
212
+ (0, Translator_1.translationKey)("time waiting on locks"),
213
+ (0, Translator_1.translationKey)("goroutines"),
214
+ (0, Translator_1.translationKey)("samples"),
215
+ ];
216
+ // A container's status, as the containers table says it (ContainerTools).
217
+ exports.AI_READ_CONTAINER_STATUSES = {
218
+ stoppedReporting: (0, Translator_1.translationKey)("Stopped reporting"),
219
+ startedInWindow: (0, Translator_1.translationKey)("Started in this window"),
220
+ reporting: (0, Translator_1.translationKey)("Reporting"),
221
+ };
222
+ // A web vital's rating, as the RUM web vitals table says it (RumTools).
223
+ exports.AI_READ_WEB_VITAL_RATINGS = {
224
+ good: (0, Translator_1.translationKey)("Good"),
225
+ needsImprovement: (0, Translator_1.translationKey)("Needs improvement"),
226
+ poor: (0, Translator_1.translationKey)("Poor"),
227
+ };
228
+ // A probe's status, as the probes table says it (WorkflowProbeTools).
229
+ exports.AI_READ_PROBE_STATUSES = {
230
+ connected: (0, Translator_1.translationKey)("Connected"),
231
+ disconnected: (0, Translator_1.translationKey)("Disconnected"),
232
+ };
233
+ /*
234
+ * ---------------------------------------------------------------------------
235
+ * The chips under Sources (#7980): what each read looked at, and how much
236
+ * it found. Each says what the tool's label always said, so an answer's
237
+ * history reads the same to the model.
238
+ * ---------------------------------------------------------------------------
239
+ */
240
+ exports.AI_READ_CITATIONS = {
241
+ // {{name}} is the monitor's name, or its ID.
242
+ monitor: (0, Translator_1.translationKey)("Monitor {{name}} + status timeline"),
243
+ monitors: (0, Translator_1.translationKey)("Monitors ({{count}} found)"),
244
+ // One page of a longer list: {{count}} of {{total}}.
245
+ monitorsPaged: (0, Translator_1.translationKey)("Monitors ({{count}} of {{total}})"),
246
+ monitorsWithProblems: (0, Translator_1.translationKey)("Monitors with problems ({{count}} found)"),
247
+ monitorsWithProblemsPaged: (0, Translator_1.translationKey)("Monitors with problems ({{count}} of {{total}})"),
248
+ // {{status}} is a status the project named, as named.
249
+ monitorsInStatus: (0, Translator_1.translationKey)('Monitors in status "{{status}}" ({{count}} found)'),
250
+ monitorsInStatusPaged: (0, Translator_1.translationKey)('Monitors in status "{{status}}" ({{count}} of {{total}})'),
251
+ incidents: (0, Translator_1.translationKey)("Incidents ({{count}} total)"),
252
+ // {{hours}}: how far back the list reaches.
253
+ incidentsInHours: (0, Translator_1.translationKey)("Incidents, last {{hours}}h ({{count}} total)"),
254
+ activeIncidents: (0, Translator_1.translationKey)("Active incidents ({{count}} total)"),
255
+ activeIncidentsInHours: (0, Translator_1.translationKey)("Active incidents, last {{hours}}h ({{count}} total)"),
256
+ resolvedIncidents: (0, Translator_1.translationKey)("Resolved incidents ({{count}} total)"),
257
+ resolvedIncidentsInHours: (0, Translator_1.translationKey)("Resolved incidents, last {{hours}}h ({{count}} total)"),
258
+ // {{query}} is the text searched for, as typed.
259
+ incidentSearch: (0, Translator_1.translationKey)('Incident search "{{query}}" ({{count}} found)'),
260
+ // {{incident}} is "#42", or the incident's ID.
261
+ incident: (0, Translator_1.translationKey)("Incident {{incident}}"),
262
+ activeAlerts: (0, Translator_1.translationKey)("Active alerts ({{count}} found)"),
263
+ activeAlertsPaged: (0, Translator_1.translationKey)("Active alerts ({{count}} of {{total}})"),
264
+ activeAlertsInHours: (0, Translator_1.translationKey)("Active alerts, last {{hours}}h ({{count}} found)"),
265
+ activeAlertsInHoursPaged: (0, Translator_1.translationKey)("Active alerts, last {{hours}}h ({{count}} of {{total}})"),
266
+ alertsInHours: (0, Translator_1.translationKey)("Alerts, last {{hours}}h ({{count}} found)"),
267
+ alertsInHoursPaged: (0, Translator_1.translationKey)("Alerts, last {{hours}}h ({{count}} of {{total}})"),
268
+ resolvedAlertsInHours: (0, Translator_1.translationKey)("Resolved alerts, last {{hours}}h ({{count}} found)"),
269
+ resolvedAlertsInHoursPaged: (0, Translator_1.translationKey)("Resolved alerts, last {{hours}}h ({{count}} of {{total}})"),
270
+ alert: (0, Translator_1.translationKey)("Alert {{alert}}"),
271
+ topExceptions: (0, Translator_1.translationKey)("Top exceptions, last {{hours}}h ({{count}} found)"),
272
+ onCallPolicies: (0, Translator_1.translationKey)("On-call policies ({{count}} found)"),
273
+ onCallPoliciesPaged: (0, Translator_1.translationKey)("On-call policies ({{count}} of {{total}})"),
274
+ // {{policy}} and {{schedule}} are names, or IDs.
275
+ onCallPolicy: (0, Translator_1.translationKey)("On-call policy '{{policy}}'"),
276
+ onCallNowForPolicy: (0, Translator_1.translationKey)("On-call now for '{{policy}}' ({{responders}})"),
277
+ // {{responders}} is how many people it pages (AI_READ_CITATION_PLURALS.responders).
278
+ onCallNow: (0, Translator_1.translationKey)("On-call now ({{responders}})"),
279
+ onCallNowForSchedule: (0, Translator_1.translationKey)("On-call now: '{{schedule}}'"),
280
+ onCallPagesInHours: (0, Translator_1.translationKey)("On-call pages, last {{hours}}h ({{count}} found)"),
281
+ onCallPagesInHoursPaged: (0, Translator_1.translationKey)("On-call pages, last {{hours}}h ({{count}} of {{total}})"),
282
+ onCallPagesInDays: (0, Translator_1.translationKey)("On-call pages, last {{days}}d ({{count}} found)"),
283
+ onCallPagesInDaysPaged: (0, Translator_1.translationKey)("On-call pages, last {{days}}d ({{count}} of {{total}})"),
284
+ statusPages: (0, Translator_1.translationKey)("Status pages ({{count}} total)"),
285
+ // {{name}} is the status page's name, or its ID.
286
+ statusPage: (0, Translator_1.translationKey)('Status page "{{name}}"'),
287
+ statusPageAnnouncements: (0, Translator_1.translationKey)("Status page announcements, last {{days}}d ({{count}} total)"),
288
+ maintenanceEvent: (0, Translator_1.translationKey)("Maintenance event {{number}}"),
289
+ scheduledMaintenance: (0, Translator_1.translationKey)("Scheduled maintenance, -{{past}}d/+{{upcoming}}d ({{count}} found)"),
290
+ slos: (0, Translator_1.translationKey)("SLOs ({{count}} found)"),
291
+ slosInStatus: (0, Translator_1.translationKey)("{{status}} SLOs ({{count}} found)"),
292
+ slo: (0, Translator_1.translationKey)("SLO {{name}}"),
293
+ runbooks: (0, Translator_1.translationKey)("Runbooks ({{count}} found)"),
294
+ runbooksPaged: (0, Translator_1.translationKey)("Runbooks ({{count}} of {{total}})"),
295
+ teams: (0, Translator_1.translationKey)("Teams ({{count}} found)"),
296
+ teamsPaged: (0, Translator_1.translationKey)("Teams ({{count}} of {{total}})"),
297
+ // {{entries}} is how many entries it read (AI_READ_CITATION_PLURALS.timelineEntries).
298
+ incidentTimeline: (0, Translator_1.translationKey)("Incident {{incident}} timeline ({{entries}})"),
299
+ alertTimeline: (0, Translator_1.translationKey)("Alert {{alert}} timeline ({{entries}})"),
300
+ workflows: (0, Translator_1.translationKey)("Workflows ({{count}} found)"),
301
+ workflowsPaged: (0, Translator_1.translationKey)("Workflows (showing {{count}} of {{total}})"),
302
+ probes: (0, Translator_1.translationKey)("Probes ({{count}} found, {{disconnected}} disconnected)"),
303
+ probesNone: (0, Translator_1.translationKey)("Probes (0 found)"),
304
+ aiInsights: (0, Translator_1.translationKey)("AI insights, last {{days}}d ({{count}} found)"),
305
+ // A window, as AI_READ_WINDOW.
306
+ logs: (0, Translator_1.translationKey)("Logs {{start}} – {{end}} ({{count}} shown)"),
307
+ logVolume: (0, Translator_1.translationKey)("Log volume by severity, {{start}} – {{end}}"),
308
+ traceAnalytics: (0, Translator_1.translationKey)("Trace analytics by {{groupBy}} ({{metric}}), {{start}} – {{end}}"),
309
+ // {{traceId}} as the trace carries it.
310
+ trace: (0, Translator_1.translationKey)("Trace {{traceId}} ({{count}} spans)"),
311
+ traceWithMoreSpans: (0, Translator_1.translationKey)("Trace {{traceId}} ({{count}}+ spans)"),
312
+ rumApplications: (0, Translator_1.translationKey)("RUM applications ({{count}} found)"),
313
+ rumWebVitals: (0, Translator_1.translationKey)("RUM web vitals, {{start}} – {{end}}"),
314
+ containersOfHost: (0, Translator_1.translationKey)("Containers of {{host}}, {{start}} – {{end}}"),
315
+ securityEvents: (0, Translator_1.translationKey)("Security events {{start}} – {{end}} ({{count}} shown)"),
316
+ securityEventSummary: (0, Translator_1.translationKey)("Security event summary {{start}} – {{end}}"),
317
+ // The summary read only the newest {{count}} events.
318
+ securityEventSummarySampled: (0, Translator_1.translationKey)("Security event summary {{start}} – {{end}} (based on the most recent {{count}} events — counts are a floor)"),
319
+ };
320
+ exports.AI_READ_CITATION_PLURALS = {
321
+ // {{name}} is the team's name, as named.
322
+ team: {
323
+ one: (0, Translator_1.translationKey)('Team "{{name}}" ({{count}} member)'),
324
+ other: (0, Translator_1.translationKey)('Team "{{name}}" ({{count}} members)'),
325
+ },
326
+ runbook: {
327
+ one: (0, Translator_1.translationKey)('Runbook "{{name}}" ({{count}} step)'),
328
+ other: (0, Translator_1.translationKey)('Runbook "{{name}}" ({{count}} steps)'),
329
+ },
330
+ workflow: {
331
+ one: (0, Translator_1.translationKey)('Workflow "{{name}}" ({{count}} recent run)'),
332
+ other: (0, Translator_1.translationKey)('Workflow "{{name}}" ({{count}} recent runs)'),
333
+ },
334
+ // How many people a policy or the project's schedules page now.
335
+ responders: {
336
+ one: (0, Translator_1.translationKey)("{{count}} responder"),
337
+ other: (0, Translator_1.translationKey)("{{count}} responders"),
338
+ },
339
+ timelineEntries: {
340
+ one: (0, Translator_1.translationKey)("{{count}} entry"),
341
+ other: (0, Translator_1.translationKey)("{{count}} entries"),
342
+ },
343
+ };
344
+ /*
345
+ * ---------------------------------------------------------------------------
346
+ * Every sentence and term above, for AIActionWords' lists.
347
+ * ---------------------------------------------------------------------------
348
+ */
349
+ exports.AI_READ_TABLE_AND_CITATION_SENTENCES = [
350
+ ...Object.values(exports.AI_READ_RECORD_TABLE_TITLES),
351
+ ...Object.values(exports.AI_READ_RECORD_TABLE_LINES),
352
+ ...Object.values(exports.AI_READ_RECORD_TABLE_CELLS),
353
+ ...Object.values(exports.AI_READ_TELEMETRY_TABLE_TITLES),
354
+ exports.AI_READ_WINDOW,
355
+ ...Object.values(exports.AI_READ_TELEMETRY_TABLE_LINES),
356
+ ...Object.values(exports.AI_READ_CITATIONS),
357
+ ];
358
+ exports.AI_READ_TABLE_AND_CITATION_PLURAL_SENTENCES = [
359
+ ...Object.values(exports.AI_READ_RECORD_TABLE_PLURAL_SENTENCES),
360
+ ...Object.values(exports.AI_READ_CITATION_PLURALS),
361
+ ];
362
+ exports.AI_READ_TABLE_TERMS = [
363
+ ...Object.values(exports.AI_READ_RECORD_TABLE_TERMS),
364
+ ...exports.AI_READ_PROFILE_KINDS,
365
+ ...Object.values(exports.AI_READ_CONTAINER_STATUSES),
366
+ ...Object.values(exports.AI_READ_PROBE_STATUSES),
367
+ ...Object.values(exports.AI_READ_WEB_VITAL_RATINGS),
368
+ ];
@@ -0,0 +1,18 @@
1
+ import commonJsModule from "./AIReadTableWords.js";
2
+ export const AI_READ_CITATIONS = commonJsModule.AI_READ_CITATIONS;
3
+ export const AI_READ_CITATION_PLURALS = commonJsModule.AI_READ_CITATION_PLURALS;
4
+ export const AI_READ_CONTAINER_STATUSES = commonJsModule.AI_READ_CONTAINER_STATUSES;
5
+ export const AI_READ_PROBE_STATUSES = commonJsModule.AI_READ_PROBE_STATUSES;
6
+ export const AI_READ_PROFILE_KINDS = commonJsModule.AI_READ_PROFILE_KINDS;
7
+ export const AI_READ_RECORD_TABLE_CELLS = commonJsModule.AI_READ_RECORD_TABLE_CELLS;
8
+ export const AI_READ_RECORD_TABLE_LINES = commonJsModule.AI_READ_RECORD_TABLE_LINES;
9
+ export const AI_READ_RECORD_TABLE_PLURAL_SENTENCES = commonJsModule.AI_READ_RECORD_TABLE_PLURAL_SENTENCES;
10
+ export const AI_READ_RECORD_TABLE_TERMS = commonJsModule.AI_READ_RECORD_TABLE_TERMS;
11
+ export const AI_READ_RECORD_TABLE_TITLES = commonJsModule.AI_READ_RECORD_TABLE_TITLES;
12
+ export const AI_READ_TABLE_AND_CITATION_PLURAL_SENTENCES = commonJsModule.AI_READ_TABLE_AND_CITATION_PLURAL_SENTENCES;
13
+ export const AI_READ_TABLE_AND_CITATION_SENTENCES = commonJsModule.AI_READ_TABLE_AND_CITATION_SENTENCES;
14
+ export const AI_READ_TABLE_TERMS = commonJsModule.AI_READ_TABLE_TERMS;
15
+ export const AI_READ_TELEMETRY_TABLE_LINES = commonJsModule.AI_READ_TELEMETRY_TABLE_LINES;
16
+ export const AI_READ_TELEMETRY_TABLE_TITLES = commonJsModule.AI_READ_TELEMETRY_TABLE_TITLES;
17
+ export const AI_READ_WEB_VITAL_RATINGS = commonJsModule.AI_READ_WEB_VITAL_RATINGS;
18
+ export const AI_READ_WINDOW = commonJsModule.AI_READ_WINDOW;
@@ -24,6 +24,9 @@ export declare enum AiRunRefusalCode {
24
24
  IncidentTokenLimitUsedUp = "incident_token_limit_used_up",
25
25
  AlertTokenLimitPaused = "alert_token_limit_paused",
26
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",
27
30
  InsightNotFound = "insight_not_found",
28
31
  InsightTriageRunning = "insight_triage_running",
29
32
  TriageFinished = "triage_finished",
@@ -24,6 +24,9 @@ export declare enum AiRunRefusalCode {
24
24
  IncidentTokenLimitUsedUp = "incident_token_limit_used_up",
25
25
  AlertTokenLimitPaused = "alert_token_limit_paused",
26
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",
27
30
  InsightNotFound = "insight_not_found",
28
31
  InsightTriageRunning = "insight_triage_running",
29
32
  TriageFinished = "triage_finished",
@@ -19,6 +19,8 @@ const RecordAiTokenLimit_1 = require("./RecordAiTokenLimit");
19
19
  * start an investigation - Try again on the failure notice, and Investigate
20
20
  * now while a rule waits - and an AI insight's card has Try again for its
21
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).
22
24
  *
23
25
  * The server answers the refusal as bad data (400) with its English
24
26
  * sentence as the message, for the API and for older Dashboards, and with
@@ -70,7 +72,23 @@ var AiRunRefusalCode;
70
72
  AiRunRefusalCode["IncidentTokenLimitUsedUp"] = "incident_token_limit_used_up";
71
73
  AiRunRefusalCode["AlertTokenLimitPaused"] = "alert_token_limit_paused";
72
74
  AiRunRefusalCode["AlertTokenLimitUsedUp"] = "alert_token_limit_used_up";
73
- // An AI insight's triage Try again.
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
+ */
74
92
  AiRunRefusalCode["InsightNotFound"] = "insight_not_found";
75
93
  AiRunRefusalCode["InsightTriageRunning"] = "insight_triage_running";
76
94
  AiRunRefusalCode["TriageFinished"] = "triage_finished";
@@ -107,6 +125,9 @@ exports.AI_RUN_REFUSALS = {
107
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."),
108
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."),
109
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."),
110
131
  [AiRunRefusalCode.InsightNotFound]: (0, Translator_1.translationKey)("This AI insight no longer exists."),
111
132
  [AiRunRefusalCode.InsightTriageRunning]: (0, Translator_1.translationKey)("This insight is being triaged already."),
112
133
  [AiRunRefusalCode.TriageFinished]: (0, Translator_1.translationKey)("Only a triage that did not finish can be tried again."),
@@ -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) {
@@ -5,20 +5,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAuditLogActionLabel = exports.AUDIT_LOG_ACTION_LABELS = void 0;
7
7
  const AuditLogAction_1 = __importDefault(require("./AuditLogAction"));
8
+ /*
9
+ * Marks an English text as a key of the Dashboard's locales - the same
10
+ * marker as Common/UI/Utils/TranslateTemplate's translationKey, kept here
11
+ * so this file stays free of the UI. It returns the text unchanged.
12
+ */
13
+ const translationKey = (text) => {
14
+ return text;
15
+ };
8
16
  /*
9
17
  * How each action reads where people read the audit log: its table, its
10
18
  * filter and an entry's details. An entry, the API and an export carry the
11
- * action itself ("SignIn"); these are its words ("Sign In").
19
+ * action itself ("SignIn"); these are its words ("Sign In"), keys of the
20
+ * Dashboard's locales (its extractor reads this file as a "keys" root),
21
+ * looked up in the reader's language wherever they are drawn.
12
22
  */
13
23
  exports.AUDIT_LOG_ACTION_LABELS = {
14
- [AuditLogAction_1.default.Create]: "Create",
15
- [AuditLogAction_1.default.Update]: "Update",
16
- [AuditLogAction_1.default.Delete]: "Delete",
17
- [AuditLogAction_1.default.Download]: "Download",
18
- [AuditLogAction_1.default.SignIn]: "Sign In",
19
- [AuditLogAction_1.default.SignOut]: "Sign Out",
20
- [AuditLogAction_1.default.SessionTimeout]: "Session Timeout",
21
- [AuditLogAction_1.default.SessionRevoked]: "Session Revoked",
24
+ [AuditLogAction_1.default.Create]: translationKey("Create"),
25
+ [AuditLogAction_1.default.Update]: translationKey("Update"),
26
+ [AuditLogAction_1.default.Delete]: translationKey("Delete"),
27
+ [AuditLogAction_1.default.Download]: translationKey("Download"),
28
+ [AuditLogAction_1.default.SignIn]: translationKey("Sign In"),
29
+ [AuditLogAction_1.default.SignOut]: translationKey("Sign Out"),
30
+ [AuditLogAction_1.default.SessionTimeout]: translationKey("Session Timeout"),
31
+ [AuditLogAction_1.default.SessionRevoked]: translationKey("Session Revoked"),
22
32
  };
23
33
  // The words of an action, or the action as it is when it is not one this release knows.
24
34
  const getAuditLogActionLabel = (action) => {
@@ -1,4 +1,5 @@
1
1
  import AggregationInterval from "./AggregationInterval.mjs";
2
+ import { CalendarUnit } from "../Date.mjs";
2
3
  import Timezone from "../Timezone.mjs";
3
4
  export interface AggregateWindow {
4
5
  startTimestamp?: Date | undefined;
@@ -19,11 +20,26 @@ export declare class AggregationIntervalUtil {
19
20
  aggregationInterval?: AggregationInterval | undefined;
20
21
  }): AggregationInterval;
21
22
  static isCalendarInterval(interval: AggregationInterval): boolean;
23
+ static getCalendarUnit(interval: AggregationInterval): CalendarUnit | undefined;
24
+ static getBucketEnd(data: {
25
+ bucketStart: Date;
26
+ interval: AggregationInterval;
27
+ timezone?: Timezone | undefined;
28
+ }): Date;
29
+ static getListedReaderTimezone(): Timezone | undefined;
30
+ static readRequestedTimezone(value: unknown): Timezone | undefined;
31
+ static getTimezoneForWindow(data: {
32
+ startDate: Date;
33
+ endDate: Date;
34
+ aggregationInterval?: AggregationInterval | undefined;
35
+ timezone: Timezone | undefined;
36
+ }): Timezone | undefined;
22
37
  static getReaderTimezone(data: {
23
38
  startDate: Date;
24
39
  endDate: Date;
25
40
  aggregationInterval?: AggregationInterval | undefined;
26
41
  }): Timezone | undefined;
42
+ static withTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest, timezone: Timezone | undefined): TRequest;
27
43
  static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
28
44
  static getAggregationIntervalMs(interval: AggregationInterval): number;
29
45
  static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;
@@ -1,4 +1,5 @@
1
1
  import AggregationInterval from "./AggregationInterval";
2
+ import { CalendarUnit } from "../Date";
2
3
  import Timezone from "../Timezone";
3
4
  export interface AggregateWindow {
4
5
  startTimestamp?: Date | undefined;
@@ -19,11 +20,26 @@ export declare class AggregationIntervalUtil {
19
20
  aggregationInterval?: AggregationInterval | undefined;
20
21
  }): AggregationInterval;
21
22
  static isCalendarInterval(interval: AggregationInterval): boolean;
23
+ static getCalendarUnit(interval: AggregationInterval): CalendarUnit | undefined;
24
+ static getBucketEnd(data: {
25
+ bucketStart: Date;
26
+ interval: AggregationInterval;
27
+ timezone?: Timezone | undefined;
28
+ }): Date;
29
+ static getListedReaderTimezone(): Timezone | undefined;
30
+ static readRequestedTimezone(value: unknown): Timezone | undefined;
31
+ static getTimezoneForWindow(data: {
32
+ startDate: Date;
33
+ endDate: Date;
34
+ aggregationInterval?: AggregationInterval | undefined;
35
+ timezone: Timezone | undefined;
36
+ }): Timezone | undefined;
22
37
  static getReaderTimezone(data: {
23
38
  startDate: Date;
24
39
  endDate: Date;
25
40
  aggregationInterval?: AggregationInterval | undefined;
26
41
  }): Timezone | undefined;
42
+ static withTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest, timezone: Timezone | undefined): TRequest;
27
43
  static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
28
44
  static getAggregationIntervalMs(interval: AggregationInterval): number;
29
45
  static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;