@oneuptime/common 14.0.92 → 14.0.94

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 (271) hide show
  1. package/Models/DatabaseModels/Alert.d.mts +2 -0
  2. package/Models/DatabaseModels/Alert.d.ts +2 -0
  3. package/Models/DatabaseModels/Alert.js +62 -1
  4. package/Models/DatabaseModels/AlertEpisodeMember.d.mts +1 -0
  5. package/Models/DatabaseModels/AlertEpisodeMember.d.ts +1 -0
  6. package/Models/DatabaseModels/AlertEpisodeMember.js +50 -0
  7. package/Models/DatabaseModels/CloudAccount.d.mts +29 -0
  8. package/Models/DatabaseModels/CloudAccount.d.ts +29 -0
  9. package/Models/DatabaseModels/CloudAccount.js +546 -0
  10. package/Models/DatabaseModels/CloudAccount.mjs +2 -0
  11. package/Models/DatabaseModels/CloudResource.d.mts +8 -0
  12. package/Models/DatabaseModels/CloudResource.d.ts +8 -0
  13. package/Models/DatabaseModels/CloudResource.js +169 -0
  14. package/Models/DatabaseModels/CloudResourceLabelRule.d.mts +1 -0
  15. package/Models/DatabaseModels/CloudResourceLabelRule.d.ts +1 -0
  16. package/Models/DatabaseModels/CloudResourceLabelRule.js +40 -0
  17. package/Models/DatabaseModels/CloudResourceOwnerRule.d.mts +1 -0
  18. package/Models/DatabaseModels/CloudResourceOwnerRule.d.ts +1 -0
  19. package/Models/DatabaseModels/CloudResourceOwnerRule.js +40 -0
  20. package/Models/DatabaseModels/Incident.d.mts +2 -0
  21. package/Models/DatabaseModels/Incident.d.ts +2 -0
  22. package/Models/DatabaseModels/Incident.js +54 -0
  23. package/Models/DatabaseModels/IncidentEpisodeMember.d.mts +1 -0
  24. package/Models/DatabaseModels/IncidentEpisodeMember.d.ts +1 -0
  25. package/Models/DatabaseModels/IncidentEpisodeMember.js +50 -0
  26. package/Models/DatabaseModels/IncomingCallPolicy.js +1 -1
  27. package/Models/DatabaseModels/Index.js +2 -0
  28. package/Models/DatabaseModels/LlmProvider.js +1 -1
  29. package/Models/DatabaseModels/Monitor.d.mts +2 -0
  30. package/Models/DatabaseModels/Monitor.d.ts +2 -0
  31. package/Models/DatabaseModels/Monitor.js +54 -0
  32. package/Models/DatabaseModels/MonitorTemplate.js +10 -4
  33. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +13 -13
  34. package/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
  35. package/Models/DatabaseModels/OpenSourceDeployment.d.mts +1 -0
  36. package/Models/DatabaseModels/OpenSourceDeployment.d.ts +1 -0
  37. package/Models/DatabaseModels/OpenSourceDeployment.js +25 -6
  38. package/Models/DatabaseModels/ScheduledMaintenance.d.mts +1 -0
  39. package/Models/DatabaseModels/ScheduledMaintenance.d.ts +1 -0
  40. package/Models/DatabaseModels/ScheduledMaintenance.js +50 -0
  41. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +1 -1
  42. package/Models/DatabaseModels/StatusPage.d.mts +2 -0
  43. package/Models/DatabaseModels/StatusPage.d.ts +2 -0
  44. package/Models/DatabaseModels/StatusPage.js +100 -0
  45. package/Types/AI/AiAffectedResources.d.mts +40 -0
  46. package/Types/AI/AiAffectedResources.d.ts +40 -0
  47. package/Types/AI/AiAffectedResources.js +292 -0
  48. package/Types/AI/AiAffectedResources.mjs +10 -0
  49. package/Types/Cloud/CloudAccountSummary.d.mts +25 -0
  50. package/Types/Cloud/CloudAccountSummary.d.ts +25 -0
  51. package/Types/Cloud/CloudAccountSummary.js +114 -0
  52. package/Types/Cloud/CloudAccountSummary.mjs +5 -0
  53. package/Types/Cloud/CloudEndpointMatch.d.mts +26 -0
  54. package/Types/Cloud/CloudEndpointMatch.d.ts +26 -0
  55. package/Types/Cloud/CloudEndpointMatch.js +134 -0
  56. package/Types/Cloud/CloudEndpointMatch.mjs +5 -0
  57. package/Types/Cloud/CloudInventory.d.mts +34 -0
  58. package/Types/Cloud/CloudInventory.d.ts +34 -0
  59. package/Types/Cloud/CloudInventory.js +362 -0
  60. package/Types/Cloud/CloudInventory.mjs +22 -0
  61. package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
  62. package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
  63. package/Types/Cloud/CloudResourceCatalog.js +29 -1
  64. package/Types/Cloud/CloudResourceCatalog.mjs +2 -0
  65. package/Types/Cloud/CloudResourceIndex.d.mts +44 -0
  66. package/Types/Cloud/CloudResourceIndex.d.ts +44 -0
  67. package/Types/Cloud/CloudResourceIndex.js +191 -0
  68. package/Types/Cloud/CloudResourceIndex.mjs +4 -0
  69. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +3 -0
  70. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +3 -0
  71. package/Types/CloudConnection/CloudConnectionCatalog.js +70 -12
  72. package/Types/CloudConnection/CloudConnectionCatalog.mjs +2 -0
  73. package/Types/CloudConnection/CloudConnectionPaste.js +7 -1
  74. package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +43 -3
  75. package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +43 -3
  76. package/Types/CloudConnection/CloudConnectionSetupCommands.js +280 -30
  77. package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +14 -0
  78. package/Types/CloudConnection/CloudConnectionTest.d.mts +1 -0
  79. package/Types/CloudConnection/CloudConnectionTest.d.ts +1 -0
  80. package/Types/CloudConnection/CloudConnectionTest.js +1 -0
  81. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.mts +19 -0
  82. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.ts +19 -0
  83. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +27 -1
  84. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.mjs +3 -0
  85. package/Types/Database/BlankColumnValue.d.mts +6 -0
  86. package/Types/Database/BlankColumnValue.d.ts +6 -0
  87. package/Types/Database/BlankColumnValue.js +77 -0
  88. package/Types/Database/BlankColumnValue.mjs +4 -0
  89. package/Types/Date.d.mts +1 -0
  90. package/Types/Date.d.ts +1 -0
  91. package/Types/Date.js +32 -6
  92. package/Types/DateLanguage.d.mts +2 -0
  93. package/Types/DateLanguage.d.ts +2 -0
  94. package/Types/DateLanguage.js +67 -12
  95. package/Types/DateLanguage.mjs +2 -0
  96. package/Types/Domain.d.mts +2 -0
  97. package/Types/Domain.d.ts +2 -0
  98. package/Types/Domain.js +27 -0
  99. package/Types/Email/EmailTemplateType.d.mts +2 -0
  100. package/Types/Email/EmailTemplateType.d.ts +2 -0
  101. package/Types/Email/EmailTemplateType.js +2 -0
  102. package/Types/Email.d.mts +1 -0
  103. package/Types/Email.d.ts +1 -0
  104. package/Types/Email.js +16 -0
  105. package/Types/IncomingCall/IncomingCallPolicyRepeat.d.mts +6 -0
  106. package/Types/IncomingCall/IncomingCallPolicyRepeat.d.ts +6 -0
  107. package/Types/IncomingCall/IncomingCallPolicyRepeat.js +41 -14
  108. package/Types/IncomingCall/IncomingCallPolicyRepeat.mjs +3 -0
  109. package/Types/Monitor/CriteriaFilter.d.mts +1 -0
  110. package/Types/Monitor/CriteriaFilter.d.ts +1 -0
  111. package/Types/Monitor/CriteriaFilter.js +9 -0
  112. package/Types/Monitor/DatabaseMetricCatalog.js +2 -2
  113. package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.mts +4 -0
  114. package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.ts +4 -0
  115. package/Types/Monitor/KubernetesEventAlertTemplates.d.mts +20 -0
  116. package/Types/Monitor/KubernetesEventAlertTemplates.d.ts +20 -0
  117. package/Types/Monitor/KubernetesEventAlertTemplates.js +232 -0
  118. package/Types/Monitor/KubernetesEventAlertTemplates.mjs +8 -0
  119. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.mts +3 -0
  120. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.ts +3 -0
  121. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +35 -0
  122. package/Types/Monitor/MonitorTemplateSyncField.js +6 -1
  123. package/Types/Monitor/MonitorType.js +12 -2
  124. package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +27 -2
  125. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.mts +1 -0
  126. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.ts +1 -0
  127. package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +31 -1
  128. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +3 -1
  129. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +3 -1
  130. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +3 -2
  131. package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.mts +1 -0
  132. package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.ts +1 -0
  133. package/Types/Monitor/UptimeBarTooltipMaintenance.d.mts +15 -0
  134. package/Types/Monitor/UptimeBarTooltipMaintenance.d.ts +15 -0
  135. package/Types/Monitor/UptimeBarTooltipMaintenance.js +2 -0
  136. package/Types/Monitor/UptimeBarTooltipMaintenance.mjs +1 -0
  137. package/Types/Monitor/UptimeHistoryLabels.d.mts +5 -0
  138. package/Types/Monitor/UptimeHistoryLabels.d.ts +5 -0
  139. package/Types/Monitor/UptimeHistoryLabels.js +5 -0
  140. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +2 -0
  141. package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +10 -3
  142. package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
  143. package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
  144. package/Types/NotificationSetting/NotificationSettingEventType.js +7 -0
  145. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.mts +7 -0
  146. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.ts +7 -0
  147. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.js +51 -0
  148. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.mjs +4 -0
  149. package/Types/ReadingDirection.d.mts +10 -0
  150. package/Types/ReadingDirection.d.ts +10 -0
  151. package/Types/ReadingDirection.js +171 -0
  152. package/Types/ReadingDirection.mjs +10 -0
  153. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.mts +8 -0
  154. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.ts +8 -0
  155. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.js +55 -0
  156. package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.mjs +5 -0
  157. package/Types/Rules/RuleCriteriaFieldRegistry.js +2 -0
  158. package/Types/Runbook/HttpStepVariables.d.mts +8 -0
  159. package/Types/Runbook/HttpStepVariables.d.ts +8 -0
  160. package/Types/Runbook/HttpStepVariables.js +109 -0
  161. package/Types/Runbook/HttpStepVariables.mjs +5 -0
  162. package/Types/Runbook/RunbookStep.d.mts +1 -0
  163. package/Types/Runbook/RunbookStep.d.ts +1 -0
  164. package/Types/Runbook/RunnerFeatures.d.mts +1 -0
  165. package/Types/Runbook/RunnerFeatures.d.ts +1 -0
  166. package/Types/Runbook/RunnerFeatures.js +15 -3
  167. package/Types/Runbook/RunnerFeatures.mjs +1 -0
  168. package/Types/Runbook/SshHostKey.d.mts +22 -0
  169. package/Types/Runbook/SshHostKey.d.ts +22 -0
  170. package/Types/Runbook/SshHostKey.js +201 -0
  171. package/Types/Runbook/SshHostKey.mjs +10 -0
  172. package/Types/Runner/CodeRepositoryRunner.js +2 -3
  173. package/Types/Runner/GlobalAIAgentsGone.d.mts +1 -0
  174. package/Types/Runner/GlobalAIAgentsGone.d.ts +1 -0
  175. package/Types/Runner/GlobalAIAgentsGone.js +19 -0
  176. package/Types/Runner/GlobalAIAgentsGone.mjs +2 -0
  177. package/Types/Runner/GlobalRunnerWork.d.mts +1 -0
  178. package/Types/Runner/GlobalRunnerWork.d.ts +1 -0
  179. package/Types/Runner/GlobalRunnerWork.js +21 -1
  180. package/Types/Runner/GlobalRunnerWork.mjs +1 -0
  181. package/Types/SSO/SignInMethods.d.mts +31 -0
  182. package/Types/SSO/SignInMethods.d.ts +31 -0
  183. package/Types/SSO/SignInMethods.js +160 -0
  184. package/Types/SSO/SignInMethods.mjs +8 -0
  185. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.mts +24 -0
  186. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.ts +24 -0
  187. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.js +159 -0
  188. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.mjs +8 -0
  189. package/Types/StatusPage/StatusPageLanguage.d.mts +6 -0
  190. package/Types/StatusPage/StatusPageLanguage.d.ts +6 -0
  191. package/Types/StatusPage/StatusPageLanguage.js +17 -1
  192. package/Types/StatusPage/StatusPageLanguage.mjs +1 -0
  193. package/Types/Workflow/Templates.js +2 -5
  194. package/Types/Workflow/WorkflowPlan.d.mts +7 -0
  195. package/Types/Workflow/WorkflowPlan.d.ts +7 -0
  196. package/Types/Workflow/WorkflowPlan.js +39 -0
  197. package/Types/Workflow/WorkflowPlan.mjs +3 -0
  198. package/Types/Workspace/WorkspaceMessagePayload.d.mts +11 -0
  199. package/Types/Workspace/WorkspaceMessagePayload.d.ts +11 -0
  200. package/Utils/ColorContrast.d.mts +3 -0
  201. package/Utils/ColorContrast.d.ts +3 -0
  202. package/Utils/ColorContrast.js +41 -3
  203. package/Utils/ColorContrast.mjs +2 -0
  204. package/Utils/Dashboard/TableThresholds.d.mts +44 -0
  205. package/Utils/Dashboard/TableThresholds.d.ts +44 -0
  206. package/Utils/Dashboard/TableThresholds.js +288 -0
  207. package/Utils/Dashboard/TableThresholds.mjs +17 -0
  208. package/Utils/Dashboard/ValueWidgetSeries.d.mts +6 -0
  209. package/Utils/Dashboard/ValueWidgetSeries.d.ts +6 -0
  210. package/Utils/Dashboard/ValueWidgetSeries.js +70 -1
  211. package/Utils/Dashboard/ValueWidgetSeries.mjs +2 -0
  212. package/Utils/DeveloperDocs/ResourceProfiles.js +16 -0
  213. package/Utils/DeveloperDocs/TerraformSchema.d.mts +1 -0
  214. package/Utils/DeveloperDocs/TerraformSchema.d.ts +1 -0
  215. package/Utils/DeveloperDocs/TerraformSchema.js +17 -0
  216. package/Utils/DeveloperDocs/TerraformSchema.mjs +1 -0
  217. package/Utils/Incident/WhoOpenedItRootCause.d.mts +2 -0
  218. package/Utils/Incident/WhoOpenedItRootCause.d.ts +2 -0
  219. package/Utils/Incident/WhoOpenedItRootCause.js +50 -0
  220. package/Utils/Incident/WhoOpenedItRootCause.mjs +3 -0
  221. package/Utils/Monitor/ExternalStatusPageComponentNames.d.mts +17 -0
  222. package/Utils/Monitor/ExternalStatusPageComponentNames.d.ts +17 -0
  223. package/Utils/Monitor/ExternalStatusPageComponentNames.js +274 -0
  224. package/Utils/Monitor/ExternalStatusPageComponentNames.mjs +6 -0
  225. package/Utils/Monitor/ExternalStatusPageReading.d.mts +35 -0
  226. package/Utils/Monitor/ExternalStatusPageReading.d.ts +35 -0
  227. package/Utils/Monitor/ExternalStatusPageReading.js +380 -0
  228. package/Utils/Monitor/ExternalStatusPageReading.mjs +6 -0
  229. package/Utils/Monitor/ExternalStatusPageScope.d.mts +43 -0
  230. package/Utils/Monitor/ExternalStatusPageScope.d.ts +43 -0
  231. package/Utils/Monitor/ExternalStatusPageScope.js +213 -0
  232. package/Utils/Monitor/ExternalStatusPageScope.mjs +4 -0
  233. package/Utils/Monitor/SyntheticMonitorStepsUtil.d.mts +18 -0
  234. package/Utils/Monitor/SyntheticMonitorStepsUtil.d.ts +18 -0
  235. package/Utils/Monitor/SyntheticMonitorStepsUtil.js +129 -0
  236. package/Utils/Monitor/SyntheticMonitorStepsUtil.mjs +4 -0
  237. package/Utils/Rules/RuleRunSummary.d.mts +1 -0
  238. package/Utils/Rules/RuleRunSummary.d.ts +1 -0
  239. package/Utils/Rules/RuleRunSummary.js +19 -1
  240. package/Utils/Rules/RuleRunSummary.mjs +1 -0
  241. package/Utils/Runbook/SshHostKeyFingerprint.d.mts +8 -0
  242. package/Utils/Runbook/SshHostKeyFingerprint.d.ts +8 -0
  243. package/Utils/Runbook/SshHostKeyFingerprint.js +83 -0
  244. package/Utils/Runbook/SshHostKeyFingerprint.mjs +5 -0
  245. package/Utils/ScheduledMaintenanceStart.d.mts +6 -0
  246. package/Utils/ScheduledMaintenanceStart.d.ts +6 -0
  247. package/Utils/ScheduledMaintenanceStart.js +15 -0
  248. package/Utils/Sms/Gsm7Text.js +9 -1
  249. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  250. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  251. package/Utils/Sms/OnCallPageSms.js +19 -2
  252. package/Utils/Sms/OnCallPageSms.mjs +1 -0
  253. package/Utils/Sms/SubscriberSms.d.mts +2 -0
  254. package/Utils/Sms/SubscriberSms.d.ts +2 -0
  255. package/Utils/Sms/SubscriberSms.js +35 -0
  256. package/Utils/Sms/SubscriberSms.mjs +3 -0
  257. package/Utils/StatusPage/HistoryChartBarColors.d.mts +2 -0
  258. package/Utils/StatusPage/HistoryChartBarColors.d.ts +2 -0
  259. package/Utils/StatusPage/HistoryChartBarColors.js +12 -1
  260. package/Utils/StatusPage/HistoryChartBarColors.mjs +2 -0
  261. package/Utils/Telemetry/ChangeEventFields.d.mts +19 -1
  262. package/Utils/Telemetry/ChangeEventFields.d.ts +19 -1
  263. package/Utils/Telemetry/ChangeEventFields.js +52 -1
  264. package/Utils/Uptime/DayUptimeGraphUtil.d.mts +6 -0
  265. package/Utils/Uptime/DayUptimeGraphUtil.d.ts +6 -0
  266. package/Utils/Uptime/DayUptimeGraphUtil.js +37 -6
  267. package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +60 -0
  268. package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +60 -0
  269. package/Utils/Uptime/UptimeMaintenanceUtil.js +295 -0
  270. package/Utils/Uptime/UptimeMaintenanceUtil.mjs +3 -0
  271. package/package.json +1 -1
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getHttpStepVariableTexts = getHttpStepVariableTexts;
4
+ exports.fillHttpStepJsonText = fillHttpStepJsonText;
5
+ exports.fillHttpStepConfig = fillHttpStepConfig;
6
+ exports.redactHttpStepSecrets = redactHttpStepSecrets;
7
+ const RunbookVariableReference_1 = require("./RunbookVariableReference");
8
+ const SecretOutputRedaction_1 = require("./SecretOutputRedaction");
9
+ /*
10
+ * AN HTTP REQUEST STEP FILLS IN THE RUNBOOK VARIABLES IT NAMES.
11
+ *
12
+ * Bash, JavaScript, SSH and kubectl steps had variables; an HTTP request
13
+ * step - calling PagerDuty, Slack or a service of your own, usually with a
14
+ * token - did not, so a token had to be typed into the step, where
15
+ * everyone who may read the runbook reads it. Now its URL, headers and body
16
+ * name variables the way scripts do ({{global.variables.NAME}},
17
+ * {{local.variables.NAME}}), and OneUptime fills them in when the step runs.
18
+ *
19
+ * Who gets a secret: an HTTP request step is sent by OneUptime itself, from
20
+ * its own servers - which keep the secret already, encrypted, and decrypt it
21
+ * for every Runner that takes a step. No Runner is involved, so a secret's
22
+ * Runners do not apply: the step gets every variable of its project (and of
23
+ * its runbook) that it names, plain or secret. The secret is filled in only
24
+ * in the request as it is sent, never stored, and hidden in what the step
25
+ * records (the response's status, headers and body, and any error).
26
+ *
27
+ * How a value is placed, so a value is never read as JSON it was not:
28
+ *
29
+ * - the URL: as written - a reference may stand for a whole base URL, so
30
+ * nothing is escaped;
31
+ * - the headers and the body, when they are JSON as written: each string
32
+ * in them (names included) is filled in, and the JSON written again, so
33
+ * a value with a quote or a line break in it stays one string;
34
+ * - otherwise (a reference standing where a number goes, or a body that is
35
+ * plain text): the text is filled in as written, and read as before.
36
+ *
37
+ * Pure, so the step's executor and the tests read the same rules.
38
+ */
39
+ // The step's fields that may name variables, as stored.
40
+ function getHttpStepVariableTexts(config) {
41
+ return [config.url || "", config.headersJson || "", config.body || ""];
42
+ }
43
+ // Every string in a JSON value, keys included, with references filled in.
44
+ function fillJsonValue(value, getValue) {
45
+ if (typeof value === "string") {
46
+ return (0, RunbookVariableReference_1.replaceRunbookVariableReferences)(value, getValue);
47
+ }
48
+ if (Array.isArray(value)) {
49
+ return value.map((item) => {
50
+ return fillJsonValue(item, getValue);
51
+ });
52
+ }
53
+ if (value && typeof value === "object") {
54
+ const filled = {};
55
+ for (const [key, item] of Object.entries(value)) {
56
+ filled[(0, RunbookVariableReference_1.replaceRunbookVariableReferences)(key, getValue)] = fillJsonValue(item, getValue);
57
+ }
58
+ return filled;
59
+ }
60
+ return value;
61
+ }
62
+ /*
63
+ * A header or body text with its references filled in: within the JSON's
64
+ * strings when the text is JSON as written, else as plain text.
65
+ */
66
+ function fillHttpStepJsonText(text, getValue) {
67
+ if (typeof text !== "string" || text.indexOf("{{") === -1) {
68
+ return text;
69
+ }
70
+ let parsed = undefined;
71
+ try {
72
+ parsed = JSON.parse(text);
73
+ }
74
+ catch (_a) {
75
+ return (0, RunbookVariableReference_1.replaceRunbookVariableReferences)(text, getValue);
76
+ }
77
+ // A JSON string, number or the like holds nothing to fill but itself.
78
+ if (typeof parsed !== "object" || parsed === null) {
79
+ return (0, RunbookVariableReference_1.replaceRunbookVariableReferences)(text, getValue);
80
+ }
81
+ return JSON.stringify(fillJsonValue(parsed, getValue));
82
+ }
83
+ // The step's URL, headers and body with the variables it names filled in.
84
+ function fillHttpStepConfig(config, getValue) {
85
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, config), { url: (0, RunbookVariableReference_1.replaceRunbookVariableReferences)(config.url || "", getValue) }), (config.headersJson
86
+ ? { headersJson: fillHttpStepJsonText(config.headersJson, getValue) }
87
+ : {})), (config.body
88
+ ? { body: fillHttpStepJsonText(config.body, getValue) }
89
+ : {}));
90
+ }
91
+ /*
92
+ * What the step records, with every secret it was given hidden - as each
93
+ * one was given, and as a URL carries it (percent-encoded), since the
94
+ * request's own URL comes back in errors and in echoing responses.
95
+ */
96
+ function redactHttpStepSecrets(text, secretValues) {
97
+ if (!secretValues.length || typeof text !== "string" || !text) {
98
+ return text;
99
+ }
100
+ const forms = [];
101
+ for (const value of secretValues) {
102
+ forms.push(value);
103
+ const encoded = encodeURIComponent(value);
104
+ if (encoded !== value) {
105
+ forms.push(encoded);
106
+ }
107
+ }
108
+ return (0, SecretOutputRedaction_1.redactSecretValues)(text, forms);
109
+ }
@@ -0,0 +1,5 @@
1
+ import commonJsModule from "./HttpStepVariables.js";
2
+ export const fillHttpStepConfig = commonJsModule.fillHttpStepConfig;
3
+ export const fillHttpStepJsonText = commonJsModule.fillHttpStepJsonText;
4
+ export const getHttpStepVariableTexts = commonJsModule.getHttpStepVariableTexts;
5
+ export const redactHttpStepSecrets = commonJsModule.redactHttpStepSecrets;
@@ -33,6 +33,7 @@ export interface SSHStepConfig {
33
33
  port?: number;
34
34
  signIn?: string;
35
35
  passphrase?: string;
36
+ hostKey?: string;
36
37
  script?: string;
37
38
  credentialId?: string;
38
39
  command?: string;
@@ -33,6 +33,7 @@ export interface SSHStepConfig {
33
33
  port?: number;
34
34
  signIn?: string;
35
35
  passphrase?: string;
36
+ hostKey?: string;
36
37
  script?: string;
37
38
  credentialId?: string;
38
39
  command?: string;
@@ -1,4 +1,5 @@
1
1
  export declare const RUNNER_FEATURE_KUBECTL_SCRIPT: string;
2
+ export declare const RUNNER_FEATURE_SSH_HOST_KEY: string;
2
3
  export declare const SSH_CREDENTIAL_TYPE: string;
3
4
  export declare const KUBECONFIG_CREDENTIAL_TYPE: string;
4
5
  export declare const RUNNER_FEATURES: ReadonlyArray<string>;
@@ -1,4 +1,5 @@
1
1
  export declare const RUNNER_FEATURE_KUBECTL_SCRIPT: string;
2
+ export declare const RUNNER_FEATURE_SSH_HOST_KEY: string;
2
3
  export declare const SSH_CREDENTIAL_TYPE: string;
3
4
  export declare const KUBECONFIG_CREDENTIAL_TYPE: string;
4
5
  export declare const RUNNER_FEATURES: ReadonlyArray<string>;
@@ -14,20 +14,31 @@
14
14
  * step is failed on a Runner that does not name "kubectl-script", saying to
15
15
  * update the Runner - the Kubernetes steps the data migration moved from an
16
16
  * action included: the runbook credential they kept for such a Runner went
17
- * with runbook credentials.
17
+ * with runbook credentials. An SSH step that names the machine's host keys
18
+ * is failed on a Runner that does not name "ssh-host-key": an older Runner
19
+ * would sign in without checking them, which is what naming them prevents.
18
20
  */
19
21
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.RUNNER_FEATURES = exports.KUBECONFIG_CREDENTIAL_TYPE = exports.SSH_CREDENTIAL_TYPE = exports.RUNNER_FEATURE_KUBECTL_SCRIPT = void 0;
22
+ exports.RUNNER_FEATURES = exports.KUBECONFIG_CREDENTIAL_TYPE = exports.SSH_CREDENTIAL_TYPE = exports.RUNNER_FEATURE_SSH_HOST_KEY = exports.RUNNER_FEATURE_KUBECTL_SCRIPT = void 0;
21
23
  exports.readRunnerFeatures = readRunnerFeatures;
22
24
  // A kubectl step that takes a script and a kubeconfig (RunbookStepType.Kubernetes).
23
25
  exports.RUNNER_FEATURE_KUBECTL_SCRIPT = "kubectl-script";
26
+ /*
27
+ * An SSH step that names the machine's host keys (SSHStepConfig.hostKey):
28
+ * the Runner signs in only when the machine presents one of them
29
+ * (credential.hostKeys).
30
+ */
31
+ exports.RUNNER_FEATURE_SSH_HOST_KEY = "ssh-host-key";
24
32
  /*
25
33
  * How a claim's `credential` says what it holds: { credentialType, ... }.
26
34
  *
27
35
  * An SSH step's sign-in is sent as { credentialType: "SSH", hostname, port,
28
36
  * username, privateKey (and passphrase) or password }, filled in from its
29
37
  * secret runbook variables (RunbookJobVariables) - the shape every Runner
30
- * reads, an older one included, since runbook credentials were sent in it.
38
+ * reads, an older one included, since runbook credentials were sent in it -
39
+ * and, when the step names the machine's host keys, hostKeys: [{
40
+ * fingerprint, keyType }], which only a Runner that names "ssh-host-key"
41
+ * is handed.
31
42
  * A kubectl step's kubeconfig is sent as { credentialType: "Kubeconfig",
32
43
  * kubeconfig }. ("Kubernetes", an API server URL and a token, is what a
33
44
  * runbook credential was sent as; OneUptime sends it no more.)
@@ -37,6 +48,7 @@ exports.KUBECONFIG_CREDENTIAL_TYPE = "Kubeconfig";
37
48
  // Every feature this build of the Runner has.
38
49
  exports.RUNNER_FEATURES = [
39
50
  exports.RUNNER_FEATURE_KUBECTL_SCRIPT,
51
+ exports.RUNNER_FEATURE_SSH_HOST_KEY,
40
52
  ];
41
53
  // The features a claim body names, read defensively: only known strings.
42
54
  function readRunnerFeatures(raw) {
@@ -2,5 +2,6 @@ import commonJsModule from "./RunnerFeatures.js";
2
2
  export const KUBECONFIG_CREDENTIAL_TYPE = commonJsModule.KUBECONFIG_CREDENTIAL_TYPE;
3
3
  export const RUNNER_FEATURES = commonJsModule.RUNNER_FEATURES;
4
4
  export const RUNNER_FEATURE_KUBECTL_SCRIPT = commonJsModule.RUNNER_FEATURE_KUBECTL_SCRIPT;
5
+ export const RUNNER_FEATURE_SSH_HOST_KEY = commonJsModule.RUNNER_FEATURE_SSH_HOST_KEY;
5
6
  export const SSH_CREDENTIAL_TYPE = commonJsModule.SSH_CREDENTIAL_TYPE;
6
7
  export const readRunnerFeatures = commonJsModule.readRunnerFeatures;
@@ -0,0 +1,22 @@
1
+ export declare const SSH_HOST_KEY_TYPES: ReadonlyArray<string>;
2
+ export declare const MAX_SSH_HOST_KEYS: number;
3
+ export declare const MAX_SSH_HOST_KEY_TEXT_LENGTH: number;
4
+ export declare const SSH_FINGERPRINT_PREFIX: string;
5
+ export type SshHostKeyEntry = {
6
+ kind: "fingerprint";
7
+ fingerprint: string;
8
+ } | {
9
+ kind: "publicKey";
10
+ keyType: string;
11
+ keyBase64: string;
12
+ };
13
+ export interface ParsedSshHostKeys {
14
+ entries: Array<SshHostKeyEntry>;
15
+ invalidLines: Array<string>;
16
+ isTooLong: boolean;
17
+ }
18
+ export declare function decodeSshBase64(text: string): Uint8Array | null;
19
+ export declare function readSshKeyBlobType(blob: Uint8Array): string | null;
20
+ export declare function parseSshHostKeys(text: string | undefined): ParsedSshHostKeys;
21
+ export declare function hasSshHostKeys(text: string | undefined): boolean;
22
+ export declare function getSshHostKeyProblem(text: string | undefined): string | null;
@@ -0,0 +1,22 @@
1
+ export declare const SSH_HOST_KEY_TYPES: ReadonlyArray<string>;
2
+ export declare const MAX_SSH_HOST_KEYS: number;
3
+ export declare const MAX_SSH_HOST_KEY_TEXT_LENGTH: number;
4
+ export declare const SSH_FINGERPRINT_PREFIX: string;
5
+ export type SshHostKeyEntry = {
6
+ kind: "fingerprint";
7
+ fingerprint: string;
8
+ } | {
9
+ kind: "publicKey";
10
+ keyType: string;
11
+ keyBase64: string;
12
+ };
13
+ export interface ParsedSshHostKeys {
14
+ entries: Array<SshHostKeyEntry>;
15
+ invalidLines: Array<string>;
16
+ isTooLong: boolean;
17
+ }
18
+ export declare function decodeSshBase64(text: string): Uint8Array | null;
19
+ export declare function readSshKeyBlobType(blob: Uint8Array): string | null;
20
+ export declare function parseSshHostKeys(text: string | undefined): ParsedSshHostKeys;
21
+ export declare function hasSshHostKeys(text: string | undefined): boolean;
22
+ export declare function getSshHostKeyProblem(text: string | undefined): string | null;
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ /*
3
+ * AN SSH STEP'S HOST KEYS: the keys the machine it signs in to may present.
4
+ *
5
+ * An SSH step signed in to whatever answered at its host, without asking
6
+ * whether it was that machine: someone between the Runner and the machine
7
+ * could have taken the step's password, or run its script elsewhere. A step
8
+ * may now name the machine's host keys (SSHStepConfig.hostKey), and the
9
+ * Runner signs in only when the machine presents one of them - after
10
+ * proving it holds that key, which ssh2 checks during the key exchange.
11
+ *
12
+ * Each line names one key, written as people copy it:
13
+ *
14
+ * - its SHA256 fingerprint, as `ssh-keygen -l` and ssh's own "the
15
+ * fingerprint is" print it - "SHA256:" and 43 characters of base64,
16
+ * anywhere in the line, so a whole `ssh-keygen -l` line reads too;
17
+ * - or its public key, as a .pub file, `ssh-keyscan` or a known_hosts
18
+ * line has it: the key's type, then its base64, with anything before
19
+ * (the host names) or after (a comment) left out.
20
+ *
21
+ * Blank lines and lines that start with "#" (what `ssh-keyscan` prints
22
+ * about the server) are skipped. An MD5 fingerprint is not read: ssh has
23
+ * shown SHA256 by default since OpenSSH 6.8.
24
+ *
25
+ * React-free and Node-free: the Steps page reads it to say what is wrong
26
+ * with a line, and the server and the Runner read it before they work out
27
+ * a public key's fingerprint (Common/Utils/Runbook/SshHostKeyFingerprint,
28
+ * which uses Node's crypto).
29
+ */
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ exports.SSH_FINGERPRINT_PREFIX = exports.MAX_SSH_HOST_KEY_TEXT_LENGTH = exports.MAX_SSH_HOST_KEYS = exports.SSH_HOST_KEY_TYPES = void 0;
32
+ exports.decodeSshBase64 = decodeSshBase64;
33
+ exports.readSshKeyBlobType = readSshKeyBlobType;
34
+ exports.parseSshHostKeys = parseSshHostKeys;
35
+ exports.hasSshHostKeys = hasSshHostKeys;
36
+ exports.getSshHostKeyProblem = getSshHostKeyProblem;
37
+ // The host key types a machine presents, as OpenSSH writes them.
38
+ exports.SSH_HOST_KEY_TYPES = [
39
+ "ssh-ed25519",
40
+ "ecdsa-sha2-nistp256",
41
+ "ecdsa-sha2-nistp384",
42
+ "ecdsa-sha2-nistp521",
43
+ "ssh-rsa",
44
+ ];
45
+ // The most host keys a step names: a machine has one of each type, at most.
46
+ exports.MAX_SSH_HOST_KEYS = 16;
47
+ // The most text the field holds: a 16384-bit RSA key is under 3 KB a line.
48
+ exports.MAX_SSH_HOST_KEY_TEXT_LENGTH = 50000;
49
+ exports.SSH_FINGERPRINT_PREFIX = "SHA256:";
50
+ /*
51
+ * A SHA-256 fingerprint: "SHA256:" and the 32 bytes' base64 - 43
52
+ * characters, and the one "=" of padding OpenSSH leaves out. Only base64
53
+ * characters around it, so it is read out of a whole `ssh-keygen -l` line.
54
+ */
55
+ const FINGERPRINT = /^SHA256:([A-Za-z0-9+/]{42}[AEIMQUYcgkosw048])=?$/;
56
+ const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
57
+ // Base64 without the "=" that pads its end (a loop: no pattern backtracks).
58
+ function withoutPadding(text) {
59
+ let end = text.length;
60
+ while (end > 0 && text[end - 1] === "=") {
61
+ end--;
62
+ }
63
+ return text.slice(0, end);
64
+ }
65
+ /*
66
+ * Base64 to bytes, or null when it is not base64. Written out rather than
67
+ * read from atob or Buffer, so the browser and Node read it alike.
68
+ */
69
+ function decodeSshBase64(text) {
70
+ const trimmed = withoutPadding(text);
71
+ if (trimmed.length === 0 || trimmed.length % 4 === 1) {
72
+ return null;
73
+ }
74
+ const bytes = [];
75
+ let buffer = 0;
76
+ let bits = 0;
77
+ for (const character of trimmed) {
78
+ const value = BASE64_ALPHABET.indexOf(character);
79
+ if (value < 0) {
80
+ return null;
81
+ }
82
+ buffer = (buffer << 6) | value;
83
+ bits += 6;
84
+ if (bits >= 8) {
85
+ bits -= 8;
86
+ bytes.push((buffer >> bits) & 0xff);
87
+ }
88
+ }
89
+ return Uint8Array.from(bytes);
90
+ }
91
+ /*
92
+ * The key type the SSH wire format of a public key starts with: a 4-byte
93
+ * length, then that many bytes of name. Null when it does not.
94
+ */
95
+ function readSshKeyBlobType(blob) {
96
+ if (blob.length < 4) {
97
+ return null;
98
+ }
99
+ const length = ((blob[0] << 24) | (blob[1] << 16) | (blob[2] << 8) | blob[3]) >>> 0;
100
+ if (length === 0 || length > 64 || blob.length < 4 + length) {
101
+ return null;
102
+ }
103
+ let name = "";
104
+ for (let index = 4; index < 4 + length; index++) {
105
+ const code = blob[index];
106
+ // A key type is printable ASCII.
107
+ if (code < 0x21 || code > 0x7e) {
108
+ return null;
109
+ }
110
+ name += String.fromCharCode(code);
111
+ }
112
+ return name;
113
+ }
114
+ // The fingerprint a line names, or null.
115
+ function readFingerprint(tokens) {
116
+ for (const token of tokens) {
117
+ const match = FINGERPRINT.exec(token);
118
+ if (match) {
119
+ return `${exports.SSH_FINGERPRINT_PREFIX}${match[1]}`;
120
+ }
121
+ }
122
+ return null;
123
+ }
124
+ // The public key a line holds, or null.
125
+ function readPublicKey(tokens) {
126
+ var _a;
127
+ // A known_hosts marker (@cert-authority, @revoked) is not a host key.
128
+ if ((_a = tokens[0]) === null || _a === void 0 ? void 0 : _a.startsWith("@")) {
129
+ return null;
130
+ }
131
+ for (let index = 0; index < tokens.length - 1; index++) {
132
+ const keyType = tokens[index];
133
+ if (!exports.SSH_HOST_KEY_TYPES.includes(keyType)) {
134
+ continue;
135
+ }
136
+ const keyBase64 = tokens[index + 1];
137
+ const blob = decodeSshBase64(keyBase64);
138
+ // The key says its own type: it must be the one the line says.
139
+ if (!blob || readSshKeyBlobType(blob) !== keyType) {
140
+ return null;
141
+ }
142
+ return { keyType, keyBase64: withoutPadding(keyBase64) };
143
+ }
144
+ return null;
145
+ }
146
+ // The host keys a step's Host key field names, read line by line.
147
+ function parseSshHostKeys(text) {
148
+ const parsed = {
149
+ entries: [],
150
+ invalidLines: [],
151
+ isTooLong: false,
152
+ };
153
+ if (!text) {
154
+ return parsed;
155
+ }
156
+ if (text.length > exports.MAX_SSH_HOST_KEY_TEXT_LENGTH) {
157
+ parsed.isTooLong = true;
158
+ return parsed;
159
+ }
160
+ for (const rawLine of text.split(/\r?\n/)) {
161
+ const line = rawLine.trim();
162
+ if (!line || line.startsWith("#")) {
163
+ continue;
164
+ }
165
+ const tokens = line.split(/\s+/);
166
+ const fingerprint = readFingerprint(tokens);
167
+ if (fingerprint) {
168
+ parsed.entries.push({ kind: "fingerprint", fingerprint });
169
+ continue;
170
+ }
171
+ const publicKey = readPublicKey(tokens);
172
+ if (publicKey) {
173
+ parsed.entries.push(Object.assign({ kind: "publicKey" }, publicKey));
174
+ continue;
175
+ }
176
+ parsed.invalidLines.push(line);
177
+ }
178
+ if (parsed.entries.length > exports.MAX_SSH_HOST_KEYS) {
179
+ parsed.isTooLong = true;
180
+ }
181
+ return parsed;
182
+ }
183
+ // Whether a step names host keys at all - a line that is not one counts.
184
+ function hasSshHostKeys(text) {
185
+ return Boolean(text && text.trim());
186
+ }
187
+ /*
188
+ * Why a step's Host key field cannot be used, or null when every line names
189
+ * a key (or it is empty). Said by the server, in English, when it refuses
190
+ * the step; the Steps page says its own words.
191
+ */
192
+ function getSshHostKeyProblem(text) {
193
+ const parsed = parseSshHostKeys(text);
194
+ if (parsed.isTooLong) {
195
+ return `This SSH step's Host key names more than ${exports.MAX_SSH_HOST_KEYS} keys, so it was not run. A machine has one key of each type: name those.`;
196
+ }
197
+ if (parsed.invalidLines.length > 0) {
198
+ return "This SSH step's Host key has a line that is neither a SHA256 fingerprint nor a public key, so it was not run. Open the step and put the machine's SHA256 fingerprint, or its public key as ssh-keyscan prints it, one per line.";
199
+ }
200
+ return null;
201
+ }
@@ -0,0 +1,10 @@
1
+ import commonJsModule from "./SshHostKey.js";
2
+ export const MAX_SSH_HOST_KEYS = commonJsModule.MAX_SSH_HOST_KEYS;
3
+ export const MAX_SSH_HOST_KEY_TEXT_LENGTH = commonJsModule.MAX_SSH_HOST_KEY_TEXT_LENGTH;
4
+ export const SSH_FINGERPRINT_PREFIX = commonJsModule.SSH_FINGERPRINT_PREFIX;
5
+ export const SSH_HOST_KEY_TYPES = commonJsModule.SSH_HOST_KEY_TYPES;
6
+ export const decodeSshBase64 = commonJsModule.decodeSshBase64;
7
+ export const getSshHostKeyProblem = commonJsModule.getSshHostKeyProblem;
8
+ export const hasSshHostKeys = commonJsModule.hasSshHostKeys;
9
+ export const parseSshHostKeys = commonJsModule.parseSshHostKeys;
10
+ export const readSshKeyBlobType = commonJsModule.readSshKeyBlobType;
@@ -73,9 +73,8 @@ var CodeWorkerKind;
73
73
  // One of the repository's project's own Runners (a Runner row).
74
74
  CodeWorkerKind["ProjectRunner"] = "project-runner";
75
75
  /*
76
- * A global Runner for code: an AI agent with no project, which serves
77
- * every project (the installation's bundled Runner, OneUptime Cloud's
78
- * fleet).
76
+ * A global Runner: a Runner row with no project (isGlobalRunner), which
77
+ * OneUptime runs for every project.
79
78
  */
80
79
  CodeWorkerKind["GlobalRunner"] = "global-runner";
81
80
  // An AI agent of the project's own, from before Runners.
@@ -0,0 +1 @@
1
+ export declare const GLOBAL_AI_AGENT_GONE_MESSAGE: string;
@@ -0,0 +1 @@
1
+ export declare const GLOBAL_AI_AGENT_GONE_MESSAGE: string;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GLOBAL_AI_AGENT_GONE_MESSAGE = void 0;
4
+ /*
5
+ * GLOBAL AI AGENTS ARE GONE
6
+ *
7
+ * A global AI agent - an AI agent with no project - was either the shared
8
+ * Runner's registration or one a master admin added on the Admin
9
+ * Dashboard's Global AI Agents page and started a Runner with. Global
10
+ * Runners took the work they did (OneUptime AI's code fixes), and the
11
+ * shared Runner, the page and the agents' registration went with them.
12
+ *
13
+ * Their rows stay in the database, unused: a global AI agent's id and key
14
+ * prove nothing on the code-fix routes (CodeFixAgentAuth), and its heartbeat
15
+ * (/api/ai-agent/alive) is answered with this, which a Runner started with
16
+ * them logs (RegisterRunner), so whoever runs it learns what to start
17
+ * instead of watching every request fail.
18
+ */
19
+ exports.GLOBAL_AI_AGENT_GONE_MESSAGE = "This is a global AI agent, which OneUptime no longer uses: global Runners do its AI code fixes now. In the Admin Dashboard, open Settings > Global Runners, create a global Runner, and start this Runner with that Runner's ID and key instead.";
@@ -0,0 +1,2 @@
1
+ import commonJsModule from "./GlobalAIAgentsGone.js";
2
+ export const GLOBAL_AI_AGENT_GONE_MESSAGE = commonJsModule.GLOBAL_AI_AGENT_GONE_MESSAGE;
@@ -1,6 +1,7 @@
1
1
  import RunbookStepType from "../Runbook/RunbookStepType.mjs";
2
2
  import { TimeoutBounds } from "../Runbook/RunbookStepTimeout.mjs";
3
3
  export declare const GLOBAL_RUNNER_STEP_TYPES: ReadonlyArray<RunbookStepType>;
4
+ export declare const CODE_AGENT_COMMAND_TOOL_NAME: string;
4
5
  export declare function canGlobalRunnersRunStepType(stepType: unknown): boolean;
5
6
  export declare const GLOBAL_RUNNER_MAX_EXECUTION_TIMEOUT_IN_MS: number;
6
7
  export declare const GLOBAL_RUNNER_STEP_EXECUTION_TIMEOUT_BOUNDS: TimeoutBounds;
@@ -1,6 +1,7 @@
1
1
  import RunbookStepType from "../Runbook/RunbookStepType";
2
2
  import { TimeoutBounds } from "../Runbook/RunbookStepTimeout";
3
3
  export declare const GLOBAL_RUNNER_STEP_TYPES: ReadonlyArray<RunbookStepType>;
4
+ export declare const CODE_AGENT_COMMAND_TOOL_NAME: string;
4
5
  export declare function canGlobalRunnersRunStepType(stepType: unknown): boolean;
5
6
  export declare const GLOBAL_RUNNER_MAX_EXECUTION_TIMEOUT_IN_MS: number;
6
7
  export declare const GLOBAL_RUNNER_STEP_EXECUTION_TIMEOUT_BOUNDS: TimeoutBounds;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MAX_GLOBAL_RUNNER_JOBS_PER_PROJECT = exports.GLOBAL_RUNNER_STEP_EXECUTION_TIMEOUT_BOUNDS = exports.GLOBAL_RUNNER_MAX_EXECUTION_TIMEOUT_IN_MS = exports.GLOBAL_RUNNER_STEP_TYPES = void 0;
6
+ exports.MAX_GLOBAL_RUNNER_JOBS_PER_PROJECT = exports.GLOBAL_RUNNER_STEP_EXECUTION_TIMEOUT_BOUNDS = exports.GLOBAL_RUNNER_MAX_EXECUTION_TIMEOUT_IN_MS = exports.CODE_AGENT_COMMAND_TOOL_NAME = exports.GLOBAL_RUNNER_STEP_TYPES = void 0;
7
7
  exports.canGlobalRunnersRunStepType = canGlobalRunnersRunStepType;
8
8
  exports.clampGlobalRunnerExecutionTimeoutInMs = clampGlobalRunnerExecutionTimeoutInMs;
9
9
  const RunbookStepType_1 = __importDefault(require("../Runbook/RunbookStepType"));
@@ -24,6 +24,18 @@ const RunbookStepTimeout_1 = require("../Runbook/RunbookStepTimeout");
24
24
  * guard on the strict policy: public internet addresses only, never a
25
25
  * private, loopback or link-local address or a cloud metadata endpoint -
26
26
  * so never a project's network, nor the network the Runner sits in.
27
+ * - OneUptime AI's code fixes, in every code repository on the Global
28
+ * Runner (Types/Runner/CodeRepositoryRunner), one at a time, each in a
29
+ * workspace of its own that is deleted when the fix ends. The code agent
30
+ * writes the fix with its file tools alone: none of the repository's own
31
+ * commands (setup, build, test) and no command a model composes ever
32
+ * runs there. The server never hands a global Runner either - a
33
+ * repository's commands, or the command tool to the model
34
+ * (CodeFixAgentAuth) - and the Runner refuses both
35
+ * (Config.runsProjectAuthoredCommands). A global Runner acts only for
36
+ * the run it claimed and is handed a repository's token only for that
37
+ * run (CodeFixAgentAuth.deniesAccessToRun); a GitHub repository's token
38
+ * covers that one repository and is revoked when the fix ends.
27
39
  *
28
40
  * Bash, SSH and Kubernetes steps never run on a global Runner. A shell
29
41
  * cannot be kept apart from the other projects' steps on the same host
@@ -49,6 +61,14 @@ const RunbookStepTimeout_1 = require("../Runbook/RunbookStepTimeout");
49
61
  exports.GLOBAL_RUNNER_STEP_TYPES = [
50
62
  RunbookStepType_1.default.JavaScript,
51
63
  ];
64
+ /*
65
+ * The code agent's tool that runs a shell command in the repository
66
+ * (packages/Runner InHouseCodeAgent). Never offered on a global Runner: the
67
+ * Runner leaves it out and refuses the call, and the server takes it out of
68
+ * the tools the model is offered for a global Runner's run
69
+ * (CodeFixAgentAuth.getOfferedTools).
70
+ */
71
+ exports.CODE_AGENT_COMMAND_TOOL_NAME = "run_command";
52
72
  // Whether a global Runner may run a step of this type.
53
73
  function canGlobalRunnersRunStepType(stepType) {
54
74
  return (typeof stepType === "string" &&
@@ -1,4 +1,5 @@
1
1
  import commonJsModule from "./GlobalRunnerWork.js";
2
+ export const CODE_AGENT_COMMAND_TOOL_NAME = commonJsModule.CODE_AGENT_COMMAND_TOOL_NAME;
2
3
  export const GLOBAL_RUNNER_MAX_EXECUTION_TIMEOUT_IN_MS = commonJsModule.GLOBAL_RUNNER_MAX_EXECUTION_TIMEOUT_IN_MS;
3
4
  export const GLOBAL_RUNNER_STEP_EXECUTION_TIMEOUT_BOUNDS = commonJsModule.GLOBAL_RUNNER_STEP_EXECUTION_TIMEOUT_BOUNDS;
4
5
  export const GLOBAL_RUNNER_STEP_TYPES = commonJsModule.GLOBAL_RUNNER_STEP_TYPES;
@@ -0,0 +1,31 @@
1
+ import SsoProviderType from "./SsoProviderType.mjs";
2
+ export interface SsoSignInProvider {
3
+ type: SsoProviderType;
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ }
8
+ export interface SignInMethods {
9
+ isSsoRequired: boolean;
10
+ ssoProviders: Array<SsoSignInProvider>;
11
+ hasProjectSsoProviders: boolean;
12
+ }
13
+ export interface ProjectSignInMethods {
14
+ ssoProviders: Array<SsoSignInProvider>;
15
+ }
16
+ export declare const SSO_REQUIRED_SIGN_IN_MESSAGE: string;
17
+ export declare const SSO_REQUIRED_SIGN_UP_MESSAGE: string;
18
+ export declare const MASTER_ADMIN_SIGN_IN_ROUTE: string;
19
+ export declare const MASTER_ADMIN_SIGN_IN_PATH: string;
20
+ export declare const GLOBAL_SSO_PROVIDER_TYPES: ReadonlyArray<SsoProviderType>;
21
+ export declare const PROJECT_SSO_PROVIDER_TYPES: ReadonlyArray<SsoProviderType>;
22
+ export default class SignInMethodsUtil {
23
+ static parseProviders(value: unknown, allowedTypes?: ReadonlyArray<SsoProviderType>): Array<SsoSignInProvider>;
24
+ static parse(value: unknown): SignInMethods | null;
25
+ static parseProjectMethods(value: unknown): ProjectSignInMethods;
26
+ static getSignInRoute(data: {
27
+ provider: SsoSignInProvider;
28
+ projectId?: string | undefined;
29
+ }): string | null;
30
+ static hasOwnDescription(provider: SsoSignInProvider): boolean;
31
+ }
@@ -0,0 +1,31 @@
1
+ import SsoProviderType from "./SsoProviderType";
2
+ export interface SsoSignInProvider {
3
+ type: SsoProviderType;
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ }
8
+ export interface SignInMethods {
9
+ isSsoRequired: boolean;
10
+ ssoProviders: Array<SsoSignInProvider>;
11
+ hasProjectSsoProviders: boolean;
12
+ }
13
+ export interface ProjectSignInMethods {
14
+ ssoProviders: Array<SsoSignInProvider>;
15
+ }
16
+ export declare const SSO_REQUIRED_SIGN_IN_MESSAGE: string;
17
+ export declare const SSO_REQUIRED_SIGN_UP_MESSAGE: string;
18
+ export declare const MASTER_ADMIN_SIGN_IN_ROUTE: string;
19
+ export declare const MASTER_ADMIN_SIGN_IN_PATH: string;
20
+ export declare const GLOBAL_SSO_PROVIDER_TYPES: ReadonlyArray<SsoProviderType>;
21
+ export declare const PROJECT_SSO_PROVIDER_TYPES: ReadonlyArray<SsoProviderType>;
22
+ export default class SignInMethodsUtil {
23
+ static parseProviders(value: unknown, allowedTypes?: ReadonlyArray<SsoProviderType>): Array<SsoSignInProvider>;
24
+ static parse(value: unknown): SignInMethods | null;
25
+ static parseProjectMethods(value: unknown): ProjectSignInMethods;
26
+ static getSignInRoute(data: {
27
+ provider: SsoSignInProvider;
28
+ projectId?: string | undefined;
29
+ }): string | null;
30
+ static hasOwnDescription(provider: SsoSignInProvider): boolean;
31
+ }