charness 3.11.0 → 3.13.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 (537) hide show
  1. package/.env.example +5 -0
  2. package/CHANGELOG.md +169 -0
  3. package/DEVELOPMENT.md +81 -18
  4. package/README.md +3 -2
  5. package/SETUP.md +71 -25
  6. package/agent-plugin/README.md +15 -6
  7. package/agent-plugin/skills/charness-delegate-claude/SKILL.md +37 -18
  8. package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +10 -6
  9. package/agent-plugin/skills/charness-delivery-loop/SKILL.md +92 -0
  10. package/agent-plugin/skills/charness-orchestration/SKILL.md +116 -0
  11. package/dist/accessControl.d.ts +43 -0
  12. package/dist/accessControl.d.ts.map +1 -1
  13. package/dist/accessControl.js +50 -1
  14. package/dist/accessControl.js.map +1 -1
  15. package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
  16. package/dist/adapters/claudeCliAdapter.js +9 -4
  17. package/dist/adapters/claudeCliAdapter.js.map +1 -1
  18. package/dist/adapters/claudeJsonStreamAdapter.js +1 -1
  19. package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
  20. package/dist/adapters/claudePlatformFlags.d.ts +4 -3
  21. package/dist/adapters/claudePlatformFlags.d.ts.map +1 -1
  22. package/dist/adapters/claudePlatformFlags.js +4 -3
  23. package/dist/adapters/claudePlatformFlags.js.map +1 -1
  24. package/dist/adapters/openCodeAdapter.d.ts +52 -13
  25. package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
  26. package/dist/adapters/openCodeAdapter.js +121 -45
  27. package/dist/adapters/openCodeAdapter.js.map +1 -1
  28. package/dist/adapters/terminalAdapter.d.ts.map +1 -1
  29. package/dist/adapters/terminalAdapter.js +5 -3
  30. package/dist/adapters/terminalAdapter.js.map +1 -1
  31. package/dist/agentLogin/agentLogin.d.ts +11 -0
  32. package/dist/agentLogin/agentLogin.d.ts.map +1 -1
  33. package/dist/agentLogin/agentLogin.js +20 -20
  34. package/dist/agentLogin/agentLogin.js.map +1 -1
  35. package/dist/apiErrorRetry.d.ts +5 -0
  36. package/dist/apiErrorRetry.d.ts.map +1 -1
  37. package/dist/apiErrorRetry.js +3 -3
  38. package/dist/apiErrorRetry.js.map +1 -1
  39. package/dist/bot.d.ts +12 -3
  40. package/dist/bot.d.ts.map +1 -1
  41. package/dist/bot.js +634 -153
  42. package/dist/bot.js.map +1 -1
  43. package/dist/cli/claudeProfiles.d.ts +5 -2
  44. package/dist/cli/claudeProfiles.d.ts.map +1 -1
  45. package/dist/cli/claudeProfiles.js +45 -22
  46. package/dist/cli/claudeProfiles.js.map +1 -1
  47. package/dist/cli/claudeProfilesCredit.d.ts +49 -0
  48. package/dist/cli/claudeProfilesCredit.d.ts.map +1 -0
  49. package/dist/cli/claudeProfilesCredit.js +160 -0
  50. package/dist/cli/claudeProfilesCredit.js.map +1 -0
  51. package/dist/cli/flagValue.d.ts +10 -0
  52. package/dist/cli/flagValue.d.ts.map +1 -0
  53. package/dist/cli/flagValue.js +17 -0
  54. package/dist/cli/flagValue.js.map +1 -0
  55. package/dist/connectors/jira/client.js +1 -1
  56. package/dist/connectors/jira/client.js.map +1 -1
  57. package/dist/connectors/jira/config.d.ts +7 -0
  58. package/dist/connectors/jira/config.d.ts.map +1 -1
  59. package/dist/connectors/jira/config.js +12 -1
  60. package/dist/connectors/jira/config.js.map +1 -1
  61. package/dist/connectors/jira/connector.d.ts +7 -0
  62. package/dist/connectors/jira/connector.d.ts.map +1 -1
  63. package/dist/connectors/jira/connector.js +20 -3
  64. package/dist/connectors/jira/connector.js.map +1 -1
  65. package/dist/connectors/jira/inbound.d.ts.map +1 -1
  66. package/dist/connectors/jira/inbound.js +4 -3
  67. package/dist/connectors/jira/inbound.js.map +1 -1
  68. package/dist/connectors/jira/issueBlocks.d.ts +1 -1
  69. package/dist/connectors/jira/trustedGroup.d.ts +21 -6
  70. package/dist/connectors/jira/trustedGroup.d.ts.map +1 -1
  71. package/dist/connectors/jira/trustedGroup.js +46 -6
  72. package/dist/connectors/jira/trustedGroup.js.map +1 -1
  73. package/dist/connectors/telegram/commands/botCore.d.ts +19 -2
  74. package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
  75. package/dist/connectors/telegram/commands/botSkills.js +1 -1
  76. package/dist/connectors/telegram/commands/claudeAccounts.d.ts +6 -1
  77. package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
  78. package/dist/connectors/telegram/commands/claudeAccounts.js +9 -6
  79. package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
  80. package/dist/connectors/telegram/commands/compaction.d.ts +16 -3
  81. package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
  82. package/dist/connectors/telegram/commands/compaction.js +216 -27
  83. package/dist/connectors/telegram/commands/compaction.js.map +1 -1
  84. package/dist/connectors/telegram/commands/runners.d.ts +5 -1
  85. package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
  86. package/dist/connectors/telegram/commands/runners.js +146 -31
  87. package/dist/connectors/telegram/commands/runners.js.map +1 -1
  88. package/dist/connectors/telegram/commands/todo.d.ts.map +1 -1
  89. package/dist/connectors/telegram/commands/todo.js +2 -2
  90. package/dist/connectors/telegram/commands/todo.js.map +1 -1
  91. package/dist/connectors/telegram/commands/topicAccess.d.ts +30 -0
  92. package/dist/connectors/telegram/commands/topicAccess.d.ts.map +1 -0
  93. package/dist/connectors/telegram/commands/topicAccess.js +399 -0
  94. package/dist/connectors/telegram/commands/topicAccess.js.map +1 -0
  95. package/dist/connectors/telegram/inbound.d.ts +44 -7
  96. package/dist/connectors/telegram/inbound.d.ts.map +1 -1
  97. package/dist/connectors/telegram/inbound.js +142 -24
  98. package/dist/connectors/telegram/inbound.js.map +1 -1
  99. package/dist/connectors/telegram/runnerPairingMessages.d.ts +2 -7
  100. package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
  101. package/dist/connectors/telegram/runnerPairingMessages.js +5 -19
  102. package/dist/connectors/telegram/runnerPairingMessages.js.map +1 -1
  103. package/dist/i18n/de.d.ts.map +1 -1
  104. package/dist/i18n/de.js +120 -8
  105. package/dist/i18n/de.js.map +1 -1
  106. package/dist/i18n/en.d.ts.map +1 -1
  107. package/dist/i18n/en.js +120 -8
  108. package/dist/i18n/en.js.map +1 -1
  109. package/dist/i18n/es.d.ts.map +1 -1
  110. package/dist/i18n/es.js +120 -8
  111. package/dist/i18n/es.js.map +1 -1
  112. package/dist/i18n/fr.d.ts.map +1 -1
  113. package/dist/i18n/fr.js +120 -8
  114. package/dist/i18n/fr.js.map +1 -1
  115. package/dist/i18n/hi.d.ts.map +1 -1
  116. package/dist/i18n/hi.js +120 -8
  117. package/dist/i18n/hi.js.map +1 -1
  118. package/dist/i18n/ja.d.ts.map +1 -1
  119. package/dist/i18n/ja.js +120 -8
  120. package/dist/i18n/ja.js.map +1 -1
  121. package/dist/i18n/ka.d.ts.map +1 -1
  122. package/dist/i18n/ka.js +120 -8
  123. package/dist/i18n/ka.js.map +1 -1
  124. package/dist/i18n/pt.d.ts.map +1 -1
  125. package/dist/i18n/pt.js +120 -8
  126. package/dist/i18n/pt.js.map +1 -1
  127. package/dist/i18n/ru.d.ts.map +1 -1
  128. package/dist/i18n/ru.js +120 -8
  129. package/dist/i18n/ru.js.map +1 -1
  130. package/dist/i18n/uk.d.ts.map +1 -1
  131. package/dist/i18n/uk.js +120 -8
  132. package/dist/i18n/uk.js.map +1 -1
  133. package/dist/i18n/uz.d.ts.map +1 -1
  134. package/dist/i18n/uz.js +120 -8
  135. package/dist/i18n/uz.js.map +1 -1
  136. package/dist/i18n/zh.d.ts.map +1 -1
  137. package/dist/i18n/zh.js +120 -8
  138. package/dist/i18n/zh.js.map +1 -1
  139. package/dist/installManager.d.ts +37 -1
  140. package/dist/installManager.d.ts.map +1 -1
  141. package/dist/installManager.js +208 -14
  142. package/dist/installManager.js.map +1 -1
  143. package/dist/instanceLock.d.ts.map +1 -1
  144. package/dist/instanceLock.js +2 -1
  145. package/dist/instanceLock.js.map +1 -1
  146. package/dist/platform/commandRouter.d.ts +13 -1
  147. package/dist/platform/commandRouter.d.ts.map +1 -1
  148. package/dist/platform/commandRouter.js +14 -2
  149. package/dist/platform/commandRouter.js.map +1 -1
  150. package/dist/platform/inbound.d.ts +2 -0
  151. package/dist/platform/inbound.d.ts.map +1 -1
  152. package/dist/platform/outbound.d.ts +14 -1
  153. package/dist/platform/outbound.d.ts.map +1 -1
  154. package/dist/platform/outbound.js.map +1 -1
  155. package/dist/remoteRun/cleanReport.d.ts +45 -0
  156. package/dist/remoteRun/cleanReport.d.ts.map +1 -0
  157. package/dist/remoteRun/cleanReport.js +84 -0
  158. package/dist/remoteRun/cleanReport.js.map +1 -0
  159. package/dist/remoteRun/cliArgs.d.ts +18 -0
  160. package/dist/remoteRun/cliArgs.d.ts.map +1 -1
  161. package/dist/remoteRun/cliArgs.js +100 -4
  162. package/dist/remoteRun/cliArgs.js.map +1 -1
  163. package/dist/remoteRun/commands.d.ts +30 -1
  164. package/dist/remoteRun/commands.d.ts.map +1 -1
  165. package/dist/remoteRun/commands.js +84 -9
  166. package/dist/remoteRun/commands.js.map +1 -1
  167. package/dist/remoteRun/exitCodes.d.ts +5 -0
  168. package/dist/remoteRun/exitCodes.d.ts.map +1 -1
  169. package/dist/remoteRun/exitCodes.js +6 -1
  170. package/dist/remoteRun/exitCodes.js.map +1 -1
  171. package/dist/remoteRun/foreground.d.ts +6 -0
  172. package/dist/remoteRun/foreground.d.ts.map +1 -1
  173. package/dist/remoteRun/foreground.js +13 -1
  174. package/dist/remoteRun/foreground.js.map +1 -1
  175. package/dist/remoteRun/interrupts.d.ts.map +1 -1
  176. package/dist/remoteRun/interrupts.js +2 -2
  177. package/dist/remoteRun/interrupts.js.map +1 -1
  178. package/dist/remoteRun/jobFiles.d.ts +6 -1
  179. package/dist/remoteRun/jobFiles.d.ts.map +1 -1
  180. package/dist/remoteRun/jobFiles.js +14 -0
  181. package/dist/remoteRun/jobFiles.js.map +1 -1
  182. package/dist/remoteRun/jobId.d.ts +5 -0
  183. package/dist/remoteRun/jobId.d.ts.map +1 -1
  184. package/dist/remoteRun/jobId.js +10 -0
  185. package/dist/remoteRun/jobId.js.map +1 -1
  186. package/dist/remoteRun/jobState.d.ts.map +1 -1
  187. package/dist/remoteRun/jobState.js +3 -2
  188. package/dist/remoteRun/jobState.js.map +1 -1
  189. package/dist/remoteRun/pairedRunners.d.ts +1 -1
  190. package/dist/remoteRun/pairedRunners.d.ts.map +1 -1
  191. package/dist/remoteRun/pairedRunners.js +4 -0
  192. package/dist/remoteRun/pairedRunners.js.map +1 -1
  193. package/dist/remoteRun/pathPatterns.d.ts +1 -1
  194. package/dist/remoteRun/pathPatterns.js +1 -1
  195. package/dist/remoteRun/probe.d.ts +58 -5
  196. package/dist/remoteRun/probe.d.ts.map +1 -1
  197. package/dist/remoteRun/probe.js +107 -11
  198. package/dist/remoteRun/probe.js.map +1 -1
  199. package/dist/remoteRun/probeTiming.d.ts +15 -0
  200. package/dist/remoteRun/probeTiming.d.ts.map +1 -0
  201. package/dist/remoteRun/probeTiming.js +23 -0
  202. package/dist/remoteRun/probeTiming.js.map +1 -0
  203. package/dist/remoteRun/project.d.ts +5 -0
  204. package/dist/remoteRun/project.d.ts.map +1 -1
  205. package/dist/remoteRun/project.js +10 -0
  206. package/dist/remoteRun/project.js.map +1 -1
  207. package/dist/remoteRun/projectConfig.d.ts +8 -1
  208. package/dist/remoteRun/projectConfig.d.ts.map +1 -1
  209. package/dist/remoteRun/projectConfig.js +18 -5
  210. package/dist/remoteRun/projectConfig.js.map +1 -1
  211. package/dist/remoteRun/pruneReport.d.ts +48 -0
  212. package/dist/remoteRun/pruneReport.d.ts.map +1 -0
  213. package/dist/remoteRun/pruneReport.js +80 -0
  214. package/dist/remoteRun/pruneReport.js.map +1 -0
  215. package/dist/remoteRun/remoteRunCli.d.ts +1 -1
  216. package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
  217. package/dist/remoteRun/remoteRunCli.js +20 -0
  218. package/dist/remoteRun/remoteRunCli.js.map +1 -1
  219. package/dist/remoteRun/runnerClient.d.ts +10 -0
  220. package/dist/remoteRun/runnerClient.d.ts.map +1 -1
  221. package/dist/remoteRun/runnerClient.js +19 -5
  222. package/dist/remoteRun/runnerClient.js.map +1 -1
  223. package/dist/remoteRun/runnerWait.d.ts.map +1 -1
  224. package/dist/remoteRun/runnerWait.js +2 -1
  225. package/dist/remoteRun/runnerWait.js.map +1 -1
  226. package/dist/remoteRun/runners.d.ts +48 -7
  227. package/dist/remoteRun/runners.d.ts.map +1 -1
  228. package/dist/remoteRun/runners.js +105 -40
  229. package/dist/remoteRun/runners.js.map +1 -1
  230. package/dist/remoteRun/runnersConfig.d.ts +24 -0
  231. package/dist/remoteRun/runnersConfig.d.ts.map +1 -1
  232. package/dist/remoteRun/runnersConfig.js +29 -2
  233. package/dist/remoteRun/runnersConfig.js.map +1 -1
  234. package/dist/remoteRun/ssh.d.ts +3 -3
  235. package/dist/remoteRun/ssh.d.ts.map +1 -1
  236. package/dist/remoteRun/ssh.js +19 -5
  237. package/dist/remoteRun/ssh.js.map +1 -1
  238. package/dist/remoteRun/submit.d.ts +1 -1
  239. package/dist/remoteRun/submit.d.ts.map +1 -1
  240. package/dist/remoteRun/submit.js +30 -2
  241. package/dist/remoteRun/submit.js.map +1 -1
  242. package/dist/runnerUtility/adminService.d.ts.map +1 -1
  243. package/dist/runnerUtility/adminService.js +5 -5
  244. package/dist/runnerUtility/adminService.js.map +1 -1
  245. package/dist/runnerUtility/appInstall.d.ts +9 -0
  246. package/dist/runnerUtility/appInstall.d.ts.map +1 -1
  247. package/dist/runnerUtility/appInstall.js +12 -2
  248. package/dist/runnerUtility/appInstall.js.map +1 -1
  249. package/dist/runnerUtility/execEnv.d.ts +1 -1
  250. package/dist/runnerUtility/execEnv.d.ts.map +1 -1
  251. package/dist/runnerUtility/execEnv.js +23 -5
  252. package/dist/runnerUtility/execEnv.js.map +1 -1
  253. package/dist/runnerUtility/guiAgentHeal.d.ts +3 -3
  254. package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -1
  255. package/dist/runnerUtility/guiAgentHeal.js +4 -2
  256. package/dist/runnerUtility/guiAgentHeal.js.map +1 -1
  257. package/dist/runnerUtility/homeFolders.d.ts +1 -0
  258. package/dist/runnerUtility/homeFolders.d.ts.map +1 -1
  259. package/dist/runnerUtility/homeFolders.js +2 -1
  260. package/dist/runnerUtility/homeFolders.js.map +1 -1
  261. package/dist/runnerUtility/iosCheck.d.ts +2 -0
  262. package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
  263. package/dist/runnerUtility/iosCheck.js +12 -3
  264. package/dist/runnerUtility/iosCheck.js.map +1 -1
  265. package/dist/runnerUtility/keepAwake.d.ts +47 -10
  266. package/dist/runnerUtility/keepAwake.d.ts.map +1 -1
  267. package/dist/runnerUtility/keepAwake.js +108 -31
  268. package/dist/runnerUtility/keepAwake.js.map +1 -1
  269. package/dist/runnerUtility/launcher.d.ts +4 -0
  270. package/dist/runnerUtility/launcher.d.ts.map +1 -1
  271. package/dist/runnerUtility/launcher.js +31 -13
  272. package/dist/runnerUtility/launcher.js.map +1 -1
  273. package/dist/runnerUtility/linkLoop.d.ts +4 -0
  274. package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
  275. package/dist/runnerUtility/linkLoop.js +15 -6
  276. package/dist/runnerUtility/linkLoop.js.map +1 -1
  277. package/dist/runnerUtility/managedNode.d.ts +84 -0
  278. package/dist/runnerUtility/managedNode.d.ts.map +1 -0
  279. package/dist/runnerUtility/managedNode.js +165 -0
  280. package/dist/runnerUtility/managedNode.js.map +1 -0
  281. package/dist/runnerUtility/nodeOnPath.d.ts +10 -0
  282. package/dist/runnerUtility/nodeOnPath.d.ts.map +1 -0
  283. package/dist/runnerUtility/nodeOnPath.js +49 -0
  284. package/dist/runnerUtility/nodeOnPath.js.map +1 -0
  285. package/dist/runnerUtility/nodeUpkeep.d.ts +140 -0
  286. package/dist/runnerUtility/nodeUpkeep.d.ts.map +1 -0
  287. package/dist/runnerUtility/nodeUpkeep.js +348 -0
  288. package/dist/runnerUtility/nodeUpkeep.js.map +1 -0
  289. package/dist/runnerUtility/nodeUpkeepTiming.d.ts +14 -0
  290. package/dist/runnerUtility/nodeUpkeepTiming.d.ts.map +1 -0
  291. package/dist/runnerUtility/nodeUpkeepTiming.js +21 -0
  292. package/dist/runnerUtility/nodeUpkeepTiming.js.map +1 -0
  293. package/dist/runnerUtility/packageManagerShims.d.ts +10 -0
  294. package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -1
  295. package/dist/runnerUtility/packageManagerShims.js +67 -3
  296. package/dist/runnerUtility/packageManagerShims.js.map +1 -1
  297. package/dist/runnerUtility/pueueDaemon.d.ts +73 -8
  298. package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
  299. package/dist/runnerUtility/pueueDaemon.js +90 -15
  300. package/dist/runnerUtility/pueueDaemon.js.map +1 -1
  301. package/dist/runnerUtility/runnerCommands.d.ts +7 -1
  302. package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
  303. package/dist/runnerUtility/runnerCommands.js +119 -16
  304. package/dist/runnerUtility/runnerCommands.js.map +1 -1
  305. package/dist/runnerUtility/runnerHome.d.ts +34 -0
  306. package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
  307. package/dist/runnerUtility/runnerHome.js +17 -3
  308. package/dist/runnerUtility/runnerHome.js.map +1 -1
  309. package/dist/runnerUtility/serviceCommon.d.ts +2 -0
  310. package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
  311. package/dist/runnerUtility/serviceCommon.js +3 -1
  312. package/dist/runnerUtility/serviceCommon.js.map +1 -1
  313. package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
  314. package/dist/runnerUtility/serviceManager.js +7 -2
  315. package/dist/runnerUtility/serviceManager.js.map +1 -1
  316. package/dist/runnerUtility/simctlGuard.d.ts +38 -0
  317. package/dist/runnerUtility/simctlGuard.d.ts.map +1 -0
  318. package/dist/runnerUtility/simctlGuard.js +166 -0
  319. package/dist/runnerUtility/simctlGuard.js.map +1 -0
  320. package/dist/runners/bootstrapLine.d.ts +3 -4
  321. package/dist/runners/bootstrapLine.d.ts.map +1 -1
  322. package/dist/runners/bootstrapLine.js +108 -83
  323. package/dist/runners/bootstrapLine.js.map +1 -1
  324. package/dist/runners/hubPackage.d.ts +1 -1
  325. package/dist/runners/hubPackage.d.ts.map +1 -1
  326. package/dist/runners/hubPackage.js +5 -6
  327. package/dist/runners/hubPackage.js.map +1 -1
  328. package/dist/runners/hubPairing.d.ts +19 -0
  329. package/dist/runners/hubPairing.d.ts.map +1 -1
  330. package/dist/runners/hubPairing.js +38 -0
  331. package/dist/runners/hubPairing.js.map +1 -1
  332. package/dist/runners/hubRegistry.d.ts +8 -0
  333. package/dist/runners/hubRegistry.d.ts.map +1 -1
  334. package/dist/runners/hubRegistry.js +6 -0
  335. package/dist/runners/hubRegistry.js.map +1 -1
  336. package/dist/runners/pairCode.d.ts +34 -3
  337. package/dist/runners/pairCode.d.ts.map +1 -1
  338. package/dist/runners/pairCode.js +65 -13
  339. package/dist/runners/pairCode.js.map +1 -1
  340. package/dist/runners/runnerGroups.d.ts +22 -0
  341. package/dist/runners/runnerGroups.d.ts.map +1 -0
  342. package/dist/runners/runnerGroups.js +41 -0
  343. package/dist/runners/runnerGroups.js.map +1 -0
  344. package/dist/runners/runnerLock.d.ts +36 -1
  345. package/dist/runners/runnerLock.d.ts.map +1 -1
  346. package/dist/runners/runnerLock.js +94 -30
  347. package/dist/runners/runnerLock.js.map +1 -1
  348. package/dist/runners/runnersCli.d.ts +5 -2
  349. package/dist/runners/runnersCli.d.ts.map +1 -1
  350. package/dist/runners/runnersCli.js +59 -9
  351. package/dist/runners/runnersCli.js.map +1 -1
  352. package/dist/runners/runnersList.d.ts +1 -1
  353. package/dist/runners/runnersList.d.ts.map +1 -1
  354. package/dist/runners/runnersList.js +3 -1
  355. package/dist/runners/runnersList.js.map +1 -1
  356. package/dist/runners/runnersOverview.d.ts.map +1 -1
  357. package/dist/runners/runnersOverview.js +8 -4
  358. package/dist/runners/runnersOverview.js.map +1 -1
  359. package/dist/scheduler/checkRun.d.ts +0 -2
  360. package/dist/scheduler/checkRun.d.ts.map +1 -1
  361. package/dist/scheduler/checkRun.js +0 -10
  362. package/dist/scheduler/checkRun.js.map +1 -1
  363. package/dist/scheduler/checkStatus.d.ts +2 -0
  364. package/dist/scheduler/checkStatus.d.ts.map +1 -1
  365. package/dist/scheduler/checkStatus.js +5 -4
  366. package/dist/scheduler/checkStatus.js.map +1 -1
  367. package/dist/scheduler/delivery.d.ts +2 -1
  368. package/dist/scheduler/delivery.d.ts.map +1 -1
  369. package/dist/scheduler/delivery.js +5 -1
  370. package/dist/scheduler/delivery.js.map +1 -1
  371. package/dist/scheduler/mcpSurface.d.ts +7 -3
  372. package/dist/scheduler/mcpSurface.d.ts.map +1 -1
  373. package/dist/scheduler/mcpSurface.js +48 -22
  374. package/dist/scheduler/mcpSurface.js.map +1 -1
  375. package/dist/scheduler/workerWatch.d.ts +33 -10
  376. package/dist/scheduler/workerWatch.d.ts.map +1 -1
  377. package/dist/scheduler/workerWatch.js +37 -11
  378. package/dist/scheduler/workerWatch.js.map +1 -1
  379. package/dist/selfUpdate/bootRollback.d.ts.map +1 -1
  380. package/dist/selfUpdate/bootRollback.js +3 -2
  381. package/dist/selfUpdate/bootRollback.js.map +1 -1
  382. package/dist/selfUpdate/updateRuntime.d.ts.map +1 -1
  383. package/dist/selfUpdate/updateRuntime.js +6 -3
  384. package/dist/selfUpdate/updateRuntime.js.map +1 -1
  385. package/dist/state.d.ts +144 -2
  386. package/dist/state.d.ts.map +1 -1
  387. package/dist/state.js +257 -7
  388. package/dist/state.js.map +1 -1
  389. package/dist/testTimings.d.ts +6 -2
  390. package/dist/testTimings.d.ts.map +1 -1
  391. package/dist/testTimings.js +12 -1
  392. package/dist/testTimings.js.map +1 -1
  393. package/dist/threadContextPreamble.d.ts +15 -1
  394. package/dist/threadContextPreamble.d.ts.map +1 -1
  395. package/dist/threadContextPreamble.js +15 -3
  396. package/dist/threadContextPreamble.js.map +1 -1
  397. package/dist/threadRouting.d.ts +47 -4
  398. package/dist/threadRouting.d.ts.map +1 -1
  399. package/dist/threadRouting.js +31 -4
  400. package/dist/threadRouting.js.map +1 -1
  401. package/dist/todos/projects.d.ts +1 -1
  402. package/dist/todos/projects.d.ts.map +1 -1
  403. package/dist/todos/projects.js +3 -14
  404. package/dist/todos/projects.js.map +1 -1
  405. package/dist/topicTalkerMemory.d.ts +37 -0
  406. package/dist/topicTalkerMemory.d.ts.map +1 -0
  407. package/dist/topicTalkerMemory.js +61 -0
  408. package/dist/topicTalkerMemory.js.map +1 -0
  409. package/dist/topicTalkers.d.ts +123 -0
  410. package/dist/topicTalkers.d.ts.map +1 -0
  411. package/dist/topicTalkers.js +276 -0
  412. package/dist/topicTalkers.js.map +1 -0
  413. package/dist/types.d.ts +7 -5
  414. package/dist/types.d.ts.map +1 -1
  415. package/dist/utils/agentEnvironment.d.ts +23 -0
  416. package/dist/utils/agentEnvironment.d.ts.map +1 -1
  417. package/dist/utils/agentEnvironment.js +33 -1
  418. package/dist/utils/agentEnvironment.js.map +1 -1
  419. package/dist/utils/agentPlugin.d.ts +9 -3
  420. package/dist/utils/agentPlugin.d.ts.map +1 -1
  421. package/dist/utils/agentPlugin.js +13 -6
  422. package/dist/utils/agentPlugin.js.map +1 -1
  423. package/dist/utils/authorMark.d.ts +59 -0
  424. package/dist/utils/authorMark.d.ts.map +1 -0
  425. package/dist/utils/authorMark.js +86 -0
  426. package/dist/utils/authorMark.js.map +1 -0
  427. package/dist/utils/botSkills.d.ts +1 -1
  428. package/dist/utils/claudeApiAgentStop.d.ts +64 -0
  429. package/dist/utils/claudeApiAgentStop.d.ts.map +1 -0
  430. package/dist/utils/claudeApiAgentStop.js +85 -0
  431. package/dist/utils/claudeApiAgentStop.js.map +1 -0
  432. package/dist/utils/claudeApiCredit.d.ts +168 -0
  433. package/dist/utils/claudeApiCredit.d.ts.map +1 -0
  434. package/dist/utils/claudeApiCredit.js +260 -0
  435. package/dist/utils/claudeApiCredit.js.map +1 -0
  436. package/dist/utils/claudeApiCreditRecheck.d.ts +120 -0
  437. package/dist/utils/claudeApiCreditRecheck.d.ts.map +1 -0
  438. package/dist/utils/claudeApiCreditRecheck.js +173 -0
  439. package/dist/utils/claudeApiCreditRecheck.js.map +1 -0
  440. package/dist/utils/claudeCompactHook.d.ts +18 -10
  441. package/dist/utils/claudeCompactHook.d.ts.map +1 -1
  442. package/dist/utils/claudeCompactHook.js +35 -14
  443. package/dist/utils/claudeCompactHook.js.map +1 -1
  444. package/dist/utils/claudeLimitSwitch.d.ts +5 -1
  445. package/dist/utils/claudeLimitSwitch.d.ts.map +1 -1
  446. package/dist/utils/claudeLimitSwitch.js +6 -2
  447. package/dist/utils/claudeLimitSwitch.js.map +1 -1
  448. package/dist/utils/claudeProfileUsageLines.d.ts +14 -2
  449. package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -1
  450. package/dist/utils/claudeProfileUsageLines.js +78 -7
  451. package/dist/utils/claudeProfileUsageLines.js.map +1 -1
  452. package/dist/utils/claudeProfileUsageViews.d.ts +46 -0
  453. package/dist/utils/claudeProfileUsageViews.d.ts.map +1 -0
  454. package/dist/utils/claudeProfileUsageViews.js +114 -0
  455. package/dist/utils/claudeProfileUsageViews.js.map +1 -0
  456. package/dist/utils/claudeProfiles.d.ts +22 -0
  457. package/dist/utils/claudeProfiles.d.ts.map +1 -1
  458. package/dist/utils/claudeProfiles.js +69 -0
  459. package/dist/utils/claudeProfiles.js.map +1 -1
  460. package/dist/utils/claudeUsage.d.ts +145 -51
  461. package/dist/utils/claudeUsage.d.ts.map +1 -1
  462. package/dist/utils/claudeUsage.js +211 -94
  463. package/dist/utils/claudeUsage.js.map +1 -1
  464. package/dist/utils/compactOnIdle.d.ts +140 -15
  465. package/dist/utils/compactOnIdle.d.ts.map +1 -1
  466. package/dist/utils/compactOnIdle.js +209 -23
  467. package/dist/utils/compactOnIdle.js.map +1 -1
  468. package/dist/utils/compactSelfReviewFlags.d.ts +50 -0
  469. package/dist/utils/compactSelfReviewFlags.d.ts.map +1 -0
  470. package/dist/utils/compactSelfReviewFlags.js +120 -0
  471. package/dist/utils/compactSelfReviewFlags.js.map +1 -0
  472. package/dist/utils/fallbackChain.d.ts +18 -7
  473. package/dist/utils/fallbackChain.d.ts.map +1 -1
  474. package/dist/utils/fallbackChain.js +36 -16
  475. package/dist/utils/fallbackChain.js.map +1 -1
  476. package/dist/utils/folderGit.d.ts +9 -0
  477. package/dist/utils/folderGit.d.ts.map +1 -0
  478. package/dist/utils/folderGit.js +33 -0
  479. package/dist/utils/folderGit.js.map +1 -0
  480. package/dist/utils/forwardedMark.d.ts +8 -0
  481. package/dist/utils/forwardedMark.d.ts.map +1 -1
  482. package/dist/utils/forwardedMark.js +2 -0
  483. package/dist/utils/forwardedMark.js.map +1 -1
  484. package/dist/utils/jsonStreamHost.d.ts +2 -1
  485. package/dist/utils/jsonStreamHost.d.ts.map +1 -1
  486. package/dist/utils/jsonStreamHost.js +4 -2
  487. package/dist/utils/jsonStreamHost.js.map +1 -1
  488. package/dist/utils/messageContext.d.ts +22 -7
  489. package/dist/utils/messageContext.d.ts.map +1 -1
  490. package/dist/utils/messageContext.js +19 -5
  491. package/dist/utils/messageContext.js.map +1 -1
  492. package/dist/utils/openCodeCompactPlugin.d.ts +28 -7
  493. package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
  494. package/dist/utils/openCodeCompactPlugin.js +80 -15
  495. package/dist/utils/openCodeCompactPlugin.js.map +1 -1
  496. package/dist/utils/personLabel.d.ts +13 -0
  497. package/dist/utils/personLabel.d.ts.map +1 -0
  498. package/dist/utils/personLabel.js +15 -0
  499. package/dist/utils/personLabel.js.map +1 -0
  500. package/dist/utils/replyQuote.d.ts +17 -3
  501. package/dist/utils/replyQuote.d.ts.map +1 -1
  502. package/dist/utils/replyQuote.js +25 -2
  503. package/dist/utils/replyQuote.js.map +1 -1
  504. package/dist/utils/runnersScreenPlan.d.ts +51 -20
  505. package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
  506. package/dist/utils/runnersScreenPlan.js +143 -28
  507. package/dist/utils/runnersScreenPlan.js.map +1 -1
  508. package/dist/utils/streamedCompactionSummary.d.ts +65 -0
  509. package/dist/utils/streamedCompactionSummary.d.ts.map +1 -0
  510. package/dist/utils/streamedCompactionSummary.js +108 -0
  511. package/dist/utils/streamedCompactionSummary.js.map +1 -0
  512. package/dist/utils/talkerAccess.d.ts +9 -0
  513. package/dist/utils/talkerAccess.d.ts.map +1 -0
  514. package/dist/utils/talkerAccess.js +20 -0
  515. package/dist/utils/talkerAccess.js.map +1 -0
  516. package/dist/utils/tmuxExec.d.ts +20 -8
  517. package/dist/utils/tmuxExec.d.ts.map +1 -1
  518. package/dist/utils/tmuxExec.js +27 -7
  519. package/dist/utils/tmuxExec.js.map +1 -1
  520. package/dist/utils/topicAccessScreenPlan.d.ts +253 -0
  521. package/dist/utils/topicAccessScreenPlan.d.ts.map +1 -0
  522. package/dist/utils/topicAccessScreenPlan.js +287 -0
  523. package/dist/utils/topicAccessScreenPlan.js.map +1 -0
  524. package/dist/utils/topicLabel.d.ts +12 -0
  525. package/dist/utils/topicLabel.d.ts.map +1 -0
  526. package/dist/utils/topicLabel.js +12 -0
  527. package/dist/utils/topicLabel.js.map +1 -0
  528. package/dist/utils/topicRequest.d.ts +8 -5
  529. package/dist/utils/topicRequest.d.ts.map +1 -1
  530. package/dist/utils/topicRequest.js +9 -7
  531. package/dist/utils/topicRequest.js.map +1 -1
  532. package/npm-shrinkwrap.json +1003 -0
  533. package/package.json +5 -3
  534. package/remoteRun/ensureNode.sh +288 -0
  535. package/remoteRun/runner.sh +2252 -115
  536. package/agent-plugin/skills/charness-manager/SKILL.md +0 -157
  537. package/remoteRun/pickNode.sh +0 -65
