@oneuptime/common 14.0.98 → 14.0.100

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 (1042) hide show
  1. package/Models/AnalyticsModels/ExceptionInstance.d.mts +2 -0
  2. package/Models/AnalyticsModels/ExceptionInstance.d.ts +2 -0
  3. package/Models/AnalyticsModels/ExceptionInstance.js +31 -0
  4. package/Models/AnalyticsModels/LogCountBaseline.d.mts +6 -0
  5. package/Models/AnalyticsModels/LogCountBaseline.d.ts +6 -0
  6. package/Models/AnalyticsModels/LogCountBaseline.js +7 -1
  7. package/Models/AnalyticsModels/MetricBaselineHourly.d.mts +11 -6
  8. package/Models/AnalyticsModels/MetricBaselineHourly.d.ts +11 -6
  9. package/Models/AnalyticsModels/MetricBaselineHourly.js +12 -7
  10. package/Models/AnalyticsModels/RumSessionChunk.js +1 -1
  11. package/Models/AnalyticsModels/SpanCountBaseline.d.mts +17 -9
  12. package/Models/AnalyticsModels/SpanCountBaseline.d.ts +17 -9
  13. package/Models/AnalyticsModels/SpanCountBaseline.js +18 -10
  14. package/Models/DatabaseModels/CloudAccount.d.mts +8 -0
  15. package/Models/DatabaseModels/CloudAccount.d.ts +8 -0
  16. package/Models/DatabaseModels/CloudAccount.js +167 -0
  17. package/Models/DatabaseModels/CloudAccountFeed.d.mts +27 -0
  18. package/Models/DatabaseModels/CloudAccountFeed.d.ts +27 -0
  19. package/Models/DatabaseModels/CloudAccountFeed.js +557 -0
  20. package/Models/DatabaseModels/CloudAccountFeed.mjs +3 -0
  21. package/Models/DatabaseModels/CloudApp.d.mts +27 -0
  22. package/Models/DatabaseModels/CloudApp.d.ts +27 -0
  23. package/Models/DatabaseModels/CloudApp.js +414 -0
  24. package/Models/DatabaseModels/CloudApp.mjs +2 -0
  25. package/Models/DatabaseModels/CloudAppRevision.d.mts +23 -0
  26. package/Models/DatabaseModels/CloudAppRevision.d.ts +23 -0
  27. package/Models/DatabaseModels/CloudAppRevision.js +351 -0
  28. package/Models/DatabaseModels/CloudAppRevision.mjs +2 -0
  29. package/Models/DatabaseModels/CloudResourceFeed.d.mts +4 -1
  30. package/Models/DatabaseModels/CloudResourceFeed.d.ts +4 -1
  31. package/Models/DatabaseModels/CloudResourceFeed.js +17 -1
  32. package/Models/DatabaseModels/CloudResourceFeed.mjs +1 -0
  33. package/Models/DatabaseModels/CloudResourceInstance.d.mts +4 -0
  34. package/Models/DatabaseModels/CloudResourceInstance.d.ts +4 -0
  35. package/Models/DatabaseModels/CloudResourceInstance.js +60 -1
  36. package/Models/DatabaseModels/CloudResourceLabelRule.d.mts +2 -0
  37. package/Models/DatabaseModels/CloudResourceLabelRule.d.ts +2 -0
  38. package/Models/DatabaseModels/CloudResourceLabelRule.js +44 -1
  39. package/Models/DatabaseModels/CloudResourceOwnerRule.d.mts +2 -0
  40. package/Models/DatabaseModels/CloudResourceOwnerRule.d.ts +2 -0
  41. package/Models/DatabaseModels/CloudResourceOwnerRule.js +44 -1
  42. package/Models/DatabaseModels/Dashboard.d.mts +2 -0
  43. package/Models/DatabaseModels/Dashboard.d.ts +2 -0
  44. package/Models/DatabaseModels/Dashboard.js +88 -0
  45. package/Models/DatabaseModels/DataSecurityCheckSetting.d.mts +17 -0
  46. package/Models/DatabaseModels/DataSecurityCheckSetting.d.ts +17 -0
  47. package/Models/DatabaseModels/DataSecurityCheckSetting.js +304 -0
  48. package/Models/DatabaseModels/DataSecurityCheckSetting.mjs +2 -0
  49. package/Models/DatabaseModels/DataSecurityCustomDataType.d.mts +25 -0
  50. package/Models/DatabaseModels/DataSecurityCustomDataType.d.ts +25 -0
  51. package/Models/DatabaseModels/DataSecurityCustomDataType.js +431 -0
  52. package/Models/DatabaseModels/DataSecurityCustomDataType.mjs +2 -0
  53. package/Models/DatabaseModels/DataSecurityFlow.d.mts +26 -0
  54. package/Models/DatabaseModels/DataSecurityFlow.d.ts +26 -0
  55. package/Models/DatabaseModels/DataSecurityFlow.js +456 -0
  56. package/Models/DatabaseModels/DataSecurityFlow.mjs +2 -0
  57. package/Models/DatabaseModels/DataSecurityIdentity.d.mts +29 -0
  58. package/Models/DatabaseModels/DataSecurityIdentity.d.ts +29 -0
  59. package/Models/DatabaseModels/DataSecurityIdentity.js +535 -0
  60. package/Models/DatabaseModels/DataSecurityIdentity.mjs +2 -0
  61. package/Models/DatabaseModels/DataSecurityIssue.d.mts +49 -0
  62. package/Models/DatabaseModels/DataSecurityIssue.d.ts +49 -0
  63. package/Models/DatabaseModels/DataSecurityIssue.js +797 -0
  64. package/Models/DatabaseModels/DataSecurityIssue.mjs +2 -0
  65. package/Models/DatabaseModels/DataSecurityIssueFeed.d.mts +43 -0
  66. package/Models/DatabaseModels/DataSecurityIssueFeed.d.ts +43 -0
  67. package/Models/DatabaseModels/DataSecurityIssueFeed.js +382 -0
  68. package/Models/DatabaseModels/DataSecurityIssueFeed.mjs +3 -0
  69. package/Models/DatabaseModels/DataSecurityResidencyRule.d.mts +18 -0
  70. package/Models/DatabaseModels/DataSecurityResidencyRule.d.ts +18 -0
  71. package/Models/DatabaseModels/DataSecurityResidencyRule.js +331 -0
  72. package/Models/DatabaseModels/DataSecurityResidencyRule.mjs +2 -0
  73. package/Models/DatabaseModels/DataSecurityScan.d.mts +29 -0
  74. package/Models/DatabaseModels/DataSecurityScan.d.ts +29 -0
  75. package/Models/DatabaseModels/DataSecurityScan.js +520 -0
  76. package/Models/DatabaseModels/DataSecurityScan.mjs +2 -0
  77. package/Models/DatabaseModels/DataSecuritySetting.d.mts +35 -0
  78. package/Models/DatabaseModels/DataSecuritySetting.d.ts +35 -0
  79. package/Models/DatabaseModels/DataSecuritySetting.js +631 -0
  80. package/Models/DatabaseModels/DataSecuritySetting.mjs +2 -0
  81. package/Models/DatabaseModels/DataStore.d.mts +84 -0
  82. package/Models/DatabaseModels/DataStore.d.ts +84 -0
  83. package/Models/DatabaseModels/DataStore.js +1359 -0
  84. package/Models/DatabaseModels/DataStore.mjs +2 -0
  85. package/Models/DatabaseModels/DataStoreAccess.d.mts +23 -0
  86. package/Models/DatabaseModels/DataStoreAccess.d.ts +23 -0
  87. package/Models/DatabaseModels/DataStoreAccess.js +427 -0
  88. package/Models/DatabaseModels/DataStoreAccess.mjs +2 -0
  89. package/Models/DatabaseModels/DataStoreFeed.d.mts +36 -0
  90. package/Models/DatabaseModels/DataStoreFeed.d.ts +36 -0
  91. package/Models/DatabaseModels/DataStoreFeed.js +613 -0
  92. package/Models/DatabaseModels/DataStoreFeed.mjs +3 -0
  93. package/Models/DatabaseModels/DataStoreFinding.d.mts +41 -0
  94. package/Models/DatabaseModels/DataStoreFinding.d.ts +41 -0
  95. package/Models/DatabaseModels/DataStoreFinding.js +745 -0
  96. package/Models/DatabaseModels/DataStoreFinding.mjs +2 -0
  97. package/Models/DatabaseModels/DataStoreLabelRule.d.mts +21 -0
  98. package/Models/DatabaseModels/DataStoreLabelRule.d.ts +21 -0
  99. package/Models/DatabaseModels/DataStoreLabelRule.js +623 -0
  100. package/Models/DatabaseModels/DataStoreLabelRule.mjs +2 -0
  101. package/Models/DatabaseModels/DataStoreOwnerRule.d.mts +24 -0
  102. package/Models/DatabaseModels/DataStoreOwnerRule.d.ts +24 -0
  103. package/Models/DatabaseModels/DataStoreOwnerRule.js +714 -0
  104. package/Models/DatabaseModels/DataStoreOwnerRule.mjs +2 -0
  105. package/Models/DatabaseModels/DataStoreOwnerTeam.d.mts +19 -0
  106. package/Models/DatabaseModels/DataStoreOwnerTeam.d.ts +19 -0
  107. package/Models/DatabaseModels/DataStoreOwnerTeam.js +477 -0
  108. package/Models/DatabaseModels/DataStoreOwnerTeam.mjs +2 -0
  109. package/Models/DatabaseModels/DataStoreOwnerUser.d.mts +18 -0
  110. package/Models/DatabaseModels/DataStoreOwnerUser.d.ts +18 -0
  111. package/Models/DatabaseModels/DataStoreOwnerUser.js +476 -0
  112. package/Models/DatabaseModels/DataStoreOwnerUser.mjs +2 -0
  113. package/Models/DatabaseModels/DetectionRule.d.mts +1 -0
  114. package/Models/DatabaseModels/DetectionRule.d.ts +1 -0
  115. package/Models/DatabaseModels/DetectionRule.js +31 -0
  116. package/Models/DatabaseModels/ExceptionSavedView.d.mts +16 -0
  117. package/Models/DatabaseModels/ExceptionSavedView.d.ts +16 -0
  118. package/Models/DatabaseModels/ExceptionSavedView.js +413 -0
  119. package/Models/DatabaseModels/ExceptionSavedView.mjs +2 -0
  120. package/Models/DatabaseModels/FormDomain.d.mts +28 -0
  121. package/Models/DatabaseModels/FormDomain.d.ts +28 -0
  122. package/Models/DatabaseModels/FormDomain.js +598 -0
  123. package/Models/DatabaseModels/FormDomain.mjs +2 -0
  124. package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
  125. package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
  126. package/Models/DatabaseModels/GlobalConfig.js +110 -0
  127. package/Models/DatabaseModels/IncidentEpisodeRoleMember.js +10 -1
  128. package/Models/DatabaseModels/Index.js +47 -0
  129. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.d.mts +2 -1
  130. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.d.ts +2 -1
  131. package/Models/DatabaseModels/NetworkEndpoint.d.mts +2 -0
  132. package/Models/DatabaseModels/NetworkEndpoint.d.ts +2 -0
  133. package/Models/DatabaseModels/NetworkEndpoint.js +62 -1
  134. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +1 -0
  135. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +1 -0
  136. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +43 -0
  137. package/Models/DatabaseModels/ProxmoxCluster.d.mts +2 -0
  138. package/Models/DatabaseModels/ProxmoxCluster.d.ts +2 -0
  139. package/Models/DatabaseModels/ProxmoxCluster.js +66 -0
  140. package/Models/DatabaseModels/ProxmoxResource.d.mts +13 -0
  141. package/Models/DatabaseModels/ProxmoxResource.d.ts +13 -0
  142. package/Models/DatabaseModels/ProxmoxResource.js +292 -0
  143. package/Models/DatabaseModels/ResourceAiAgent.js +3 -1
  144. package/Models/DatabaseModels/SecurityEntityCriticality.js +7 -6
  145. package/Models/DatabaseModels/SecurityEntityRisk.js +2 -2
  146. package/Models/DatabaseModels/StatusPageSubscriber.d.mts +1 -0
  147. package/Models/DatabaseModels/StatusPageSubscriber.d.ts +1 -0
  148. package/Models/DatabaseModels/StatusPageSubscriber.js +52 -0
  149. package/Models/DatabaseModels/TelemetryException.d.mts +10 -0
  150. package/Models/DatabaseModels/TelemetryException.d.ts +10 -0
  151. package/Models/DatabaseModels/TelemetryException.js +353 -8
  152. package/Models/DatabaseModels/TelemetryExceptionActivity.d.mts +42 -0
  153. package/Models/DatabaseModels/TelemetryExceptionActivity.d.ts +42 -0
  154. package/Models/DatabaseModels/TelemetryExceptionActivity.js +527 -0
  155. package/Models/DatabaseModels/TelemetryExceptionActivity.mjs +3 -0
  156. package/Server/Services/DatabaseService.d.mts +10 -0
  157. package/Server/Services/DatabaseService.d.ts +10 -0
  158. package/Types/AI/AIChatPageContext.d.mts +4 -1
  159. package/Types/AI/AIChatPageContext.d.ts +4 -1
  160. package/Types/AI/AIChatPageContext.js +7 -0
  161. package/Types/AI/AIChatTypes.d.mts +6 -1
  162. package/Types/AI/AIChatTypes.d.ts +6 -1
  163. package/Types/AI/AIChatTypes.js +9 -0
  164. package/Types/AI/AIResourceContext.d.mts +2 -0
  165. package/Types/AI/AIResourceContext.d.ts +2 -0
  166. package/Types/AI/AIResourceContext.js +5 -0
  167. package/Types/AI/AiAffectedResources.js +5 -3
  168. package/Types/AI/CodeFixTaskContext.d.mts +21 -0
  169. package/Types/AI/CodeFixTaskContext.d.ts +21 -0
  170. package/Types/AI/CodeFixTaskContext.js +61 -4
  171. package/Types/AI/CodeFixTaskContext.mjs +2 -0
  172. package/Types/AI/CodeTask.d.mts +2 -0
  173. package/Types/AI/CodeTask.d.ts +2 -0
  174. package/Types/AI/CodeTask.js +4 -0
  175. package/Types/AI/ResourceAiAccessApi.d.mts +1 -0
  176. package/Types/AI/ResourceAiAccessApi.d.ts +1 -0
  177. package/Types/AI/ResourceAiAccessPermissions.js +6 -0
  178. package/Types/Analytics/CookieConsent.d.mts +1 -0
  179. package/Types/Analytics/CookieConsent.d.ts +1 -0
  180. package/Types/Analytics/CookieConsent.js +10 -0
  181. package/Types/Analytics/CookieConsent.mjs +2 -0
  182. package/Types/AutoRemediation/AiRemediationCommandPlan.d.mts +19 -0
  183. package/Types/AutoRemediation/AiRemediationCommandPlan.d.ts +19 -0
  184. package/Types/AutoRemediation/AiRemediationCommandPlan.js +85 -10
  185. package/Types/AutoRemediation/AiRemediationCommandPlan.mjs +4 -0
  186. package/Types/AutoRemediation/RemediationTryAgain.d.mts +17 -0
  187. package/Types/AutoRemediation/RemediationTryAgain.d.ts +17 -0
  188. package/Types/AutoRemediation/RemediationTryAgain.js +104 -0
  189. package/Types/AutoRemediation/RemediationTryAgain.mjs +6 -0
  190. package/Types/BaseDatabase/AggregateBy.d.mts +13 -0
  191. package/Types/BaseDatabase/AggregateBy.d.ts +13 -0
  192. package/Types/Billing/SubscriptionPlanPricing.d.mts +2 -0
  193. package/Types/Billing/SubscriptionPlanPricing.d.ts +2 -0
  194. package/Types/Billing/SubscriptionPlanPricing.js +30 -0
  195. package/Types/Billing/SubscriptionPlanPricing.mjs +2 -0
  196. package/Types/Cloud/CloudPlatform.d.mts +3 -0
  197. package/Types/Cloud/CloudPlatform.d.ts +3 -0
  198. package/Types/Cloud/CloudPlatform.js +50 -0
  199. package/Types/Cloud/CloudResourceKind.d.mts +11 -0
  200. package/Types/Cloud/CloudResourceKind.d.ts +11 -0
  201. package/Types/Cloud/CloudResourceKind.js +78 -9
  202. package/Types/Cloud/CloudResourceKind.mjs +5 -0
  203. package/Types/CloudConnection/CloudAiAgentCost.d.mts +19 -0
  204. package/Types/CloudConnection/CloudAiAgentCost.d.ts +19 -0
  205. package/Types/CloudConnection/CloudAiAgentCost.js +95 -0
  206. package/Types/CloudConnection/CloudAiAgentCost.mjs +15 -0
  207. package/Types/CloudConnection/CloudAiAgentSetupCommands.d.mts +70 -0
  208. package/Types/CloudConnection/CloudAiAgentSetupCommands.d.ts +70 -0
  209. package/Types/CloudConnection/CloudAiAgentSetupCommands.js +1107 -0
  210. package/Types/CloudConnection/CloudAiAgentSetupCommands.mjs +37 -0
  211. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +8 -0
  212. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +8 -0
  213. package/Types/CloudConnection/CloudConnectionCatalog.js +77 -1
  214. package/Types/CloudConnection/CloudConnectionCatalog.mjs +6 -0
  215. package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +48 -4
  216. package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +48 -4
  217. package/Types/CloudConnection/CloudConnectionSetupCommands.js +432 -16
  218. package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +21 -0
  219. package/Types/CodeRepository/CodeHost.d.mts +2 -1
  220. package/Types/CodeRepository/CodeHost.d.ts +2 -1
  221. package/Types/CodeRepository/CodeHost.js +12 -5
  222. package/Types/CodeRepository/ProductionReview.d.mts +7 -0
  223. package/Types/CodeRepository/ProductionReview.d.ts +7 -0
  224. package/Types/CodeRepository/ProductionReview.js +67 -1
  225. package/Types/CodeRepository/ProductionReview.mjs +1 -0
  226. package/Types/CustomField/CustomFieldFile.d.mts +69 -0
  227. package/Types/CustomField/CustomFieldFile.d.ts +69 -0
  228. package/Types/CustomField/CustomFieldFile.js +235 -0
  229. package/Types/CustomField/CustomFieldFile.mjs +16 -0
  230. package/Types/CustomField/CustomFieldRecordKinds.d.mts +25 -0
  231. package/Types/CustomField/CustomFieldRecordKinds.d.ts +25 -0
  232. package/Types/CustomField/CustomFieldRecordKinds.js +111 -0
  233. package/Types/CustomField/CustomFieldRecordKinds.mjs +6 -0
  234. package/Types/CustomField/CustomFieldType.d.mts +15 -1
  235. package/Types/CustomField/CustomFieldType.d.ts +15 -1
  236. package/Types/CustomField/CustomFieldType.js +14 -0
  237. package/Types/CustomField/CustomFieldValueFormat.d.mts +3 -2
  238. package/Types/CustomField/CustomFieldValueFormat.d.ts +3 -2
  239. package/Types/CustomField/CustomFieldValueFormat.js +8 -2
  240. package/Types/CustomField/CustomFieldValueMapping.js +31 -2
  241. package/Types/CustomField/CustomFieldValueValidator.js +41 -1
  242. package/Types/Dashboard/DashboardLanguage.d.mts +1 -0
  243. package/Types/Dashboard/DashboardLanguage.d.ts +1 -0
  244. package/Types/Dashboard/DashboardLanguage.js +7 -1
  245. package/Types/Dashboard/DashboardLanguage.mjs +1 -0
  246. package/Types/Dashboard/DashboardTemplateFallbackHints.d.mts +4 -0
  247. package/Types/Dashboard/DashboardTemplateFallbackHints.d.ts +4 -0
  248. package/Types/Dashboard/DashboardTemplateFallbackHints.js +42 -0
  249. package/Types/Dashboard/DashboardTemplateFallbackHints.mjs +4 -0
  250. package/Types/Dashboard/DashboardTemplates.js +34 -11
  251. package/Types/DataSecurity/ComplianceFramework.d.mts +21 -0
  252. package/Types/DataSecurity/ComplianceFramework.d.ts +21 -0
  253. package/Types/DataSecurity/ComplianceFramework.js +97 -0
  254. package/Types/DataSecurity/ComplianceFramework.mjs +5 -0
  255. package/Types/DataSecurity/ComplianceRequirementCatalog.d.mts +41 -0
  256. package/Types/DataSecurity/ComplianceRequirementCatalog.d.ts +41 -0
  257. package/Types/DataSecurity/ComplianceRequirementCatalog.js +203 -0
  258. package/Types/DataSecurity/ComplianceRequirementCatalog.mjs +7 -0
  259. package/Types/DataSecurity/DataCategory.d.mts +15 -0
  260. package/Types/DataSecurity/DataCategory.d.ts +15 -0
  261. package/Types/DataSecurity/DataCategory.js +61 -0
  262. package/Types/DataSecurity/DataCategory.mjs +7 -0
  263. package/Types/DataSecurity/DataConfidence.d.mts +11 -0
  264. package/Types/DataSecurity/DataConfidence.d.ts +11 -0
  265. package/Types/DataSecurity/DataConfidence.js +49 -0
  266. package/Types/DataSecurity/DataConfidence.mjs +7 -0
  267. package/Types/DataSecurity/DataSecurityApiTypes.d.mts +106 -0
  268. package/Types/DataSecurity/DataSecurityApiTypes.d.ts +106 -0
  269. package/Types/DataSecurity/DataSecurityApiTypes.js +53 -0
  270. package/Types/DataSecurity/DataSecurityApiTypes.mjs +3 -0
  271. package/Types/DataSecurity/DataSecurityCheckCatalog.d.mts +94 -0
  272. package/Types/DataSecurity/DataSecurityCheckCatalog.d.ts +94 -0
  273. package/Types/DataSecurity/DataSecurityCheckCatalog.js +1236 -0
  274. package/Types/DataSecurity/DataSecurityCheckCatalog.mjs +10 -0
  275. package/Types/DataSecurity/DataSecurityIdentity.d.mts +27 -0
  276. package/Types/DataSecurity/DataSecurityIdentity.d.ts +27 -0
  277. package/Types/DataSecurity/DataSecurityIdentity.js +160 -0
  278. package/Types/DataSecurity/DataSecurityIdentity.mjs +14 -0
  279. package/Types/DataSecurity/DataSecurityIssueStatus.d.mts +10 -0
  280. package/Types/DataSecurity/DataSecurityIssueStatus.d.ts +10 -0
  281. package/Types/DataSecurity/DataSecurityIssueStatus.js +38 -0
  282. package/Types/DataSecurity/DataSecurityIssueStatus.mjs +5 -0
  283. package/Types/DataSecurity/DataSecurityResidency.d.mts +21 -0
  284. package/Types/DataSecurity/DataSecurityResidency.d.ts +21 -0
  285. package/Types/DataSecurity/DataSecurityResidency.js +92 -0
  286. package/Types/DataSecurity/DataSecurityResidency.mjs +5 -0
  287. package/Types/DataSecurity/DataSecurityResponseAction.d.mts +22 -0
  288. package/Types/DataSecurity/DataSecurityResponseAction.d.ts +22 -0
  289. package/Types/DataSecurity/DataSecurityResponseAction.js +202 -0
  290. package/Types/DataSecurity/DataSecurityResponseAction.mjs +13 -0
  291. package/Types/DataSecurity/DataSecurityRisk.d.mts +38 -0
  292. package/Types/DataSecurity/DataSecurityRisk.d.ts +38 -0
  293. package/Types/DataSecurity/DataSecurityRisk.js +138 -0
  294. package/Types/DataSecurity/DataSecurityRisk.mjs +7 -0
  295. package/Types/DataSecurity/DataSensitivity.d.mts +13 -0
  296. package/Types/DataSecurity/DataSensitivity.d.ts +13 -0
  297. package/Types/DataSecurity/DataSensitivity.js +68 -0
  298. package/Types/DataSecurity/DataSensitivity.mjs +8 -0
  299. package/Types/DataSecurity/DataStoreAccess.d.mts +34 -0
  300. package/Types/DataSecurity/DataStoreAccess.d.ts +34 -0
  301. package/Types/DataSecurity/DataStoreAccess.js +57 -0
  302. package/Types/DataSecurity/DataStoreAccess.mjs +6 -0
  303. package/Types/DataSecurity/DataStoreEnvironment.d.mts +11 -0
  304. package/Types/DataSecurity/DataStoreEnvironment.d.ts +11 -0
  305. package/Types/DataSecurity/DataStoreEnvironment.js +80 -0
  306. package/Types/DataSecurity/DataStoreEnvironment.mjs +5 -0
  307. package/Types/DataSecurity/DataStoreKey.d.mts +18 -0
  308. package/Types/DataSecurity/DataStoreKey.d.ts +18 -0
  309. package/Types/DataSecurity/DataStoreKey.js +49 -0
  310. package/Types/DataSecurity/DataStoreKey.mjs +7 -0
  311. package/Types/DataSecurity/DataStoreKind.d.mts +67 -0
  312. package/Types/DataSecurity/DataStoreKind.d.ts +67 -0
  313. package/Types/DataSecurity/DataStoreKind.js +230 -0
  314. package/Types/DataSecurity/DataStoreKind.mjs +10 -0
  315. package/Types/DataSecurity/DataStorePosture.d.mts +40 -0
  316. package/Types/DataSecurity/DataStorePosture.d.ts +40 -0
  317. package/Types/DataSecurity/DataStorePosture.js +100 -0
  318. package/Types/DataSecurity/DataStorePosture.mjs +7 -0
  319. package/Types/DataSecurity/DataTypeCatalog.d.mts +17 -0
  320. package/Types/DataSecurity/DataTypeCatalog.d.ts +17 -0
  321. package/Types/DataSecurity/DataTypeCatalog.js +434 -0
  322. package/Types/DataSecurity/DataTypeCatalog.mjs +4 -0
  323. package/Types/Date.d.mts +30 -1
  324. package/Types/Date.d.ts +30 -1
  325. package/Types/Date.js +173 -5
  326. package/Types/Email/EmailMessage.d.mts +1 -0
  327. package/Types/Email/EmailMessage.d.ts +1 -0
  328. package/Types/Email/EmailTemplateType.d.mts +1 -0
  329. package/Types/Email/EmailTemplateType.d.ts +1 -0
  330. package/Types/Email/EmailTemplateType.js +6 -0
  331. package/Types/Episode/EpisodeMembersAdd.d.mts +2 -0
  332. package/Types/Episode/EpisodeMembersAdd.d.ts +2 -0
  333. package/Types/Episode/EpisodeMembersAdd.js +9 -1
  334. package/Types/Episode/EpisodeMembersAdd.mjs +2 -0
  335. package/Types/File/FileContentCheck.d.mts +13 -0
  336. package/Types/File/FileContentCheck.d.ts +13 -0
  337. package/Types/File/FileContentCheck.js +301 -0
  338. package/Types/File/FileContentCheck.mjs +4 -0
  339. package/Types/File/FileSize.d.mts +3 -0
  340. package/Types/File/FileSize.d.ts +3 -0
  341. package/Types/File/FileSize.js +30 -0
  342. package/Types/File/FileSize.mjs +3 -0
  343. package/Types/File/FileTypeIcon.d.mts +4 -0
  344. package/Types/File/FileTypeIcon.d.ts +4 -0
  345. package/Types/File/FileTypeIcon.js +26 -0
  346. package/Types/File/FileTypeIcon.mjs +3 -0
  347. package/Types/File/MimeTypeLabel.d.mts +3 -0
  348. package/Types/File/MimeTypeLabel.d.ts +3 -0
  349. package/Types/File/MimeTypeLabel.js +39 -0
  350. package/Types/File/MimeTypeLabel.mjs +3 -0
  351. package/Types/Form/FormCustomDomain.d.mts +19 -0
  352. package/Types/Form/FormCustomDomain.d.ts +19 -0
  353. package/Types/Form/FormCustomDomain.js +86 -0
  354. package/Types/Form/FormCustomDomain.mjs +13 -0
  355. package/Types/Form/FormField.js +6 -0
  356. package/Types/Form/FormFileAnswer.d.mts +34 -0
  357. package/Types/Form/FormFileAnswer.d.ts +34 -0
  358. package/Types/Form/FormFileAnswer.js +203 -0
  359. package/Types/Form/FormFileAnswer.mjs +10 -0
  360. package/Types/Form/FormPublic.d.mts +16 -1
  361. package/Types/Form/FormPublic.d.ts +16 -1
  362. package/Types/Form/FormPublic.js +184 -2
  363. package/Types/Form/FormPublic.mjs +5 -0
  364. package/Types/Form/FormSubmissionAnswer.js +29 -0
  365. package/Types/InstallScripts/InstallScripts.d.mts +28 -0
  366. package/Types/InstallScripts/InstallScripts.d.ts +28 -0
  367. package/Types/InstallScripts/InstallScripts.js +225 -0
  368. package/Types/InstallScripts/InstallScripts.mjs +11 -0
  369. package/Types/Kubernetes/KubernetesClusterProvider.d.mts +10 -0
  370. package/Types/Kubernetes/KubernetesClusterProvider.d.ts +10 -0
  371. package/Types/Kubernetes/KubernetesClusterProvider.js +95 -0
  372. package/Types/Kubernetes/KubernetesClusterProvider.mjs +8 -0
  373. package/Types/Kubernetes/KubernetesInventoryExtractor.js +23 -16
  374. package/Types/Kubernetes/KubernetesObjectParser.d.mts +24 -0
  375. package/Types/Kubernetes/KubernetesObjectParser.d.ts +24 -0
  376. package/Types/Kubernetes/KubernetesObjectParser.js +64 -0
  377. package/Types/Kubernetes/KubernetesObjectParser.mjs +3 -0
  378. package/Types/Kubernetes/OpenShiftObjectAttributes.d.mts +20 -0
  379. package/Types/Kubernetes/OpenShiftObjectAttributes.d.ts +20 -0
  380. package/Types/Kubernetes/OpenShiftObjectAttributes.js +124 -0
  381. package/Types/Kubernetes/OpenShiftObjectAttributes.mjs +5 -0
  382. package/Types/Kubernetes/OpenShiftObjectParser.d.mts +140 -0
  383. package/Types/Kubernetes/OpenShiftObjectParser.d.ts +140 -0
  384. package/Types/Kubernetes/OpenShiftObjectParser.js +436 -0
  385. package/Types/Kubernetes/OpenShiftObjectParser.mjs +22 -0
  386. package/Types/Metrics/MetricQueryConfigData.d.mts +2 -0
  387. package/Types/Metrics/MetricQueryConfigData.d.ts +2 -0
  388. package/Types/Metrics/MetricQueryFallback.d.mts +10 -0
  389. package/Types/Metrics/MetricQueryFallback.d.ts +10 -0
  390. package/Types/Metrics/MetricQueryFallback.js +2 -0
  391. package/Types/Metrics/MetricQueryFallback.mjs +1 -0
  392. package/Types/Monitor/CephAlertTemplates.d.mts +4 -3
  393. package/Types/Monitor/CephAlertTemplates.d.ts +4 -3
  394. package/Types/Monitor/CephAlertTemplates.js +63 -11
  395. package/Types/Monitor/CephAlertTemplates.mjs +1 -0
  396. package/Types/Monitor/CephMetricCatalog.d.mts +2 -0
  397. package/Types/Monitor/CephMetricCatalog.d.ts +2 -0
  398. package/Types/Monitor/CephMetricCatalog.js +72 -29
  399. package/Types/Monitor/CephMetricCatalog.mjs +2 -0
  400. package/Types/Monitor/CriteriaFilter.d.mts +17 -0
  401. package/Types/Monitor/CriteriaFilter.d.ts +17 -0
  402. package/Types/Monitor/CriteriaFilter.js +23 -1
  403. package/Types/Monitor/CriteriaFilter.mjs +3 -0
  404. package/Types/Monitor/DockerAlertTemplates.d.mts +3 -1
  405. package/Types/Monitor/DockerAlertTemplates.d.ts +3 -1
  406. package/Types/Monitor/DockerAlertTemplates.js +159 -76
  407. package/Types/Monitor/DockerAlertTemplates.mjs +1 -0
  408. package/Types/Monitor/DockerMetricCatalog.d.mts +1 -0
  409. package/Types/Monitor/DockerMetricCatalog.d.ts +1 -0
  410. package/Types/Monitor/DockerMetricCatalog.js +42 -52
  411. package/Types/Monitor/DockerSwarmAlertTemplates.d.mts +2 -0
  412. package/Types/Monitor/DockerSwarmAlertTemplates.d.ts +2 -0
  413. package/Types/Monitor/DockerSwarmAlertTemplates.js +78 -10
  414. package/Types/Monitor/DockerSwarmAlertTemplates.mjs +1 -0
  415. package/Types/Monitor/DockerSwarmMetricCatalog.js +7 -4
  416. package/Types/Monitor/ExceptionMonitor/ExceptionMonitorEvaluation.d.mts +34 -0
  417. package/Types/Monitor/ExceptionMonitor/ExceptionMonitorEvaluation.d.ts +34 -0
  418. package/Types/Monitor/ExceptionMonitor/ExceptionMonitorEvaluation.js +170 -0
  419. package/Types/Monitor/ExceptionMonitor/ExceptionMonitorEvaluation.mjs +12 -0
  420. package/Types/Monitor/ExceptionMonitor/ExceptionMonitorResponse.d.mts +17 -0
  421. package/Types/Monitor/ExceptionMonitor/ExceptionMonitorResponse.d.ts +17 -0
  422. package/Types/Monitor/HostAlertTemplates.d.mts +2 -1
  423. package/Types/Monitor/HostAlertTemplates.d.ts +2 -1
  424. package/Types/Monitor/HostAlertTemplates.js +48 -0
  425. package/Types/Monitor/HostAlertTemplates.mjs +1 -0
  426. package/Types/Monitor/HostMetricCatalog.d.mts +2 -0
  427. package/Types/Monitor/HostMetricCatalog.d.ts +2 -0
  428. package/Types/Monitor/HostMetricCatalog.js +20 -11
  429. package/Types/Monitor/IotAlertTemplates.d.mts +2 -0
  430. package/Types/Monitor/IotAlertTemplates.d.ts +2 -0
  431. package/Types/Monitor/IotAlertTemplates.js +22 -7
  432. package/Types/Monitor/IotAlertTemplates.mjs +1 -0
  433. package/Types/Monitor/KubernetesAlertTemplates.d.mts +53 -2
  434. package/Types/Monitor/KubernetesAlertTemplates.d.ts +53 -2
  435. package/Types/Monitor/KubernetesAlertTemplates.js +475 -76
  436. package/Types/Monitor/KubernetesAlertTemplates.mjs +2 -0
  437. package/Types/Monitor/KubernetesMetricCatalog.d.mts +2 -1
  438. package/Types/Monitor/KubernetesMetricCatalog.d.ts +2 -1
  439. package/Types/Monitor/KubernetesMetricCatalog.js +74 -3
  440. package/Types/Monitor/LogMonitor/LogMonitorResponse.d.mts +1 -0
  441. package/Types/Monitor/LogMonitor/LogMonitorResponse.d.ts +1 -0
  442. package/Types/Monitor/MetricMonitor/MetricCriteriaContext.d.mts +24 -1
  443. package/Types/Monitor/MetricMonitor/MetricCriteriaContext.d.ts +24 -1
  444. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.mts +4 -4
  445. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.ts +4 -4
  446. package/Types/Monitor/MonitorCriteriaInstance.js +107 -10
  447. package/Types/Monitor/MonitorStep.js +50 -3
  448. package/Types/Monitor/MonitorStepCephMonitor.d.mts +1 -0
  449. package/Types/Monitor/MonitorStepCephMonitor.d.ts +1 -0
  450. package/Types/Monitor/MonitorStepDockerMonitor.d.mts +1 -0
  451. package/Types/Monitor/MonitorStepDockerMonitor.d.ts +1 -0
  452. package/Types/Monitor/MonitorStepDockerSwarmMonitor.d.mts +43 -11
  453. package/Types/Monitor/MonitorStepDockerSwarmMonitor.d.ts +43 -11
  454. package/Types/Monitor/MonitorStepDockerSwarmMonitor.js +68 -1
  455. package/Types/Monitor/MonitorStepDockerSwarmMonitor.mjs +1 -0
  456. package/Types/Monitor/MonitorStepExceptionMonitor.d.mts +1 -0
  457. package/Types/Monitor/MonitorStepExceptionMonitor.d.ts +1 -0
  458. package/Types/Monitor/MonitorStepExceptionMonitor.js +13 -2
  459. package/Types/Monitor/MonitorStepHostMonitor.d.mts +1 -0
  460. package/Types/Monitor/MonitorStepHostMonitor.d.ts +1 -0
  461. package/Types/Monitor/MonitorStepIoTMonitor.d.mts +9 -0
  462. package/Types/Monitor/MonitorStepIoTMonitor.d.ts +9 -0
  463. package/Types/Monitor/MonitorStepIoTMonitor.js +21 -0
  464. package/Types/Monitor/MonitorStepKubernetesMonitor.d.mts +16 -0
  465. package/Types/Monitor/MonitorStepKubernetesMonitor.d.ts +16 -0
  466. package/Types/Monitor/MonitorStepKubernetesMonitor.js +49 -1
  467. package/Types/Monitor/MonitorStepKubernetesMonitor.mjs +4 -0
  468. package/Types/Monitor/MonitorStepPodmanMonitor.d.mts +1 -0
  469. package/Types/Monitor/MonitorStepPodmanMonitor.d.ts +1 -0
  470. package/Types/Monitor/MonitorStepProxmoxMonitor.d.mts +5 -3
  471. package/Types/Monitor/MonitorStepProxmoxMonitor.d.ts +5 -3
  472. package/Types/Monitor/MonitorStepProxmoxMonitor.js +1 -1
  473. package/Types/Monitor/MonitorStepStorageArrayMonitor.d.mts +1 -0
  474. package/Types/Monitor/MonitorStepStorageArrayMonitor.d.ts +1 -0
  475. package/Types/Monitor/MonitorStepVMwareMonitor.d.mts +1 -0
  476. package/Types/Monitor/MonitorStepVMwareMonitor.d.ts +1 -0
  477. package/Types/Monitor/MonitorType.d.mts +1 -0
  478. package/Types/Monitor/MonitorType.d.ts +1 -0
  479. package/Types/Monitor/MonitorType.js +18 -0
  480. package/Types/Monitor/OpenShiftAlertTemplates.d.mts +29 -0
  481. package/Types/Monitor/OpenShiftAlertTemplates.d.ts +29 -0
  482. package/Types/Monitor/OpenShiftAlertTemplates.js +220 -0
  483. package/Types/Monitor/OpenShiftAlertTemplates.mjs +9 -0
  484. package/Types/Monitor/PodmanAlertTemplates.d.mts +3 -1
  485. package/Types/Monitor/PodmanAlertTemplates.d.ts +3 -1
  486. package/Types/Monitor/PodmanAlertTemplates.js +119 -36
  487. package/Types/Monitor/PodmanAlertTemplates.mjs +1 -0
  488. package/Types/Monitor/PodmanMetricCatalog.d.mts +1 -0
  489. package/Types/Monitor/PodmanMetricCatalog.d.ts +1 -0
  490. package/Types/Monitor/PodmanMetricCatalog.js +42 -52
  491. package/Types/Monitor/ProxmoxAlertTemplates.d.mts +2 -0
  492. package/Types/Monitor/ProxmoxAlertTemplates.d.ts +2 -0
  493. package/Types/Monitor/ProxmoxAlertTemplates.js +239 -4
  494. package/Types/Monitor/ProxmoxAlertTemplates.mjs +2 -0
  495. package/Types/Monitor/ProxmoxMetricCatalog.js +43 -22
  496. package/Types/Monitor/ProxmoxNotificationAlertTemplates.d.mts +24 -0
  497. package/Types/Monitor/ProxmoxNotificationAlertTemplates.d.ts +24 -0
  498. package/Types/Monitor/ProxmoxNotificationAlertTemplates.js +251 -0
  499. package/Types/Monitor/ProxmoxNotificationAlertTemplates.mjs +12 -0
  500. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +71 -3
  501. package/Types/Monitor/Recommendation/MonitorRecommendationTypes.d.mts +1 -0
  502. package/Types/Monitor/Recommendation/MonitorRecommendationTypes.d.ts +1 -0
  503. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +23 -7
  504. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.mts +19 -0
  505. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.ts +19 -0
  506. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js +50 -2
  507. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.mjs +2 -0
  508. package/Types/Monitor/ServiceAlertTemplates.js +111 -3
  509. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +2 -0
  510. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +2 -0
  511. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +31 -2
  512. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +9 -0
  513. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +9 -0
  514. package/Types/Monitor/SnmpMonitor/SnmpHardwareIdentity.d.mts +5 -0
  515. package/Types/Monitor/SnmpMonitor/SnmpHardwareIdentity.d.ts +5 -0
  516. package/Types/Monitor/SnmpMonitor/SnmpHardwareIdentity.js +2 -0
  517. package/Types/Monitor/SnmpMonitor/SnmpHardwareIdentity.mjs +1 -0
  518. package/Types/Monitor/SnmpMonitor/SnmpVendorIdentity.d.mts +27 -0
  519. package/Types/Monitor/SnmpMonitor/SnmpVendorIdentity.d.ts +27 -0
  520. package/Types/Monitor/SnmpMonitor/SnmpVendorIdentity.js +97 -0
  521. package/Types/Monitor/SnmpMonitor/SnmpVendorIdentity.mjs +4 -0
  522. package/Types/Monitor/StorageArrayAlertTemplates.d.mts +3 -1
  523. package/Types/Monitor/StorageArrayAlertTemplates.d.ts +3 -1
  524. package/Types/Monitor/StorageArrayAlertTemplates.js +77 -1
  525. package/Types/Monitor/StorageArrayAlertTemplates.mjs +1 -0
  526. package/Types/Monitor/StorageArrayMetricCatalog.js +10 -1
  527. package/Types/Monitor/TelemetryAlertRule.d.mts +8 -1
  528. package/Types/Monitor/TelemetryAlertRule.d.ts +8 -1
  529. package/Types/Monitor/TelemetryAlertRule.js +62 -35
  530. package/Types/Monitor/TraceMonitor/TraceMonitorResponse.d.mts +1 -0
  531. package/Types/Monitor/TraceMonitor/TraceMonitorResponse.d.ts +1 -0
  532. package/Types/Monitor/VMwareAlertTemplates.d.mts +3 -1
  533. package/Types/Monitor/VMwareAlertTemplates.d.ts +3 -1
  534. package/Types/Monitor/VMwareAlertTemplates.js +91 -19
  535. package/Types/Monitor/VMwareAlertTemplates.mjs +1 -0
  536. package/Types/NetworkController/NetworkControllerProvider.d.mts +1 -0
  537. package/Types/NetworkController/NetworkControllerProvider.d.ts +1 -0
  538. package/Types/NetworkController/NetworkControllerProvider.js +8 -0
  539. package/Types/NetworkController/NetworkControllerProvider.mjs +1 -0
  540. package/Types/NetworkController/NetworkControllerReadSummary.d.mts +3 -0
  541. package/Types/NetworkController/NetworkControllerReadSummary.d.ts +3 -0
  542. package/Types/NetworkController/NetworkControllerReadSummary.js +7 -1
  543. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.mts +49 -2
  544. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.ts +49 -2
  545. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.js +252 -17
  546. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs +7 -0
  547. package/Types/NotificationSetting/NotificationEmailRollupCategory.d.mts +1 -0
  548. package/Types/NotificationSetting/NotificationEmailRollupCategory.d.ts +1 -0
  549. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +9 -0
  550. package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
  551. package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
  552. package/Types/NotificationSetting/NotificationSettingEventType.js +8 -0
  553. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +44 -0
  554. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +44 -0
  555. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +171 -0
  556. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +14 -0
  557. package/Types/Permission.d.mts +56 -0
  558. package/Types/Permission.d.ts +56 -0
  559. package/Types/Permission.js +601 -1
  560. package/Types/PrivateRecord/PrivateRecordHeld.d.mts +18 -0
  561. package/Types/PrivateRecord/PrivateRecordHeld.d.ts +18 -0
  562. package/Types/PrivateRecord/PrivateRecordHeld.js +101 -0
  563. package/Types/PrivateRecord/PrivateRecordHeld.mjs +2 -0
  564. package/Types/PrivateRecord/PrivateRecordParts.d.mts +14 -0
  565. package/Types/PrivateRecord/PrivateRecordParts.d.ts +14 -0
  566. package/Types/PrivateRecord/PrivateRecordParts.js +95 -0
  567. package/Types/PrivateRecord/PrivateRecordParts.mjs +4 -0
  568. package/Types/Probe/ProbeCapability.d.mts +2 -1
  569. package/Types/Probe/ProbeCapability.d.ts +2 -1
  570. package/Types/Probe/ProbeCapability.js +8 -0
  571. package/Types/ProviderLogo/ProviderLogo.d.mts +2 -0
  572. package/Types/ProviderLogo/ProviderLogo.d.ts +2 -0
  573. package/Types/ProviderLogo/ProviderLogo.js +4 -0
  574. package/Types/ReaderLanguage.d.mts +11 -0
  575. package/Types/ReaderLanguage.d.ts +11 -0
  576. package/Types/ReaderLanguage.js +173 -0
  577. package/Types/ReaderLanguage.mjs +12 -0
  578. package/Types/ReadingDirection.d.mts +4 -0
  579. package/Types/ReadingDirection.d.ts +4 -0
  580. package/Types/ReadingDirection.js +52 -1
  581. package/Types/ReadingDirection.mjs +4 -0
  582. package/Types/ResourceAiAgent/AiResourceType.d.mts +7 -1
  583. package/Types/ResourceAiAgent/AiResourceType.d.ts +7 -1
  584. package/Types/ResourceAiAgent/AiResourceType.js +76 -2
  585. package/Types/ResourceAiAgent/AiResourceType.mjs +3 -0
  586. package/Types/ResourceAiAgent/CloudAiAgentNames.d.mts +19 -0
  587. package/Types/ResourceAiAgent/CloudAiAgentNames.d.ts +19 -0
  588. package/Types/ResourceAiAgent/CloudAiAgentNames.js +75 -0
  589. package/Types/ResourceAiAgent/CloudAiAgentNames.mjs +16 -0
  590. package/Types/ResourceAiAgent/ResourceAiAccess.d.mts +12 -1
  591. package/Types/ResourceAiAgent/ResourceAiAccess.d.ts +12 -1
  592. package/Types/ResourceAiAgent/ResourceAiAccess.js +28 -1
  593. package/Types/ResourceAiAgent/ResourceAiAccess.mjs +6 -0
  594. package/Types/Rules/RuleCriteriaFieldRegistry.js +13 -0
  595. package/Types/Rules/RuleCriteriaSubject.d.mts +4 -1
  596. package/Types/Rules/RuleCriteriaSubject.d.ts +4 -1
  597. package/Types/Rules/RuleCriteriaSubject.js +19 -1
  598. package/Types/Rules/RuleCriteriaSubject.mjs +1 -0
  599. package/Types/Rules/RuleRun.d.mts +7 -1
  600. package/Types/Rules/RuleRun.d.ts +7 -1
  601. package/Types/Rules/RuleRun.js +14 -2
  602. package/Types/Rum/SessionReplay.d.mts +1 -0
  603. package/Types/Rum/SessionReplay.d.ts +1 -0
  604. package/Types/Rum/SessionReplay.js +4 -2
  605. package/Types/Rum/SessionReplay.mjs +1 -0
  606. package/Types/Rum/UserFlow.d.mts +11 -0
  607. package/Types/Rum/UserFlow.d.ts +11 -0
  608. package/Types/Rum/UserFlow.js +27 -12
  609. package/Types/SecurityCase/SecurityCaseContext.d.mts +33 -1
  610. package/Types/SecurityCase/SecurityCaseContext.d.ts +33 -1
  611. package/Types/SecurityCase/SecurityCaseContext.js +6 -1
  612. package/Types/SecurityCase/SecurityCaseContext.mjs +2 -0
  613. package/Types/SecurityCase/SecurityDetectionSource.d.mts +2 -1
  614. package/Types/SecurityCase/SecurityDetectionSource.d.ts +2 -1
  615. package/Types/SecurityCase/SecurityDetectionSource.js +5 -2
  616. package/Types/SecurityCase/SecurityEntity.d.mts +5 -0
  617. package/Types/SecurityCase/SecurityEntity.d.ts +5 -0
  618. package/Types/SecurityCase/SecurityEntity.js +39 -1
  619. package/Types/SecurityCase/SecurityEntity.mjs +4 -0
  620. package/Types/SecurityCase/SecurityEntityRisk.js +14 -6
  621. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
  622. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
  623. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +124 -1
  624. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.mjs +2 -0
  625. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.d.mts +3 -1
  626. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.d.ts +3 -1
  627. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js +4 -0
  628. package/Types/SecurityEvent/DataSecuritySignal.d.mts +33 -0
  629. package/Types/SecurityEvent/DataSecuritySignal.d.ts +33 -0
  630. package/Types/SecurityEvent/DataSecuritySignal.js +114 -0
  631. package/Types/SecurityEvent/DataSecuritySignal.mjs +14 -0
  632. package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +7 -1
  633. package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +7 -1
  634. package/Types/SecurityEvent/DetectionRuleDataKind.js +74 -0
  635. package/Types/SecurityEvent/DetectionRuleLibrary.d.mts +2 -1
  636. package/Types/SecurityEvent/DetectionRuleLibrary.d.ts +2 -1
  637. package/Types/SecurityEvent/DetectionRuleLibrary.js +730 -0
  638. package/Types/SecurityEvent/OcsfEventClass.js +31 -2
  639. package/Types/SecurityEvent/RealTimeDetection.d.mts +13 -0
  640. package/Types/SecurityEvent/RealTimeDetection.d.ts +13 -0
  641. package/Types/SecurityEvent/RealTimeDetection.js +60 -0
  642. package/Types/SecurityEvent/RealTimeDetection.mjs +8 -0
  643. package/Types/SecurityEvent/SecurityLogFormat.d.mts +15 -0
  644. package/Types/SecurityEvent/SecurityLogFormat.d.ts +15 -0
  645. package/Types/SecurityEvent/SecurityLogFormat.js +123 -10
  646. package/Types/SecurityEvent/SecurityLogFormat.mjs +4 -0
  647. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +10 -0
  648. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +10 -0
  649. package/Types/SecurityPlaybook/SecurityPlaybookAction.js +117 -3
  650. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +18 -1
  651. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +18 -1
  652. package/Types/SecurityPlaybook/SecurityPlaybookStep.js +121 -3
  653. package/Types/SecurityPlaybook/SecurityPlaybookStep.mjs +5 -0
  654. package/Types/SecurityPlaybook/SecurityPlaybookStepCondition.d.mts +44 -0
  655. package/Types/SecurityPlaybook/SecurityPlaybookStepCondition.d.ts +44 -0
  656. package/Types/SecurityPlaybook/SecurityPlaybookStepCondition.js +188 -0
  657. package/Types/SecurityPlaybook/SecurityPlaybookStepCondition.mjs +9 -0
  658. package/Types/SecurityPlaybook/SecurityPlaybookStepResult.d.mts +1 -0
  659. package/Types/SecurityPlaybook/SecurityPlaybookStepResult.d.ts +1 -0
  660. package/Types/SecurityPlaybook/SecurityPlaybookStepResult.js +1 -0
  661. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.d.mts +2 -0
  662. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.d.ts +2 -0
  663. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.js +67 -16
  664. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.mjs +2 -0
  665. package/Types/SecurityPlaybook/SecurityProtectedEntity.js +8 -1
  666. package/Types/StatusPage/DefaultStatusNames.d.mts +4 -0
  667. package/Types/StatusPage/DefaultStatusNames.d.ts +4 -0
  668. package/Types/StatusPage/DefaultStatusNames.js +50 -0
  669. package/Types/StatusPage/DefaultStatusNames.mjs +4 -0
  670. package/Types/StatusPage/StateChangeNoteMessage.d.mts +18 -1
  671. package/Types/StatusPage/StateChangeNoteMessage.d.ts +18 -1
  672. package/Types/StatusPage/StateChangeNoteMessage.js +60 -9
  673. package/Types/StatusPage/StateChangeNoteMessage.mjs +1 -0
  674. package/Types/StatusPage/StatusPageLanguage.d.mts +2 -0
  675. package/Types/StatusPage/StatusPageLanguage.d.ts +2 -0
  676. package/Types/StatusPage/StatusPageLanguage.js +10 -1
  677. package/Types/StatusPage/StatusPageLanguage.mjs +2 -0
  678. package/Types/Telemetry/ExceptionAIDigest.d.mts +31 -0
  679. package/Types/Telemetry/ExceptionAIDigest.d.ts +31 -0
  680. package/Types/Telemetry/ExceptionAIDigest.js +131 -0
  681. package/Types/Telemetry/ExceptionAIDigest.mjs +13 -0
  682. package/Types/Telemetry/ExceptionAIExplanation.d.mts +37 -0
  683. package/Types/Telemetry/ExceptionAIExplanation.d.ts +37 -0
  684. package/Types/Telemetry/ExceptionAIExplanation.js +110 -0
  685. package/Types/Telemetry/ExceptionAIExplanation.mjs +12 -0
  686. package/Types/Telemetry/ExceptionFingerprintLookup.d.mts +9 -0
  687. package/Types/Telemetry/ExceptionFingerprintLookup.d.ts +9 -0
  688. package/Types/Telemetry/ExceptionFingerprintLookup.js +55 -0
  689. package/Types/Telemetry/ExceptionFingerprintLookup.mjs +4 -0
  690. package/Types/Telemetry/ExceptionGroupFingerprints.d.mts +10 -0
  691. package/Types/Telemetry/ExceptionGroupFingerprints.d.ts +10 -0
  692. package/Types/Telemetry/ExceptionGroupFingerprints.js +114 -0
  693. package/Types/Telemetry/ExceptionGroupFingerprints.mjs +6 -0
  694. package/Types/Telemetry/ExceptionListStats.d.mts +19 -0
  695. package/Types/Telemetry/ExceptionListStats.d.ts +19 -0
  696. package/Types/Telemetry/ExceptionListStats.js +122 -0
  697. package/Types/Telemetry/ExceptionListStats.mjs +9 -0
  698. package/Types/Telemetry/ExceptionSpanScope.d.mts +3 -0
  699. package/Types/Telemetry/ExceptionSpanScope.d.ts +3 -0
  700. package/Types/Telemetry/ExceptionSpanScope.js +39 -3
  701. package/Types/Telemetry/ExceptionSpanScope.mjs +2 -0
  702. package/Types/Telemetry/SimilarExceptions.d.mts +33 -0
  703. package/Types/Telemetry/SimilarExceptions.d.ts +33 -0
  704. package/Types/Telemetry/SimilarExceptions.js +109 -0
  705. package/Types/Telemetry/SimilarExceptions.mjs +10 -0
  706. package/Types/Telemetry/TelemetrySavedViewState.d.mts +4 -0
  707. package/Types/Telemetry/TelemetrySavedViewState.d.ts +4 -0
  708. package/Types/Telemetry/TraceSpanType.d.mts +2 -1
  709. package/Types/Telemetry/TraceSpanType.d.ts +2 -1
  710. package/Types/Telemetry/TraceSpanType.js +50 -11
  711. package/Types/Telemetry/TraceSpanType.mjs +2 -1
  712. package/Types/Theme/ThemePreference.js +2 -1
  713. package/Types/Translator.d.mts +77 -0
  714. package/Types/Translator.d.ts +77 -0
  715. package/Types/Translator.js +582 -0
  716. package/Types/Translator.mjs +18 -0
  717. package/Types/UpdateCheck/SecurityAdvisory.d.mts +39 -0
  718. package/Types/UpdateCheck/SecurityAdvisory.d.ts +39 -0
  719. package/Types/UpdateCheck/SecurityAdvisory.js +221 -0
  720. package/Types/UpdateCheck/SecurityAdvisory.mjs +7 -0
  721. package/Types/UpdateCheck/UpdateCheckFailure.d.mts +9 -0
  722. package/Types/UpdateCheck/UpdateCheckFailure.d.ts +9 -0
  723. package/Types/UpdateCheck/UpdateCheckFailure.js +32 -0
  724. package/Types/UpdateCheck/UpdateCheckFailure.mjs +3 -0
  725. package/Types/UpdateCheck/UpdateStatus.d.mts +44 -0
  726. package/Types/UpdateCheck/UpdateStatus.d.ts +44 -0
  727. package/Types/UpdateCheck/UpdateStatus.js +195 -0
  728. package/Types/UpdateCheck/UpdateStatus.mjs +3 -0
  729. package/Types/VideoCall/VideoCallProvider.js +6 -3
  730. package/Types/Workflow/ComponentID.d.mts +5 -0
  731. package/Types/Workflow/ComponentID.d.ts +5 -0
  732. package/Types/Workflow/ComponentID.js +12 -0
  733. package/Types/Workflow/Components/API.js +91 -0
  734. package/Types/Workflow/Components/ApiGetById.d.mts +16 -0
  735. package/Types/Workflow/Components/ApiGetById.d.ts +16 -0
  736. package/Types/Workflow/Components/ApiGetById.js +69 -0
  737. package/Types/Workflow/Components/ApiGetById.mjs +4 -0
  738. package/Types/Workflow/Components/FromAnotherTool.d.mts +94 -0
  739. package/Types/Workflow/Components/FromAnotherTool.d.ts +94 -0
  740. package/Types/Workflow/Components/FromAnotherTool.js +541 -0
  741. package/Types/Workflow/Components/FromAnotherTool.mjs +23 -0
  742. package/Types/Workflow/Components/JavaScriptCheck.d.mts +16 -0
  743. package/Types/Workflow/Components/JavaScriptCheck.d.ts +16 -0
  744. package/Types/Workflow/Components/JavaScriptCheck.js +145 -0
  745. package/Types/Workflow/Components/JavaScriptCheck.mjs +5 -0
  746. package/Types/Workflow/Components/Zabbix.d.mts +62 -0
  747. package/Types/Workflow/Components/Zabbix.d.ts +62 -0
  748. package/Types/Workflow/Components/Zabbix.js +343 -0
  749. package/Types/Workflow/Components/Zabbix.mjs +17 -0
  750. package/Types/Workflow/Components.js +21 -0
  751. package/Types/Workflow/Documentation/APIDocumentation.d.mts +1 -0
  752. package/Types/Workflow/Documentation/APIDocumentation.d.ts +1 -0
  753. package/Types/Workflow/Documentation/APIDocumentation.js +48 -1
  754. package/Types/Workflow/Documentation/APIDocumentation.mjs +1 -0
  755. package/Types/Workflow/Documentation/DocumentationContext.js +2 -0
  756. package/Types/Workflow/Documentation/DocumentationLinks.d.mts +3 -0
  757. package/Types/Workflow/Documentation/DocumentationLinks.d.ts +3 -0
  758. package/Types/Workflow/Documentation/DocumentationLinks.js +3 -0
  759. package/Types/Workflow/Documentation/FromAnotherToolDocumentation.d.mts +5 -0
  760. package/Types/Workflow/Documentation/FromAnotherToolDocumentation.d.ts +5 -0
  761. package/Types/Workflow/Documentation/FromAnotherToolDocumentation.js +89 -0
  762. package/Types/Workflow/Documentation/FromAnotherToolDocumentation.mjs +3 -0
  763. package/Types/Workflow/Documentation/Index.js +7 -0
  764. package/Types/Workflow/Documentation/UtilityDocumentation.d.mts +1 -0
  765. package/Types/Workflow/Documentation/UtilityDocumentation.d.ts +1 -0
  766. package/Types/Workflow/Documentation/UtilityDocumentation.js +40 -1
  767. package/Types/Workflow/Documentation/UtilityDocumentation.mjs +1 -0
  768. package/Types/Workflow/Documentation/ZabbixDocumentation.d.mts +4 -0
  769. package/Types/Workflow/Documentation/ZabbixDocumentation.d.ts +4 -0
  770. package/Types/Workflow/Documentation/ZabbixDocumentation.js +67 -0
  771. package/Types/Workflow/Documentation/ZabbixDocumentation.mjs +2 -0
  772. package/Types/Workflow/TemplateLayout.d.mts +44 -0
  773. package/Types/Workflow/TemplateLayout.d.ts +44 -0
  774. package/Types/Workflow/TemplateLayout.js +125 -0
  775. package/Types/Workflow/TemplateLayout.mjs +7 -0
  776. package/Types/Workflow/Templates.d.mts +42 -12
  777. package/Types/Workflow/Templates.d.ts +42 -12
  778. package/Types/Workflow/Templates.js +2046 -6220
  779. package/Types/Workflow/Templates.mjs +1 -0
  780. package/Types/Workflow/UnhandledStepFailure.d.mts +15 -0
  781. package/Types/Workflow/UnhandledStepFailure.d.ts +15 -0
  782. package/Types/Workflow/UnhandledStepFailure.js +68 -0
  783. package/Types/Workflow/UnhandledStepFailure.mjs +5 -0
  784. package/Types/Workspace/MicrosoftTeamsCloud.d.mts +26 -0
  785. package/Types/Workspace/MicrosoftTeamsCloud.d.ts +26 -0
  786. package/Types/Workspace/MicrosoftTeamsCloud.js +214 -0
  787. package/Types/Workspace/MicrosoftTeamsCloud.mjs +4 -0
  788. package/Types/Workspace/WorkspaceChannelLink.d.mts +1 -0
  789. package/Types/Workspace/WorkspaceChannelLink.d.ts +1 -0
  790. package/Types/Workspace/WorkspaceChannelLink.js +45 -6
  791. package/Types/Workspace/WorkspaceMessagePayload.d.mts +1 -0
  792. package/Types/Workspace/WorkspaceMessagePayload.d.ts +1 -0
  793. package/UI/Utils/TranslateTemplate.d.mts +3 -68
  794. package/UI/Utils/TranslateTemplate.d.ts +3 -68
  795. package/Utils/AiRemediation/CloudChangeDryRunPlan.d.mts +17 -0
  796. package/Utils/AiRemediation/CloudChangeDryRunPlan.d.ts +17 -0
  797. package/Utils/AiRemediation/CloudChangeDryRunPlan.js +122 -0
  798. package/Utils/AiRemediation/CloudChangeDryRunPlan.mjs +7 -0
  799. package/Utils/AiRemediation/Resource/CloudCommandPolicy.d.mts +4 -0
  800. package/Utils/AiRemediation/Resource/CloudCommandPolicy.d.ts +4 -0
  801. package/Utils/AiRemediation/Resource/CloudCommandPolicy.js +177 -0
  802. package/Utils/AiRemediation/Resource/CloudCommandPolicy.mjs +4 -0
  803. package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.mts +144 -0
  804. package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.ts +144 -0
  805. package/Utils/AiRemediation/Resource/CloudOperationCatalog.js +1964 -0
  806. package/Utils/AiRemediation/Resource/CloudOperationCatalog.mjs +48 -0
  807. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +4 -0
  808. package/Utils/Dashboard/DashboardBoardLayout.d.mts +46 -0
  809. package/Utils/Dashboard/DashboardBoardLayout.d.ts +46 -0
  810. package/Utils/Dashboard/DashboardBoardLayout.js +238 -0
  811. package/Utils/Dashboard/DashboardBoardLayout.mjs +11 -0
  812. package/Utils/Dashboard/ValueWidgetLayout.js +9 -1
  813. package/Utils/Dashboard/VariableInterpolation.d.mts +1 -0
  814. package/Utils/Dashboard/VariableInterpolation.d.ts +1 -0
  815. package/Utils/Dashboard/VariableInterpolation.js +19 -0
  816. package/Utils/DataSecurity/CustomDataTypeDetector.d.mts +23 -0
  817. package/Utils/DataSecurity/CustomDataTypeDetector.d.ts +23 -0
  818. package/Utils/DataSecurity/CustomDataTypeDetector.js +130 -0
  819. package/Utils/DataSecurity/CustomDataTypeDetector.mjs +8 -0
  820. package/Utils/DataSecurity/Detector.d.mts +26 -0
  821. package/Utils/DataSecurity/Detector.d.ts +26 -0
  822. package/Utils/DataSecurity/Detector.js +83 -0
  823. package/Utils/DataSecurity/Detector.mjs +8 -0
  824. package/Utils/DataSecurity/Detectors/ContactDetectors.d.mts +12 -0
  825. package/Utils/DataSecurity/Detectors/ContactDetectors.d.ts +12 -0
  826. package/Utils/DataSecurity/Detectors/ContactDetectors.js +915 -0
  827. package/Utils/DataSecurity/Detectors/ContactDetectors.mjs +12 -0
  828. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.d.mts +3 -0
  829. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.d.ts +3 -0
  830. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.js +52 -0
  831. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.mjs +3 -0
  832. package/Utils/DataSecurity/Detectors/FinancialDetectors.d.mts +8 -0
  833. package/Utils/DataSecurity/Detectors/FinancialDetectors.d.ts +8 -0
  834. package/Utils/DataSecurity/Detectors/FinancialDetectors.js +566 -0
  835. package/Utils/DataSecurity/Detectors/FinancialDetectors.mjs +8 -0
  836. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.d.mts +3 -0
  837. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.d.ts +3 -0
  838. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.js +2415 -0
  839. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.mjs +3 -0
  840. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.d.mts +3 -0
  841. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.d.ts +3 -0
  842. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.js +258 -0
  843. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.mjs +3 -0
  844. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.d.mts +3 -0
  845. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.d.ts +3 -0
  846. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.js +115 -0
  847. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.mjs +3 -0
  848. package/Utils/DataSecurity/Detectors/Index.d.mts +4 -0
  849. package/Utils/DataSecurity/Detectors/Index.d.ts +4 -0
  850. package/Utils/DataSecurity/Detectors/Index.js +47 -0
  851. package/Utils/DataSecurity/Detectors/Index.mjs +4 -0
  852. package/Utils/DataSecurity/Detectors/SecretDetectors.d.mts +11 -0
  853. package/Utils/DataSecurity/Detectors/SecretDetectors.d.ts +11 -0
  854. package/Utils/DataSecurity/Detectors/SecretDetectors.js +1733 -0
  855. package/Utils/DataSecurity/Detectors/SecretDetectors.mjs +11 -0
  856. package/Utils/DataSecurity/FieldClassifier.d.mts +22 -0
  857. package/Utils/DataSecurity/FieldClassifier.d.ts +22 -0
  858. package/Utils/DataSecurity/FieldClassifier.js +247 -0
  859. package/Utils/DataSecurity/FieldClassifier.mjs +5 -0
  860. package/Utils/DataSecurity/FieldCollector.d.mts +23 -0
  861. package/Utils/DataSecurity/FieldCollector.d.ts +23 -0
  862. package/Utils/DataSecurity/FieldCollector.js +81 -0
  863. package/Utils/DataSecurity/FieldCollector.mjs +3 -0
  864. package/Utils/DataSecurity/FieldNameHints.d.mts +9 -0
  865. package/Utils/DataSecurity/FieldNameHints.d.ts +9 -0
  866. package/Utils/DataSecurity/FieldNameHints.js +184 -0
  867. package/Utils/DataSecurity/FieldNameHints.mjs +6 -0
  868. package/Utils/DataSecurity/FindingTally.d.mts +44 -0
  869. package/Utils/DataSecurity/FindingTally.d.ts +44 -0
  870. package/Utils/DataSecurity/FindingTally.js +138 -0
  871. package/Utils/DataSecurity/FindingTally.mjs +6 -0
  872. package/Utils/DataSecurity/Masking.d.mts +6 -0
  873. package/Utils/DataSecurity/Masking.d.ts +6 -0
  874. package/Utils/DataSecurity/Masking.js +159 -0
  875. package/Utils/DataSecurity/Masking.mjs +7 -0
  876. package/Utils/DataSecurity/PathPattern.d.mts +3 -0
  877. package/Utils/DataSecurity/PathPattern.d.ts +3 -0
  878. package/Utils/DataSecurity/PathPattern.js +55 -0
  879. package/Utils/DataSecurity/PathPattern.mjs +4 -0
  880. package/Utils/DataSecurity/Sha256.d.mts +1 -0
  881. package/Utils/DataSecurity/Sha256.d.ts +1 -0
  882. package/Utils/DataSecurity/Sha256.js +94 -0
  883. package/Utils/DataSecurity/Sha256.mjs +2 -0
  884. package/Utils/DataSecurity/TextScanner.d.mts +35 -0
  885. package/Utils/DataSecurity/TextScanner.d.ts +35 -0
  886. package/Utils/DataSecurity/TextScanner.js +303 -0
  887. package/Utils/DataSecurity/TextScanner.mjs +8 -0
  888. package/Utils/DataSecurity/UnplacedFields.d.mts +35 -0
  889. package/Utils/DataSecurity/UnplacedFields.d.ts +35 -0
  890. package/Utils/DataSecurity/UnplacedFields.js +407 -0
  891. package/Utils/DataSecurity/UnplacedFields.mjs +19 -0
  892. package/Utils/DataSecurity/Validators.d.mts +16 -0
  893. package/Utils/DataSecurity/Validators.d.ts +16 -0
  894. package/Utils/DataSecurity/Validators.js +339 -0
  895. package/Utils/DataSecurity/Validators.mjs +17 -0
  896. package/Utils/Exceptions/ExceptionActivity.d.mts +22 -0
  897. package/Utils/Exceptions/ExceptionActivity.d.ts +22 -0
  898. package/Utils/Exceptions/ExceptionActivity.js +141 -0
  899. package/Utils/Exceptions/ExceptionActivity.mjs +6 -0
  900. package/Utils/Exceptions/ExceptionIssueState.d.mts +18 -0
  901. package/Utils/Exceptions/ExceptionIssueState.d.ts +18 -0
  902. package/Utils/Exceptions/ExceptionIssueState.js +131 -0
  903. package/Utils/Exceptions/ExceptionIssueState.mjs +8 -0
  904. package/Utils/Exceptions/ExceptionUserId.d.mts +8 -0
  905. package/Utils/Exceptions/ExceptionUserId.d.ts +8 -0
  906. package/Utils/Exceptions/ExceptionUserId.js +79 -0
  907. package/Utils/Exceptions/ExceptionUserId.mjs +6 -0
  908. package/Utils/HostCollector/HostCollectorDefaultConfig.d.mts +2 -0
  909. package/Utils/HostCollector/HostCollectorDefaultConfig.d.ts +2 -0
  910. package/Utils/HostCollector/HostCollectorDefaultConfig.js +39 -1
  911. package/Utils/HostCollector/HostCollectorDefaultConfig.mjs +2 -0
  912. package/Utils/Inventory/InventoryAssetDetails.d.mts +7 -0
  913. package/Utils/Inventory/InventoryAssetDetails.d.ts +7 -0
  914. package/Utils/Inventory/InventoryAssetDetails.js +70 -1
  915. package/Utils/Inventory/InventoryAssetDetails.mjs +1 -0
  916. package/Utils/LabelRuleImportExport.js +17 -3
  917. package/Utils/Metrics/MetricQueryFallback.d.mts +24 -0
  918. package/Utils/Metrics/MetricQueryFallback.d.ts +24 -0
  919. package/Utils/Metrics/MetricQueryFallback.js +208 -0
  920. package/Utils/Metrics/MetricQueryFallback.mjs +2 -0
  921. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +15 -2
  922. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +15 -2
  923. package/Utils/Monitor/EndpointAttachmentUtil.js +83 -1
  924. package/Utils/Monitor/EndpointAttachmentUtil.mjs +1 -0
  925. package/Utils/Monitor/NeighborIdentityUtil.d.mts +15 -0
  926. package/Utils/Monitor/NeighborIdentityUtil.d.ts +15 -0
  927. package/Utils/Monitor/NeighborIdentityUtil.js +58 -0
  928. package/Utils/Monitor/NeighborIdentityUtil.mjs +3 -0
  929. package/Utils/Monitor/NetworkTopologyUtil.d.mts +13 -0
  930. package/Utils/Monitor/NetworkTopologyUtil.d.ts +13 -0
  931. package/Utils/Monitor/NetworkTopologyUtil.js +293 -70
  932. package/Utils/Monitor/PlatformResourceIdentity.js +7 -4
  933. package/Utils/NetworkDevice/DeviceOwnMacUtil.d.mts +20 -0
  934. package/Utils/NetworkDevice/DeviceOwnMacUtil.d.ts +20 -0
  935. package/Utils/NetworkDevice/DeviceOwnMacUtil.js +81 -0
  936. package/Utils/NetworkDevice/DeviceOwnMacUtil.mjs +4 -0
  937. package/Utils/NetworkDevice/DeviceWebUiUtil.d.mts +20 -0
  938. package/Utils/NetworkDevice/DeviceWebUiUtil.d.ts +20 -0
  939. package/Utils/NetworkDevice/DeviceWebUiUtil.js +139 -0
  940. package/Utils/NetworkDevice/DeviceWebUiUtil.mjs +4 -0
  941. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.mts +1 -0
  942. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.ts +1 -0
  943. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.js +64 -6
  944. package/Utils/NetworkDevice/SystemDescriptionUtil.d.mts +10 -0
  945. package/Utils/NetworkDevice/SystemDescriptionUtil.d.ts +10 -0
  946. package/Utils/NetworkDevice/SystemDescriptionUtil.js +69 -5
  947. package/Utils/NetworkDevice/SystemDescriptionUtil.mjs +2 -0
  948. package/Utils/NetworkDiscovery/DiscoveredDetailsPlan.d.mts +1 -0
  949. package/Utils/NetworkDiscovery/DiscoveredDetailsPlan.d.ts +1 -0
  950. package/Utils/NetworkDiscovery/DiscoveredDetailsPlan.js +19 -6
  951. package/Utils/NetworkDiscovery/DiscoveredHostUtil.d.mts +1 -1
  952. package/Utils/NetworkDiscovery/DiscoveredHostUtil.d.ts +1 -1
  953. package/Utils/NetworkDiscovery/DiscoveredHostUtil.js +18 -1
  954. package/Utils/Proxmox/ProxmoxNotifications.d.mts +62 -0
  955. package/Utils/Proxmox/ProxmoxNotifications.d.ts +62 -0
  956. package/Utils/Proxmox/ProxmoxNotifications.js +458 -0
  957. package/Utils/Proxmox/ProxmoxNotifications.mjs +20 -0
  958. package/Utils/Rules/RuleRunSummary.d.mts +6 -3
  959. package/Utils/Rules/RuleRunSummary.d.ts +6 -3
  960. package/Utils/Rules/RuleRunSummary.js +11 -7
  961. package/Utils/Rum/UserFlow.d.mts +20 -0
  962. package/Utils/Rum/UserFlow.d.ts +20 -0
  963. package/Utils/Rum/UserFlow.js +41 -3
  964. package/Utils/Rum/UserFlow.mjs +1 -0
  965. package/Utils/Schema/MonitorSchemas.js +2 -0
  966. package/Utils/SecurityAdvisoryMatcher.d.mts +33 -0
  967. package/Utils/SecurityAdvisoryMatcher.d.ts +33 -0
  968. package/Utils/SecurityAdvisoryMatcher.js +291 -0
  969. package/Utils/SecurityAdvisoryMatcher.mjs +2 -0
  970. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.mts +24 -0
  971. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.ts +24 -0
  972. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.js +380 -0
  973. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.mjs +15 -0
  974. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.mts +29 -0
  975. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.ts +29 -0
  976. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.js +527 -0
  977. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.mjs +13 -0
  978. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.d.mts +21 -0
  979. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.d.ts +21 -0
  980. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.js +365 -0
  981. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.mjs +11 -0
  982. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.d.mts +17 -0
  983. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.d.ts +17 -0
  984. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.js +344 -0
  985. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.mjs +12 -0
  986. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.d.mts +27 -0
  987. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.d.ts +27 -0
  988. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.js +326 -0
  989. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.mjs +10 -0
  990. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.d.mts +38 -0
  991. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.d.ts +38 -0
  992. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.js +629 -0
  993. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.mjs +13 -0
  994. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +9 -0
  995. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +9 -0
  996. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +63 -3
  997. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +4 -0
  998. package/Utils/SecurityEvent/LogParsers/SecurityLogParser.js +54 -0
  999. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.mts +26 -0
  1000. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.ts +26 -0
  1001. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.js +1046 -0
  1002. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.mjs +11 -0
  1003. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.mts +19 -0
  1004. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.ts +19 -0
  1005. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.js +724 -0
  1006. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.mjs +7 -0
  1007. package/Utils/SecurityEvent/SecurityRecordReading.d.mts +32 -0
  1008. package/Utils/SecurityEvent/SecurityRecordReading.d.ts +32 -0
  1009. package/Utils/SecurityEvent/SecurityRecordReading.js +78 -0
  1010. package/Utils/SecurityEvent/SecurityRecordReading.mjs +2 -0
  1011. package/Utils/Sms/Gsm7Text.d.mts +3 -0
  1012. package/Utils/Sms/Gsm7Text.d.ts +3 -0
  1013. package/Utils/Sms/Gsm7Text.js +109 -8
  1014. package/Utils/Sms/Gsm7Text.mjs +3 -0
  1015. package/Utils/Sms/OnCallPageSms.d.mts +1 -0
  1016. package/Utils/Sms/OnCallPageSms.d.ts +1 -0
  1017. package/Utils/Sms/OnCallPageSms.js +16 -2
  1018. package/Utils/Sms/SubscriberSms.js +9 -1
  1019. package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.mts +44 -0
  1020. package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.ts +44 -0
  1021. package/Utils/Suggestions/InvestigationCodeFixSuggestion.js +223 -0
  1022. package/Utils/Suggestions/InvestigationCodeFixSuggestion.mjs +8 -0
  1023. package/Utils/Syslog/LeefParser.d.mts +28 -0
  1024. package/Utils/Syslog/LeefParser.d.ts +28 -0
  1025. package/Utils/Syslog/LeefParser.js +326 -0
  1026. package/Utils/Syslog/LeefParser.mjs +10 -0
  1027. package/Utils/Telemetry/ChangeEventFields.d.mts +11 -0
  1028. package/Utils/Telemetry/ChangeEventFields.d.ts +11 -0
  1029. package/Utils/Telemetry/ChangeEventFields.js +33 -3
  1030. package/Utils/Telemetry/CloudAppRevisionName.d.mts +4 -0
  1031. package/Utils/Telemetry/CloudAppRevisionName.d.ts +4 -0
  1032. package/Utils/Telemetry/CloudAppRevisionName.js +27 -0
  1033. package/Utils/Telemetry/CloudAppRevisionName.mjs +2 -0
  1034. package/Utils/Telemetry/CloudInstanceIdentity.d.mts +1 -0
  1035. package/Utils/Telemetry/CloudInstanceIdentity.d.ts +1 -0
  1036. package/Utils/Telemetry/CloudInstanceIdentity.js +10 -0
  1037. package/Utils/Telemetry/CloudInstanceIdentity.mjs +1 -0
  1038. package/Utils/VersionRange.d.mts +34 -0
  1039. package/Utils/VersionRange.d.ts +34 -0
  1040. package/Utils/VersionRange.js +422 -0
  1041. package/Utils/VersionRange.mjs +5 -0
  1042. package/package.json +1 -1
