charness 3.9.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/DEVELOPMENT.md +4 -1
  3. package/SETUP.md +6 -4
  4. package/agent-plugin/README.md +2 -2
  5. package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +1 -1
  6. package/agent-plugin/skills/charness-manager/SKILL.md +8 -4
  7. package/dist/bot.d.ts +27 -18
  8. package/dist/bot.d.ts.map +1 -1
  9. package/dist/bot.js +217 -99
  10. package/dist/bot.js.map +1 -1
  11. package/dist/connectors/jira/adf.d.ts.map +1 -1
  12. package/dist/connectors/jira/adf.js +2 -3
  13. package/dist/connectors/jira/adf.js.map +1 -1
  14. package/dist/connectors/jira/inbound.d.ts +25 -1
  15. package/dist/connectors/jira/inbound.d.ts.map +1 -1
  16. package/dist/connectors/jira/inbound.js +74 -2
  17. package/dist/connectors/jira/inbound.js.map +1 -1
  18. package/dist/connectors/jira/issueContext.d.ts +11 -2
  19. package/dist/connectors/jira/issueContext.d.ts.map +1 -1
  20. package/dist/connectors/jira/issueContext.js +22 -2
  21. package/dist/connectors/jira/issueContext.js.map +1 -1
  22. package/dist/connectors/jira/prompt.d.ts +12 -2
  23. package/dist/connectors/jira/prompt.d.ts.map +1 -1
  24. package/dist/connectors/jira/prompt.js +59 -5
  25. package/dist/connectors/jira/prompt.js.map +1 -1
  26. package/dist/connectors/telegram/commands/botCore.d.ts +16 -0
  27. package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
  28. package/dist/connectors/telegram/commands/runners.d.ts +10 -1
  29. package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
  30. package/dist/connectors/telegram/commands/runners.js +75 -13
  31. package/dist/connectors/telegram/commands/runners.js.map +1 -1
  32. package/dist/connectors/telegram/runnerLinkNotices.d.ts +24 -0
  33. package/dist/connectors/telegram/runnerLinkNotices.d.ts.map +1 -0
  34. package/dist/connectors/telegram/runnerLinkNotices.js +95 -0
  35. package/dist/connectors/telegram/runnerLinkNotices.js.map +1 -0
  36. package/dist/connectors/telegram/runnerPairingMessages.d.ts +9 -0
  37. package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
  38. package/dist/connectors/telegram/runnerPairingMessages.js +17 -1
  39. package/dist/connectors/telegram/runnerPairingMessages.js.map +1 -1
  40. package/dist/i18n/de.d.ts.map +1 -1
  41. package/dist/i18n/de.js +19 -0
  42. package/dist/i18n/de.js.map +1 -1
  43. package/dist/i18n/en.d.ts.map +1 -1
  44. package/dist/i18n/en.js +19 -0
  45. package/dist/i18n/en.js.map +1 -1
  46. package/dist/i18n/es.d.ts.map +1 -1
  47. package/dist/i18n/es.js +19 -0
  48. package/dist/i18n/es.js.map +1 -1
  49. package/dist/i18n/fr.d.ts.map +1 -1
  50. package/dist/i18n/fr.js +19 -0
  51. package/dist/i18n/fr.js.map +1 -1
  52. package/dist/i18n/hi.d.ts.map +1 -1
  53. package/dist/i18n/hi.js +19 -0
  54. package/dist/i18n/hi.js.map +1 -1
  55. package/dist/i18n/ja.d.ts.map +1 -1
  56. package/dist/i18n/ja.js +19 -0
  57. package/dist/i18n/ja.js.map +1 -1
  58. package/dist/i18n/ka.d.ts.map +1 -1
  59. package/dist/i18n/ka.js +19 -0
  60. package/dist/i18n/ka.js.map +1 -1
  61. package/dist/i18n/pt.d.ts.map +1 -1
  62. package/dist/i18n/pt.js +19 -0
  63. package/dist/i18n/pt.js.map +1 -1
  64. package/dist/i18n/ru.d.ts.map +1 -1
  65. package/dist/i18n/ru.js +19 -0
  66. package/dist/i18n/ru.js.map +1 -1
  67. package/dist/i18n/uk.d.ts.map +1 -1
  68. package/dist/i18n/uk.js +19 -0
  69. package/dist/i18n/uk.js.map +1 -1
  70. package/dist/i18n/uz.d.ts.map +1 -1
  71. package/dist/i18n/uz.js +19 -0
  72. package/dist/i18n/uz.js.map +1 -1
  73. package/dist/i18n/zh.d.ts.map +1 -1
  74. package/dist/i18n/zh.js +19 -0
  75. package/dist/i18n/zh.js.map +1 -1
  76. package/dist/outputTrace.d.ts.map +1 -1
  77. package/dist/outputTrace.js +2 -9
  78. package/dist/outputTrace.js.map +1 -1
  79. package/dist/rateLimiter.d.ts +3 -1
  80. package/dist/rateLimiter.d.ts.map +1 -1
  81. package/dist/rateLimiter.js +3 -1
  82. package/dist/rateLimiter.js.map +1 -1
  83. package/dist/remoteRun/cliArgs.d.ts +6 -1
  84. package/dist/remoteRun/cliArgs.d.ts.map +1 -1
  85. package/dist/remoteRun/cliArgs.js +39 -2
  86. package/dist/remoteRun/cliArgs.js.map +1 -1
  87. package/dist/remoteRun/exitCodes.d.ts +12 -2
  88. package/dist/remoteRun/exitCodes.d.ts.map +1 -1
  89. package/dist/remoteRun/exitCodes.js +3 -0
  90. package/dist/remoteRun/exitCodes.js.map +1 -1
  91. package/dist/remoteRun/foreground.d.ts +13 -0
  92. package/dist/remoteRun/foreground.d.ts.map +1 -1
  93. package/dist/remoteRun/foreground.js +15 -2
  94. package/dist/remoteRun/foreground.js.map +1 -1
  95. package/dist/remoteRun/heldBackNotice.d.ts +7 -0
  96. package/dist/remoteRun/heldBackNotice.d.ts.map +1 -0
  97. package/dist/remoteRun/heldBackNotice.js +92 -0
  98. package/dist/remoteRun/heldBackNotice.js.map +1 -0
  99. package/dist/remoteRun/interrupts.d.ts +6 -2
  100. package/dist/remoteRun/interrupts.d.ts.map +1 -1
  101. package/dist/remoteRun/interrupts.js +18 -3
  102. package/dist/remoteRun/interrupts.js.map +1 -1
  103. package/dist/remoteRun/leaseTiming.d.ts +1 -2
  104. package/dist/remoteRun/leaseTiming.d.ts.map +1 -1
  105. package/dist/remoteRun/leaseTiming.js +3 -17
  106. package/dist/remoteRun/leaseTiming.js.map +1 -1
  107. package/dist/remoteRun/output.d.ts +16 -1
  108. package/dist/remoteRun/output.d.ts.map +1 -1
  109. package/dist/remoteRun/output.js +28 -2
  110. package/dist/remoteRun/output.js.map +1 -1
  111. package/dist/remoteRun/probe.d.ts +40 -2
  112. package/dist/remoteRun/probe.d.ts.map +1 -1
  113. package/dist/remoteRun/probe.js +58 -2
  114. package/dist/remoteRun/probe.js.map +1 -1
  115. package/dist/remoteRun/project.d.ts +2 -2
  116. package/dist/remoteRun/project.d.ts.map +1 -1
  117. package/dist/remoteRun/project.js +5 -4
  118. package/dist/remoteRun/project.js.map +1 -1
  119. package/dist/remoteRun/remoteRunCli.d.ts +1 -1
  120. package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
  121. package/dist/remoteRun/remoteRunCli.js +6 -3
  122. package/dist/remoteRun/remoteRunCli.js.map +1 -1
  123. package/dist/remoteRun/runnerWait.d.ts +3 -3
  124. package/dist/remoteRun/runnerWait.d.ts.map +1 -1
  125. package/dist/remoteRun/runnerWait.js +12 -6
  126. package/dist/remoteRun/runnerWait.js.map +1 -1
  127. package/dist/remoteRun/runnerWaitTiming.d.ts +1 -1
  128. package/dist/remoteRun/runnerWaitTiming.d.ts.map +1 -1
  129. package/dist/remoteRun/runnerWaitTiming.js +3 -16
  130. package/dist/remoteRun/runnerWaitTiming.js.map +1 -1
  131. package/dist/remoteRun/runners.d.ts +16 -3
  132. package/dist/remoteRun/runners.d.ts.map +1 -1
  133. package/dist/remoteRun/runners.js +42 -4
  134. package/dist/remoteRun/runners.js.map +1 -1
  135. package/dist/remoteRun/sendPlan.d.ts +11 -1
  136. package/dist/remoteRun/sendPlan.d.ts.map +1 -1
  137. package/dist/remoteRun/sendPlan.js +29 -5
  138. package/dist/remoteRun/sendPlan.js.map +1 -1
  139. package/dist/remoteRun/submit.d.ts.map +1 -1
  140. package/dist/remoteRun/submit.js +13 -3
  141. package/dist/remoteRun/submit.js.map +1 -1
  142. package/dist/requests/requestHeader.d.ts +2 -1
  143. package/dist/requests/requestHeader.d.ts.map +1 -1
  144. package/dist/requests/requestHeader.js +6 -2
  145. package/dist/requests/requestHeader.js.map +1 -1
  146. package/dist/requests/storedPromptRefresh.d.ts +16 -0
  147. package/dist/requests/storedPromptRefresh.d.ts.map +1 -0
  148. package/dist/requests/storedPromptRefresh.js +36 -0
  149. package/dist/requests/storedPromptRefresh.js.map +1 -0
  150. package/dist/runnerUtility/adminService.d.ts +30 -2
  151. package/dist/runnerUtility/adminService.d.ts.map +1 -1
  152. package/dist/runnerUtility/adminService.js +104 -6
  153. package/dist/runnerUtility/adminService.js.map +1 -1
  154. package/dist/runnerUtility/appInstall.d.ts +13 -4
  155. package/dist/runnerUtility/appInstall.d.ts.map +1 -1
  156. package/dist/runnerUtility/appInstall.js +46 -19
  157. package/dist/runnerUtility/appInstall.js.map +1 -1
  158. package/dist/runnerUtility/appUpdate.js +1 -1
  159. package/dist/runnerUtility/appUpdate.js.map +1 -1
  160. package/dist/runnerUtility/execEnv.d.ts +2 -0
  161. package/dist/runnerUtility/execEnv.d.ts.map +1 -1
  162. package/dist/runnerUtility/execEnv.js +6 -2
  163. package/dist/runnerUtility/execEnv.js.map +1 -1
  164. package/dist/runnerUtility/guiAgent.d.ts +126 -0
  165. package/dist/runnerUtility/guiAgent.d.ts.map +1 -0
  166. package/dist/runnerUtility/guiAgent.js +591 -0
  167. package/dist/runnerUtility/guiAgent.js.map +1 -0
  168. package/dist/runnerUtility/guiAgentHeal.d.ts +128 -0
  169. package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -0
  170. package/dist/runnerUtility/guiAgentHeal.js +284 -0
  171. package/dist/runnerUtility/guiAgentHeal.js.map +1 -0
  172. package/dist/runnerUtility/homeFolders.d.ts +33 -0
  173. package/dist/runnerUtility/homeFolders.d.ts.map +1 -0
  174. package/dist/runnerUtility/homeFolders.js +158 -0
  175. package/dist/runnerUtility/homeFolders.js.map +1 -0
  176. package/dist/runnerUtility/hubClient.d.ts +12 -2
  177. package/dist/runnerUtility/hubClient.d.ts.map +1 -1
  178. package/dist/runnerUtility/hubClient.js +24 -3
  179. package/dist/runnerUtility/hubClient.js.map +1 -1
  180. package/dist/runnerUtility/iosCheck.d.ts +7 -1
  181. package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
  182. package/dist/runnerUtility/iosCheck.js +14 -5
  183. package/dist/runnerUtility/iosCheck.js.map +1 -1
  184. package/dist/runnerUtility/isolatedCommand.d.ts +33 -0
  185. package/dist/runnerUtility/isolatedCommand.d.ts.map +1 -0
  186. package/dist/runnerUtility/isolatedCommand.js +139 -0
  187. package/dist/runnerUtility/isolatedCommand.js.map +1 -0
  188. package/dist/runnerUtility/keepAwake.d.ts +67 -0
  189. package/dist/runnerUtility/keepAwake.d.ts.map +1 -0
  190. package/dist/runnerUtility/keepAwake.js +211 -0
  191. package/dist/runnerUtility/keepAwake.js.map +1 -0
  192. package/dist/runnerUtility/lidPollTiming.d.ts +11 -0
  193. package/dist/runnerUtility/lidPollTiming.d.ts.map +1 -0
  194. package/dist/runnerUtility/lidPollTiming.js +18 -0
  195. package/dist/runnerUtility/lidPollTiming.js.map +1 -0
  196. package/dist/runnerUtility/lidState.d.ts +57 -0
  197. package/dist/runnerUtility/lidState.d.ts.map +1 -0
  198. package/dist/runnerUtility/lidState.js +195 -0
  199. package/dist/runnerUtility/lidState.js.map +1 -0
  200. package/dist/runnerUtility/linkLoop.d.ts +5 -0
  201. package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
  202. package/dist/runnerUtility/linkLoop.js +37 -1
  203. package/dist/runnerUtility/linkLoop.js.map +1 -1
  204. package/dist/runnerUtility/packageManagerShims.d.ts +44 -0
  205. package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -0
  206. package/dist/runnerUtility/packageManagerShims.js +130 -0
  207. package/dist/runnerUtility/packageManagerShims.js.map +1 -0
  208. package/dist/runnerUtility/progress.d.ts +43 -0
  209. package/dist/runnerUtility/progress.d.ts.map +1 -0
  210. package/dist/runnerUtility/progress.js +78 -0
  211. package/dist/runnerUtility/progress.js.map +1 -0
  212. package/dist/runnerUtility/pueueDaemon.d.ts +8 -4
  213. package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
  214. package/dist/runnerUtility/pueueDaemon.js +12 -7
  215. package/dist/runnerUtility/pueueDaemon.js.map +1 -1
  216. package/dist/runnerUtility/rootServiceCli.d.ts +23 -3
  217. package/dist/runnerUtility/rootServiceCli.d.ts.map +1 -1
  218. package/dist/runnerUtility/rootServiceCli.js +56 -10
  219. package/dist/runnerUtility/rootServiceCli.js.map +1 -1
  220. package/dist/runnerUtility/runnerCli.d.ts +1 -0
  221. package/dist/runnerUtility/runnerCli.d.ts.map +1 -1
  222. package/dist/runnerUtility/runnerCli.js +14 -7
  223. package/dist/runnerUtility/runnerCli.js.map +1 -1
  224. package/dist/runnerUtility/runnerCommands.d.ts +45 -0
  225. package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
  226. package/dist/runnerUtility/runnerCommands.js +188 -21
  227. package/dist/runnerUtility/runnerCommands.js.map +1 -1
  228. package/dist/runnerUtility/runnerHome.d.ts +8 -0
  229. package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
  230. package/dist/runnerUtility/runnerHome.js +7 -0
  231. package/dist/runnerUtility/runnerHome.js.map +1 -1
  232. package/dist/runnerUtility/serviceCommon.d.ts +4 -0
  233. package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
  234. package/dist/runnerUtility/serviceCommon.js +8 -1
  235. package/dist/runnerUtility/serviceCommon.js.map +1 -1
  236. package/dist/runnerUtility/serviceManager.d.ts +5 -2
  237. package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
  238. package/dist/runnerUtility/serviceManager.js +40 -17
  239. package/dist/runnerUtility/serviceManager.js.map +1 -1
  240. package/dist/runnerUtility/serviceUnits.d.ts +11 -0
  241. package/dist/runnerUtility/serviceUnits.d.ts.map +1 -1
  242. package/dist/runnerUtility/serviceUnits.js +8 -2
  243. package/dist/runnerUtility/serviceUnits.js.map +1 -1
  244. package/dist/runnerUtility/simulatorSilencer.d.ts +55 -0
  245. package/dist/runnerUtility/simulatorSilencer.d.ts.map +1 -0
  246. package/dist/runnerUtility/simulatorSilencer.js +203 -0
  247. package/dist/runnerUtility/simulatorSilencer.js.map +1 -0
  248. package/dist/runnerUtility/stopSignals.d.ts +10 -0
  249. package/dist/runnerUtility/stopSignals.d.ts.map +1 -0
  250. package/dist/runnerUtility/stopSignals.js +27 -0
  251. package/dist/runnerUtility/stopSignals.js.map +1 -0
  252. package/dist/runnerUtility/versionPollTiming.d.ts +2 -3
  253. package/dist/runnerUtility/versionPollTiming.d.ts.map +1 -1
  254. package/dist/runnerUtility/versionPollTiming.js +4 -18
  255. package/dist/runnerUtility/versionPollTiming.js.map +1 -1
  256. package/dist/runners/bootstrapLine.d.ts.map +1 -1
  257. package/dist/runners/bootstrapLine.js +35 -19
  258. package/dist/runners/bootstrapLine.js.map +1 -1
  259. package/dist/runners/gate.d.ts.map +1 -1
  260. package/dist/runners/gate.js +28 -1
  261. package/dist/runners/gate.js.map +1 -1
  262. package/dist/runners/gateLink.d.ts +7 -0
  263. package/dist/runners/gateLink.d.ts.map +1 -1
  264. package/dist/runners/gateLink.js +36 -3
  265. package/dist/runners/gateLink.js.map +1 -1
  266. package/dist/runners/gateProtocol.d.ts +37 -2
  267. package/dist/runners/gateProtocol.d.ts.map +1 -1
  268. package/dist/runners/gateProtocol.js +45 -4
  269. package/dist/runners/gateProtocol.js.map +1 -1
  270. package/dist/runners/hubPackage.d.ts +2 -1
  271. package/dist/runners/hubPackage.d.ts.map +1 -1
  272. package/dist/runners/hubPackage.js +32 -11
  273. package/dist/runners/hubPackage.js.map +1 -1
  274. package/dist/runners/hubPairing.d.ts +1 -1
  275. package/dist/runners/hubPairing.d.ts.map +1 -1
  276. package/dist/runners/hubPairing.js +8 -1
  277. package/dist/runners/hubPairing.js.map +1 -1
  278. package/dist/runners/hubPaths.d.ts +2 -0
  279. package/dist/runners/hubPaths.d.ts.map +1 -1
  280. package/dist/runners/hubPaths.js +1 -1
  281. package/dist/runners/hubPaths.js.map +1 -1
  282. package/dist/runners/linkConcern.d.ts +75 -0
  283. package/dist/runners/linkConcern.d.ts.map +1 -0
  284. package/dist/runners/linkConcern.js +85 -0
  285. package/dist/runners/linkConcern.js.map +1 -0
  286. package/dist/runners/linkControl.d.ts +25 -1
  287. package/dist/runners/linkControl.d.ts.map +1 -1
  288. package/dist/runners/linkControl.js +46 -4
  289. package/dist/runners/linkControl.js.map +1 -1
  290. package/dist/runners/pairingTiming.d.ts +2 -3
  291. package/dist/runners/pairingTiming.d.ts.map +1 -1
  292. package/dist/runners/pairingTiming.js +4 -18
  293. package/dist/runners/pairingTiming.js.map +1 -1
  294. package/dist/runners/runnerLock.d.ts +112 -0
  295. package/dist/runners/runnerLock.d.ts.map +1 -0
  296. package/dist/runners/runnerLock.js +292 -0
  297. package/dist/runners/runnerLock.js.map +1 -0
  298. package/dist/runners/runnersCli.d.ts +6 -3
  299. package/dist/runners/runnersCli.d.ts.map +1 -1
  300. package/dist/runners/runnersCli.js +33 -6
  301. package/dist/runners/runnersCli.js.map +1 -1
  302. package/dist/runners/runnersList.d.ts +3 -3
  303. package/dist/runners/runnersList.d.ts.map +1 -1
  304. package/dist/runners/runnersList.js +9 -2
  305. package/dist/runners/runnersList.js.map +1 -1
  306. package/dist/runners/runnersOverview.d.ts +29 -3
  307. package/dist/runners/runnersOverview.d.ts.map +1 -1
  308. package/dist/runners/runnersOverview.js +71 -6
  309. package/dist/runners/runnersOverview.js.map +1 -1
  310. package/dist/runners/serviceRemoval.d.ts +43 -0
  311. package/dist/runners/serviceRemoval.d.ts.map +1 -0
  312. package/dist/runners/serviceRemoval.js +114 -0
  313. package/dist/runners/serviceRemoval.js.map +1 -0
  314. package/dist/scheduler/checkStatus.d.ts +78 -0
  315. package/dist/scheduler/checkStatus.d.ts.map +1 -0
  316. package/dist/scheduler/checkStatus.js +122 -0
  317. package/dist/scheduler/checkStatus.js.map +1 -0
  318. package/dist/scheduler/delivery.d.ts +27 -1
  319. package/dist/scheduler/delivery.d.ts.map +1 -1
  320. package/dist/scheduler/delivery.js +83 -6
  321. package/dist/scheduler/delivery.js.map +1 -1
  322. package/dist/scheduler/mcpSurface.d.ts +2 -0
  323. package/dist/scheduler/mcpSurface.d.ts.map +1 -1
  324. package/dist/scheduler/mcpSurface.js +62 -10
  325. package/dist/scheduler/mcpSurface.js.map +1 -1
  326. package/dist/scheduler/store.d.ts +16 -1
  327. package/dist/scheduler/store.d.ts.map +1 -1
  328. package/dist/scheduler/store.js +33 -0
  329. package/dist/scheduler/store.js.map +1 -1
  330. package/dist/scheduler/types.d.ts +22 -0
  331. package/dist/scheduler/types.d.ts.map +1 -1
  332. package/dist/scheduler/unbindPause.d.ts +27 -0
  333. package/dist/scheduler/unbindPause.d.ts.map +1 -0
  334. package/dist/scheduler/unbindPause.js +21 -0
  335. package/dist/scheduler/unbindPause.js.map +1 -0
  336. package/dist/scheduler/workerActivity.d.ts +25 -0
  337. package/dist/scheduler/workerActivity.d.ts.map +1 -0
  338. package/dist/scheduler/workerActivity.js +195 -0
  339. package/dist/scheduler/workerActivity.js.map +1 -0
  340. package/dist/scheduler/workerWatch.d.ts +14 -2
  341. package/dist/scheduler/workerWatch.d.ts.map +1 -1
  342. package/dist/scheduler/workerWatch.js +15 -3
  343. package/dist/scheduler/workerWatch.js.map +1 -1
  344. package/dist/state.d.ts +8 -0
  345. package/dist/state.d.ts.map +1 -1
  346. package/dist/state.js +30 -0
  347. package/dist/state.js.map +1 -1
  348. package/dist/stt/sttRuntime.d.ts.map +1 -1
  349. package/dist/stt/sttRuntime.js +8 -1
  350. package/dist/stt/sttRuntime.js.map +1 -1
  351. package/dist/stt/sttSettings.d.ts +56 -6
  352. package/dist/stt/sttSettings.d.ts.map +1 -1
  353. package/dist/stt/sttSettings.js +128 -7
  354. package/dist/stt/sttSettings.js.map +1 -1
  355. package/dist/stt/sttSidecarOwner.d.ts +13 -5
  356. package/dist/stt/sttSidecarOwner.d.ts.map +1 -1
  357. package/dist/stt/sttSidecarOwner.js +72 -31
  358. package/dist/stt/sttSidecarOwner.js.map +1 -1
  359. package/dist/stt/transcribeChain.d.ts +23 -1
  360. package/dist/stt/transcribeChain.d.ts.map +1 -1
  361. package/dist/stt/transcribeChain.js +59 -4
  362. package/dist/stt/transcribeChain.js.map +1 -1
  363. package/dist/testTimings.d.ts +4 -2
  364. package/dist/testTimings.d.ts.map +1 -1
  365. package/dist/testTimings.js +7 -1
  366. package/dist/testTimings.js.map +1 -1
  367. package/dist/testTimingsSeam.d.ts +10 -0
  368. package/dist/testTimingsSeam.d.ts.map +1 -0
  369. package/dist/testTimingsSeam.js +29 -0
  370. package/dist/testTimingsSeam.js.map +1 -0
  371. package/dist/utils/runnersScreenPlan.d.ts +14 -0
  372. package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
  373. package/dist/utils/runnersScreenPlan.js +49 -5
  374. package/dist/utils/runnersScreenPlan.js.map +1 -1
  375. package/dist/utils/surrogateSafeCut.d.ts +14 -0
  376. package/dist/utils/surrogateSafeCut.d.ts.map +1 -0
  377. package/dist/utils/surrogateSafeCut.js +30 -0
  378. package/dist/utils/surrogateSafeCut.js.map +1 -0
  379. package/dist/utils/telegramError.d.ts +7 -0
  380. package/dist/utils/telegramError.d.ts.map +1 -1
  381. package/dist/utils/telegramError.js +15 -0
  382. package/dist/utils/telegramError.js.map +1 -1
  383. package/dist/utils/transientFrames.d.ts +51 -6
  384. package/dist/utils/transientFrames.d.ts.map +1 -1
  385. package/dist/utils/transientFrames.js +52 -2
  386. package/dist/utils/transientFrames.js.map +1 -1
  387. package/dist/voiceProgressNote.d.ts +73 -0
  388. package/dist/voiceProgressNote.d.ts.map +1 -0
  389. package/dist/voiceProgressNote.js +142 -0
  390. package/dist/voiceProgressNote.js.map +1 -0
  391. package/package.json +4 -1
  392. package/remoteRun/pickNode.sh +65 -0
  393. package/remoteRun/runner-package-lock.json +59 -0
  394. package/remoteRun/runner.sh +304 -6