@@ -1 +1 @@
1
- {"version":3,"file":"serviceManager.js","sourceRoot":"","sources":["../../src/runnerU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BAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACzF,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACjE,yJAAyJ;IACzJ,4HAA4H;IAC5H,MAAM,MAAM,GAAG,IAAA,8BAAe,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5F,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9D,IAAA,+BAAe,EAAC,IAAA,+BAAe,EAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,IAAA,iCAAkB,EAAC,MAAM,CAAC,CAAC,CAAC;IACnF,4JAA4J;IAC5J,IAAA,0CAA2B,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAClC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { RunnerHomePaths } from './runnerHome';
2
+ /**
3
+ * @description Jobs of different projects run side by side on one Mac, and each iOS job has a Simulator device of its own (`REMOTE_RUN_IOS_SIMULATOR_UDID`, made by
4
+ * `runner.sh ios-device`). Agents and test tools habitually clear the field with `xcrun simctl shutdown all` (Detox, a freshness gate that refuses two booted devices,
5
+ * a script's cleanup) — which would stop the devices of every other job under way — or name the device `booted`, which with two simulators up may be the other job's.
6
+ * So `<root>/bin/xcrun`, first on a job's PATH (`execEnv.ts`: the folders of a job and of the login session's agent), is a guard in front of the real `/usr/bin/xcrun`:
7
+ *
8
+ * `xcrun simctl [--set <path>] shutdown | erase | delete all`, and any `simctl <subcommand> booted …` → the same command on the job's own device, with a line on
9
+ * stderr saying so; with no device of its own (the variable is not set) → for `shutdown | erase | delete`
10
+ * nothing is run, exit 0, the same line (any other `<subcommand> booted` is left as it is)
11
+ * everything else (`delete unavailable`, `boot <udid>`, `list devices booted`, any other tool of `xcrun`) → `exec /usr/bin/xcrun "$@"`, the arguments intact
12
+ *
13
+ * It is a guard against a habit, not a wall: `/usr/bin/xcrun`, `killall Simulator` and `killall com.apple.CoreSimulator.CoreSimulatorService` pass it (the agents'
14
+ * instructions say not to). Written at every link start and on `check` (like the `corepack` wrapper of `packageManagerShims.ts`): rewritten when this version's text
15
+ * differs, removed again where it has no use (not a Mac, no `/usr/bin/xcrun`), and a `<root>/bin/xcrun` that is not ours (no marker) is left alone.
16
+ */
17
+ export declare const realXcrunPath = "/usr/bin/xcrun";
18
+ /** The first comment of the guard: what makes a `<root>/bin/xcrun` ours to rewrite or remove. */
19
+ export declare const xcrunGuardMarker = "# Written by charness-runner: xcrun guard.";
20
+ /** The variable `runner.sh` sets for a job that has a Simulator device of its own. */
21
+ export declare const simulatorUdidVariable = "REMOTE_RUN_IOS_SIMULATOR_UDID";
22
+ /** What `ensureXcrunGuard` did: made or refreshed, was current already, took our own away, found nothing to do, or found an `xcrun` that is not ours and left it. */
23
+ export type GuardOutcome = 'installed' | 'current' | 'removed' | 'not-needed' | 'foreign';
24
+ export interface GuardDeps {
25
+ platform: NodeJS.Platform;
26
+ /** The real `xcrun` the guard hands everything else to. */
27
+ realXcrun: string;
28
+ /** Is `candidate` a file this account can run? */
29
+ checkIsExecutable: (candidate: string) => boolean;
30
+ }
31
+ export declare function createGuardDeps(): GuardDeps;
32
+ /** @description The text of the guard (see the head of the file); the real `xcrun` is the one thing in it that varies. POSIX `sh`, no arrays: a rebuilt argument list is rotated through `set --`. */
33
+ export declare function renderXcrunGuard(realXcrun: string): string;
34
+ /** @description Put the guard in `<root>/bin` on a Mac that has a real `xcrun`; take our own back out anywhere else. Throws only what writing the file throws (the caller says it, the link goes up anyway). */
35
+ export declare function ensureXcrunGuard(paths: RunnerHomePaths, deps: GuardDeps): GuardOutcome;
36
+ /** @description One line for the link's log: what keeps `simctl shutdown all` away from the other jobs' simulators; nothing where the guard is not in place. */
37
+ export declare function formatGuardLine(outcome: GuardOutcome, paths: RunnerHomePaths): string | null;
38
+ //# sourceMappingURL=simctlGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simctlGuard.d.ts","sourceRoot":"","sources":["../../src/runnerUtility/simctlGuard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAG9C,iGAAiG;AACjG,eAAO,MAAM,gBAAgB,+CAA+C,CAAC;AAC7E,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAIrE,qKAAqK;AACrK,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAE1F,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD;AAED,wBAAgB,eAAe,IAAI,SAAS,CAa3C;AAED,sMAAsM;AACtM,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA4C1D;AAUD,gNAAgN;AAChN,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,GAAG,YAAY,CAetF;AAED,gKAAgK;AAChK,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAI5F"}
@@ -0,0 +1,166 @@
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.simulatorUdidVariable = exports.xcrunGuardMarker = exports.realXcrunPath = void 0;
37
+ exports.createGuardDeps = createGuardDeps;
38
+ exports.renderXcrunGuard = renderXcrunGuard;
39
+ exports.ensureXcrunGuard = ensureXcrunGuard;
40
+ exports.formatGuardLine = formatGuardLine;
41
+ const fs = __importStar(require("fs"));
42
+ const path = __importStar(require("path"));
43
+ const configDirFile_1 = require("../configDirFile");
44
+ const tmuxExec_1 = require("../utils/tmuxExec");
45
+ /**
46
+ * @description Jobs of different projects run side by side on one Mac, and each iOS job has a Simulator device of its own (`REMOTE_RUN_IOS_SIMULATOR_UDID`, made by
47
+ * `runner.sh ios-device`). Agents and test tools habitually clear the field with `xcrun simctl shutdown all` (Detox, a freshness gate that refuses two booted devices,
48
+ * a script's cleanup) — which would stop the devices of every other job under way — or name the device `booted`, which with two simulators up may be the other job's.
49
+ * So `<root>/bin/xcrun`, first on a job's PATH (`execEnv.ts`: the folders of a job and of the login session's agent), is a guard in front of the real `/usr/bin/xcrun`:
50
+ *
51
+ * `xcrun simctl [--set <path>] shutdown | erase | delete all`, and any `simctl <subcommand> booted …` → the same command on the job's own device, with a line on
52
+ * stderr saying so; with no device of its own (the variable is not set) → for `shutdown | erase | delete`
53
+ * nothing is run, exit 0, the same line (any other `<subcommand> booted` is left as it is)
54
+ * everything else (`delete unavailable`, `boot <udid>`, `list devices booted`, any other tool of `xcrun`) → `exec /usr/bin/xcrun "$@"`, the arguments intact
55
+ *
56
+ * It is a guard against a habit, not a wall: `/usr/bin/xcrun`, `killall Simulator` and `killall com.apple.CoreSimulator.CoreSimulatorService` pass it (the agents'
57
+ * instructions say not to). Written at every link start and on `check` (like the `corepack` wrapper of `packageManagerShims.ts`): rewritten when this version's text
58
+ * differs, removed again where it has no use (not a Mac, no `/usr/bin/xcrun`), and a `<root>/bin/xcrun` that is not ours (no marker) is left alone.
59
+ */
60
+ exports.realXcrunPath = '/usr/bin/xcrun';
61
+ const guardName = 'xcrun';
62
+ const guardMode = 0o755;
63
+ /** The first comment of the guard: what makes a `<root>/bin/xcrun` ours to rewrite or remove. */
64
+ exports.xcrunGuardMarker = '# Written by charness-runner: xcrun guard.';
65
+ /** The variable `runner.sh` sets for a job that has a Simulator device of its own. */
66
+ exports.simulatorUdidVariable = 'REMOTE_RUN_IOS_SIMULATOR_UDID';
67
+ /** The subcommands of `simctl` that take `all` (and, with no device of the job's own, are not run on `booted` either). */
68
+ const guardedSubcommands = ['shutdown', 'erase', 'delete'];
69
+ function createGuardDeps() {
70
+ return {
71
+ platform: process.platform,
72
+ realXcrun: exports.realXcrunPath,
73
+ checkIsExecutable: (candidate) => {
74
+ try {
75
+ fs.accessSync(candidate, fs.constants.X_OK);
76
+ return fs.statSync(candidate).isFile();
77
+ }
78
+ catch {
79
+ return false;
80
+ }
81
+ },
82
+ };
83
+ }
84
+ /** @description The text of the guard (see the head of the file); the real `xcrun` is the one thing in it that varies. POSIX `sh`, no arrays: a rebuilt argument list is rotated through `set --`. */
85
+ function renderXcrunGuard(realXcrun) {
86
+ const udid = `\${${exports.simulatorUdidVariable}:-}`;
87
+ return [
88
+ '#!/bin/sh',
89
+ exports.xcrunGuardMarker,
90
+ '# Jobs run side by side on this machine, each with a Simulator device of its own: `xcrun simctl shutdown|erase|delete all` would reach the devices of the other jobs, and `booted` may name another job\'s.',
91
+ '# It is run on this job\'s own device instead (or, for shutdown|erase|delete, not at all when the job has none). Everything else goes to the real xcrun unchanged.',
92
+ '# A guard against the habit, not a wall: /usr/bin/xcrun, `killall Simulator` and `killall com.apple.CoreSimulator.CoreSimulatorService` pass it.',
93
+ `REAL=${(0, tmuxExec_1.shellSingleQuote)(realXcrun)}`,
94
+ '[ "$1" = simctl ] || exec "$REAL" "$@"',
95
+ 'position=0; skip_next=0; subcommand=; target=; target_position=0',
96
+ 'for argument in "$@"; do',
97
+ ' position=$((position + 1))',
98
+ ' [ "$position" -eq 1 ] && continue',
99
+ ' if [ "$skip_next" -eq 1 ]; then skip_next=0; continue; fi',
100
+ ' case $argument in',
101
+ ' --set) skip_next=1; continue;;',
102
+ ' --set=*) continue;;',
103
+ ' esac',
104
+ ' if [ -z "$subcommand" ]; then subcommand=$argument; continue; fi',
105
+ ' case $argument in -*) continue;; esac',
106
+ ' if [ "$target_position" -eq 0 ]; then target=$argument; target_position=$position; fi',
107
+ 'done',
108
+ 'case $target in',
109
+ ` all) case $subcommand in ${guardedSubcommands.join('|')}) ;; *) exec "$REAL" "$@";; esac;;`,
110
+ ' booted) ;;',
111
+ ' *) exec "$REAL" "$@";;',
112
+ 'esac',
113
+ `if [ -z "${udid}" ]; then`,
114
+ ` case $subcommand in ${guardedSubcommands.join('|')}) ;; *) exec "$REAL" "$@";; esac`,
115
+ ' echo "charness-runner: \\`xcrun simctl $subcommand $target\\` was not run: other jobs on this machine use their own simulators, and this job has none of its own (' + exports.simulatorUdidVariable + ' is not set)" >&2',
116
+ ' exit 0',
117
+ 'fi',
118
+ `echo "charness-runner: \\\`xcrun simctl $subcommand $target\\\` can reach the simulators of other jobs on this machine; it is run on this job's own simulator (${udid}) only" >&2`,
119
+ 'count=$#; index=0',
120
+ 'while [ "$index" -lt "$count" ]; do',
121
+ ' index=$((index + 1))',
122
+ ' argument=$1; shift',
123
+ ` [ "$index" -eq "$target_position" ] && argument="${udid}"`,
124
+ ' set -- "$@" "$argument"',
125
+ 'done',
126
+ 'exec "$REAL" "$@"',
127
+ '',
128
+ ].join('\n');
129
+ }
130
+ function readTextOrNull(filePath) {
131
+ try {
132
+ return fs.readFileSync(filePath, 'utf8');
133
+ }
134
+ catch {
135
+ return null;
136
+ }
137
+ }
138
+ /** @description Put the guard in `<root>/bin` on a Mac that has a real `xcrun`; take our own back out anywhere else. Throws only what writing the file throws (the caller says it, the link goes up anyway). */
139
+ function ensureXcrunGuard(paths, deps) {
140
+ const guardPath = path.join(paths.binDir, guardName);
141
+ const current = readTextOrNull(guardPath);
142
+ const isOurs = current !== null && current.includes(exports.xcrunGuardMarker);
143
+ if (deps.platform !== 'darwin' || !deps.checkIsExecutable(deps.realXcrun)) {
144
+ if (!isOurs)
145
+ return 'not-needed';
146
+ fs.rmSync(guardPath, { force: true });
147
+ return 'removed';
148
+ }
149
+ if (current !== null && !isOurs)
150
+ return 'foreign';
151
+ const text = renderXcrunGuard(deps.realXcrun);
152
+ if (current === text)
153
+ return 'current';
154
+ fs.mkdirSync(paths.binDir, { recursive: true, mode: 0o700 });
155
+ (0, configDirFile_1.writeTextFileAtomically)(guardPath, text, guardMode);
156
+ return 'installed';
157
+ }
158
+ /** @description One line for the link's log: what keeps `simctl shutdown all` away from the other jobs' simulators; nothing where the guard is not in place. */
159
+ function formatGuardLine(outcome, paths) {
160
+ if (outcome === 'installed' || outcome === 'current')
161
+ return ` simulators: ${path.join(paths.binDir, guardName)} runs \`xcrun simctl shutdown|erase|delete all\` and \`xcrun simctl <command> booted\` on a job's own simulator only`;
162
+ if (outcome === 'foreign')
163
+ return ` simulators: ${path.join(paths.binDir, guardName)} is not charness-runner's: jobs can shut down each other's simulators with \`simctl shutdown all\``;
164
+ return null;
165
+ }
166
+ //# sourceMappingURL=simctlGuard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simctlGuard.js","sourceRoot":"","sources":["../../src/runnerUtility/simctlGuard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,0CAaC;AAGD,4CA4CC;AAWD,4CAeC;AAGD,0CAIC;AAxID,uCAAyB;AACzB,2CAA6B;AAC7B,oDAA2D;AAC3D,gDAAqD;AAGrD;;;;;;;;;;;;;;GAcG;AAEU,QAAA,aAAa,GAAG,gBAAgB,CAAC;AAC9C,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,iGAAiG;AACpF,QAAA,gBAAgB,GAAG,4CAA4C,CAAC;AAC7E,sFAAsF;AACzE,QAAA,qBAAqB,GAAG,+BAA+B,CAAC;AACrE,0HAA0H;AAC1H,MAAM,kBAAkB,GAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAa9E,SAAgB,eAAe;IAC7B,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,SAAS,EAAE,qBAAa;QACxB,iBAAiB,EAAE,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC;gBACH,EAAE,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBAC5C,OAAO,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;YACz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iBAAiB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,oGAAoG,CAAC;IAC1L,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -3,11 +3,10 @@ import { type PairCodePayload } from './pairCode';
3
3
  export declare const defaultRunnerAccount = "runner";
4
4
  /** @description Is `name` a plain account name (letters, digits, `.`, `_`, `-`; no leading `-`)? The admin line refuses anything else. */
5
5
  export declare function checkIsAccountName(name: string): boolean;
6
- /** @description The command to paste on the runner machine, as the account that will run jobs, for the pairing `payload`. */
7
- export declare function buildBootstrapLine(payload: PairCodePayload): string;
8
6
  /**
9
- * @description The command to paste in an ADMIN account's terminal on the runner machine: it checks `account`, pairs it, and installs its
10
- * always-on service. `account` is the line's last word, so the operator can change it by hand.
7
+ * @description The command to paste on the runner machine: `sudo sh -c '<script>' sh <account>`. In an ADMIN account's terminal it pairs `account` and installs its
8
+ * always-on service; without its leading `sudo`, in the terminal of `account` itself, it pairs that account only (see the head of the file). `account` is the
9
+ * line's last word, so the operator can change it by hand.
11
10
  */
12
11
  export declare function buildAdminBootstrapLine(payload: PairCodePayload, account?: string): string;
13
12
  //# sourceMappingURL=bootstrapLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrapLine.d.ts","sourceRoot":"","sources":["../../src/runners/bootstrapLine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAwElE,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAK7C,0IAA0I;AAC1I,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAmDD,6HAA6H;AAC7H,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAGnE;AA4BD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,GAAE,MAA6B,GAAG,MAAM,CAGhH"}
1
+ {"version":3,"file":"bootstrapLine.d.ts","sourceRoot":"","sources":["../../src/runners/bootstrapLine.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkG,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AA2ElJ,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAK7C,0IAA0I;AAC1I,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAmGD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,GAAE,MAA6B,GAAG,MAAM,CAGhH"}
@@ -2,53 +2,63 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultRunnerAccount = void 0;
4
4
  exports.checkIsAccountName = checkIsAccountName;
5
- exports.buildBootstrapLine = buildBootstrapLine;
6
5
  exports.buildAdminBootstrapLine = buildAdminBootstrapLine;
7
6
  const adminCheck_1 = require("../runnerUtility/adminCheck");
8
7
  const gateProtocol_1 = require("./gateProtocol");
8
+ const managedNode_1 = require("../runnerUtility/managedNode");
9
+ const runnerHome_1 = require("../runnerUtility/runnerHome");
9
10
  const pairCode_1 = require("./pairCode");
10
11
  /**
11
- * @description The lines the operator runs on the runner machine. They are plain `sh` (a runner has nothing of charness yet): they
12
- * write the pairing's temporary key and the hub's host key into a private temp folder (removed on exit), download the hub's own
13
- * charness package through the gate's `bootstrap` request, unpack it, and hand over to the runner utility's `pair` step with the
14
- * pairing code and the id of the archive they downloaded (the hub announces it in the marker line; the first step checks the archive against it). What the hub's shell printed before the gate ran (a banner, a motd) is skipped: the answer opens with the marker line,
15
- * which `grep -b` finds among the first {@link maxGateNoiseBytes} bytes, and the archive is cut out from the byte after it.
12
+ * @description THE line the operator runs on the runner machine: `sudo sh -c '<script>' sh <account>` (see {@link buildAdminBootstrapLine}). It is plain
13
+ * `sh` (a runner has nothing of charness yet): it writes the pairing's temporary key and the hub's host key into a private temp folder (removed on exit),
14
+ * downloads the hub's own charness package through the gate's `bootstrap` request, unpacks it, and hands over to the runner utility with the pairing code and
15
+ * the id of the archive it downloaded (the hub announces it in the marker line; the first step checks the archive against it). What the hub's shell printed
16
+ * before the gate ran (a banner, a motd) is skipped: the answer opens with the marker line, which `grep -b` finds among the first {@link maxGateNoiseBytes}
17
+ * bytes, and the archive is cut out from the byte after it.
16
18
  *
17
19
  * Contract with the runner utility: `runnerCli.js pair --bootstrap <unpacked folder> --archive <file> --package-id <id> <code>` is started with a package that has NO
18
20
  * `node_modules` yet, so it reaches its install step (`npm ci --omit=dev --ignore-scripts` into its own app folder, against the lock the package carries) using
19
21
  * Node's built-ins only.
20
22
  *
21
- * Every value in the line passed a strict pattern (`pairCode.ts`) that has no quote, space, `$`, backtick or backslash; the line
22
- * itself is wrapped in single quotes and so holds none.
23
+ * Every value in the line passed a strict pattern (`pairCode.ts`) that has no quote, space, `$`, backtick or backslash; the line itself is wrapped in single
24
+ * quotes and so holds none. Each value is in the line ONCE, as a shell variable (`u h p y z k`: account, host, port, host key type and key, private key body)
25
+ * that the script itself needs before any program exists to read a code; the pairing code it hands the utility is JOINED from those variables by the shell
26
+ * (`pairCode.ts`: `"cr2.$u,$h,$p,<id>,$y,$z,$k"`) instead of being carried in the line a second time — a copy as base64 once cost the line more than a third of its
27
+ * length, and a Telegram message holds 4096 characters. The same script serves two ways of running it, chosen by who runs it — ONE line, so the Telegram message holds one (together two
28
+ * would not fit 4096 characters) and the operator changes one word, not a whole line:
23
29
  *
24
- * The PLAIN line ({@link buildBootstrapLine}) is run as the runner account itself: all of it is that account's.
30
+ * as ROOT (`sudo …`, the way it is offered) it does everything for the account named by its last word. The runner account runs the agents' code, so ROOT
31
+ * never executes, reads through or writes into anything that account can change. As root the script (1) checks the account (it exists; not root; not an
32
+ * admin; the OS is known), (2) downloads the package into a folder of ITS OWN in `/tmp` — root-owned, readable by the account, extracted with
33
+ * `--no-same-owner` — (3) has the package's `remoteRun/ensureNode.sh` install the runner its own Node.js into a folder only root can write
34
+ * (`/usr/local/lib/charness-runner/node`; checked again for what root requires of it — outside every home, the account can run it and cannot write it) and
35
+ * (4) runs the root step with that Node from the same root-owned copy (`rootServiceCli.js install <account> --bootstrap …`: Node built-ins only,
36
+ * because the copy has no dependencies). The root step has the account pair itself from that copy (`sudo -u <account> -H node
37
+ * …/runnerCli.js pair`: its files are the account's, never root's) and then installs the always-on service. EVERY step that runs as the
38
+ * account goes through one runner with no terminal attached (a session of its own, no standard input, its output piped through the root
39
+ * step with the control characters stripped), see `runnerUtility/adminService.ts` and `isolatedCommand.ts`: the account runs the agents'
40
+ * code, and code it can change must not get the admin's terminal. Run again for an account that is already paired, the line pairs nothing twice and
41
+ * installs the service — that is its way to retry.
25
42
  *
26
- * The ADMIN line ({@link buildAdminBootstrapLine}), `sudo sh -c '<script>' sh <account>`, is run from an admin account and does everything
27
- * for the account named by its last word. The runner account runs the agents' code, so ROOT never executes, reads through or writes into
28
- * anything that account can change. As root the script (1) checks the account (it exists; not root; not an admin; the OS is known),
29
- * (2) downloads the package into a folder of ITS OWN in `/tmp` — root-owned, readable by the account, extracted with `--no-same-owner`
30
- * — and (3) runs the root step from the same root-owned copy (`rootServiceCli.js install <account> --bootstrap …`: Node built-ins only,
31
- * because the copy has no dependencies). The root step has the account pair itself from that copy (`sudo -u <account> -H node
32
- * …/runnerCli.js pair`: its files are the account's, never root's) and then installs the always-on service. EVERY step that runs as the
33
- * account goes through one runner with no terminal attached (a session of its own, no standard input, its output piped through the root
34
- * step with the control characters stripped), see `runnerUtility/adminService.ts` and `isolatedCommand.ts`: the account runs the agents'
35
- * code, and code it can change must not get the admin's terminal. The pairing code stays single use, 10 minutes, a secret; sudo logs the command line, so a code that
36
- * is neither used nor closed stays live in that log until it runs out: a refused line (no such account, an admin account) leaves it open ON
37
- * PURPOSE — the operator fixes the last word and pastes the same line again — and an already-paired account's line closes its own code (the
38
- * gate's `cancel`). Nothing creates an account. Run again for an account that is already paired, the line pairs nothing twice and installs
39
- * the service — that is its way to retry.
43
+ * as a NON-ROOT user (the same line without its leading `sudo`, from the runner account's own terminal) it pairs THAT account, for a person without
44
+ * admin rights: everything is the account's — the temp folder (`$TMPDIR`, private), the runner's own Node.js, which `ensureNode.sh own` puts in
45
+ * `~/.charness-runner/node` before the pairing runs under it, and the pairing itself (`runnerCli.js pair`). No service is installed (the pairing prints the
46
+ * «keep it running» help for the account to follow). The last word must be the name of the account that runs it: the line pairs the account you are in, and
47
+ * a main account with a leftover `runner` at the end is refused instead of paired by mistake. Nothing judges that account (it is the account the person
48
+ * chose to be in; only root's way — another account — is checked for admin rights).
40
49
  *
41
- * What the admin line trusts: the charness host. The line is text the host made, and the program root runs from it is the one in the host's
42
- * own install, so whoever can change that install (its user, and the agents that run as that user) controls code that runs as root on the
43
- * runner machine — and what it installs outlasts the paste. The plain line trusts the host only with the runner account. Every place that
44
- * offers the line says so: the Telegram message (`runners.pairingAdminIntro`) and the CLI's text (`adminLineTrustSentence` in `runnersCli.ts`).
50
+ * A machine needs no Node.js of its own for either way: only `curl` or `wget`, `tar`, and a way to reach nodejs.org. The pairing code stays single use, 10
51
+ * minutes, a secret; sudo logs the command line, so a code that is neither used nor closed stays live in that log until it runs out: a refused line (no such
52
+ * account, an admin account) leaves it open ON PURPOSE — the operator fixes the last word and pastes the same line again — and an already-paired account's
53
+ * line closes its own code (the gate's `cancel`). Nothing creates an account.
54
+ *
55
+ * What the root way trusts: the charness host. The line is text the host made, and the program root runs from it is the one in the host's own install, so
56
+ * whoever can change that install (its user, and the agents that run as that user) controls code that runs as root on the runner machine — and what it installs
57
+ * outlasts the paste. The non-root way trusts the host only with the runner account. Every place that offers the line says so: the Telegram message
58
+ * (`runners.pairingIntro`) and the CLI's text (`adminLineTrustSentence` in `runnersCli.ts`).
45
59
  */
46
- const minNodeMajor = 22;
47
- const minNodeMinor = 12;
48
60
  const hubHostAlias = 'hub';
49
61
  const privateKeyFoldWidth = 70;
50
- const privateKeyHeader = '-----BEGIN OPENSSH PRIVATE KEY-----';
51
- const privateKeyFooter = '-----END OPENSSH PRIVATE KEY-----';
52
62
  const connectTimeoutSeconds = 20;
53
63
  /** The marker line of a `bootstrap` answer as an extended regular expression: the marker, the request, optional `key=value` fields. */
54
64
  const bootstrapMarkerPattern = `^${gateProtocol_1.gateMarker} bootstrap( [a-z]+=[A-Za-z0-9._:@/-]*)*$`;
@@ -57,21 +67,17 @@ const bootstrapMarkerPattern = `^${gateProtocol_1.gateMarker} bootstrap( [a-z]+=
57
67
  * `charness-runner: checking the account`. A function in the script, defined once, so each step costs a few characters of the Telegram message.
58
68
  */
59
69
  const sayFunction = 's() { echo "charness-runner: $*"; }';
60
- /** The same for a refusal: the line on stderr, then out. A function, defined once — three refusals of the fetch steps and the admin checks share it. */
61
- const failFunction = 'f() { echo "charness-runner: $*" >&2; exit 1; }';
62
- /** The test of a `node` program (`$1` is the program): exit status 0 when it is `minNodeMajor.minNodeMinor` or newer. */
63
- function nodeVersionCheck(program) {
64
- return `${program} -e "var v=process.versions.node.split(/[.]/);process.exit(v[0]>${minNodeMajor}||v[0]==${minNodeMajor}&&v[1]>=${minNodeMinor}?0:1)"`;
65
- }
66
- /** The Node pick the admin line runs as root from its copy of the package (see the script's own head): prints the real path of the Node root and the service run under. */
67
- const pickNodeInPackage = 'remoteRun/pickNode.sh';
70
+ /** The same for a refusal: the line on stderr, then out. A function, defined once — the refusals of the fetch steps and the checks share it. */
71
+ const failFunction = 'f() { s "$*" >&2; exit 1; }';
72
+ // The Node install both lines run from their copy of the package (`ensureNodeScriptRelativePath`; see the script's own head): it puts the runner's OWN Node.js in
73
+ // place — the official build from nodejs.org, checksum checked — and prints the real path of the `node` the pairing runs under. Kept out of the pasted line: a
74
+ // Telegram message holds 4096 characters.
75
+ /** Where the Node of the account's own way goes, as the shell spells it: inside the account's state folder. */
76
+ const ownNodeBaseInShell = `"$HOME/${runnerHome_1.runnerStateDirName}/${runnerHome_1.ownNodeDirName}"`;
68
77
  const runnerCliInPackage = 'dist/runnerUtility/runnerCli.js';
69
78
  const rootServiceCliInPackage = 'dist/runnerUtility/rootServiceCli.js';
70
79
  /** Where the admin line's root-owned copy is made: a folder the account can read, which `$TMPDIR` (the admin's own, private) is not. */
71
80
  const adminCopyBase = '/tmp';
72
- function getPrivateKeyBody(privateKey) {
73
- return privateKey.replace(privateKeyHeader, '').replace(privateKeyFooter, '').replace(/\s+/g, '');
74
- }
75
81
  /** @description The account the admin line pairs unless the operator changes its last word. */
76
82
  exports.defaultRunnerAccount = 'runner';
77
83
  /** The characters of an account name the admin line lets through (a character class body): none is special to a shell, and a name never starts with `-`. */
@@ -82,11 +88,12 @@ function checkIsAccountName(name) {
82
88
  return accountNamePattern.test(name);
83
89
  }
84
90
  /**
85
- * The steps that make the package ready in `$d/pkg` (and its archive in `$d/package.tgz`): `sh` that needs nothing of charness. `isForAccount`:
86
- * the copy is made by ROOT for an account to read — its folder is world-readable (the key files in it stay 0600), the archive and the
87
- * package are extracted readable, and without taking the owner from the archive, so root's copy stays root's.
91
+ * The steps that make the package ready in `$d/pkg` (and its archive in `$d/package.tgz`): `sh` that needs nothing of charness. `$r` is `1` when ROOT makes the
92
+ * copy for an account to read — its folder is made world-readable once the package is downloaded (the key files in it stay 0600), the archive and the package
93
+ * are extracted readable — and `0` for a non-root user's own copy, which stays private. `$b` is the folder the copy is made in. The copy never takes the owner from the archive, so root's copy
94
+ * stays root's.
88
95
  */
89
- function renderFetchSteps(payload, isForAccount) {
96
+ function renderFetchSteps(fields) {
90
97
  const sshOptions = [
91
98
  '-T', '-F /dev/null', '-i "$d/key"',
92
99
  '-o BatchMode=yes', '-o IdentitiesOnly=yes', '-o IdentityAgent=none',
@@ -96,75 +103,93 @@ function renderFetchSteps(payload, isForAccount) {
96
103
  ].join(' ');
97
104
  return [
98
105
  'umask 077',
99
- `d=$(mktemp -d "${isForAccount ? adminCopyBase : '${TMPDIR:-/tmp}'}/charness-runner.XXXXXXXX")`,
100
- ...(isForAccount ? ['chmod 755 "$d"'] : []),
106
+ 'd=$(mktemp -d "$b/charness-runner.XXXXXXXX")',
101
107
  'trap "rm -rf \\"$d\\"" EXIT',
102
108
  'trap "exit 1" INT TERM',
103
- `u="${payload.user}"`,
104
- `h="${payload.host}"`,
105
- `p="${payload.port}"`,
106
- `k="${payload.hostKey}"`,
107
- `b="${getPrivateKeyBody(payload.privateKey)}"`,
108
- ...(isForAccount ? [] : [`command -v node >/dev/null 2>&1 && ${nodeVersionCheck('node')} || f "Node.js ${minNodeMajor}.${minNodeMinor} or newer is needed on this machine (https://nodejs.org)"`]),
109
- `{ printf "%s\\n" "${privateKeyHeader}"; printf "%s" "$b" | fold -w ${privateKeyFoldWidth}; printf "\\n%s\\n" "${privateKeyFooter}"; } > "$d/key"`,
110
- `printf "%s %s\\n" ${hubHostAlias} "$k" > "$d/kh"`,
109
+ `u="${fields.user}"`,
110
+ `h="${fields.host}"`,
111
+ `p="${fields.port}"`,
112
+ `y="${fields.hostKeyType}"`,
113
+ `z="${fields.hostKeyBlob}"`,
114
+ `k="${fields.privateKeyBody}"`,
115
+ `{ printf "%s\\n" "${pairCode_1.privateKeyHeader}"; printf "%s" "$k" | fold -w ${privateKeyFoldWidth}; printf "\\n%s\\n" "${pairCode_1.privateKeyFooter}"; } > "$d/key"`,
116
+ `printf "%s %s %s\\n" ${hubHostAlias} "$y" "$z" > "$d/kh"`,
111
117
  's "downloading the package from the hub"',
112
118
  `ssh ${sshOptions} "$u@$h" bootstrap > "$d/answer" || f "the hub refused or did not answer: expired or used line? see the ssh message above"`,
113
119
  `hit=$(head -c ${gateProtocol_1.maxGateNoiseBytes} "$d/answer" | LC_ALL=C grep -a -b -o -E -e "${bootstrapMarkerPattern}" | head -n 1)`,
114
120
  '[ -n "$hit" ] || f "no package from the hub: expired or used line?"',
115
121
  'o=${hit%%:*}; t=${hit#*:}',
116
- ...(isForAccount ? ['umask 022'] : []),
122
+ '[ "$r" = 0 ] || { chmod 755 "$d"; umask 022; }',
117
123
  'tail -c +$((o + ${#t} + 2)) "$d/answer" > "$d/package.tgz"',
118
124
  'mkdir "$d/pkg"',
119
- `tar ${isForAccount ? '--no-same-owner ' : ''}-xzf "$d/package.tgz" -C "$d/pkg"`,
125
+ 'tar --no-same-owner -xzf "$d/package.tgz" -C "$d/pkg"',
120
126
  ];
121
127
  }
122
- /** The arguments of a pairing from the unpacked package, for the pairing `code`: the folder, the archive and the id the hub announced for it. */
123
- function renderPairArguments(code) {
124
- return `--bootstrap "$d/pkg" --archive "$d/package.tgz" --package-id "\${t##*id=}" ${code}`;
128
+ /**
129
+ * The arguments of a pairing from the unpacked package: the folder, the archive, the id the hub announced for it and the pairing code, which the SHELL puts
130
+ * together from the variables the script already holds (`pairCode.ts`: it is not carried a second time in the line).
131
+ */
132
+ function renderPairArguments(fields) {
133
+ const code = (0, pairCode_1.joinPairCodeFields)({ ...fields, user: '$u', host: '$h', port: '$p', hostKeyType: '$y', hostKeyBlob: '$z', privateKeyBody: '$k' });
134
+ return `--bootstrap "$d/pkg" --archive "$d/package.tgz" --package-id "\${t##*id=}" "${code}"`;
125
135
  }
126
136
  function checkScriptHasNoQuote(script, what) {
127
137
  if (script.includes("'"))
128
138
  throw new Error(`the ${what} script must not hold a single quote`);
129
139
  return script;
130
140
  }
131
- /** @description The command to paste on the runner machine, as the account that will run jobs, for the pairing `payload`. */
132
- function buildBootstrapLine(payload) {
133
- const script = [...renderFetchSteps(payload, false), `node "$d/pkg/${runnerCliInPackage}" pair ${renderPairArguments((0, pairCode_1.encodePairCode)(payload))}`];
134
- return `sh -c '${checkScriptHasNoQuote(['set -eu', sayFunction, failFunction, ...script].join('; '), 'bootstrap')}'`;
135
- }
136
141
  /**
137
- * The admin script. `$1` is the account. Messages are plain ASCII with no apostrophe (the whole line sits in single quotes) and short: the
138
- * line plus its text must fit one Telegram message.
142
+ * The script (see the head of the file for its two ways). `$1` is the account. Messages are plain ASCII with no apostrophe (the whole line sits in single
143
+ * quotes) and short: the line plus its text must fit one Telegram message.
139
144
  */
140
- function renderAdminScript(payload) {
141
- const checks = [
142
- sayFunction,
143
- failFunction,
144
- 'a=$1',
145
- '[ "$(id -u)" = 0 ] || f "run this line with sudo"',
146
- 's "checking the account $a"',
147
- `case $a in ""|-*|*[!${accountNameChars}]*) f "$a is not an account name";; esac`,
145
+ function renderScript(fields) {
146
+ const notAccountName = 'f "$a is not an account name"';
147
+ // Root's way: another account is named, and root checks it before anything is fetched or runs as it — also that the name is a plain one, because the name goes
148
+ // to `id`, to `sudo -u` and to the root step.
149
+ const asRootChecks = [
150
+ 'r=1',
151
+ `b=${adminCopyBase}`,
152
+ `case $a in *[!${accountNameChars}]*) ${notAccountName};; esac`,
148
153
  'i=$(id -u "$a" 2>/dev/null) || f "no account $a here: create a standard user or fix the last word"',
149
154
  '[ "$i" != 0 ] || f "$a is root: use a standard user"',
150
155
  `case $(uname -s) in Darwin) g="${adminCheck_1.macAdminGroup}";; Linux) g="${adminCheck_1.linuxAdminGroups.join(' ')}";; *) f "only macOS and Linux";; esac`,
151
156
  'gs=$(id -Gn "$a") || f "no groups for $a"',
152
157
  'for x in $gs; do case " $g " in *" $x "*) f "$a is an admin: the agents code runs with its rights";; esac; done',
153
158
  ];
159
+ // The account's own way: nobody else is involved, so the only question is whether it IS the account named. The name is only compared (quoted) and told: an
160
+ // account named by a directory service (`user@realm`) is its own business, and the old line, which asked nothing, paired it.
161
+ const asAccountChecks = [
162
+ 'r=0',
163
+ 'b=${TMPDIR:-/tmp}',
164
+ '[ "$a" = "$(id -un)" ] || f "you are not $a: run the line as $a or with sudo"',
165
+ ];
166
+ const checks = [
167
+ sayFunction,
168
+ failFunction,
169
+ 'a=$1',
170
+ 's "checking the account $a"',
171
+ `case $a in ""|-*) ${notAccountName};; esac`,
172
+ `if [ "$(id -u)" = 0 ]; then ${asRootChecks.join('; ')}; else ${asAccountChecks.join('; ')}; fi`,
173
+ ];
174
+ const nodeScript = `"$d/pkg/${managedNode_1.ensureNodeScriptRelativePath}"`;
175
+ const asRootStep = `n=$(sh ${nodeScript} root "$a"); "$n" "$d/pkg/${rootServiceCliInPackage}" install "$a" "$@"`;
176
+ const asAccountStep = `n=$(sh ${nodeScript} own ${ownNodeBaseInShell}); "$n" "$d/pkg/${runnerCliInPackage}" pair "$@"`;
154
177
  const steps = [
155
- ...renderFetchSteps(payload, true),
156
- `n=$(sh "$d/pkg/${pickNodeInPackage}" "$a")`,
157
- `"$n" "$d/pkg/${rootServiceCliInPackage}" install "$a" ${renderPairArguments((0, pairCode_1.encodePairCode)(payload))}`,
178
+ ...renderFetchSteps(fields),
179
+ // The account is saved in `$a`: the pairing's arguments are the one list both steps are handed.
180
+ `set -- ${renderPairArguments(fields)}`,
181
+ `if [ "$r" = 1 ]; then ${asRootStep}; else ${asAccountStep}; fi`,
158
182
  ];
159
- return checkScriptHasNoQuote(['set -eu', ...checks, ...steps].join('; '), 'admin');
183
+ return checkScriptHasNoQuote(['set -eu', ...checks, ...steps].join('; '), 'pairing');
160
184
  }
161
185
  /**
162
- * @description The command to paste in an ADMIN account's terminal on the runner machine: it checks `account`, pairs it, and installs its
163
- * always-on service. `account` is the line's last word, so the operator can change it by hand.
186
+ * @description The command to paste on the runner machine: `sudo sh -c '<script>' sh <account>`. In an ADMIN account's terminal it pairs `account` and installs its
187
+ * always-on service; without its leading `sudo`, in the terminal of `account` itself, it pairs that account only (see the head of the file). `account` is the
188
+ * line's last word, so the operator can change it by hand.
164
189
  */
165
190
  function buildAdminBootstrapLine(payload, account = exports.defaultRunnerAccount) {
166
191
  if (!checkIsAccountName(account))
167
192
  throw new Error('the runner account must be a plain account name');
168
- return `sudo sh -c '${renderAdminScript(payload)}' sh ${account}`;
193
+ return `sudo sh -c '${renderScript((0, pairCode_1.getPairCodeFields)(payload))}' sh ${account}`;
169
194
  }
170
195
  //# sourceMappingURL=bootstrapLine.js.map