@@ -0,0 +1,1964 @@
1
+ "use strict";
2
+ /*
3
+ * The cloud catalog: the CLOSED set of operations OneUptime AI may run on an
4
+ * AWS account, an Azure subscription or a Google Cloud project, the grammar
5
+ * that reads a `cloud` argv into exactly one of them, which kinds of
6
+ * resource each one supports, and how each change is undone.
7
+ *
8
+ * `cloud` is not a real CLI and never runs text the model wrote, the way
9
+ * `db` is not (DatabaseDiagnosticCatalog). A command is
10
+ *
11
+ * cloud <operation> [resource] [--flag value | --flag=value]...
12
+ *
13
+ * where the resource is the provider's own id of ONE resource the account's
14
+ * inventory lists: an ARN, an Azure resource ID, or a Google Cloud full
15
+ * resource name ("//run.googleapis.com/projects/p/locations/l/services/s").
16
+ * There are no free-form `aws`, `az` or `gcloud` calls.
17
+ *
18
+ * Where each operation runs:
19
+ * - the changes run only on the Cloud AI agent in the customer's cloud,
20
+ * which maps each one to ONE API call it owns (the `apiCall` notes),
21
+ * reads the value it is about to replace first and reports it, so the
22
+ * plan's rollback is exact;
23
+ * - the reads (describe, recent-events, target-health, quota-usage,
24
+ * read-logs) run on the OneUptime server through the account's existing
25
+ * read-only connection, so they work without the agent;
26
+ * - `whoami` runs on the agent: the account it acts in and the operations
27
+ * its role allows, for "Test connection";
28
+ * - `dry-run <change>` runs on the agent too: it checks one change the way
29
+ * the agent would make it and reads the value it would replace, then
30
+ * stops before the call that makes it (see CLOUD_DRY_RUN_OPERATION).
31
+ *
32
+ * The grammar is as strict as the db catalog's, so a flag or value the
33
+ * policy refuses can never hide inside one it allows:
34
+ * - the operation is argv[1], spelled exactly (lowercase, dashes);
35
+ * - flags are LONG only (`--count 4` or `--count=4`); every flag takes a
36
+ * value; `--flag value` never takes a value that starts with "-", and
37
+ * `--flag=` with nothing after it is refused;
38
+ * - a flag the operation does not take (or does not take for this kind of
39
+ * resource), an unknown flag, a flag given twice, a value outside its
40
+ * type or bounds, a missing or extra argument: all refused;
41
+ * - "--" ends the flags;
42
+ * - the resource must be a well-formed id of the account's cloud, and a
43
+ * change must name a kind of resource the operation supports.
44
+ * The parse yields a canonical argv (operation, resource, flags in catalog
45
+ * order as `--flag value`) that re-parses to itself, so what the agent
46
+ * receives, what a person approves and what the agent runs are one thing.
47
+ *
48
+ * Tiers are set per kind of resource (restarting an ECS service is a
49
+ * rolling replacement, restarting an App Service is not), and three
50
+ * changes always ask a person, in every mode: fail-over-database,
51
+ * stop-instance and redrive-queue. Everything else is in the never tier:
52
+ * deleting or terminating anything, IAM, security groups and firewall
53
+ * rules, secrets and keys, storage and database contents, instance types,
54
+ * snapshots and restores, purging a queue, a group's minimum or maximum,
55
+ * and anything not here.
56
+ *
57
+ * Part of the import-closed resource policy directory the resource AI agent
58
+ * carries a byte-identical copy of (see ResourceCommandPolicyCore): pure,
59
+ * total (nothing here throws), relative imports of that set only.
60
+ */
61
+ var __importDefault = (this && this.__importDefault) || function (mod) {
62
+ return (mod && mod.__esModule) ? mod : { "default": mod };
63
+ };
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.CLOUD_DRY_RUN_PREFIX = exports.CLOUD_REPLACED_VALUE_PREFIX = exports.CLOUD_DRY_RUN_OPERATION = exports.CLOUD_DRY_RUN_OPERATION_NAME = exports.CLOUD_CHANGE_OPERATION_NAMES = exports.CLOUD_OPERATION_NAMES = exports.CLOUD_OPERATIONS = exports.CLOUD_MAX_VERSION_LENGTH = exports.CLOUD_MAX_SEARCH_TEXT_LENGTH = exports.CLOUD_DEFAULT_ROW_LIMIT = exports.CLOUD_MAX_ROW_LIMIT = exports.CLOUD_DEFAULT_LOG_MINUTES = exports.CLOUD_MAX_LOG_MINUTES = exports.CLOUD_DEFAULT_EVENT_HOURS = exports.CLOUD_MAX_EVENT_HOURS = exports.CLOUD_MAX_LIMIT_VALUE = exports.CLOUD_MAX_COUNT = exports.CloudParamKind = exports.CLOUD_MAX_RESOURCE_ID_LENGTH = exports.CLOUD_RESOURCE_KINDS = exports.CLOUD_RESOURCE_ID_NAMES = exports.CLOUD_CATALOG_PROVIDER_NAMES = exports.ALL_CLOUD_CATALOG_PROVIDERS = exports.CLOUD_PROGRAM = void 0;
66
+ exports.getCloudCatalogProvider = getCloudCatalogProvider;
67
+ exports.getCloudResourceKind = getCloudResourceKind;
68
+ exports.quoteCloudWord = quoteCloudWord;
69
+ exports.parseCloudResourceId = parseCloudResourceId;
70
+ exports.getCloudWriteTarget = getCloudWriteTarget;
71
+ exports.isSameCloudResourceId = isSameCloudResourceId;
72
+ exports.isCloudDryRun = isCloudDryRun;
73
+ exports.isCloudChangeOperation = isCloudChangeOperation;
74
+ exports.getCloudOperation = getCloudOperation;
75
+ exports.getCloudOperationKind = getCloudOperationKind;
76
+ exports.describeCloudOperationKinds = describeCloudOperationKinds;
77
+ exports.isCloudOperationAvailable = isCloudOperationAvailable;
78
+ exports.describeCloudOperationUsage = describeCloudOperationUsage;
79
+ exports.parseCloudCommand = parseCloudCommand;
80
+ exports.getCloudIntegerFlag = getCloudIntegerFlag;
81
+ exports.formatCloudReplacedValue = formatCloudReplacedValue;
82
+ exports.readCloudReplacedValue = readCloudReplacedValue;
83
+ exports.formatCloudDryRunVerdict = formatCloudDryRunVerdict;
84
+ exports.readCloudDryRunVerdict = readCloudDryRunVerdict;
85
+ exports.withoutCloudDryRunVerdict = withoutCloudDryRunVerdict;
86
+ exports.getCloudUndoCommand = getCloudUndoCommand;
87
+ exports.getCloudReadCommandGuide = getCloudReadCommandGuide;
88
+ exports.getCloudWriteCommandGuide = getCloudWriteCommandGuide;
89
+ const AiResourceType_1 = __importDefault(require("../../../Types/ResourceAiAgent/AiResourceType"));
90
+ const ResourceAiAccess_1 = require("../../../Types/ResourceAiAgent/ResourceAiAccess");
91
+ // The program every cloud command starts with.
92
+ exports.CLOUD_PROGRAM = "cloud";
93
+ exports.ALL_CLOUD_CATALOG_PROVIDERS = ["aws", "azure", "gcp"];
94
+ exports.CLOUD_CATALOG_PROVIDER_NAMES = {
95
+ aws: "AWS",
96
+ azure: "Azure",
97
+ gcp: "Google Cloud",
98
+ };
99
+ // How each cloud names the id a command takes.
100
+ exports.CLOUD_RESOURCE_ID_NAMES = {
101
+ aws: "ARN",
102
+ azure: "Azure resource ID",
103
+ gcp: "Google Cloud full resource name",
104
+ };
105
+ // The cloud a resource type's agent acts in, or null for any other type.
106
+ function getCloudCatalogProvider(resourceType) {
107
+ switch (resourceType) {
108
+ case AiResourceType_1.default.AwsAccount:
109
+ return "aws";
110
+ case AiResourceType_1.default.AzureSubscription:
111
+ return "azure";
112
+ case AiResourceType_1.default.GoogleCloudProject:
113
+ return "gcp";
114
+ default:
115
+ return null;
116
+ }
117
+ }
118
+ exports.CLOUD_RESOURCE_KINDS = [
119
+ { provider: "aws", kind: "ecs-service", displayName: "ECS service" },
120
+ { provider: "aws", kind: "ec2-instance", displayName: "EC2 instance" },
121
+ { provider: "aws", kind: "rds-instance", displayName: "RDS instance" },
122
+ { provider: "aws", kind: "rds-cluster", displayName: "Aurora cluster" },
123
+ {
124
+ provider: "aws",
125
+ kind: "autoscaling-group",
126
+ displayName: "Auto Scaling group",
127
+ },
128
+ { provider: "aws", kind: "lambda-function", displayName: "Lambda function" },
129
+ { provider: "aws", kind: "lambda-alias", displayName: "Lambda alias" },
130
+ { provider: "aws", kind: "sqs-queue", displayName: "SQS queue" },
131
+ { provider: "aws", kind: "elb-target-group", displayName: "target group" },
132
+ { provider: "aws", kind: "elb-load-balancer", displayName: "load balancer" },
133
+ {
134
+ provider: "azure",
135
+ kind: "app-service",
136
+ displayName: "App Service or Function App",
137
+ },
138
+ {
139
+ provider: "azure",
140
+ kind: "app-service-plan",
141
+ displayName: "App Service plan",
142
+ },
143
+ { provider: "azure", kind: "container-app", displayName: "Container App" },
144
+ {
145
+ provider: "azure",
146
+ kind: "virtual-machine",
147
+ displayName: "virtual machine",
148
+ },
149
+ { provider: "azure", kind: "vm-scale-set", displayName: "VM scale set" },
150
+ {
151
+ provider: "azure",
152
+ kind: "postgresql-flexible-server",
153
+ displayName: "PostgreSQL flexible server",
154
+ },
155
+ {
156
+ provider: "azure",
157
+ kind: "mysql-flexible-server",
158
+ displayName: "MySQL flexible server",
159
+ },
160
+ {
161
+ provider: "azure",
162
+ kind: "sql-failover-group",
163
+ displayName: "SQL failover group",
164
+ },
165
+ {
166
+ provider: "gcp",
167
+ kind: "compute-instance",
168
+ displayName: "Compute Engine VM",
169
+ },
170
+ {
171
+ provider: "gcp",
172
+ kind: "cloud-run-service",
173
+ displayName: "Cloud Run service",
174
+ },
175
+ {
176
+ provider: "gcp",
177
+ kind: "managed-instance-group",
178
+ displayName: "managed instance group",
179
+ },
180
+ {
181
+ provider: "gcp",
182
+ kind: "cloud-sql-instance",
183
+ displayName: "Cloud SQL instance",
184
+ },
185
+ ];
186
+ function getCloudResourceKind(provider, kind) {
187
+ if (!kind) {
188
+ return null;
189
+ }
190
+ for (const spec of exports.CLOUD_RESOURCE_KINDS) {
191
+ if (spec.provider === provider && spec.kind === kind) {
192
+ return spec;
193
+ }
194
+ }
195
+ return null;
196
+ }
197
+ // The longest id the catalog reads (an ARN is at most 2048 characters).
198
+ exports.CLOUD_MAX_RESOURCE_ID_LENGTH = 1600;
199
+ const AWS_PARTITION_REGEX = /^aws(?:-cn|-us-gov|-iso|-iso-b)?$/;
200
+ const AWS_SERVICE_REGEX = /^[a-z0-9][a-z0-9-]{0,62}$/;
201
+ const AWS_REGION_REGEX = /^[a-z]{2}(?:-gov|-iso|-isob)?-[a-z]{2,12}-[0-9]{1,2}$/;
202
+ const AWS_ACCOUNT_REGEX = /^[0-9]{12}$/;
203
+ // What an ARN's resource part may hold: no space, quote, backslash or control character.
204
+ const AWS_RESOURCE_PART_REGEX = /^[A-Za-z0-9_.:/@+=,$#-]{1,1500}$/;
205
+ const AWS_ECS_NAME_REGEX = /^[A-Za-z0-9_-]{1,255}$/;
206
+ const AWS_EC2_INSTANCE_REGEX = /^i-(?:[0-9a-f]{8}|[0-9a-f]{17})$/;
207
+ const AWS_RDS_NAME_REGEX = /^[A-Za-z][A-Za-z0-9-]{0,62}$/;
208
+ const AWS_UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
209
+ const AWS_ASG_NAME_REGEX = /^[A-Za-z0-9._@+=,-]{1,255}$/;
210
+ const AWS_LAMBDA_NAME_REGEX = /^[A-Za-z0-9_-]{1,64}$/;
211
+ const AWS_LAMBDA_QUALIFIER_REGEX = /^(?:\$LATEST|[A-Za-z0-9_-]{1,128})$/;
212
+ const AWS_SQS_NAME_REGEX = /^[A-Za-z0-9_-]{1,80}(?:\.fifo)?$/;
213
+ const AWS_ELB_NAME_REGEX = /^[A-Za-z0-9-]{1,32}$/;
214
+ const AWS_ELB_ID_REGEX = /^[0-9a-f]{16}$/;
215
+ const DIGITS_REGEX = /^[0-9]+$/;
216
+ function refuseResource(errorMessage) {
217
+ return { ok: false, errorMessage };
218
+ }
219
+ // The longest id quoted back in a refusal.
220
+ const MAX_QUOTED_WORD_LENGTH = 64;
221
+ // A word as a refusal quotes it: JSON-escaped, and cut when it is long.
222
+ function quoteCloudWord(word) {
223
+ const shown = word.length > MAX_QUOTED_WORD_LENGTH
224
+ ? `${word.slice(0, MAX_QUOTED_WORD_LENGTH)}...`
225
+ : word;
226
+ return JSON.stringify(shown);
227
+ }
228
+ /*
229
+ * arn:partition:service:region:account:resource, with the kinds the
230
+ * catalog's changes take read out of the resource part.
231
+ */
232
+ function parseAwsArn(id) {
233
+ const notArn = `an AWS resource is named by its ARN, such as arn:aws:ecs:us-east-1:123456789012:service/prod/web (got ${quoteCloudWord(id)})`;
234
+ if (!id.startsWith("arn:")) {
235
+ return refuseResource(notArn);
236
+ }
237
+ const fields = [];
238
+ let start = 0;
239
+ // The first five fields end at a colon; the resource part may hold more.
240
+ for (let field = 0; field < 5; field++) {
241
+ const colon = id.indexOf(":", start);
242
+ if (colon < 0) {
243
+ return refuseResource(notArn);
244
+ }
245
+ fields.push(id.slice(start, colon));
246
+ start = colon + 1;
247
+ }
248
+ const partition = fields[1] || "";
249
+ const service = fields[2] || "";
250
+ const region = fields[3] || "";
251
+ const account = fields[4] || "";
252
+ const resourcePart = id.slice(start);
253
+ if (!AWS_PARTITION_REGEX.test(partition) ||
254
+ !AWS_SERVICE_REGEX.test(service) ||
255
+ (region !== "" && !AWS_REGION_REGEX.test(region)) ||
256
+ (account !== "" && !AWS_ACCOUNT_REGEX.test(account)) ||
257
+ !AWS_RESOURCE_PART_REGEX.test(resourcePart)) {
258
+ return refuseResource(notArn);
259
+ }
260
+ const resource = {
261
+ provider: "aws",
262
+ id,
263
+ accountId: account,
264
+ region: region || null,
265
+ zone: null,
266
+ kind: null,
267
+ parts: { service, partition },
268
+ };
269
+ const slash = resourcePart.split("/");
270
+ const colon = resourcePart.split(":");
271
+ if (service === "ecs" &&
272
+ slash.length === 3 &&
273
+ slash[0] === "service" &&
274
+ AWS_ECS_NAME_REGEX.test(slash[1] || "") &&
275
+ AWS_ECS_NAME_REGEX.test(slash[2] || "")) {
276
+ resource.kind = "ecs-service";
277
+ resource.parts["cluster"] = slash[1] || "";
278
+ resource.parts["name"] = slash[2] || "";
279
+ }
280
+ else if (service === "ec2" &&
281
+ slash.length === 2 &&
282
+ slash[0] === "instance" &&
283
+ AWS_EC2_INSTANCE_REGEX.test(slash[1] || "")) {
284
+ resource.kind = "ec2-instance";
285
+ resource.parts["instanceId"] = slash[1] || "";
286
+ }
287
+ else if (service === "rds" &&
288
+ colon.length === 2 &&
289
+ (colon[0] === "db" || colon[0] === "cluster") &&
290
+ AWS_RDS_NAME_REGEX.test(colon[1] || "")) {
291
+ resource.kind = colon[0] === "db" ? "rds-instance" : "rds-cluster";
292
+ resource.parts["name"] = colon[1] || "";
293
+ }
294
+ else if (service === "autoscaling" &&
295
+ colon.length === 3 &&
296
+ colon[0] === "autoScalingGroup" &&
297
+ AWS_UUID_REGEX.test(colon[1] || "") &&
298
+ (colon[2] || "").startsWith("autoScalingGroupName/") &&
299
+ AWS_ASG_NAME_REGEX.test((colon[2] || "").slice("autoScalingGroupName/".length))) {
300
+ resource.kind = "autoscaling-group";
301
+ resource.parts["name"] = (colon[2] || "").slice("autoScalingGroupName/".length);
302
+ }
303
+ else if (service === "lambda" &&
304
+ colon[0] === "function" &&
305
+ (colon.length === 2 || colon.length === 3) &&
306
+ AWS_LAMBDA_NAME_REGEX.test(colon[1] || "")) {
307
+ resource.parts["functionName"] = colon[1] || "";
308
+ if (colon.length === 2) {
309
+ resource.kind = "lambda-function";
310
+ }
311
+ else {
312
+ const qualifier = colon[2] || "";
313
+ if (!AWS_LAMBDA_QUALIFIER_REGEX.test(qualifier)) {
314
+ return refuseResource(notArn);
315
+ }
316
+ // A version (digits or $LATEST) is not an alias: it never moves.
317
+ if (qualifier !== "$LATEST" && !DIGITS_REGEX.test(qualifier)) {
318
+ resource.kind = "lambda-alias";
319
+ resource.parts["alias"] = qualifier;
320
+ }
321
+ }
322
+ }
323
+ else if (service === "sqs" &&
324
+ colon.length === 1 &&
325
+ AWS_SQS_NAME_REGEX.test(resourcePart)) {
326
+ resource.kind = "sqs-queue";
327
+ resource.parts["queueName"] = resourcePart;
328
+ }
329
+ else if (service === "elasticloadbalancing") {
330
+ if (slash.length === 3 &&
331
+ slash[0] === "targetgroup" &&
332
+ AWS_ELB_NAME_REGEX.test(slash[1] || "") &&
333
+ AWS_ELB_ID_REGEX.test(slash[2] || "")) {
334
+ resource.kind = "elb-target-group";
335
+ resource.parts["name"] = slash[1] || "";
336
+ }
337
+ else if (slash.length === 4 &&
338
+ slash[0] === "loadbalancer" &&
339
+ (slash[1] === "app" || slash[1] === "net") &&
340
+ AWS_ELB_NAME_REGEX.test(slash[2] || "") &&
341
+ AWS_ELB_ID_REGEX.test(slash[3] || "")) {
342
+ resource.kind = "elb-load-balancer";
343
+ resource.parts["name"] = slash[2] || "";
344
+ }
345
+ }
346
+ return { ok: true, resource };
347
+ }
348
+ const AZURE_GUID_REGEX = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
349
+ const AZURE_RESOURCE_GROUP_REGEX = /^[A-Za-z0-9._()-]{1,90}$/;
350
+ const AZURE_NAMESPACE_REGEX = /^[A-Za-z][A-Za-z0-9]{0,63}(?:\.[A-Za-z][A-Za-z0-9]{0,63}){1,3}$/;
351
+ const AZURE_TYPE_REGEX = /^[A-Za-z][A-Za-z0-9]{0,63}$/;
352
+ const AZURE_NAME_REGEX = /^[A-Za-z0-9._()-]{1,260}$/;
353
+ // The Azure kinds, by provider namespace and type path (compared lowercased).
354
+ const AZURE_KINDS_BY_TYPE = [
355
+ { typePath: "microsoft.web/sites", kind: "app-service" },
356
+ { typePath: "microsoft.web/serverfarms", kind: "app-service-plan" },
357
+ { typePath: "microsoft.app/containerapps", kind: "container-app" },
358
+ { typePath: "microsoft.compute/virtualmachines", kind: "virtual-machine" },
359
+ {
360
+ typePath: "microsoft.compute/virtualmachinescalesets",
361
+ kind: "vm-scale-set",
362
+ },
363
+ {
364
+ typePath: "microsoft.dbforpostgresql/flexibleservers",
365
+ kind: "postgresql-flexible-server",
366
+ },
367
+ {
368
+ typePath: "microsoft.dbformysql/flexibleservers",
369
+ kind: "mysql-flexible-server",
370
+ },
371
+ {
372
+ typePath: "microsoft.sql/servers/failovergroups",
373
+ kind: "sql-failover-group",
374
+ },
375
+ ];
376
+ /*
377
+ * /subscriptions/<id>/resourceGroups/<group>/providers/<Namespace>/<type>/
378
+ * <name>[/<type>/<name>]..., compared case-insensitively as Azure does.
379
+ */
380
+ function parseAzureResourceId(id) {
381
+ const notId = `an Azure resource is named by its resource ID, such as /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/prod/providers/Microsoft.Web/sites/web (got ${quoteCloudWord(id)})`;
382
+ const segments = id.split("/");
383
+ // "", subscriptions, id, resourceGroups, group, providers, namespace, then type/name pairs.
384
+ if (segments.length < 9 ||
385
+ segments.length > 13 ||
386
+ segments.length % 2 === 0 ||
387
+ segments[0] !== "" ||
388
+ (segments[1] || "").toLowerCase() !== "subscriptions" ||
389
+ !AZURE_GUID_REGEX.test(segments[2] || "") ||
390
+ (segments[3] || "").toLowerCase() !== "resourcegroups" ||
391
+ !AZURE_RESOURCE_GROUP_REGEX.test(segments[4] || "") ||
392
+ (segments[4] || "").endsWith(".") ||
393
+ (segments[5] || "").toLowerCase() !== "providers" ||
394
+ !AZURE_NAMESPACE_REGEX.test(segments[6] || "")) {
395
+ return refuseResource(notId);
396
+ }
397
+ const types = [];
398
+ const names = [];
399
+ for (let index = 7; index < segments.length; index += 2) {
400
+ const type = segments[index] || "";
401
+ const name = segments[index + 1] || "";
402
+ if (!AZURE_TYPE_REGEX.test(type) || !AZURE_NAME_REGEX.test(name)) {
403
+ return refuseResource(notId);
404
+ }
405
+ types.push(type);
406
+ names.push(name);
407
+ }
408
+ const typePath = [segments[6] || "", ...types]
409
+ .join("/")
410
+ .toLowerCase();
411
+ const match = AZURE_KINDS_BY_TYPE.find((candidate) => {
412
+ return candidate.typePath === typePath;
413
+ });
414
+ const parts = {
415
+ resourceGroup: segments[4] || "",
416
+ namespace: segments[6] || "",
417
+ name: names[names.length - 1] || "",
418
+ };
419
+ if (match && match.kind === "sql-failover-group") {
420
+ parts["server"] = names[0] || "";
421
+ }
422
+ return {
423
+ ok: true,
424
+ resource: {
425
+ provider: "azure",
426
+ id,
427
+ accountId: (segments[2] || "").toLowerCase(),
428
+ region: null,
429
+ zone: null,
430
+ kind: match ? match.kind : null,
431
+ parts,
432
+ },
433
+ };
434
+ }
435
+ const GCP_PROJECT_REGEX = /^(?:[a-z][a-z0-9-]{4,28}[a-z0-9]|[0-9]{1,20})$/;
436
+ const GCP_SERVICE_HOST_REGEX = /^[a-z][a-z0-9-]{0,62}\.googleapis\.com$/;
437
+ const GCP_PATH_SEGMENT_REGEX = /^[A-Za-z0-9._~@-]{1,255}$/;
438
+ const GCP_ZONE_REGEX = /^[a-z]+-[a-z]+[0-9]{1,2}-[a-z]$/;
439
+ const GCP_REGION_REGEX = /^[a-z]+-[a-z]+[0-9]{1,2}$/;
440
+ const GCP_COMPUTE_NAME_REGEX = /^[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?$/;
441
+ const GCP_RUN_NAME_REGEX = /^[a-z](?:[-a-z0-9]{0,47}[a-z0-9])?$/;
442
+ const GCP_SQL_NAME_REGEX = /^[a-z][a-z0-9-]{0,97}$/;
443
+ /*
444
+ * //<service>.googleapis.com/projects/<project>/..., the form Cloud Asset
445
+ * Inventory names resources by. Cloud SQL is named by cloudsql (sqladmin is
446
+ * read as the same).
447
+ */
448
+ function parseGcpResourceName(id) {
449
+ const notName = `a Google Cloud resource is named by its full resource name, such as //run.googleapis.com/projects/my-project/locations/us-central1/services/web (got ${quoteCloudWord(id)})`;
450
+ if (!id.startsWith("//")) {
451
+ return refuseResource(notName);
452
+ }
453
+ const segments = id.slice(2).split("/");
454
+ const host = segments[0] || "";
455
+ if (!GCP_SERVICE_HOST_REGEX.test(host) ||
456
+ segments.length < 3 ||
457
+ segments.length > 12 ||
458
+ segments[1] !== "projects" ||
459
+ !GCP_PROJECT_REGEX.test(segments[2] || "")) {
460
+ return refuseResource(notName);
461
+ }
462
+ for (const segment of segments.slice(1)) {
463
+ if (!GCP_PATH_SEGMENT_REGEX.test(segment)) {
464
+ return refuseResource(notName);
465
+ }
466
+ }
467
+ const service = host === "sqladmin.googleapis.com" ? "cloudsql.googleapis.com" : host;
468
+ const canonical = `//${[service, ...segments.slice(1)].join("/")}`;
469
+ const rest = segments.slice(3);
470
+ const resource = {
471
+ provider: "gcp",
472
+ id: canonical,
473
+ accountId: segments[2] || "",
474
+ region: null,
475
+ zone: null,
476
+ kind: null,
477
+ parts: { project: segments[2] || "", service },
478
+ };
479
+ if (service === "compute.googleapis.com" && rest.length === 4) {
480
+ const scope = rest[0] || "";
481
+ const where = rest[1] || "";
482
+ const collection = rest[2] || "";
483
+ const name = rest[3] || "";
484
+ if (scope === "zones" &&
485
+ GCP_ZONE_REGEX.test(where) &&
486
+ GCP_COMPUTE_NAME_REGEX.test(name) &&
487
+ (collection === "instances" || collection === "instanceGroupManagers")) {
488
+ resource.kind =
489
+ collection === "instances"
490
+ ? "compute-instance"
491
+ : "managed-instance-group";
492
+ resource.zone = where;
493
+ resource.region = where.slice(0, where.lastIndexOf("-"));
494
+ resource.parts["zone"] = where;
495
+ resource.parts["name"] = name;
496
+ }
497
+ else if (scope === "regions" &&
498
+ GCP_REGION_REGEX.test(where) &&
499
+ collection === "instanceGroupManagers" &&
500
+ GCP_COMPUTE_NAME_REGEX.test(name)) {
501
+ resource.kind = "managed-instance-group";
502
+ resource.region = where;
503
+ resource.parts["region"] = where;
504
+ resource.parts["name"] = name;
505
+ }
506
+ }
507
+ else if (service === "run.googleapis.com" &&
508
+ rest.length === 4 &&
509
+ rest[0] === "locations" &&
510
+ GCP_REGION_REGEX.test(rest[1] || "") &&
511
+ rest[2] === "services" &&
512
+ GCP_RUN_NAME_REGEX.test(rest[3] || "")) {
513
+ resource.kind = "cloud-run-service";
514
+ resource.region = rest[1] || null;
515
+ resource.parts["location"] = rest[1] || "";
516
+ resource.parts["name"] = rest[3] || "";
517
+ }
518
+ else if (service === "cloudsql.googleapis.com" &&
519
+ rest.length === 2 &&
520
+ rest[0] === "instances" &&
521
+ GCP_SQL_NAME_REGEX.test(rest[1] || "")) {
522
+ resource.kind = "cloud-sql-instance";
523
+ resource.parts["name"] = rest[1] || "";
524
+ }
525
+ return { ok: true, resource };
526
+ }
527
+ /*
528
+ * Read one resource id of this cloud, or say why it is not one. Total:
529
+ * anything that is not a string id of the cloud is refused, never thrown on.
530
+ */
531
+ function parseCloudResourceId(provider, value) {
532
+ if (typeof value !== "string" || value === "") {
533
+ return refuseResource(`name the resource by its ${exports.CLOUD_RESOURCE_ID_NAMES[provider]}`);
534
+ }
535
+ if (value.length > exports.CLOUD_MAX_RESOURCE_ID_LENGTH) {
536
+ return refuseResource(`the ${exports.CLOUD_RESOURCE_ID_NAMES[provider]} is ${value.length} characters long; the most cloud reads is ${exports.CLOUD_MAX_RESOURCE_ID_LENGTH}`);
537
+ }
538
+ switch (provider) {
539
+ case "aws":
540
+ return parseAwsArn(value);
541
+ case "azure":
542
+ return parseAzureResourceId(value);
543
+ case "gcp":
544
+ return parseGcpResourceName(value);
545
+ default:
546
+ return refuseResource("this cloud has no catalog");
547
+ }
548
+ }
549
+ /*
550
+ * The target a change names, as write-scope globs and protected targets see
551
+ * it: the id itself, lowercased for Azure, whose ids are case-insensitive.
552
+ */
553
+ function getCloudWriteTarget(resource) {
554
+ return resource.provider === "azure"
555
+ ? resource.id.toLowerCase()
556
+ : resource.id;
557
+ }
558
+ /*
559
+ * Whether two ids name the same resource the way each cloud compares them:
560
+ * Azure ids case-insensitively, the others exactly.
561
+ */
562
+ function isSameCloudResourceId(provider, left, right) {
563
+ if (typeof left !== "string" || typeof right !== "string") {
564
+ return false;
565
+ }
566
+ return provider === "azure"
567
+ ? left.toLowerCase() === right.toLowerCase()
568
+ : left === right;
569
+ }
570
+ // ---- Parameters ---------------------------------------------------------------
571
+ // How a flag's value is read.
572
+ var CloudParamKind;
573
+ (function (CloudParamKind) {
574
+ // A whole number within [minimum, maximum], written without leading zeros.
575
+ CloudParamKind["Integer"] = "Integer";
576
+ /*
577
+ * A version or revision to move to: an ECS task definition
578
+ * (family:revision), a Lambda version, a Container App or Cloud Run
579
+ * revision. [A-Za-z0-9._:$-], not starting with "-".
580
+ */
581
+ CloudParamKind["Version"] = "Version";
582
+ // An App Service deployment slot's name.
583
+ CloudParamKind["SlotName"] = "SlotName";
584
+ // A concurrency limit: a whole number, or "none" for no explicit limit.
585
+ CloudParamKind["Limit"] = "Limit";
586
+ /*
587
+ * Words to search log lines for: letters, digits, spaces and . _ : / @ = , + # ( ) -
588
+ * — never quotes, backslashes or anything a query language would read.
589
+ */
590
+ CloudParamKind["SearchText"] = "SearchText";
591
+ })(CloudParamKind || (exports.CloudParamKind = CloudParamKind = {}));
592
+ exports.CLOUD_MAX_COUNT = 1000;
593
+ exports.CLOUD_MAX_LIMIT_VALUE = 10000;
594
+ exports.CLOUD_MAX_EVENT_HOURS = 72;
595
+ exports.CLOUD_DEFAULT_EVENT_HOURS = 6;
596
+ exports.CLOUD_MAX_LOG_MINUTES = 1440;
597
+ exports.CLOUD_DEFAULT_LOG_MINUTES = 60;
598
+ exports.CLOUD_MAX_ROW_LIMIT = 200;
599
+ exports.CLOUD_DEFAULT_ROW_LIMIT = 50;
600
+ exports.CLOUD_MAX_SEARCH_TEXT_LENGTH = 128;
601
+ exports.CLOUD_MAX_VERSION_LENGTH = 255;
602
+ function limitFlag() {
603
+ return {
604
+ name: "limit",
605
+ kind: CloudParamKind.Integer,
606
+ valueLabel: "N",
607
+ description: `at most N rows (1-${exports.CLOUD_MAX_ROW_LIMIT}, default ${exports.CLOUD_DEFAULT_ROW_LIMIT})`,
608
+ minimum: 1,
609
+ maximum: exports.CLOUD_MAX_ROW_LIMIT,
610
+ defaultValue: exports.CLOUD_DEFAULT_ROW_LIMIT,
611
+ required: false,
612
+ };
613
+ }
614
+ function countFlag(direction) {
615
+ return {
616
+ name: "count",
617
+ kind: CloudParamKind.Integer,
618
+ valueLabel: "N",
619
+ description: direction === "out"
620
+ ? `the new desired count, above the current one and within the group's maximum (at most double the current count where the platform sets no maximum; 1-${exports.CLOUD_MAX_COUNT})`
621
+ : `the new desired count, below the current one and not below the group's minimum (1-${exports.CLOUD_MAX_COUNT}; never 0)`,
622
+ minimum: 1,
623
+ maximum: exports.CLOUD_MAX_COUNT,
624
+ required: true,
625
+ };
626
+ }
627
+ const READ = ResourceAiAccess_1.ResourceCommandTier.Read;
628
+ const SAFE = ResourceAiAccess_1.ResourceCommandTier.SafeWrite;
629
+ const RISKY = ResourceAiAccess_1.ResourceCommandTier.RiskyWrite;
630
+ function kindSpec(provider, kind, tier, apiCall, permissions, requiresHuman = false) {
631
+ return { provider, kind, tier, requiresHuman, apiCall, permissions };
632
+ }
633
+ /*
634
+ * The whole catalog. Order is the guides' order: the reads first, then the
635
+ * changes from the safest up, the three a person always approves last.
636
+ */
637
+ exports.CLOUD_OPERATIONS = [
638
+ {
639
+ name: "describe",
640
+ aliases: [],
641
+ runsOn: "server",
642
+ summary: "shows the resource's live settings and status",
643
+ takesResource: true,
644
+ kinds: [
645
+ kindSpec("aws", "ecs-service", READ, "ECS DescribeServices", [
646
+ "ecs:DescribeServices",
647
+ ]),
648
+ kindSpec("aws", "ec2-instance", READ, "EC2 DescribeInstances and DescribeInstanceStatus", ["ec2:DescribeInstances", "ec2:DescribeInstanceStatus"]),
649
+ kindSpec("aws", "rds-instance", READ, "RDS DescribeDBInstances", [
650
+ "rds:DescribeDBInstances",
651
+ ]),
652
+ kindSpec("aws", "rds-cluster", READ, "RDS DescribeDBClusters", [
653
+ "rds:DescribeDBClusters",
654
+ ]),
655
+ kindSpec("aws", "autoscaling-group", READ, "Auto Scaling DescribeAutoScalingGroups", ["autoscaling:DescribeAutoScalingGroups"]),
656
+ kindSpec("aws", "lambda-function", READ, "Lambda GetFunctionConfiguration and GetFunctionConcurrency", ["lambda:GetFunctionConfiguration", "lambda:GetFunctionConcurrency"]),
657
+ kindSpec("aws", "lambda-alias", READ, "Lambda GetAlias, and its function's GetFunctionConfiguration and GetFunctionConcurrency", [
658
+ "lambda:GetAlias",
659
+ "lambda:GetFunctionConfiguration",
660
+ "lambda:GetFunctionConcurrency",
661
+ ]),
662
+ kindSpec("aws", "sqs-queue", READ, "SQS GetQueueAttributes", [
663
+ "sqs:GetQueueAttributes",
664
+ ]),
665
+ kindSpec("aws", "elb-target-group", READ, "Elastic Load Balancing DescribeTargetGroups", ["elasticloadbalancing:DescribeTargetGroups"]),
666
+ kindSpec("aws", "elb-load-balancer", READ, "Elastic Load Balancing DescribeLoadBalancers", ["elasticloadbalancing:DescribeLoadBalancers"]),
667
+ kindSpec("aws", "*", READ, "OneUptime's stored copy from the account's last read, marked NOT LIVE: AWS has no one call for every kind", []),
668
+ kindSpec("azure", "*", READ, "Azure Resource Manager GET of the resource (with its instance view for a VM), or Resource Graph for a kind without one", ["*/read"]),
669
+ kindSpec("gcp", "*", READ, "Cloud Asset Inventory's current record of the resource", ["cloudasset.assets.searchAllResources"]),
670
+ ],
671
+ flags: [],
672
+ undo: null,
673
+ undoNote: "",
674
+ },
675
+ {
676
+ name: "recent-events",
677
+ aliases: ["events"],
678
+ runsOn: "server",
679
+ summary: "lists what the platform did to the resource lately: deployments and service events, RDS events, scaling activities, resource health and activity log entries",
680
+ takesResource: true,
681
+ kinds: [
682
+ kindSpec("aws", "*", READ, "ECS DescribeServices events, RDS DescribeEvents, Auto Scaling DescribeScalingActivities, or CloudTrail LookupEvents for anything else", [
683
+ "ecs:DescribeServices",
684
+ "rds:DescribeEvents",
685
+ "autoscaling:DescribeScalingActivities",
686
+ "cloudtrail:LookupEvents",
687
+ ]),
688
+ kindSpec("azure", "*", READ, "Azure Resource Health availability and the Activity Log of the resource", [
689
+ "Microsoft.ResourceHealth/availabilityStatuses/read",
690
+ "Microsoft.Insights/eventtypes/values/read",
691
+ ]),
692
+ kindSpec("gcp", "*", READ, "the resource's Admin Activity audit log entries", ["logging.logEntries.list"]),
693
+ ],
694
+ flags: [
695
+ {
696
+ name: "hours",
697
+ kind: CloudParamKind.Integer,
698
+ valueLabel: "N",
699
+ description: `the last N hours (1-${exports.CLOUD_MAX_EVENT_HOURS}, default ${exports.CLOUD_DEFAULT_EVENT_HOURS})`,
700
+ minimum: 1,
701
+ maximum: exports.CLOUD_MAX_EVENT_HOURS,
702
+ defaultValue: exports.CLOUD_DEFAULT_EVENT_HOURS,
703
+ required: false,
704
+ },
705
+ limitFlag(),
706
+ ],
707
+ undo: null,
708
+ undoNote: "",
709
+ },
710
+ {
711
+ name: "target-health",
712
+ aliases: [],
713
+ runsOn: "server",
714
+ summary: "shows which backends a load balancer counts as healthy, and why the others are not",
715
+ takesResource: true,
716
+ kinds: [
717
+ kindSpec("aws", "elb-target-group", READ, "Elastic Load Balancing DescribeTargetHealth of the target group", ["elasticloadbalancing:DescribeTargetHealth"]),
718
+ kindSpec("aws", "elb-load-balancer", READ, "Elastic Load Balancing DescribeTargetGroups and DescribeTargetHealth of each of its target groups", [
719
+ "elasticloadbalancing:DescribeTargetGroups",
720
+ "elasticloadbalancing:DescribeTargetHealth",
721
+ ]),
722
+ ],
723
+ flags: [],
724
+ undo: null,
725
+ undoNote: "",
726
+ },
727
+ {
728
+ name: "quota-usage",
729
+ aliases: ["quotas"],
730
+ runsOn: "server",
731
+ summary: "shows the account's usage against its limits for the resource's service, in the resource's Region",
732
+ takesResource: true,
733
+ kinds: [
734
+ kindSpec("aws", "*", READ, "Service Quotas ListServiceQuotas for the resource's service, with each quota's usage metric from CloudWatch", ["servicequotas:ListServiceQuotas", "cloudwatch:GetMetricData"]),
735
+ kindSpec("azure", "*", READ, "the Compute usages of the resource's location", ["Microsoft.Compute/locations/usages/read"]),
736
+ kindSpec("gcp", "*", READ, "Cloud Monitoring's quota usage and limit series for the resource's region", ["monitoring.timeSeries.list"]),
737
+ ],
738
+ flags: [limitFlag()],
739
+ undo: null,
740
+ undoNote: "",
741
+ },
742
+ {
743
+ name: "read-logs",
744
+ aliases: ["logs"],
745
+ runsOn: "server",
746
+ summary: "shows the resource's recent log lines, newest first, optionally only those containing --filter; off until someone lets AI read the account's logs",
747
+ takesResource: true,
748
+ kinds: [
749
+ kindSpec("aws", "lambda-function", READ, "CloudWatch Logs FilterLogEvents on the function's log group", ["lambda:GetFunctionConfiguration", "logs:FilterLogEvents"]),
750
+ kindSpec("aws", "lambda-alias", READ, "CloudWatch Logs FilterLogEvents on its function's log group", ["lambda:GetFunctionConfiguration", "logs:FilterLogEvents"]),
751
+ kindSpec("aws", "ecs-service", READ, "CloudWatch Logs FilterLogEvents on the log groups its task definition names", [
752
+ "ecs:DescribeServices",
753
+ "ecs:DescribeTaskDefinition",
754
+ "logs:FilterLogEvents",
755
+ ]),
756
+ kindSpec("aws", "rds-instance", READ, "CloudWatch Logs FilterLogEvents on the instance's exported log groups", ["logs:DescribeLogGroups", "logs:FilterLogEvents"]),
757
+ kindSpec("aws", "rds-cluster", READ, "CloudWatch Logs FilterLogEvents on the cluster's exported log groups", ["logs:DescribeLogGroups", "logs:FilterLogEvents"]),
758
+ kindSpec("aws", "*", READ, "CloudWatch Logs FilterLogEvents on a log group named by its ARN", ["logs:FilterLogEvents"]),
759
+ kindSpec("azure", "*", READ, "a resource-centric Log Analytics query of the resource's logs", ["Microsoft.Insights/logs/*/read"]),
760
+ kindSpec("gcp", "*", READ, "Cloud Logging entries.list for the resource", ["logging.logEntries.list"]),
761
+ ],
762
+ flags: [
763
+ {
764
+ name: "filter",
765
+ kind: CloudParamKind.SearchText,
766
+ valueLabel: "TEXT",
767
+ description: `only lines containing TEXT (1-${exports.CLOUD_MAX_SEARCH_TEXT_LENGTH} letters, digits, spaces and . _ : / @ = , + # ( ) -)`,
768
+ required: false,
769
+ },
770
+ {
771
+ name: "minutes",
772
+ kind: CloudParamKind.Integer,
773
+ valueLabel: "N",
774
+ description: `the last N minutes (1-${exports.CLOUD_MAX_LOG_MINUTES}, default ${exports.CLOUD_DEFAULT_LOG_MINUTES})`,
775
+ minimum: 1,
776
+ maximum: exports.CLOUD_MAX_LOG_MINUTES,
777
+ defaultValue: exports.CLOUD_DEFAULT_LOG_MINUTES,
778
+ required: false,
779
+ },
780
+ limitFlag(),
781
+ ],
782
+ undo: null,
783
+ undoNote: "",
784
+ },
785
+ {
786
+ name: "whoami",
787
+ aliases: [],
788
+ runsOn: "agent",
789
+ summary: "shows the account the Cloud AI agent acts in, the operations its role allows and whether it may change anything",
790
+ takesResource: false,
791
+ kinds: [
792
+ kindSpec("aws", "*", READ, "STS GetCallerIdentity", []),
793
+ kindSpec("azure", "*", READ, "Azure Resource Manager GET of the subscription", ["Microsoft.Resources/subscriptions/read"]),
794
+ kindSpec("gcp", "*", READ, "the metadata server's project and service account", []),
795
+ ],
796
+ flags: [],
797
+ undo: null,
798
+ undoNote: "",
799
+ },
800
+ {
801
+ name: "restart-service",
802
+ aliases: [],
803
+ runsOn: "agent",
804
+ summary: "restarts the service on the version it runs now: a new ECS deployment (a rolling replacement), or an App Service, Function App or Container App revision restart",
805
+ takesResource: true,
806
+ kinds: [
807
+ kindSpec("aws", "ecs-service", SAFE, "ecs:UpdateService with forceNewDeployment", ["ecs:UpdateService", "ecs:DescribeServices"]),
808
+ kindSpec("azure", "app-service", RISKY, "Microsoft.Web/sites restart", [
809
+ "Microsoft.Web/sites/restart/action",
810
+ "Microsoft.Web/sites/read",
811
+ ]),
812
+ kindSpec("azure", "container-app", RISKY, "Microsoft.App/containerApps revision restart of its latest ready revision", [
813
+ "Microsoft.App/containerApps/revisions/restart/action",
814
+ "Microsoft.App/containerApps/read",
815
+ ]),
816
+ ],
817
+ flags: [],
818
+ undo: null,
819
+ undoNote: "nothing to undo: the same version runs again",
820
+ },
821
+ {
822
+ name: "start-instance",
823
+ aliases: [],
824
+ runsOn: "agent",
825
+ summary: "starts a stopped instance or virtual machine",
826
+ takesResource: true,
827
+ kinds: [
828
+ kindSpec("aws", "ec2-instance", SAFE, "ec2:StartInstances", [
829
+ "ec2:StartInstances",
830
+ "ec2:DescribeInstances",
831
+ ]),
832
+ kindSpec("aws", "rds-instance", SAFE, "rds:StartDBInstance", [
833
+ "rds:StartDBInstance",
834
+ "rds:DescribeDBInstances",
835
+ ]),
836
+ kindSpec("azure", "virtual-machine", SAFE, "Microsoft.Compute/virtualMachines start", [
837
+ "Microsoft.Compute/virtualMachines/start/action",
838
+ "Microsoft.Compute/virtualMachines/read",
839
+ ]),
840
+ kindSpec("gcp", "compute-instance", SAFE, "compute.instances.start", [
841
+ "compute.instances.start",
842
+ "compute.instances.get",
843
+ ]),
844
+ ],
845
+ flags: [],
846
+ undo: {
847
+ operation: "stop-instance",
848
+ valueFlag: null,
849
+ valueKey: null,
850
+ keepFlags: [],
851
+ },
852
+ undoNote: "",
853
+ },
854
+ {
855
+ name: "scale-out",
856
+ aliases: [],
857
+ runsOn: "agent",
858
+ summary: "raises a service's or group's desired count, within its limits: an ECS service's desired count, an Auto Scaling group's desired capacity, an App Service plan's or VM scale set's instance count, a Cloud Run service's minimum instances or a managed instance group's size",
859
+ takesResource: true,
860
+ kinds: [
861
+ kindSpec("aws", "ecs-service", SAFE, "ecs:UpdateService with desiredCount", [
862
+ "ecs:UpdateService",
863
+ "ecs:DescribeServices",
864
+ "application-autoscaling:DescribeScalableTargets",
865
+ ]),
866
+ kindSpec("aws", "autoscaling-group", SAFE, "autoscaling:SetDesiredCapacity", [
867
+ "autoscaling:SetDesiredCapacity",
868
+ "autoscaling:DescribeAutoScalingGroups",
869
+ ]),
870
+ kindSpec("azure", "app-service-plan", SAFE, "Microsoft.Web/serverfarms update of sku.capacity", ["Microsoft.Web/serverfarms/write", "Microsoft.Web/serverfarms/read"]),
871
+ kindSpec("azure", "vm-scale-set", SAFE, "Microsoft.Compute/virtualMachineScaleSets update of sku.capacity", [
872
+ "Microsoft.Compute/virtualMachineScaleSets/write",
873
+ "Microsoft.Compute/virtualMachineScaleSets/read",
874
+ ]),
875
+ kindSpec("gcp", "cloud-run-service", SAFE, "run.services.patch of scaling.minInstanceCount", ["run.services.update", "run.services.get"]),
876
+ kindSpec("gcp", "managed-instance-group", SAFE, "compute.instanceGroupManagers.resize", [
877
+ "compute.instanceGroupManagers.update",
878
+ "compute.instanceGroupManagers.get",
879
+ ]),
880
+ ],
881
+ flags: [countFlag("out")],
882
+ undo: {
883
+ operation: "scale-in",
884
+ valueFlag: "count",
885
+ valueKey: "count",
886
+ keepFlags: [],
887
+ },
888
+ undoNote: "",
889
+ },
890
+ {
891
+ name: "scale-in",
892
+ aliases: [],
893
+ runsOn: "agent",
894
+ summary: "lowers a service's or group's desired count, never below its minimum or to zero",
895
+ takesResource: true,
896
+ kinds: [
897
+ kindSpec("aws", "ecs-service", RISKY, "ecs:UpdateService with desiredCount", [
898
+ "ecs:UpdateService",
899
+ "ecs:DescribeServices",
900
+ "application-autoscaling:DescribeScalableTargets",
901
+ ]),
902
+ kindSpec("aws", "autoscaling-group", RISKY, "autoscaling:SetDesiredCapacity", [
903
+ "autoscaling:SetDesiredCapacity",
904
+ "autoscaling:DescribeAutoScalingGroups",
905
+ ]),
906
+ kindSpec("azure", "app-service-plan", RISKY, "Microsoft.Web/serverfarms update of sku.capacity", ["Microsoft.Web/serverfarms/write", "Microsoft.Web/serverfarms/read"]),
907
+ kindSpec("azure", "vm-scale-set", RISKY, "Microsoft.Compute/virtualMachineScaleSets update of sku.capacity", [
908
+ "Microsoft.Compute/virtualMachineScaleSets/write",
909
+ "Microsoft.Compute/virtualMachineScaleSets/read",
910
+ ]),
911
+ kindSpec("gcp", "cloud-run-service", RISKY, "run.services.patch of scaling.minInstanceCount", ["run.services.update", "run.services.get"]),
912
+ kindSpec("gcp", "managed-instance-group", RISKY, "compute.instanceGroupManagers.resize", [
913
+ "compute.instanceGroupManagers.update",
914
+ "compute.instanceGroupManagers.get",
915
+ ]),
916
+ ],
917
+ flags: [countFlag("in")],
918
+ undo: {
919
+ operation: "scale-out",
920
+ valueFlag: "count",
921
+ valueKey: "count",
922
+ keepFlags: [],
923
+ },
924
+ undoNote: "",
925
+ },
926
+ {
927
+ name: "reboot-instance",
928
+ aliases: [],
929
+ runsOn: "agent",
930
+ summary: "reboots an instance, a virtual machine or a database server in place (an RDS instance without failover)",
931
+ takesResource: true,
932
+ kinds: [
933
+ kindSpec("aws", "ec2-instance", RISKY, "ec2:RebootInstances", [
934
+ "ec2:RebootInstances",
935
+ "ec2:DescribeInstances",
936
+ ]),
937
+ kindSpec("aws", "rds-instance", RISKY, "rds:RebootDBInstance without ForceFailover", ["rds:RebootDBInstance", "rds:DescribeDBInstances"]),
938
+ kindSpec("azure", "virtual-machine", RISKY, "Microsoft.Compute/virtualMachines restart", [
939
+ "Microsoft.Compute/virtualMachines/restart/action",
940
+ "Microsoft.Compute/virtualMachines/read",
941
+ ]),
942
+ kindSpec("azure", "postgresql-flexible-server", RISKY, "Microsoft.DBforPostgreSQL/flexibleServers restart", [
943
+ "Microsoft.DBforPostgreSQL/flexibleServers/restart/action",
944
+ "Microsoft.DBforPostgreSQL/flexibleServers/read",
945
+ ]),
946
+ kindSpec("azure", "mysql-flexible-server", RISKY, "Microsoft.DBforMySQL/flexibleServers restart", [
947
+ "Microsoft.DBforMySQL/flexibleServers/restart/action",
948
+ "Microsoft.DBforMySQL/flexibleServers/read",
949
+ ]),
950
+ kindSpec("gcp", "compute-instance", RISKY, "compute.instances.reset", [
951
+ "compute.instances.reset",
952
+ "compute.instances.get",
953
+ ]),
954
+ kindSpec("gcp", "cloud-sql-instance", RISKY, "Cloud SQL instances.restart", ["cloudsql.instances.restart", "cloudsql.instances.get"]),
955
+ ],
956
+ flags: [],
957
+ undo: null,
958
+ undoNote: "nothing to undo",
959
+ },
960
+ {
961
+ name: "roll-back-service",
962
+ aliases: ["rollback-service"],
963
+ runsOn: "agent",
964
+ summary: "moves a service back to the version it ran before (or to --to): an ECS service's previous task definition, a Lambda alias's previous version, an App Service slot swap back, a Container App's or Cloud Run service's traffic to its previous revision",
965
+ takesResource: true,
966
+ kinds: [
967
+ kindSpec("aws", "ecs-service", RISKY, "ecs:UpdateService with taskDefinition (a revision of the service's own family)", [
968
+ "ecs:UpdateService",
969
+ "ecs:DescribeServices",
970
+ "ecs:ListTaskDefinitions",
971
+ ]),
972
+ kindSpec("aws", "lambda-alias", RISKY, "lambda:UpdateAlias with FunctionVersion (a version of the same function)", [
973
+ "lambda:UpdateAlias",
974
+ "lambda:GetAlias",
975
+ "lambda:ListVersionsByFunction",
976
+ ]),
977
+ kindSpec("azure", "app-service", RISKY, "Microsoft.Web/sites slotsswap between --slot and production", [
978
+ "Microsoft.Web/sites/slotsswap/action",
979
+ "Microsoft.Web/sites/slots/read",
980
+ ]),
981
+ kindSpec("azure", "container-app", RISKY, "Microsoft.App/containerApps update of its traffic weights (a revision of the same app)", [
982
+ "Microsoft.App/containerApps/write",
983
+ "Microsoft.App/containerApps/read",
984
+ "Microsoft.App/containerApps/revisions/read",
985
+ ]),
986
+ kindSpec("gcp", "cloud-run-service", RISKY, "run.services.patch of its traffic (a revision of the same service)", ["run.services.update", "run.services.get", "run.revisions.list"]),
987
+ ],
988
+ flags: [
989
+ {
990
+ name: "to",
991
+ kind: CloudParamKind.Version,
992
+ valueLabel: "VERSION",
993
+ description: "the version to move to (a task definition family:revision, a Lambda version, a revision name); without it, the one before the current one",
994
+ required: false,
995
+ kinds: [
996
+ "ecs-service",
997
+ "lambda-alias",
998
+ "container-app",
999
+ "cloud-run-service",
1000
+ ],
1001
+ },
1002
+ {
1003
+ name: "slot",
1004
+ kind: CloudParamKind.SlotName,
1005
+ valueLabel: "SLOT",
1006
+ description: "the deployment slot to swap with production (swapping the same pair again puts each version back)",
1007
+ required: true,
1008
+ kinds: ["app-service"],
1009
+ },
1010
+ ],
1011
+ undo: {
1012
+ operation: "roll-back-service",
1013
+ valueFlag: "to",
1014
+ valueKey: "version",
1015
+ keepFlags: ["slot"],
1016
+ },
1017
+ undoNote: "",
1018
+ },
1019
+ {
1020
+ name: "set-concurrency",
1021
+ aliases: [],
1022
+ runsOn: "agent",
1023
+ summary: "sets how many copies may run at once: a Lambda function's reserved concurrency or a Cloud Run service's maximum instances",
1024
+ takesResource: true,
1025
+ kinds: [
1026
+ kindSpec("aws", "lambda-function", RISKY, "lambda:PutFunctionConcurrency (DeleteFunctionConcurrency for none)", [
1027
+ "lambda:PutFunctionConcurrency",
1028
+ "lambda:DeleteFunctionConcurrency",
1029
+ "lambda:GetFunctionConcurrency",
1030
+ ]),
1031
+ kindSpec("gcp", "cloud-run-service", RISKY, "run.services.patch of the template's scaling.maxInstanceCount", ["run.services.update", "run.services.get"]),
1032
+ ],
1033
+ flags: [
1034
+ {
1035
+ name: "value",
1036
+ kind: CloudParamKind.Limit,
1037
+ valueLabel: "N|none",
1038
+ description: `the new limit (1-${exports.CLOUD_MAX_LIMIT_VALUE}; never 0, which would stop it), or none for no explicit limit`,
1039
+ minimum: 1,
1040
+ maximum: exports.CLOUD_MAX_LIMIT_VALUE,
1041
+ required: true,
1042
+ },
1043
+ ],
1044
+ undo: {
1045
+ operation: "set-concurrency",
1046
+ valueFlag: "value",
1047
+ valueKey: "value",
1048
+ keepFlags: [],
1049
+ },
1050
+ undoNote: "",
1051
+ },
1052
+ {
1053
+ name: "fail-over-database",
1054
+ aliases: ["failover-database"],
1055
+ runsOn: "agent",
1056
+ summary: "fails a database over to its standby: an Aurora cluster failover, an RDS Multi-AZ reboot with failover, a SQL failover group failover or a Cloud SQL failover",
1057
+ takesResource: true,
1058
+ kinds: [
1059
+ kindSpec("aws", "rds-cluster", RISKY, "rds:FailoverDBCluster", ["rds:FailoverDBCluster", "rds:DescribeDBClusters"], true),
1060
+ kindSpec("aws", "rds-instance", RISKY, "rds:RebootDBInstance with ForceFailover (Multi-AZ only)", ["rds:RebootDBInstance", "rds:DescribeDBInstances"], true),
1061
+ kindSpec("azure", "sql-failover-group", RISKY, "Microsoft.Sql/servers/failoverGroups failover (planned)", [
1062
+ "Microsoft.Sql/servers/failoverGroups/failover/action",
1063
+ "Microsoft.Sql/servers/failoverGroups/read",
1064
+ ], true),
1065
+ kindSpec("gcp", "cloud-sql-instance", RISKY, "Cloud SQL instances.failover (high availability only)", ["cloudsql.instances.failover", "cloudsql.instances.get"], true),
1066
+ ],
1067
+ flags: [],
1068
+ undo: {
1069
+ operation: "fail-over-database",
1070
+ valueFlag: null,
1071
+ valueKey: null,
1072
+ keepFlags: [],
1073
+ },
1074
+ undoNote: "",
1075
+ },
1076
+ {
1077
+ name: "stop-instance",
1078
+ aliases: [],
1079
+ runsOn: "agent",
1080
+ summary: "stops an instance or virtual machine (an Azure VM is deallocated)",
1081
+ takesResource: true,
1082
+ kinds: [
1083
+ kindSpec("aws", "ec2-instance", RISKY, "ec2:StopInstances", ["ec2:StopInstances", "ec2:DescribeInstances"], true),
1084
+ kindSpec("azure", "virtual-machine", RISKY, "Microsoft.Compute/virtualMachines deallocate", [
1085
+ "Microsoft.Compute/virtualMachines/deallocate/action",
1086
+ "Microsoft.Compute/virtualMachines/read",
1087
+ ], true),
1088
+ kindSpec("gcp", "compute-instance", RISKY, "compute.instances.stop", ["compute.instances.stop", "compute.instances.get"], true),
1089
+ ],
1090
+ flags: [],
1091
+ undo: {
1092
+ operation: "start-instance",
1093
+ valueFlag: null,
1094
+ valueKey: null,
1095
+ keepFlags: [],
1096
+ },
1097
+ undoNote: "",
1098
+ },
1099
+ {
1100
+ name: "redrive-queue",
1101
+ aliases: [],
1102
+ runsOn: "agent",
1103
+ summary: "moves the messages of an SQS dead-letter queue back to the queue they came from",
1104
+ takesResource: true,
1105
+ kinds: [
1106
+ kindSpec("aws", "sqs-queue", RISKY, "sqs:StartMessageMoveTask from the dead-letter queue to its source queue", [
1107
+ "sqs:StartMessageMoveTask",
1108
+ "sqs:GetQueueAttributes",
1109
+ "sqs:ListDeadLetterSourceQueues",
1110
+ "sqs:ReceiveMessage",
1111
+ "sqs:DeleteMessage",
1112
+ "sqs:SendMessage",
1113
+ ], true),
1114
+ ],
1115
+ flags: [],
1116
+ undo: null,
1117
+ undoNote: "nothing to undo",
1118
+ },
1119
+ ];
1120
+ // The canonical operation names, in catalog order.
1121
+ exports.CLOUD_OPERATION_NAMES = exports.CLOUD_OPERATIONS.map((operation) => {
1122
+ return operation.name;
1123
+ });
1124
+ // The changes (every operation the agent runs but whoami), in catalog order.
1125
+ exports.CLOUD_CHANGE_OPERATION_NAMES = exports.CLOUD_OPERATIONS.filter((operation) => {
1126
+ return isCloudChangeOperation(operation);
1127
+ }).map((operation) => {
1128
+ return operation.name;
1129
+ });
1130
+ /*
1131
+ * A DRY RUN of one change: `cloud dry-run <change> RESOURCE [--flag value]`,
1132
+ * the change written exactly as it would run.
1133
+ *
1134
+ * The Cloud AI agent checks the change the way it would before making it -
1135
+ * the changes it may make (ONEUPTIME_AI_CLOUD_OPERATIONS), its write scope
1136
+ * (ONEUPTIME_AI_ALLOW_WRITES, the write and protected targets), the account
1137
+ * and the required tag, the resource's state and the bounds of a scale -
1138
+ * reads the value the change would replace, and stops before the ONE call
1139
+ * that makes it. Its output starts with the dry run's verdict
1140
+ * (formatCloudDryRunVerdict) and, when the change would run, the value it
1141
+ * would replace (formatCloudReplacedValue), then says what would change and
1142
+ * how it would be undone. On AWS the dry run reads with a session of the
1143
+ * write role whose session policy holds the change's reads only, so it
1144
+ * cannot write even by mistake.
1145
+ *
1146
+ * It is a Read - it changes nothing - so an investigation may run it, and
1147
+ * OneUptime runs it for a person about to approve a fix. It runs on the
1148
+ * agent, never on the server: only the agent knows its settings and holds
1149
+ * the role. An agent older than dry runs refuses the command, as its
1150
+ * catalog knows no dry-run operation, so a dry run is never mistaken for
1151
+ * the change it checks.
1152
+ *
1153
+ * Not in CLOUD_OPERATIONS: it is no operation of its own on any kind of
1154
+ * resource, and every list of the catalog's operations (the guides, the
1155
+ * setup command's permissions, the docs) stays the list of what the agent
1156
+ * can do.
1157
+ */
1158
+ exports.CLOUD_DRY_RUN_OPERATION_NAME = "dry-run";
1159
+ exports.CLOUD_DRY_RUN_OPERATION = {
1160
+ name: exports.CLOUD_DRY_RUN_OPERATION_NAME,
1161
+ aliases: [],
1162
+ runsOn: "agent",
1163
+ summary: "checks one change the way the agent would make it and reads the value it would replace, without making it",
1164
+ takesResource: true,
1165
+ kinds: [],
1166
+ flags: [],
1167
+ undo: null,
1168
+ undoNote: "a dry run changes nothing",
1169
+ };
1170
+ // Whether a parsed command is a dry run (of the change it carries).
1171
+ function isCloudDryRun(command) {
1172
+ return (command.operation.name === exports.CLOUD_DRY_RUN_OPERATION_NAME &&
1173
+ Boolean(command.dryRunOf));
1174
+ }
1175
+ // A change: something the agent runs that is not a read.
1176
+ function isCloudChangeOperation(operation) {
1177
+ return operation.kinds.some((kind) => {
1178
+ return kind.tier !== ResourceAiAccess_1.ResourceCommandTier.Read;
1179
+ });
1180
+ }
1181
+ // The operation a word names exactly (canonical name or alias), or null.
1182
+ function getCloudOperation(word) {
1183
+ if (typeof word !== "string" || !word) {
1184
+ return null;
1185
+ }
1186
+ for (const operation of exports.CLOUD_OPERATIONS) {
1187
+ if (operation.name === word || operation.aliases.includes(word)) {
1188
+ return operation;
1189
+ }
1190
+ }
1191
+ return null;
1192
+ }
1193
+ /*
1194
+ * How an operation applies to this cloud and kind: the kind's own entry,
1195
+ * else the cloud's "*" entry (reads), else null (not supported).
1196
+ */
1197
+ function getCloudOperationKind(operation, provider, kind) {
1198
+ let any = null;
1199
+ for (const spec of operation.kinds) {
1200
+ if (spec.provider !== provider) {
1201
+ continue;
1202
+ }
1203
+ if (kind !== null && spec.kind === kind) {
1204
+ return spec;
1205
+ }
1206
+ if (spec.kind === "*") {
1207
+ any = spec;
1208
+ }
1209
+ }
1210
+ return any;
1211
+ }
1212
+ // The kinds of this cloud an operation supports, by name ("ECS service").
1213
+ function describeCloudOperationKinds(operation, provider) {
1214
+ return operation.kinds
1215
+ .filter((spec) => {
1216
+ return spec.provider === provider && spec.kind !== "*";
1217
+ })
1218
+ .map((spec) => {
1219
+ const known = getCloudResourceKind(provider, spec.kind);
1220
+ return known ? known.displayName : spec.kind;
1221
+ });
1222
+ }
1223
+ // Whether an operation exists on this cloud at all.
1224
+ function isCloudOperationAvailable(operation, provider) {
1225
+ return operation.kinds.some((spec) => {
1226
+ return spec.provider === provider;
1227
+ });
1228
+ }
1229
+ const INTEGER_REGEX = /^(?:0|[1-9][0-9]{0,8})$/;
1230
+ const VERSION_REGEX = /^[A-Za-z0-9._:$][A-Za-z0-9._:$-]{0,254}$/;
1231
+ const SLOT_NAME_REGEX = /^[A-Za-z0-9][A-Za-z0-9-]{0,58}$/;
1232
+ const SEARCH_TEXT_REGEX = /^[A-Za-z0-9 _.:/@=,+#()-]{1,128}$/;
1233
+ const FLAG_NAME_REGEX = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
1234
+ function joinWords(words, conjunction) {
1235
+ if (words.length <= 1) {
1236
+ return words.join("");
1237
+ }
1238
+ return `${words.slice(0, -1).join(", ")} ${conjunction} ${words[words.length - 1]}`;
1239
+ }
1240
+ function appliesToKind(param, kind) {
1241
+ return !param.kinds || (kind !== null && param.kinds.includes(kind));
1242
+ }
1243
+ // "cloud scale-out RESOURCE --count N" for one operation (and kind, when known).
1244
+ function describeCloudOperationUsage(operation, kind = null) {
1245
+ const words = [exports.CLOUD_PROGRAM, operation.name];
1246
+ if (operation.takesResource) {
1247
+ words.push("RESOURCE");
1248
+ }
1249
+ for (const flag of operation.flags) {
1250
+ if (kind !== null && !appliesToKind(flag, kind)) {
1251
+ continue;
1252
+ }
1253
+ const written = `--${flag.name} ${flag.valueLabel}`;
1254
+ words.push(flag.required && (kind !== null || !flag.kinds)
1255
+ ? written
1256
+ : `[${written}]`);
1257
+ }
1258
+ return words.join(" ");
1259
+ }
1260
+ function describeFlags(operation) {
1261
+ if (operation.flags.length === 0) {
1262
+ return `cloud ${operation.name} takes no flags`;
1263
+ }
1264
+ return `cloud ${operation.name} takes ${joinWords(operation.flags.map((flag) => {
1265
+ return `--${flag.name}`;
1266
+ }), "and")}`;
1267
+ }
1268
+ function operationList(provider) {
1269
+ return `the operations on ${exports.CLOUD_CATALOG_PROVIDER_NAMES[provider]} are ${exports.CLOUD_OPERATIONS.filter((operation) => {
1270
+ return isCloudOperationAvailable(operation, provider);
1271
+ })
1272
+ .map((operation) => {
1273
+ return operation.name;
1274
+ })
1275
+ .join(", ")}`;
1276
+ }
1277
+ /*
1278
+ * What a model may write out of CLI habit, and what to write instead: the
1279
+ * catalog's word for the same change, or why there is none.
1280
+ */
1281
+ const NEVER_OPERATIONS = [
1282
+ {
1283
+ words: [
1284
+ "delete",
1285
+ "terminate",
1286
+ "remove",
1287
+ "destroy",
1288
+ "rm",
1289
+ "purge",
1290
+ "purge-queue",
1291
+ "delete-service",
1292
+ "terminate-instance",
1293
+ "delete-instance",
1294
+ ],
1295
+ reason: "deleting, terminating or purging anything is never available",
1296
+ },
1297
+ {
1298
+ words: [
1299
+ "iam",
1300
+ "attach-role-policy",
1301
+ "put-role-policy",
1302
+ "create-access-key",
1303
+ "create-role",
1304
+ "role-assignment",
1305
+ "add-iam-policy-binding",
1306
+ "set-iam-policy",
1307
+ ],
1308
+ reason: "IAM roles, policies, users and keys are never changed",
1309
+ },
1310
+ {
1311
+ words: [
1312
+ "authorize-security-group-ingress",
1313
+ "security-group",
1314
+ "firewall",
1315
+ "nsg",
1316
+ "route-table",
1317
+ "open-port",
1318
+ ],
1319
+ reason: "security groups, network security groups, firewall rules and route tables are never changed",
1320
+ },
1321
+ {
1322
+ words: [
1323
+ "get-secret-value",
1324
+ "secret",
1325
+ "secrets",
1326
+ "kms",
1327
+ "decrypt",
1328
+ "get-parameter",
1329
+ ],
1330
+ reason: "secrets and keys are never read or changed",
1331
+ },
1332
+ {
1333
+ words: [
1334
+ "s3",
1335
+ "get-object",
1336
+ "put-object",
1337
+ "query",
1338
+ "scan",
1339
+ "sql",
1340
+ "exec",
1341
+ "run-command",
1342
+ "ssm",
1343
+ "ssh",
1344
+ ],
1345
+ reason: "storage and database contents are never read or written, and nothing runs inside a resource",
1346
+ },
1347
+ {
1348
+ words: [
1349
+ "resize-instance",
1350
+ "modify-instance",
1351
+ "change-instance-type",
1352
+ "snapshot",
1353
+ "create-snapshot",
1354
+ "restore",
1355
+ "restore-db-instance",
1356
+ "set-min",
1357
+ "set-max",
1358
+ "update-auto-scaling-group",
1359
+ ],
1360
+ reason: "instance types, snapshots and restores, and a group's minimum or maximum are never changed",
1361
+ },
1362
+ ];
1363
+ const ALIASES_OF_CHANGES = {
1364
+ restart: "restart-service",
1365
+ "force-new-deployment": "restart-service",
1366
+ redeploy: "restart-service",
1367
+ start: "start-instance",
1368
+ "start-instances": "start-instance",
1369
+ "start-vm": "start-instance",
1370
+ stop: "stop-instance",
1371
+ "stop-instances": "stop-instance",
1372
+ deallocate: "stop-instance",
1373
+ reboot: "reboot-instance",
1374
+ "reboot-instances": "reboot-instance",
1375
+ reset: "reboot-instance",
1376
+ scale: "scale-out or scale-in",
1377
+ "set-desired-capacity": "scale-out or scale-in",
1378
+ "update-service": "restart-service, scale-out, scale-in or roll-back-service",
1379
+ rollback: "roll-back-service",
1380
+ "roll-back": "roll-back-service",
1381
+ failover: "fail-over-database",
1382
+ "put-function-concurrency": "set-concurrency",
1383
+ redrive: "redrive-queue",
1384
+ "start-message-move-task": "redrive-queue",
1385
+ get: "describe",
1386
+ show: "describe",
1387
+ status: "describe",
1388
+ health: "target-health",
1389
+ "describe-target-health": "target-health",
1390
+ quota: "quota-usage",
1391
+ log: "read-logs",
1392
+ tail: "read-logs",
1393
+ "who-am-i": "whoami",
1394
+ "get-caller-identity": "whoami",
1395
+ };
1396
+ function describeUnknownOperation(word, provider) {
1397
+ const folded = word.toLowerCase();
1398
+ if (getCloudOperation(folded)) {
1399
+ return `operations are lowercase: write ${quoteCloudWord(folded)}, not ${quoteCloudWord(word)}`;
1400
+ }
1401
+ if (word === "aws" || word === "az" || word === "gcloud") {
1402
+ return `cloud is not the ${word} CLI and never runs one: it runs one operation from a fixed catalog; ${operationList(provider)}`;
1403
+ }
1404
+ for (const never of NEVER_OPERATIONS) {
1405
+ if (never.words.includes(folded)) {
1406
+ return `${quoteCloudWord(word)} is not available: ${never.reason}; ${operationList(provider)}`;
1407
+ }
1408
+ }
1409
+ if (Object.prototype.hasOwnProperty.call(ALIASES_OF_CHANGES, folded)) {
1410
+ return `${quoteCloudWord(word)} is not a cloud operation; write ${ALIASES_OF_CHANGES[folded] || "one of the catalog's operations"} instead`;
1411
+ }
1412
+ return `${quoteCloudWord(word)} is not a cloud operation; ${operationList(provider)}`;
1413
+ }
1414
+ // Why a value is not what the parameter takes; null when it is.
1415
+ function describeValueProblem(param, value, shownName) {
1416
+ switch (param.kind) {
1417
+ case CloudParamKind.Integer:
1418
+ case CloudParamKind.Limit: {
1419
+ if (param.kind === CloudParamKind.Limit && value === "none") {
1420
+ return null;
1421
+ }
1422
+ const minimum = param.minimum === undefined ? 0 : param.minimum;
1423
+ const maximum = param.maximum === undefined ? exports.CLOUD_MAX_COUNT : param.maximum;
1424
+ if (INTEGER_REGEX.test(value)) {
1425
+ const parsed = Number(value);
1426
+ if (parsed >= minimum && parsed <= maximum) {
1427
+ return null;
1428
+ }
1429
+ }
1430
+ return `${shownName} must be a whole number from ${minimum} to ${maximum}${param.kind === CloudParamKind.Limit ? ' or the word "none"' : ""}, written without leading zeros (got ${quoteCloudWord(value)})`;
1431
+ }
1432
+ case CloudParamKind.Version:
1433
+ return VERSION_REGEX.test(value)
1434
+ ? null
1435
+ : `${shownName} must be one version or revision name of 1-${exports.CLOUD_MAX_VERSION_LENGTH} letters, digits and . _ : $ - that does not start with "-" (got ${quoteCloudWord(value)})`;
1436
+ case CloudParamKind.SlotName:
1437
+ return SLOT_NAME_REGEX.test(value)
1438
+ ? null
1439
+ : `${shownName} must be a deployment slot's name: letters, digits and - (got ${quoteCloudWord(value)})`;
1440
+ case CloudParamKind.SearchText:
1441
+ return SEARCH_TEXT_REGEX.test(value) && value.trim() !== ""
1442
+ ? null
1443
+ : `${shownName} must be 1-${exports.CLOUD_MAX_SEARCH_TEXT_LENGTH} letters, digits, spaces and . _ : / @ = , + # ( ) - — no quotes, backslashes or query syntax (got ${quoteCloudWord(value)})`;
1444
+ default:
1445
+ return `${shownName} has a type cloud does not know`;
1446
+ }
1447
+ }
1448
+ function toParamValue(param, value) {
1449
+ if (param.kind === CloudParamKind.Integer) {
1450
+ return Number(value);
1451
+ }
1452
+ if (param.kind === CloudParamKind.Limit) {
1453
+ return value === "none" ? value : Number(value);
1454
+ }
1455
+ return value;
1456
+ }
1457
+ function refuse(errorMessage) {
1458
+ return { ok: false, errorMessage };
1459
+ }
1460
+ /*
1461
+ * Read one `cloud` argv (argv[0] is the program) for this cloud into one
1462
+ * catalog operation on one resource, or say why it is not one. Total:
1463
+ * anything that is not an array of strings, however malformed, is refused,
1464
+ * never thrown on.
1465
+ */
1466
+ function parseCloudCommand(provider, argv) {
1467
+ if (!exports.ALL_CLOUD_CATALOG_PROVIDERS.includes(provider)) {
1468
+ return refuse("this resource is not in a cloud the catalog knows");
1469
+ }
1470
+ if (!Array.isArray(argv) || argv.length === 0) {
1471
+ return refuse("empty command");
1472
+ }
1473
+ if (argv.some((word) => {
1474
+ return typeof word !== "string";
1475
+ })) {
1476
+ return refuse("every word of the command must be a string");
1477
+ }
1478
+ const words = argv;
1479
+ if (words[0] !== exports.CLOUD_PROGRAM) {
1480
+ return refuse(`a cloud command starts with "${exports.CLOUD_PROGRAM}" (got ${quoteCloudWord(words[0] || "")})`);
1481
+ }
1482
+ const operationWord = words[1];
1483
+ if (operationWord === undefined || operationWord === "") {
1484
+ return refuse(`name an operation: "cloud <operation> RESOURCE [--flag value]"; ${operationList(provider)}`);
1485
+ }
1486
+ if (operationWord.startsWith("-")) {
1487
+ return refuse(`the operation comes right after "cloud", before any flag (got ${quoteCloudWord(operationWord)}); ${operationList(provider)}`);
1488
+ }
1489
+ if (operationWord === exports.CLOUD_DRY_RUN_OPERATION_NAME) {
1490
+ return parseCloudDryRun(provider, words);
1491
+ }
1492
+ const operation = getCloudOperation(operationWord);
1493
+ if (!operation) {
1494
+ return refuse(describeUnknownOperation(operationWord, provider));
1495
+ }
1496
+ if (!isCloudOperationAvailable(operation, provider)) {
1497
+ return refuse(`cloud ${operation.name} is not available on ${exports.CLOUD_CATALOG_PROVIDER_NAMES[provider]}; ${operationList(provider)}`);
1498
+ }
1499
+ const usage = `usage: ${describeCloudOperationUsage(operation)}`;
1500
+ const rawFlags = [];
1501
+ let resourceWord = null;
1502
+ let afterDoubleDash = false;
1503
+ for (let i = 2; i < words.length; i++) {
1504
+ const word = words[i] || "";
1505
+ if (!afterDoubleDash && word === "--") {
1506
+ afterDoubleDash = true;
1507
+ continue;
1508
+ }
1509
+ if (!afterDoubleDash && word.startsWith("-") && word !== "-") {
1510
+ if (!word.startsWith("--")) {
1511
+ return refuse(`cloud takes long flags only, written like "--count 4" or "--count=4"; ${quoteCloudWord(word)} is not one (${describeFlags(operation)}; ${usage})`);
1512
+ }
1513
+ const equals = word.indexOf("=");
1514
+ const rawName = equals >= 0 ? word.slice(2, equals) : word.slice(2);
1515
+ if (!FLAG_NAME_REGEX.test(rawName)) {
1516
+ const lower = rawName.toLowerCase().replace(/_/g, "-");
1517
+ const known = operation.flags.find((flag) => {
1518
+ return flag.name === lower;
1519
+ });
1520
+ return refuse(known
1521
+ ? `flags are lowercase words joined by dashes: write --${known.name}, not ${quoteCloudWord(`--${rawName}`)}`
1522
+ : `${quoteCloudWord(word)} is not a flag cloud knows (${describeFlags(operation)}; ${usage})`);
1523
+ }
1524
+ const flag = operation.flags.find((candidate) => {
1525
+ return candidate.name === rawName;
1526
+ });
1527
+ if (!flag) {
1528
+ if (rawName === exports.CLOUD_DRY_RUN_OPERATION_NAME) {
1529
+ return refuse(isCloudChangeOperation(operation)
1530
+ ? `a dry run is a command of its own: write "cloud ${exports.CLOUD_DRY_RUN_OPERATION_NAME} ${operation.name} RESOURCE ...", the change exactly as it would run, without --${exports.CLOUD_DRY_RUN_OPERATION_NAME}`
1531
+ : `cloud ${operation.name} changes nothing, so it has nothing to dry-run: run it without --${exports.CLOUD_DRY_RUN_OPERATION_NAME}`);
1532
+ }
1533
+ if ([
1534
+ "region",
1535
+ "profile",
1536
+ "role-arn",
1537
+ "subscription",
1538
+ "project",
1539
+ "account",
1540
+ "credentials",
1541
+ "endpoint-url",
1542
+ ].includes(rawName)) {
1543
+ return refuse(`--${rawName} is not available: the Cloud AI agent acts in its own account with its own role, and the resource's id already says where it is (${describeFlags(operation)})`);
1544
+ }
1545
+ return refuse(`${describeFlags(operation)}, not --${rawName} (${usage})`);
1546
+ }
1547
+ if (rawFlags.some((given) => {
1548
+ return given.flag.name === flag.name;
1549
+ })) {
1550
+ return refuse(`--${flag.name} is given more than once; give each flag once (${usage})`);
1551
+ }
1552
+ let value;
1553
+ if (equals >= 0) {
1554
+ value = word.slice(equals + 1);
1555
+ }
1556
+ else {
1557
+ const next = words[i + 1];
1558
+ // Never take a flag-looking word as a value: it would skip that flag's check.
1559
+ if (next === undefined || next.startsWith("-")) {
1560
+ return refuse(`--${flag.name} needs a value${next === undefined
1561
+ ? ""
1562
+ : `, but the next word is ${quoteCloudWord(next)}`} (${usage})`);
1563
+ }
1564
+ value = next;
1565
+ i++;
1566
+ }
1567
+ if (value === "") {
1568
+ return refuse(`--${flag.name} needs a value (${usage})`);
1569
+ }
1570
+ const problem = describeValueProblem(flag, value, `--${flag.name}`);
1571
+ if (problem) {
1572
+ return refuse(problem);
1573
+ }
1574
+ rawFlags.push({ flag, value });
1575
+ continue;
1576
+ }
1577
+ // A positional word: the operation's one resource.
1578
+ if (!operation.takesResource) {
1579
+ return refuse(`cloud ${operation.name} takes no resource (got ${quoteCloudWord(word)}; ${usage})`);
1580
+ }
1581
+ if (resourceWord !== null) {
1582
+ return refuse(`each cloud command names exactly one resource, but got ${quoteCloudWord(resourceWord)} and ${quoteCloudWord(word)} (${usage})`);
1583
+ }
1584
+ resourceWord = word;
1585
+ }
1586
+ let resource = null;
1587
+ if (operation.takesResource) {
1588
+ if (resourceWord === null) {
1589
+ return refuse(`cloud ${operation.name} needs the resource's ${exports.CLOUD_RESOURCE_ID_NAMES[provider]}, as the account's inventory lists it (${usage})`);
1590
+ }
1591
+ const parsed = parseCloudResourceId(provider, resourceWord);
1592
+ if (!parsed.ok) {
1593
+ return refuse(`${parsed.errorMessage} (${usage})`);
1594
+ }
1595
+ resource = parsed.resource;
1596
+ }
1597
+ const kindSpec = getCloudOperationKind(operation, provider, resource ? resource.kind : null);
1598
+ if (!kindSpec) {
1599
+ const known = resource
1600
+ ? getCloudResourceKind(provider, resource.kind)
1601
+ : null;
1602
+ return refuse(`cloud ${operation.name} is not available for ${known ? `a ${known.displayName}` : "this resource"}: on ${exports.CLOUD_CATALOG_PROVIDER_NAMES[provider]} it works on ${joinWords(describeCloudOperationKinds(operation, provider), "and")}`);
1603
+ }
1604
+ const kind = resource ? resource.kind : null;
1605
+ const flags = {};
1606
+ for (const given of rawFlags) {
1607
+ if (!appliesToKind(given.flag, kind)) {
1608
+ const known = getCloudResourceKind(provider, kind);
1609
+ return refuse(`--${given.flag.name} does not apply to ${known ? `a ${known.displayName}` : "this resource"} (${usage})`);
1610
+ }
1611
+ flags[given.flag.name] = toParamValue(given.flag, given.value);
1612
+ }
1613
+ for (const flag of operation.flags) {
1614
+ if (flag.required &&
1615
+ appliesToKind(flag, kind) &&
1616
+ !Object.prototype.hasOwnProperty.call(flags, flag.name)) {
1617
+ return refuse(`cloud ${operation.name} needs --${flag.name} ${flag.valueLabel}: ${flag.description} (usage: ${describeCloudOperationUsage(operation, kind)})`);
1618
+ }
1619
+ }
1620
+ const canonicalArgs = [operation.name];
1621
+ if (resource) {
1622
+ canonicalArgs.push(resource.id);
1623
+ }
1624
+ for (const flag of operation.flags) {
1625
+ if (Object.prototype.hasOwnProperty.call(flags, flag.name)) {
1626
+ canonicalArgs.push(`--${flag.name}`, String(flags[flag.name]));
1627
+ }
1628
+ }
1629
+ return {
1630
+ ok: true,
1631
+ command: {
1632
+ operation,
1633
+ provider,
1634
+ resource,
1635
+ kindSpec,
1636
+ flags,
1637
+ canonicalArgs,
1638
+ },
1639
+ };
1640
+ }
1641
+ /*
1642
+ * `cloud dry-run <change> RESOURCE [--flag value]...`: the change after
1643
+ * "dry-run" read by the same grammar (so it is refused for every reason
1644
+ * the change would be), then wrapped as CLOUD_DRY_RUN_OPERATION, a Read
1645
+ * whose canonical argv is "dry-run" and the change's own.
1646
+ */
1647
+ function parseCloudDryRun(provider, words) {
1648
+ const changeWord = words[2];
1649
+ const usage = `"${exports.CLOUD_PROGRAM} ${exports.CLOUD_DRY_RUN_OPERATION_NAME} <change> RESOURCE [--flag value]", the change exactly as it would run`;
1650
+ if (changeWord === undefined || changeWord === "") {
1651
+ return refuse(`name the change to check: ${usage}; the changes on ${exports.CLOUD_CATALOG_PROVIDER_NAMES[provider]} are ${exports.CLOUD_OPERATIONS.filter((operation) => {
1652
+ return (isCloudChangeOperation(operation) &&
1653
+ isCloudOperationAvailable(operation, provider));
1654
+ })
1655
+ .map((operation) => {
1656
+ return operation.name;
1657
+ })
1658
+ .join(", ")}`);
1659
+ }
1660
+ if (changeWord === exports.CLOUD_DRY_RUN_OPERATION_NAME) {
1661
+ return refuse(`a dry run checks one change, never another dry run: ${usage}`);
1662
+ }
1663
+ if (changeWord.startsWith("-")) {
1664
+ return refuse(`the change comes right after "${exports.CLOUD_DRY_RUN_OPERATION_NAME}", before any flag (got ${quoteCloudWord(changeWord)}): ${usage}`);
1665
+ }
1666
+ const change = parseCloudCommand(provider, [
1667
+ exports.CLOUD_PROGRAM,
1668
+ ...words.slice(2),
1669
+ ]);
1670
+ if (!change.ok) {
1671
+ return refuse(`the dry run's change is refused: ${change.errorMessage}`);
1672
+ }
1673
+ const changed = change.command;
1674
+ if (!isCloudChangeOperation(changed.operation) || !changed.resource) {
1675
+ return refuse(`cloud ${changed.operation.name} changes nothing, so it has nothing to dry-run: run it as it is`);
1676
+ }
1677
+ return {
1678
+ ok: true,
1679
+ command: {
1680
+ operation: exports.CLOUD_DRY_RUN_OPERATION,
1681
+ provider,
1682
+ resource: changed.resource,
1683
+ kindSpec: {
1684
+ provider,
1685
+ kind: changed.kindSpec.kind,
1686
+ tier: ResourceAiAccess_1.ResourceCommandTier.Read,
1687
+ requiresHuman: false,
1688
+ apiCall: `no call that changes anything: the agent stops before ${changed.kindSpec.apiCall}`,
1689
+ permissions: changed.kindSpec.permissions,
1690
+ },
1691
+ flags: Object.assign({}, changed.flags),
1692
+ canonicalArgs: [exports.CLOUD_DRY_RUN_OPERATION_NAME, ...changed.canonicalArgs],
1693
+ dryRunOf: changed,
1694
+ },
1695
+ };
1696
+ }
1697
+ // An Integer flag's value, or its default when it was not given.
1698
+ function getCloudIntegerFlag(command, name) {
1699
+ const value = command.flags[name];
1700
+ if (typeof value === "number") {
1701
+ return value;
1702
+ }
1703
+ const spec = command.operation.flags.find((flag) => {
1704
+ return flag.name === name;
1705
+ });
1706
+ return spec && spec.defaultValue !== undefined ? spec.defaultValue : null;
1707
+ }
1708
+ // ---- What a change replaced, and how it is undone -----------------------------
1709
+ /*
1710
+ * The line the agent starts a change's output with: the value the change
1711
+ * replaced, as a JSON object of strings ({"count":"2"}, {"version":
1712
+ * "web:41"}). The server reads it back to build the change's undo with the
1713
+ * catalog's inverse. Only the FIRST line is read: the stored output keeps
1714
+ * its head, and no later line (which may quote what the cloud answered)
1715
+ * can stand in for it.
1716
+ */
1717
+ exports.CLOUD_REPLACED_VALUE_PREFIX = "oneuptime-replaced-value: ";
1718
+ // The keys a replaced value may carry, and how each one's value is checked.
1719
+ const REPLACED_VALUE_PATTERNS = {
1720
+ count: /^(?:0|[1-9][0-9]{0,8})$/,
1721
+ version: VERSION_REGEX,
1722
+ value: /^(?:none|[1-9][0-9]{0,8})$/,
1723
+ state: /^[a-z][a-z-]{0,31}$/,
1724
+ primary: /^[A-Za-z0-9._:/-]{1,255}$/,
1725
+ };
1726
+ // The replaced-value line for these values (the agent writes it).
1727
+ function formatCloudReplacedValue(values) {
1728
+ const clean = {};
1729
+ for (const key of Object.keys(values).sort()) {
1730
+ const pattern = REPLACED_VALUE_PATTERNS[key];
1731
+ const value = values[key];
1732
+ if (pattern && typeof value === "string" && pattern.test(value)) {
1733
+ clean[key] = value;
1734
+ }
1735
+ }
1736
+ return `${exports.CLOUD_REPLACED_VALUE_PREFIX}${JSON.stringify(clean)}`;
1737
+ }
1738
+ // The longest output line read as a replaced value.
1739
+ const MAX_REPLACED_VALUE_LINE_LENGTH = 2048;
1740
+ /*
1741
+ * The replaced value a change's output reports: its first line, when that
1742
+ * is a replaced-value line, keeping only known keys whose values have their
1743
+ * pattern. {} when there is none or it cannot be read. Scans with indexOf,
1744
+ * never a regex over the whole output (outputs can be a megabyte).
1745
+ */
1746
+ function readCloudReplacedValue(output) {
1747
+ if (typeof output !== "string" ||
1748
+ !output.startsWith(exports.CLOUD_REPLACED_VALUE_PREFIX)) {
1749
+ return {};
1750
+ }
1751
+ const end = output.indexOf("\n");
1752
+ const line = output
1753
+ .slice(exports.CLOUD_REPLACED_VALUE_PREFIX.length, end < 0 ? output.length : end)
1754
+ .trimEnd();
1755
+ if (line.length > MAX_REPLACED_VALUE_LINE_LENGTH) {
1756
+ return {};
1757
+ }
1758
+ let parsed;
1759
+ try {
1760
+ parsed = JSON.parse(line);
1761
+ }
1762
+ catch (_a) {
1763
+ return {};
1764
+ }
1765
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
1766
+ return {};
1767
+ }
1768
+ const values = {};
1769
+ for (const key of Object.keys(parsed)) {
1770
+ const pattern = REPLACED_VALUE_PATTERNS[key];
1771
+ const value = parsed[key];
1772
+ if (pattern && typeof value === "string" && pattern.test(value)) {
1773
+ values[key] = value;
1774
+ }
1775
+ }
1776
+ return values;
1777
+ }
1778
+ /*
1779
+ * The line a dry run's output starts with: its verdict. would-run when the
1780
+ * agent found nothing that would stop the change (the replaced-value line
1781
+ * follows it), would-be-refused when something would (the reason follows).
1782
+ * Only the FIRST line is read, as for the replaced value.
1783
+ */
1784
+ exports.CLOUD_DRY_RUN_PREFIX = "oneuptime-dry-run: ";
1785
+ const CLOUD_DRY_RUN_VERDICTS = [
1786
+ "would-run",
1787
+ "would-be-refused",
1788
+ ];
1789
+ // The verdict line (the agent writes it).
1790
+ function formatCloudDryRunVerdict(verdict) {
1791
+ return `${exports.CLOUD_DRY_RUN_PREFIX}${JSON.stringify({ verdict })}`;
1792
+ }
1793
+ /*
1794
+ * A dry run's verdict, from its output's first line; null when the output
1795
+ * is not a dry run's or cannot be read. Reads with indexOf, never a regex
1796
+ * over the output.
1797
+ */
1798
+ function readCloudDryRunVerdict(output) {
1799
+ if (typeof output !== "string" || !output.startsWith(exports.CLOUD_DRY_RUN_PREFIX)) {
1800
+ return null;
1801
+ }
1802
+ const end = output.indexOf("\n");
1803
+ const line = output
1804
+ .slice(exports.CLOUD_DRY_RUN_PREFIX.length, end < 0 ? output.length : end)
1805
+ .trimEnd();
1806
+ if (line.length > MAX_REPLACED_VALUE_LINE_LENGTH) {
1807
+ return null;
1808
+ }
1809
+ let parsed;
1810
+ try {
1811
+ parsed = JSON.parse(line);
1812
+ }
1813
+ catch (_a) {
1814
+ return null;
1815
+ }
1816
+ const verdict = parsed && typeof parsed === "object" && !Array.isArray(parsed)
1817
+ ? parsed["verdict"]
1818
+ : undefined;
1819
+ return CLOUD_DRY_RUN_VERDICTS.includes(verdict)
1820
+ ? verdict
1821
+ : null;
1822
+ }
1823
+ /*
1824
+ * The output of a dry run without its verdict line: what is left starts
1825
+ * with the replaced-value line when the change would run.
1826
+ */
1827
+ function withoutCloudDryRunVerdict(output) {
1828
+ if (!output.startsWith(exports.CLOUD_DRY_RUN_PREFIX)) {
1829
+ return output;
1830
+ }
1831
+ const end = output.indexOf("\n");
1832
+ return end < 0 ? "" : output.slice(end + 1);
1833
+ }
1834
+ /*
1835
+ * The command that undoes a change, from the catalog's inverse and the
1836
+ * value the change's output reported it replaced. The result is a cloud
1837
+ * argv the policy reads like any other (it re-checks tier and bounds); a
1838
+ * change whose replaced value is missing cannot be undone exactly, which is
1839
+ * said rather than guessed.
1840
+ */
1841
+ function getCloudUndoCommand(data) {
1842
+ const operation = data.command.operation;
1843
+ if (!isCloudChangeOperation(operation)) {
1844
+ return {
1845
+ kind: "nothing",
1846
+ reason: `cloud ${operation.name} changes nothing`,
1847
+ };
1848
+ }
1849
+ const undo = operation.undo;
1850
+ if (!undo || !data.command.resource) {
1851
+ return {
1852
+ kind: "nothing",
1853
+ reason: `cloud ${operation.name}: ${operation.undoNote || "nothing to undo"}`,
1854
+ };
1855
+ }
1856
+ // An inverse that does not work on this kind (an RDS instance is started here, never stopped).
1857
+ const inverse = getCloudOperation(undo.operation);
1858
+ if (!inverse ||
1859
+ !getCloudOperationKind(inverse, data.command.provider, data.command.resource.kind)) {
1860
+ const known = getCloudResourceKind(data.command.provider, data.command.resource.kind);
1861
+ return {
1862
+ kind: "nothing",
1863
+ reason: `cloud ${undo.operation} does not work on ${known ? `a ${known.displayName}` : "this resource"}, so cloud ${operation.name} has nothing to undo here: a person puts it back`,
1864
+ };
1865
+ }
1866
+ const argv = [
1867
+ exports.CLOUD_PROGRAM,
1868
+ undo.operation,
1869
+ data.command.resource.id,
1870
+ ];
1871
+ if (undo.valueFlag && undo.valueKey) {
1872
+ const value = data.replaced[undo.valueKey];
1873
+ if (value === undefined) {
1874
+ // roll-back-service on a slot swap needs no version: the same swap undoes it.
1875
+ if (!(operation.name === "roll-back-service" &&
1876
+ data.command.resource.kind === "app-service")) {
1877
+ return {
1878
+ kind: "unknown",
1879
+ reason: `cloud ${operation.name} did not report the ${undo.valueKey} it replaced, so it cannot be undone exactly`,
1880
+ };
1881
+ }
1882
+ }
1883
+ else {
1884
+ argv.push(`--${undo.valueFlag}`, value);
1885
+ }
1886
+ }
1887
+ for (const name of undo.keepFlags) {
1888
+ const value = data.command.flags[name];
1889
+ if (value !== undefined) {
1890
+ argv.push(`--${name}`, String(value));
1891
+ }
1892
+ }
1893
+ // The policy's canonical order, so the undo reads like any other command.
1894
+ const reparsed = parseCloudCommand(data.command.provider, argv);
1895
+ if (!reparsed.ok) {
1896
+ return {
1897
+ kind: "unknown",
1898
+ reason: `the undo of cloud ${operation.name} could not be written: ${reparsed.errorMessage}`,
1899
+ };
1900
+ }
1901
+ return {
1902
+ kind: "command",
1903
+ argv: [exports.CLOUD_PROGRAM, ...reparsed.command.canonicalArgs],
1904
+ };
1905
+ }
1906
+ // ---- Guides -------------------------------------------------------------------
1907
+ function operationBullet(operation, provider) {
1908
+ const kinds = describeCloudOperationKinds(operation, provider);
1909
+ return `- \`${describeCloudOperationUsage(operation)}\`: ${operation.summary}${kinds.length > 0 ? ` (${joinWords(kinds, "and")})` : ""}.`;
1910
+ }
1911
+ /*
1912
+ * The read cheat-sheet for the investigation tool, for one cloud: compact
1913
+ * markdown bullets.
1914
+ */
1915
+ function getCloudReadCommandGuide(provider) {
1916
+ return [
1917
+ `- \`cloud\` runs one operation from a fixed catalog on this ${exports.CLOUD_CATALOG_PROVIDER_NAMES[provider]} account — never an aws, az or gcloud command: \`cloud <operation> RESOURCE [--flag value]\`, long flags only, each flag once. RESOURCE is one resource's ${exports.CLOUD_RESOURCE_ID_NAMES[provider]}, exactly as the account's inventory lists it (query_cloud_resource finds it).`,
1918
+ ...exports.CLOUD_OPERATIONS.filter((operation) => {
1919
+ return (!isCloudChangeOperation(operation) &&
1920
+ isCloudOperationAvailable(operation, provider));
1921
+ }).map((operation) => {
1922
+ return operationBullet(operation, provider);
1923
+ }),
1924
+ "- The reads run on OneUptime through the account's read-only connection and are live; whoami asks the Cloud AI agent.",
1925
+ `- \`cloud ${exports.CLOUD_DRY_RUN_OPERATION_NAME} <change> RESOURCE [--flag value]\`: ${exports.CLOUD_DRY_RUN_OPERATION.summary}. It asks the Cloud AI agent and changes nothing: it says whether the change would run, the value it would replace and how it would be undone.`,
1926
+ ].join("\n");
1927
+ }
1928
+ /*
1929
+ * The write cheat-sheet for the remediation tools, for one cloud: every
1930
+ * change, the kinds it works on with their tiers, how it is undone, and
1931
+ * what never changes.
1932
+ */
1933
+ function getCloudWriteCommandGuide(provider) {
1934
+ const lines = [];
1935
+ for (const operation of exports.CLOUD_OPERATIONS) {
1936
+ if (!isCloudChangeOperation(operation)) {
1937
+ continue;
1938
+ }
1939
+ const kinds = [];
1940
+ for (const spec of operation.kinds) {
1941
+ if (spec.provider !== provider) {
1942
+ continue;
1943
+ }
1944
+ const known = getCloudResourceKind(provider, spec.kind);
1945
+ const tier = spec.requiresHuman
1946
+ ? "always needs a person"
1947
+ : spec.tier === ResourceAiAccess_1.ResourceCommandTier.SafeWrite
1948
+ ? "safe"
1949
+ : "riskier";
1950
+ kinds.push(`${known ? known.displayName : spec.kind}: ${tier}`);
1951
+ }
1952
+ if (kinds.length === 0) {
1953
+ continue;
1954
+ }
1955
+ const undo = operation.undo
1956
+ ? `undone with cloud ${operation.undo.operation}${operation.undo.valueFlag
1957
+ ? ` --${operation.undo.valueFlag} <the replaced value>`
1958
+ : ""}`
1959
+ : operation.undoNote;
1960
+ lines.push(`- \`${describeCloudOperationUsage(operation)}\`: ${operation.summary} (${kinds.join("; ")}; ${undo}).`);
1961
+ }
1962
+ lines.push("- Each change names exactly one resource the account's inventory lists. The agent reads the value it replaces first and reports it, so a failed fix rolls back exactly.", `- Before you propose or make a change, check it with \`cloud ${exports.CLOUD_DRY_RUN_OPERATION_NAME} <change> RESOURCE [--flag value]\`, a read that changes nothing: the agent says whether it would run, the value it would replace and how it would be undone.`, "- Never, even with approval: deleting or terminating anything, IAM, security groups and firewall rules, secrets and keys, storage and database contents, instance types, snapshots and restores, purging a queue, a group's minimum or maximum, and anything not listed here.");
1963
+ return lines.join("\n");
1964
+ }