@@ -0,0 +1,67 @@
1
+ import { type ChildProcess } from 'child_process';
2
+ import type { KeepAwakeMethod } from '../remoteRun/probe';
3
+ import type { RunnerHomePaths } from './runnerHome';
4
+ /**
5
+ * @description A runner keeps its machine awake while its link runs: it holds an IDLE-sleep assertion, the way `caffeinate -i` does, so a Mac with its lid
6
+ * open never goes to sleep under a job (or between two jobs), and one with the lid closed sleeps as it always did — closing the lid is not idle, and
7
+ * nothing here overrides it. Nothing of the machine's power settings is read or changed (never `pmset`, nothing that needs an admin), and the
8
+ * display may still turn off:
9
+ *
10
+ * macOS `caffeinate -i -w <the link's pid>` — a child of the link that ends by itself the moment the link's process does (a stop, a removal, a crash,
11
+ * a SIGKILL): no orphan to keep the Mac awake after the runner is gone
12
+ * Linux `systemd-inhibit --what=idle … sh -c 'while kill -0 <the link's pid> …; sleep 2; done'` — the lock is held while that loop runs, and the loop
13
+ * ends within two seconds of the link's process, however it ended
14
+ * else nothing — and `runners` says so (no `systemd-inhibit` on the PATH, no D-Bus session for it, another system)
15
+ *
16
+ * What was done is written to `<state>/awake` (`caffeinate 123`, `systemd-inhibit 123`, or `none <reason>`) for `runner.sh probe`, which tells whether the
17
+ * holder is still alive. A holder that ends while the link runs is tried again every {@link retryAfterMs}.
18
+ */
19
+ /** @name KeepAwakeState @description How the machine is kept awake right now: by which holder process, or not at all and why. */
20
+ export type KeepAwakeState = {
21
+ method: KeepAwakeMethod;
22
+ holderPid: number;
23
+ } | {
24
+ method: null;
25
+ reason: string;
26
+ };
27
+ /** What a holder is asked to be: the command line, and which method it is. */
28
+ export type KeepAwakePlan = {
29
+ method: KeepAwakeMethod;
30
+ file: string;
31
+ args: string[];
32
+ } | {
33
+ reason: string;
34
+ };
35
+ /** How long a holder must stay up to count as holding: one that dies at once (no bus for `systemd-inhibit`) is a failure, not a lock. */
36
+ export declare const defaultSettleMs = 500;
37
+ export declare const retryAfterMs: number;
38
+ /** @description The holder to start for this platform, or why there is none: pure, `findExecutable` is the PATH lookup. */
39
+ export declare function planKeepAwake(platform: NodeJS.Platform, linkPid: number, findExecutable: (name: string) => string | null): KeepAwakePlan;
40
+ /** @description The one line of `<state>/awake`. A reason is one line, cut short: it is the machine's own text (a holder's stderr). */
41
+ export declare function formatKeepAwakeState(state: KeepAwakeState): string;
42
+ export interface KeepAwakeDeps {
43
+ platform: NodeJS.Platform;
44
+ /** The pid of the link: what the holder is tied to. */
45
+ linkPid: number;
46
+ findExecutable: (name: string) => string | null;
47
+ spawnHolder: (file: string, args: readonly string[]) => ChildProcess;
48
+ settleMs: number;
49
+ retryMs: number;
50
+ writeState: (line: string) => void;
51
+ removeState: () => void;
52
+ }
53
+ export interface KeepAwake {
54
+ getState: () => KeepAwakeState;
55
+ /** End the holder and forget the state. Idempotent, synchronous (it runs from the process's `exit` too). */
56
+ stop: () => void;
57
+ }
58
+ /**
59
+ * @description Start holding the idle-sleep assertion. Resolves once the first attempt has settled — a holder that stayed up, or the reason there is none — and never
60
+ * rejects: a machine that cannot be kept awake is a state `runners` shows, not a reason for the link not to come up.
61
+ */
62
+ export declare function startKeepAwake(deps: KeepAwakeDeps): Promise<KeepAwake>;
63
+ /** @description The first executable `name` in `pathValue`'s folders, or `null`. */
64
+ export declare function findExecutableOnPath(name: string, pathValue: string, checkIsExecutable: (candidate: string) => boolean): string | null;
65
+ /** @description The real holder of this machine's link: the PATH's `caffeinate` / `systemd-inhibit` (then the system's folders), `<state>/awake` for its state. */
66
+ export declare function createKeepAwakeDeps(paths: RunnerHomePaths): KeepAwakeDeps;
67
+ //# sourceMappingURL=keepAwake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keepAwake.d.ts","sourceRoot":"","sources":["../../src/runnerUtility/keepAwake.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AAEH,iIAAiI;AACjI,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,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AC;CAClB;AAoBD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CA6E5E;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,GAAG,IAAI,CAOtI;AAeD,mKAAmK;AACnK,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,aAAa,CAWzE"}
@@ -0,0 +1,211 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.retryAfterMs = exports.defaultSettleMs = void 0;
37
+ exports.planKeepAwake = planKeepAwake;
38
+ exports.formatKeepAwakeState = formatKeepAwakeState;
39
+ exports.startKeepAwake = startKeepAwake;
40
+ exports.findExecutableOnPath = findExecutableOnPath;
41
+ exports.createKeepAwakeDeps = createKeepAwakeDeps;
42
+ const child_process_1 = require("child_process");
43
+ const fs = __importStar(require("fs"));
44
+ const path = __importStar(require("path"));
45
+ const configDirFile_1 = require("../configDirFile");
46
+ const holderLoopSeconds = 2;
47
+ /** How long a holder must stay up to count as holding: one that dies at once (no bus for `systemd-inhibit`) is a failure, not a lock. */
48
+ exports.defaultSettleMs = 500;
49
+ exports.retryAfterMs = 30 * 1000;
50
+ const stderrTailChars = 400;
51
+ const reasonMaxChars = 200;
52
+ /** `sh -c <script> sh <pid>`: the lock lasts as long as the link's process does. */
53
+ const waitForLinkScript = `while kill -0 "$1" 2> /dev/null; do sleep ${holderLoopSeconds}; done`;
54
+ /** @description The holder to start for this platform, or why there is none: pure, `findExecutable` is the PATH lookup. */
55
+ function planKeepAwake(platform, linkPid, findExecutable) {
56
+ if (platform === 'darwin') {
57
+ const file = findExecutable('caffeinate');
58
+ return file === null ? { reason: 'caffeinate was not found on this Mac' } : { method: 'caffeinate', file, args: ['-i', '-w', `${linkPid}`] };
59
+ }
60
+ if (platform === 'linux') {
61
+ const file = findExecutable('systemd-inhibit');
62
+ if (file === null)
63
+ return { reason: 'systemd-inhibit was not found (no systemd here, or not on the PATH of the runner)' };
64
+ return { method: 'systemd-inhibit', file, args: ['--what=idle', '--who=charness-runner', '--why=the runner link is up', '--mode=block', 'sh', '-c', waitForLinkScript, 'sh', `${linkPid}`] };
65
+ }
66
+ return { reason: `keeping the machine awake is not supported on ${platform}` };
67
+ }
68
+ /** @description The one line of `<state>/awake`. A reason is one line, cut short: it is the machine's own text (a holder's stderr). */
69
+ function formatKeepAwakeState(state) {
70
+ if (state.method !== null)
71
+ return `${state.method} ${state.holderPid}\n`;
72
+ return `none ${state.reason.replace(/\s+/g, ' ').trim().slice(0, reasonMaxChars)}\n`;
73
+ }
74
+ /** Wait up to `settleMs` for the holder to end: `ended` with what it said, or `holding` when it is still there. */
75
+ function waitForHolderToSettle(child, settleMs, getStderrTail) {
76
+ return new Promise((resolve) => {
77
+ const timer = setTimeout(() => resolve({ kind: 'holding' }), settleMs);
78
+ child.once('error', (error) => {
79
+ clearTimeout(timer);
80
+ resolve({ kind: 'ended', detail: error.message });
81
+ });
82
+ child.once('exit', (code, signal) => {
83
+ clearTimeout(timer);
84
+ const said = getStderrTail().trim().split('\n').pop() ?? '';
85
+ resolve({ kind: 'ended', detail: said !== '' ? said : `exit ${code ?? signal ?? 'unknown'}` });
86
+ });
87
+ });
88
+ }
89
+ /**
90
+ * @description Start holding the idle-sleep assertion. Resolves once the first attempt has settled — a holder that stayed up, or the reason there is none — and never
91
+ * rejects: a machine that cannot be kept awake is a state `runners` shows, not a reason for the link not to come up.
92
+ */
93
+ async function startKeepAwake(deps) {
94
+ let state = { method: null, reason: 'not started' };
95
+ let holder = null;
96
+ let retryTimer = null;
97
+ let isStopped = false;
98
+ const publish = (next) => {
99
+ state = next;
100
+ try {
101
+ deps.writeState(formatKeepAwakeState(next));
102
+ }
103
+ catch {
104
+ /* the state file is for `runners`; a folder that cannot be written is already the link's problem */
105
+ }
106
+ };
107
+ const scheduleRetry = () => {
108
+ if (isStopped || retryTimer !== null)
109
+ return;
110
+ retryTimer = setTimeout(() => {
111
+ retryTimer = null;
112
+ void attempt();
113
+ }, deps.retryMs);
114
+ retryTimer.unref();
115
+ };
116
+ const attempt = async () => {
117
+ const plan = planKeepAwake(deps.platform, deps.linkPid, deps.findExecutable);
118
+ if ('reason' in plan) {
119
+ publish({ method: null, reason: plan.reason });
120
+ return;
121
+ }
122
+ let stderrTail = '';
123
+ let child;
124
+ try {
125
+ child = deps.spawnHolder(plan.file, plan.args);
126
+ }
127
+ catch (error) {
128
+ publish({ method: null, reason: `${plan.method} could not be started (${error instanceof Error ? error.message : 'unknown error'})` });
129
+ scheduleRetry();
130
+ return;
131
+ }
132
+ child.stderr?.on('data', (chunk) => { stderrTail = (stderrTail + chunk.toString()).slice(-stderrTailChars); });
133
+ const outcome = await waitForHolderToSettle(child, deps.settleMs, () => stderrTail);
134
+ if (isStopped) {
135
+ child.kill('SIGTERM');
136
+ return;
137
+ }
138
+ if (outcome.kind === 'ended' || child.pid === undefined) {
139
+ publish({ method: null, reason: `${plan.method} ended at once (${outcome.kind === 'ended' ? outcome.detail : 'no pid'})` });
140
+ scheduleRetry();
141
+ return;
142
+ }
143
+ holder = child;
144
+ publish({ method: plan.method, holderPid: child.pid });
145
+ child.once('exit', (code, signal) => {
146
+ if (holder !== child)
147
+ return;
148
+ holder = null;
149
+ if (isStopped)
150
+ return;
151
+ publish({ method: null, reason: `the ${plan.method} process ended while the link runs (${code ?? signal ?? 'unknown'}); trying again` });
152
+ scheduleRetry();
153
+ });
154
+ };
155
+ await attempt();
156
+ return {
157
+ getState: () => state,
158
+ stop: () => {
159
+ if (isStopped)
160
+ return;
161
+ isStopped = true;
162
+ if (retryTimer !== null)
163
+ clearTimeout(retryTimer);
164
+ holder?.kill('SIGTERM');
165
+ holder = null;
166
+ try {
167
+ deps.removeState();
168
+ }
169
+ catch {
170
+ /* already gone */
171
+ }
172
+ },
173
+ };
174
+ }
175
+ /** @description The first executable `name` in `pathValue`'s folders, or `null`. */
176
+ function findExecutableOnPath(name, pathValue, checkIsExecutable) {
177
+ for (const folder of pathValue.split(path.delimiter)) {
178
+ if (folder === '')
179
+ continue;
180
+ const candidate = path.join(folder, name);
181
+ if (checkIsExecutable(candidate))
182
+ return candidate;
183
+ }
184
+ return null;
185
+ }
186
+ /** Where the system's own tools are, whatever the PATH of the account's service says. */
187
+ const systemToolFolders = '/usr/bin:/bin:/usr/sbin:/sbin';
188
+ const stateFileMode = 0o644;
189
+ function checkIsExecutableFile(candidate) {
190
+ try {
191
+ fs.accessSync(candidate, fs.constants.X_OK);
192
+ return fs.statSync(candidate).isFile();
193
+ }
194
+ catch {
195
+ return false;
196
+ }
197
+ }
198
+ /** @description The real holder of this machine's link: the PATH's `caffeinate` / `systemd-inhibit` (then the system's folders), `<state>/awake` for its state. */
199
+ function createKeepAwakeDeps(paths) {
200
+ return {
201
+ platform: process.platform,
202
+ linkPid: process.pid,
203
+ findExecutable: (name) => findExecutableOnPath(name, `${process.env.PATH ?? ''}${path.delimiter}${systemToolFolders}`, checkIsExecutableFile),
204
+ spawnHolder: (file, args) => (0, child_process_1.spawn)(file, [...args], { stdio: ['ignore', 'ignore', 'pipe'] }),
205
+ settleMs: exports.defaultSettleMs,
206
+ retryMs: exports.retryAfterMs,
207
+ writeState: (line) => { (0, configDirFile_1.writeTextFileAtomically)(paths.awakeFile, line, stateFileMode); },
208
+ removeState: () => { fs.rmSync(paths.awakeFile, { force: true }); },
209
+ };
210
+ }
211
+ //# sourceMappingURL=keepAwake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keepAwake.js","sourceRoot":"","sources":["../../src/runnerUtility/keepAwake.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,sCAWC;AAGD,oDAGC;AA0CD,wCA6EC;AAGD,oDAOC;AAgBD,kDAWC;AApND,iDAAyD;AACzD,uCAAyB;AACzB,2CAA6B;AAC7B,oDAA2D;AA0B3D,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,yIAAyI;AAC5H,QAAA,eAAe,GAAG,GAAG,CAAC;AACtB,QAAA,YAAY,GAAG,EAAE,GAAG,IAAI,CAAC;AACtC,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,oFAAoF;AACpF,MAAM,iBAAiB,GAAG,6CAA6C,iBAAiB,QAAQ,CAAC;AAEjG,2HAA2H;AAC3H,SAAgB,aAAa,CAAC,QAAyB,EAAE,OAAe,EAAE,cAA+C;I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C;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,mKAAmK;AACnK,SAAgB,mBAAmB,CAAC,KAAsB;IACxD,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,OAAO,EAAE,OAAO,CAAC,GAAG;QACpB,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,GAAG,iBAAiB,EAAE,EAAE,qBAAqB,CAAC;QAC7I,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,qBAAK,EAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;QAC5F,QAAQ,EAAE,uBAAe;QACzB,OAAO,EAAE,oBAAY;QACrB,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,IAAA,uCAAuB,EAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxF,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @description How often a Mac's link looks at its lid (`lidState.ts`). In a module of its own so the runner utility reads it without loading the bot, like `versionPollTiming.ts`:
3
+ * the test seam `CHARNESS_TEST_TIMINGS` (`testTimings.ts`) may only SHORTEN it (key `runnerLidPollMs`), read through `testTimingsSeam.ts`.
4
+ */
5
+ /** Production: as often as the hub's gate takes its own heartbeat. */
6
+ export declare const lidPollMs: number;
7
+ /** A shorter poll than this is a loop of `ioreg` calls, not a look. */
8
+ export declare const lidPollMinMs = 500;
9
+ /** @description The poll interval in force: the production one, or the seam's shorter `runnerLidPollMs` when it is a whole number of ms within [min, production]. */
10
+ export declare function readLidPollMs(env: NodeJS.ProcessEnv): number;
11
+ //# sourceMappingURL=lidPollTiming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lidPollTiming.d.ts","sourceRoot":"","sources":["../../src/runnerUtility/lidPollTiming.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,sEAAsE;AACtE,eAAO,MAAM,SAAS,QAAY,CAAC;AACnC,uEAAuE;AACvE,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,qKAAqK;AACrK,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lidPollMinMs = exports.lidPollMs = void 0;
4
+ exports.readLidPollMs = readLidPollMs;
5
+ const testTimingsSeam_1 = require("../testTimingsSeam");
6
+ /**
7
+ * @description How often a Mac's link looks at its lid (`lidState.ts`). In a module of its own so the runner utility reads it without loading the bot, like `versionPollTiming.ts`:
8
+ * the test seam `CHARNESS_TEST_TIMINGS` (`testTimings.ts`) may only SHORTEN it (key `runnerLidPollMs`), read through `testTimingsSeam.ts`.
9
+ */
10
+ /** Production: as often as the hub's gate takes its own heartbeat. */
11
+ exports.lidPollMs = 10 * 1000;
12
+ /** A shorter poll than this is a loop of `ioreg` calls, not a look. */
13
+ exports.lidPollMinMs = 500;
14
+ /** @description The poll interval in force: the production one, or the seam's shorter `runnerLidPollMs` when it is a whole number of ms within [min, production]. */
15
+ function readLidPollMs(env) {
16
+ return (0, testTimingsSeam_1.readShorterTestWindowMs)(env, 'runnerLidPollMs', exports.lidPollMs, exports.lidPollMinMs);
17
+ }
18
+ //# sourceMappingURL=lidPollTiming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lidPollTiming.js","sourceRoot":"","sources":["../../src/runnerUtility/lidPollTiming.ts"],"names":[],"mappings":";;;AAaA,sCAEC;AAfD,wDAA6D;AAE7D;;;GAGG;AAEH,sEAAsE;AACzD,QAAA,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC;AACnC,uEAAuE;AAC1D,QAAA,YAAY,GAAG,GAAG,CAAC;AAEhC,qKAAqK;AACrK,SAAgB,aAAa,CAAC,GAAsB;IAClD,OAAO,IAAA,yCAAuB,EAAC,GAAG,EAAE,iBAAiB,EAAE,iBAAS,EAAE,oBAAY,CAAC,CAAC;AAClF,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { type CommandRunner } from '../selfUpdate/commandRunner';
2
+ /**
3
+ * @description The lid of a MacBook runner. A Mac whose lid is closed with nothing keeping it awake (no external display: macOS sleeps it about a minute and a half
4
+ * later, and on power wakes it for a minute or two every quarter of an hour to do its housekeeping) cannot run a job to its end — a job that lands in one of those
5
+ * windows is cut when the Mac sleeps again. So the link looks at the lid on a short timer and TELLS THE HUB when what it last told changes; the hub treats such a
6
+ * runner like an offline one for NEW jobs (`runners/linkControl.ts`, `remoteRun/runners.ts`) and never touches a job that already runs.
7
+ *
8
+ * The state is the I/O Registry's own: `ioreg -r -k AppleClamshellState -d 4` prints, for the power-management root,
9
+ * `"AppleClamshellState" = Yes|No` the lid is shut (the key is absent on a Mac without a lid)
10
+ * `"AppleClamshellCausesSleep" = Yes|No` closing it sleeps the machine (No: an external display keeps it awake — «clamshell mode»)
11
+ * (source: Apple's darwin-dev mailing list on the key, and the Keyboard Maestro forum's use of that exact command; not part of Apple's documented API).
12
+ * Closed means BOTH are Yes. Anything else — a lid that is open, a Mac without one, an external display, a reading that cannot be made — is «open»: this
13
+ * must never take a runner out of use on a guess, and a failed read is told once and never blocks the link.
14
+ *
15
+ * The lid the runner has when it CONNECTS goes in the request that makes the link (`link lid=closed`), so the hub knows it before the link's socket exists: a Mac that wakes
16
+ * in the dark for a minute with its lid shut is never, for even a second, online with the lid of the last time. The looks after that report only a change.
17
+ */
18
+ export { lidPollMs } from './lidPollTiming';
19
+ /**
20
+ * @description Does this runner report a lid? A Mac does — whatever its `PATH` — and so does a runner that has an `ioreg` on its `PATH` (a Mac's own tool, which no other system
21
+ * ships): that is how a flow on another system plays a Mac with a stand-in `ioreg`. Any other runner never reports one.
22
+ */
23
+ export declare function checkCanReadLid(platform: NodeJS.Platform, env: NodeJS.ProcessEnv): boolean;
24
+ /** What `ioreg` says of the lid: shut and sleeping the Mac, or anything else (`no-lid`: the key is not there at all). */
25
+ export type LidReading = 'closed' | 'open' | 'no-lid';
26
+ /** @description The lid as the output of `ioreg -r -k AppleClamshellState -d 4` says it. */
27
+ export declare function parseLidReading(output: string): LidReading;
28
+ /** @description The reader of the real machine: `ioreg`'s output, or `null` when it could not be run or did not end in time. */
29
+ export declare function createIoregReader(runner?: CommandRunner): () => Promise<string | null>;
30
+ /** What the hub did with a report: took it; answered and refused it (an older gate that does not know the word, a body it will not take) — a retry now would be refused the same; or could not be reached. */
31
+ export type LidReportResult = 'taken' | 'refused' | 'failed';
32
+ /** After a refusal the same report is not sent again for this long, doubling with every further refusal up to {@link lidRefusalMaxBackoffMs}. */
33
+ export declare const lidRefusalFirstBackoffMs: number;
34
+ /** As long as the hub's own question about its package: five minutes. */
35
+ export declare const lidRefusalMaxBackoffMs: number;
36
+ export interface LidWatcherDeps {
37
+ /** The registry's output (`null`: it could not be read). */
38
+ readRegistry: () => Promise<string | null>;
39
+ log: (line: string) => void;
40
+ now?: () => number;
41
+ }
42
+ export interface LidWatcher {
43
+ /** The lid right now — the one look; a failure to read it is an open lid, said once per run of failures. Never throws. */
44
+ look: () => Promise<boolean>;
45
+ /** A link began and told the hub `toldIsClosed` in its own request (`null`: the request could not carry it): the looks of THIS link report only a change from it. Whatever an earlier link had under way no longer counts. */
46
+ startLink: (toldIsClosed: boolean | null) => void;
47
+ /** One look at the lid for the link in force; `report` tells the hub and is called only when the hub was last told something else (and is not being given time after a refusal). Never throws. */
48
+ beat: (report: (isClosed: boolean) => Promise<LidReportResult>) => Promise<void>;
49
+ }
50
+ /**
51
+ * @description The watcher: reads the lid, compares it with what the hub was last told, tells the hub on a change. A report the hub could not be reached with is made again at the
52
+ * next look; one it REFUSED is made again after a growing wait (30 s, doubling to 5 min) — a hub that does not know the word must not get an ssh exec and a process at every look —
53
+ * until the hub takes one or a new link begins. A failure is said once per run of failures. A look or a report that belongs to a link that has ended since it began (`startLink`
54
+ * came in between) changes nothing: the new link's own first look is never held back by the old one's report still on its way.
55
+ */
56
+ export declare function createLidWatcher(deps: LidWatcherDeps): LidWatcher;
57
+ //# sourceMappingURL=lidState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lidState.d.ts","sourceRoot":"","sources":["../../src/runnerUtility/lidState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE7E;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAqB5C;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAE1F;AAED,yHAAyH;AACzH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAQtD,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAI1D;AAED,gIAAgI;AAChI,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,aAA0B,GAAG,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAKlG;AAED,8MAA8M;AAC9M,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7D,iJAAiJ;AACjJ,eAAO,MAAM,wBAAwB,QAAY,CAAC;AAClD,yEAAyE;AACzE,eAAO,MAAM,sBAAsB,QAAgB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,4DAA4D;IAC5D,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3C,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,0HAA0H;IAC1H,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,8NAA8N;IAC9N,SAAS,EAAE,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,kMAAkM;IAClM,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,eAAe,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,CAqEjE"}
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.lidRefusalMaxBackoffMs = exports.lidRefusalFirstBackoffMs = exports.lidPollMs = void 0;
37
+ exports.checkCanReadLid = checkCanReadLid;
38
+ exports.parseLidReading = parseLidReading;
39
+ exports.createIoregReader = createIoregReader;
40
+ exports.createLidWatcher = createLidWatcher;
41
+ const fs = __importStar(require("fs"));
42
+ const path = __importStar(require("path"));
43
+ const commandRunner_1 = require("../selfUpdate/commandRunner");
44
+ /**
45
+ * @description The lid of a MacBook runner. A Mac whose lid is closed with nothing keeping it awake (no external display: macOS sleeps it about a minute and a half
46
+ * later, and on power wakes it for a minute or two every quarter of an hour to do its housekeeping) cannot run a job to its end — a job that lands in one of those
47
+ * windows is cut when the Mac sleeps again. So the link looks at the lid on a short timer and TELLS THE HUB when what it last told changes; the hub treats such a
48
+ * runner like an offline one for NEW jobs (`runners/linkControl.ts`, `remoteRun/runners.ts`) and never touches a job that already runs.
49
+ *
50
+ * The state is the I/O Registry's own: `ioreg -r -k AppleClamshellState -d 4` prints, for the power-management root,
51
+ * `"AppleClamshellState" = Yes|No` the lid is shut (the key is absent on a Mac without a lid)
52
+ * `"AppleClamshellCausesSleep" = Yes|No` closing it sleeps the machine (No: an external display keeps it awake — «clamshell mode»)
53
+ * (source: Apple's darwin-dev mailing list on the key, and the Keyboard Maestro forum's use of that exact command; not part of Apple's documented API).
54
+ * Closed means BOTH are Yes. Anything else — a lid that is open, a Mac without one, an external display, a reading that cannot be made — is «open»: this
55
+ * must never take a runner out of use on a guess, and a failed read is told once and never blocks the link.
56
+ *
57
+ * The lid the runner has when it CONNECTS goes in the request that makes the link (`link lid=closed`), so the hub knows it before the link's socket exists: a Mac that wakes
58
+ * in the dark for a minute with its lid shut is never, for even a second, online with the lid of the last time. The looks after that report only a change.
59
+ */
60
+ var lidPollTiming_1 = require("./lidPollTiming");
61
+ Object.defineProperty(exports, "lidPollMs", { enumerable: true, get: function () { return lidPollTiming_1.lidPollMs; } });
62
+ const ioregTimeoutMs = 5 * 1000;
63
+ const ioregArguments = ['-r', '-k', 'AppleClamshellState', '-d', '4'];
64
+ const clamshellStateKey = 'AppleClamshellState';
65
+ const clamshellCausesSleepKey = 'AppleClamshellCausesSleep';
66
+ const ioregProgramName = 'ioreg';
67
+ function checkIsExecutableOnPath(programName, pathVariable) {
68
+ return (pathVariable ?? '').split(path.delimiter).some((folder) => {
69
+ // An empty entry of PATH means the current folder, which is nobody's choice of where a runner finds its tools.
70
+ if (folder === '')
71
+ return false;
72
+ try {
73
+ fs.accessSync(path.join(folder, programName), fs.constants.X_OK);
74
+ return true;
75
+ }
76
+ catch {
77
+ return false;
78
+ }
79
+ });
80
+ }
81
+ /**
82
+ * @description Does this runner report a lid? A Mac does — whatever its `PATH` — and so does a runner that has an `ioreg` on its `PATH` (a Mac's own tool, which no other system
83
+ * ships): that is how a flow on another system plays a Mac with a stand-in `ioreg`. Any other runner never reports one.
84
+ */
85
+ function checkCanReadLid(platform, env) {
86
+ return platform === 'darwin' || checkIsExecutableOnPath(ioregProgramName, env.PATH);
87
+ }
88
+ /** `"Key" = Yes` → `true`, `= No` → `false`, no such line → `null`. */
89
+ function readYesNo(output, key) {
90
+ const match = new RegExp(`"${key}"\\s*=\\s*(Yes|No)\\b`, 'i').exec(output);
91
+ return match === null ? null : match[1].toLowerCase() === 'yes';
92
+ }
93
+ /** @description The lid as the output of `ioreg -r -k AppleClamshellState -d 4` says it. */
94
+ function parseLidReading(output) {
95
+ const isShut = readYesNo(output, clamshellStateKey);
96
+ if (isShut === null)
97
+ return 'no-lid';
98
+ return isShut && readYesNo(output, clamshellCausesSleepKey) === true ? 'closed' : 'open';
99
+ }
100
+ /** @description The reader of the real machine: `ioreg`'s output, or `null` when it could not be run or did not end in time. */
101
+ function createIoregReader(runner = commandRunner_1.runCommand) {
102
+ return async () => {
103
+ const result = await runner(ioregProgramName, ioregArguments, { timeoutMs: ioregTimeoutMs });
104
+ return result.ok ? result.stdout : null;
105
+ };
106
+ }
107
+ /** After a refusal the same report is not sent again for this long, doubling with every further refusal up to {@link lidRefusalMaxBackoffMs}. */
108
+ exports.lidRefusalFirstBackoffMs = 30 * 1000;
109
+ /** As long as the hub's own question about its package: five minutes. */
110
+ exports.lidRefusalMaxBackoffMs = 5 * 60 * 1000;
111
+ /**
112
+ * @description The watcher: reads the lid, compares it with what the hub was last told, tells the hub on a change. A report the hub could not be reached with is made again at the
113
+ * next look; one it REFUSED is made again after a growing wait (30 s, doubling to 5 min) — a hub that does not know the word must not get an ssh exec and a process at every look —
114
+ * until the hub takes one or a new link begins. A failure is said once per run of failures. A look or a report that belongs to a link that has ended since it began (`startLink`
115
+ * came in between) changes nothing: the new link's own first look is never held back by the old one's report still on its way.
116
+ */
117
+ function createLidWatcher(deps) {
118
+ const now = deps.now ?? Date.now;
119
+ let generation = 0;
120
+ let lastTold = null;
121
+ let beatingGeneration = null;
122
+ let isReadFailing = false;
123
+ let isReportFailing = false;
124
+ let refusals = 0;
125
+ let retryAfterMs = 0;
126
+ const look = async () => {
127
+ let output;
128
+ try {
129
+ output = await deps.readRegistry();
130
+ }
131
+ catch {
132
+ output = null;
133
+ }
134
+ if (output === null && !isReadFailing)
135
+ deps.log('the lid state cannot be read (ioreg did not answer): the lid is taken as open, and the runner takes jobs as usual');
136
+ isReadFailing = output === null;
137
+ return output !== null && parseLidReading(output) === 'closed';
138
+ };
139
+ const noteRefusal = () => {
140
+ refusals += 1;
141
+ const waitMs = Math.min(exports.lidRefusalMaxBackoffMs, exports.lidRefusalFirstBackoffMs * 2 ** (refusals - 1));
142
+ retryAfterMs = now() + waitMs;
143
+ if (!isReportFailing)
144
+ deps.log(`the hub did not take the report of the lid (it refused it): trying again in ${Math.round(waitMs / 1000)} s, and at longer waits while it does`);
145
+ isReportFailing = true;
146
+ };
147
+ return {
148
+ look,
149
+ startLink: (toldIsClosed) => {
150
+ generation += 1;
151
+ lastTold = toldIsClosed;
152
+ isReportFailing = false;
153
+ refusals = 0;
154
+ retryAfterMs = 0;
155
+ },
156
+ beat: async (report) => {
157
+ const own = generation;
158
+ if (beatingGeneration === own)
159
+ return;
160
+ beatingGeneration = own;
161
+ try {
162
+ const isClosed = await look();
163
+ if (own !== generation || isClosed === lastTold || now() < retryAfterMs)
164
+ return;
165
+ let result;
166
+ try {
167
+ result = await report(isClosed);
168
+ }
169
+ catch {
170
+ result = 'failed';
171
+ }
172
+ if (own !== generation)
173
+ return;
174
+ if (result === 'taken') {
175
+ lastTold = isClosed;
176
+ isReportFailing = false;
177
+ refusals = 0;
178
+ retryAfterMs = 0;
179
+ }
180
+ else if (result === 'refused') {
181
+ noteRefusal();
182
+ }
183
+ else if (!isReportFailing) {
184
+ isReportFailing = true;
185
+ deps.log('the hub could not be reached with the report of the lid; trying again at the next look');
186
+ }
187
+ }
188
+ finally {
189
+ if (beatingGeneration === own)
190
+ beatingGeneration = null;
191
+ }
192
+ },
193
+ };
194
+ }
195
+ //# sourceMappingURL=lidState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lidState.js","sourceRoot":"","sources":["../../src/runnerUtility/lidState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,0CAEC;AAYD,0CAIC;AAGD,8CAKC;AAgCD,4CAqEC;AA7KD,uCAAyB;AACzB,2CAA6B;AAC7B,+DAA6E;AAE7E;;;;;;;;;;;;;;;GAeG;AAEH,iDAA4C;AAAnC,0GAAA,SAAS,OAAA;AAClB,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,CAAC;AAChC,MAAM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IAAI,EAAE,CAAC;gBAC9B,IAAI,GAAG,KAAK,UAAU,IAAI,QAAQ,KAAK,QAAQ,IAAI,GAAG,EAAE,GAAG,YAAY;oBAAE,OAAO;gBAChF,IAAI,MAAuB,CAAC;gBAC5B,IAAI,CAAC;oBACH,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAClC,CAAC;gBAAC,MAAM,CAAC;oBACP,MAAM,GAAG,QAAQ,CAAC;gBACpB,CAAC;gBACD,IAAI,GAAG,KAAK,UAAU;oBAAE,OAAO;gBAC/B,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;oBACvB,QAAQ,GAAG,QAAQ,CAAC;oBACpB,eAAe,GAAG,KAAK,CAAC;oBACxB,QAAQ,GAAG,CAAC,CAAC;oBACb,YAAY,GAAG,CAAC,CAAC;gBACnB,CAAC;qBAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;oBAChC,WAAW,EAAE,CAAC;gBAChB,CAAC;qBAAM,IAAI,CAAC,eAAe,EAAE,CAAC;oBAC5B,eAAe,GAAG,IAAI,CAAC;oBACvB,IAAI,CAAC,GAAG,CAAC,wFAAwF,CAAC,CAAC;gBACrG,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,IAAI,iBAAiB,KAAK,GAAG;oBAAE,iBAAiB,GAAG,IAAI,CAAC;YAC1D,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { updateFromHub } from './appUpdate';
2
2
  import { connectToHub } from './hubClient';
3
+ import type { LidWatcher } from './lidState';
3
4
  import { type RunnerConfig } from './runnerConfig';
4
5
  import type { RunnerHomePaths } from './runnerHome';
5
6
  import type { RunnerKeys } from './runnerKeys';
@@ -23,6 +24,10 @@ export interface LinkLoopDeps {
23
24
  removalConfirmMs?: number;
24
25
  /** How long a bare refusal of the key must last before it stops the jobs (default {@link unconfirmedRemovalStopAfterMs}). */
25
26
  unconfirmedRemovalStopAfterMs?: number;
27
+ /** A Mac's lid watcher (`lidState.ts`); absent off a Mac: such a runner never reports a lid. */
28
+ lid?: LidWatcher;
29
+ /** How often the lid is looked at (default {@link readLidPollMs}). */
30
+ lidPollMs?: number;
26
31
  random?: () => number;
27
32
  sleep?: (ms: number, signal: AbortSignal) => Promise<void>;
28
33
  connect?: typeof connectToHub;
@@ -1 +1 @@
1
- {"version":3,"file":"linkLoop.d.ts","sourceRoot":"","sources":["../../src/runnerUtility/linkLoop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,aAAa,EAAsB,MAAM,aAAa,CAAC;AAG9E,OAAO,EAAY,YAAY,EAAyD,MAAM,aAAa,CAAC;AAE5G,OAAO,EAAqC,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAsBrD,eAAO,MAAM,cAAc,QAAiB,CAAC;AAC7C,qGAAqG;AACrG,eAAO,MAAM,gBAAgB,QAAY,CAAC;AAE1C,uHAAuH;AACvH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,yGAAyG;IACzG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6HAA6H;IAC7H,6BAA6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