charness 3.11.0 → 3.12.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 (390) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/DEVELOPMENT.md +3 -3
  3. package/README.md +1 -1
  4. package/SETUP.md +6 -5
  5. package/agent-plugin/README.md +15 -6
  6. package/agent-plugin/skills/charness-delegate-claude/SKILL.md +23 -13
  7. package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +10 -6
  8. package/agent-plugin/skills/charness-delivery-loop/SKILL.md +92 -0
  9. package/agent-plugin/skills/charness-orchestration/SKILL.md +116 -0
  10. package/dist/adapters/openCodeAdapter.d.ts +15 -0
  11. package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
  12. package/dist/adapters/openCodeAdapter.js +48 -4
  13. package/dist/adapters/openCodeAdapter.js.map +1 -1
  14. package/dist/agentLogin/agentLogin.d.ts +11 -0
  15. package/dist/agentLogin/agentLogin.d.ts.map +1 -1
  16. package/dist/agentLogin/agentLogin.js +18 -6
  17. package/dist/agentLogin/agentLogin.js.map +1 -1
  18. package/dist/apiErrorRetry.d.ts +5 -0
  19. package/dist/apiErrorRetry.d.ts.map +1 -1
  20. package/dist/apiErrorRetry.js +3 -3
  21. package/dist/apiErrorRetry.js.map +1 -1
  22. package/dist/bot.d.ts.map +1 -1
  23. package/dist/bot.js +158 -20
  24. package/dist/bot.js.map +1 -1
  25. package/dist/cli/claudeProfiles.d.ts +5 -2
  26. package/dist/cli/claudeProfiles.d.ts.map +1 -1
  27. package/dist/cli/claudeProfiles.js +43 -20
  28. package/dist/cli/claudeProfiles.js.map +1 -1
  29. package/dist/cli/claudeProfilesCredit.d.ts +49 -0
  30. package/dist/cli/claudeProfilesCredit.d.ts.map +1 -0
  31. package/dist/cli/claudeProfilesCredit.js +160 -0
  32. package/dist/cli/claudeProfilesCredit.js.map +1 -0
  33. package/dist/cli/flagValue.d.ts +10 -0
  34. package/dist/cli/flagValue.d.ts.map +1 -0
  35. package/dist/cli/flagValue.js +17 -0
  36. package/dist/cli/flagValue.js.map +1 -0
  37. package/dist/connectors/telegram/commands/botSkills.js +1 -1
  38. package/dist/connectors/telegram/commands/claudeAccounts.d.ts +6 -1
  39. package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
  40. package/dist/connectors/telegram/commands/claudeAccounts.js +9 -6
  41. package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
  42. package/dist/connectors/telegram/commands/compaction.d.ts +11 -0
  43. package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
  44. package/dist/connectors/telegram/commands/compaction.js +208 -22
  45. package/dist/connectors/telegram/commands/compaction.js.map +1 -1
  46. package/dist/connectors/telegram/commands/runners.d.ts +5 -1
  47. package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
  48. package/dist/connectors/telegram/commands/runners.js +146 -31
  49. package/dist/connectors/telegram/commands/runners.js.map +1 -1
  50. package/dist/connectors/telegram/runnerPairingMessages.d.ts +2 -7
  51. package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
  52. package/dist/connectors/telegram/runnerPairingMessages.js +5 -19
  53. package/dist/connectors/telegram/runnerPairingMessages.js.map +1 -1
  54. package/dist/i18n/de.d.ts.map +1 -1
  55. package/dist/i18n/de.js +52 -8
  56. package/dist/i18n/de.js.map +1 -1
  57. package/dist/i18n/en.d.ts.map +1 -1
  58. package/dist/i18n/en.js +52 -8
  59. package/dist/i18n/en.js.map +1 -1
  60. package/dist/i18n/es.d.ts.map +1 -1
  61. package/dist/i18n/es.js +52 -8
  62. package/dist/i18n/es.js.map +1 -1
  63. package/dist/i18n/fr.d.ts.map +1 -1
  64. package/dist/i18n/fr.js +52 -8
  65. package/dist/i18n/fr.js.map +1 -1
  66. package/dist/i18n/hi.d.ts.map +1 -1
  67. package/dist/i18n/hi.js +52 -8
  68. package/dist/i18n/hi.js.map +1 -1
  69. package/dist/i18n/ja.d.ts.map +1 -1
  70. package/dist/i18n/ja.js +52 -8
  71. package/dist/i18n/ja.js.map +1 -1
  72. package/dist/i18n/ka.d.ts.map +1 -1
  73. package/dist/i18n/ka.js +52 -8
  74. package/dist/i18n/ka.js.map +1 -1
  75. package/dist/i18n/pt.d.ts.map +1 -1
  76. package/dist/i18n/pt.js +52 -8
  77. package/dist/i18n/pt.js.map +1 -1
  78. package/dist/i18n/ru.d.ts.map +1 -1
  79. package/dist/i18n/ru.js +52 -8
  80. package/dist/i18n/ru.js.map +1 -1
  81. package/dist/i18n/uk.d.ts.map +1 -1
  82. package/dist/i18n/uk.js +52 -8
  83. package/dist/i18n/uk.js.map +1 -1
  84. package/dist/i18n/uz.d.ts.map +1 -1
  85. package/dist/i18n/uz.js +52 -8
  86. package/dist/i18n/uz.js.map +1 -1
  87. package/dist/i18n/zh.d.ts.map +1 -1
  88. package/dist/i18n/zh.js +52 -8
  89. package/dist/i18n/zh.js.map +1 -1
  90. package/dist/installManager.d.ts.map +1 -1
  91. package/dist/installManager.js +3 -0
  92. package/dist/installManager.js.map +1 -1
  93. package/dist/instanceLock.d.ts.map +1 -1
  94. package/dist/instanceLock.js +2 -1
  95. package/dist/instanceLock.js.map +1 -1
  96. package/dist/platform/outbound.d.ts +14 -1
  97. package/dist/platform/outbound.d.ts.map +1 -1
  98. package/dist/platform/outbound.js.map +1 -1
  99. package/dist/remoteRun/cleanReport.d.ts +45 -0
  100. package/dist/remoteRun/cleanReport.d.ts.map +1 -0
  101. package/dist/remoteRun/cleanReport.js +84 -0
  102. package/dist/remoteRun/cleanReport.js.map +1 -0
  103. package/dist/remoteRun/cliArgs.d.ts +18 -0
  104. package/dist/remoteRun/cliArgs.d.ts.map +1 -1
  105. package/dist/remoteRun/cliArgs.js +100 -4
  106. package/dist/remoteRun/cliArgs.js.map +1 -1
  107. package/dist/remoteRun/commands.d.ts +30 -1
  108. package/dist/remoteRun/commands.d.ts.map +1 -1
  109. package/dist/remoteRun/commands.js +84 -9
  110. package/dist/remoteRun/commands.js.map +1 -1
  111. package/dist/remoteRun/exitCodes.d.ts +5 -0
  112. package/dist/remoteRun/exitCodes.d.ts.map +1 -1
  113. package/dist/remoteRun/exitCodes.js +6 -1
  114. package/dist/remoteRun/exitCodes.js.map +1 -1
  115. package/dist/remoteRun/foreground.d.ts +6 -0
  116. package/dist/remoteRun/foreground.d.ts.map +1 -1
  117. package/dist/remoteRun/foreground.js +13 -1
  118. package/dist/remoteRun/foreground.js.map +1 -1
  119. package/dist/remoteRun/interrupts.d.ts.map +1 -1
  120. package/dist/remoteRun/interrupts.js +2 -2
  121. package/dist/remoteRun/interrupts.js.map +1 -1
  122. package/dist/remoteRun/jobFiles.d.ts +6 -1
  123. package/dist/remoteRun/jobFiles.d.ts.map +1 -1
  124. package/dist/remoteRun/jobFiles.js +14 -0
  125. package/dist/remoteRun/jobFiles.js.map +1 -1
  126. package/dist/remoteRun/jobId.d.ts +5 -0
  127. package/dist/remoteRun/jobId.d.ts.map +1 -1
  128. package/dist/remoteRun/jobId.js +10 -0
  129. package/dist/remoteRun/jobId.js.map +1 -1
  130. package/dist/remoteRun/jobState.d.ts.map +1 -1
  131. package/dist/remoteRun/jobState.js +3 -2
  132. package/dist/remoteRun/jobState.js.map +1 -1
  133. package/dist/remoteRun/pairedRunners.d.ts +1 -1
  134. package/dist/remoteRun/pairedRunners.d.ts.map +1 -1
  135. package/dist/remoteRun/pairedRunners.js +4 -0
  136. package/dist/remoteRun/pairedRunners.js.map +1 -1
  137. package/dist/remoteRun/pathPatterns.d.ts +1 -1
  138. package/dist/remoteRun/pathPatterns.js +1 -1
  139. package/dist/remoteRun/probe.d.ts +58 -5
  140. package/dist/remoteRun/probe.d.ts.map +1 -1
  141. package/dist/remoteRun/probe.js +107 -11
  142. package/dist/remoteRun/probe.js.map +1 -1
  143. package/dist/remoteRun/probeTiming.d.ts +15 -0
  144. package/dist/remoteRun/probeTiming.d.ts.map +1 -0
  145. package/dist/remoteRun/probeTiming.js +23 -0
  146. package/dist/remoteRun/probeTiming.js.map +1 -0
  147. package/dist/remoteRun/project.d.ts +5 -0
  148. package/dist/remoteRun/project.d.ts.map +1 -1
  149. package/dist/remoteRun/project.js +10 -0
  150. package/dist/remoteRun/project.js.map +1 -1
  151. package/dist/remoteRun/projectConfig.d.ts +8 -1
  152. package/dist/remoteRun/projectConfig.d.ts.map +1 -1
  153. package/dist/remoteRun/projectConfig.js +18 -5
  154. package/dist/remoteRun/projectConfig.js.map +1 -1
  155. package/dist/remoteRun/pruneReport.d.ts +48 -0
  156. package/dist/remoteRun/pruneReport.d.ts.map +1 -0
  157. package/dist/remoteRun/pruneReport.js +80 -0
  158. package/dist/remoteRun/pruneReport.js.map +1 -0
  159. package/dist/remoteRun/remoteRunCli.d.ts +1 -1
  160. package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
  161. package/dist/remoteRun/remoteRunCli.js +20 -0
  162. package/dist/remoteRun/remoteRunCli.js.map +1 -1
  163. package/dist/remoteRun/runnerClient.d.ts +10 -0
  164. package/dist/remoteRun/runnerClient.d.ts.map +1 -1
  165. package/dist/remoteRun/runnerClient.js +19 -5
  166. package/dist/remoteRun/runnerClient.js.map +1 -1
  167. package/dist/remoteRun/runnerWait.d.ts.map +1 -1
  168. package/dist/remoteRun/runnerWait.js +2 -1
  169. package/dist/remoteRun/runnerWait.js.map +1 -1
  170. package/dist/remoteRun/runners.d.ts +48 -7
  171. package/dist/remoteRun/runners.d.ts.map +1 -1
  172. package/dist/remoteRun/runners.js +105 -40
  173. package/dist/remoteRun/runners.js.map +1 -1
  174. package/dist/remoteRun/runnersConfig.d.ts +24 -0
  175. package/dist/remoteRun/runnersConfig.d.ts.map +1 -1
  176. package/dist/remoteRun/runnersConfig.js +29 -2
  177. package/dist/remoteRun/runnersConfig.js.map +1 -1
  178. package/dist/remoteRun/ssh.d.ts +3 -3
  179. package/dist/remoteRun/ssh.d.ts.map +1 -1
  180. package/dist/remoteRun/ssh.js +19 -5
  181. package/dist/remoteRun/ssh.js.map +1 -1
  182. package/dist/remoteRun/submit.d.ts +1 -1
  183. package/dist/remoteRun/submit.d.ts.map +1 -1
  184. package/dist/remoteRun/submit.js +30 -2
  185. package/dist/remoteRun/submit.js.map +1 -1
  186. package/dist/runnerUtility/adminService.d.ts.map +1 -1
  187. package/dist/runnerUtility/adminService.js +5 -5
  188. package/dist/runnerUtility/adminService.js.map +1 -1
  189. package/dist/runnerUtility/appInstall.d.ts +9 -0
  190. package/dist/runnerUtility/appInstall.d.ts.map +1 -1
  191. package/dist/runnerUtility/appInstall.js +12 -2
  192. package/dist/runnerUtility/appInstall.js.map +1 -1
  193. package/dist/runnerUtility/execEnv.d.ts +1 -1
  194. package/dist/runnerUtility/execEnv.d.ts.map +1 -1
  195. package/dist/runnerUtility/execEnv.js +23 -5
  196. package/dist/runnerUtility/execEnv.js.map +1 -1
  197. package/dist/runnerUtility/guiAgentHeal.d.ts +3 -3
  198. package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -1
  199. package/dist/runnerUtility/guiAgentHeal.js +4 -2
  200. package/dist/runnerUtility/guiAgentHeal.js.map +1 -1
  201. package/dist/runnerUtility/homeFolders.d.ts +1 -0
  202. package/dist/runnerUtility/homeFolders.d.ts.map +1 -1
  203. package/dist/runnerUtility/homeFolders.js +2 -1
  204. package/dist/runnerUtility/homeFolders.js.map +1 -1
  205. package/dist/runnerUtility/iosCheck.d.ts +2 -0
  206. package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
  207. package/dist/runnerUtility/iosCheck.js +12 -3
  208. package/dist/runnerUtility/iosCheck.js.map +1 -1
  209. package/dist/runnerUtility/keepAwake.d.ts +47 -10
  210. package/dist/runnerUtility/keepAwake.d.ts.map +1 -1
  211. package/dist/runnerUtility/keepAwake.js +108 -31
  212. package/dist/runnerUtility/keepAwake.js.map +1 -1
  213. package/dist/runnerUtility/launcher.d.ts +4 -0
  214. package/dist/runnerUtility/launcher.d.ts.map +1 -1
  215. package/dist/runnerUtility/launcher.js +31 -13
  216. package/dist/runnerUtility/launcher.js.map +1 -1
  217. package/dist/runnerUtility/linkLoop.d.ts +4 -0
  218. package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
  219. package/dist/runnerUtility/linkLoop.js +15 -6
  220. package/dist/runnerUtility/linkLoop.js.map +1 -1
  221. package/dist/runnerUtility/managedNode.d.ts +84 -0
  222. package/dist/runnerUtility/managedNode.d.ts.map +1 -0
  223. package/dist/runnerUtility/managedNode.js +165 -0
  224. package/dist/runnerUtility/managedNode.js.map +1 -0
  225. package/dist/runnerUtility/nodeOnPath.d.ts +10 -0
  226. package/dist/runnerUtility/nodeOnPath.d.ts.map +1 -0
  227. package/dist/runnerUtility/nodeOnPath.js +49 -0
  228. package/dist/runnerUtility/nodeOnPath.js.map +1 -0
  229. package/dist/runnerUtility/nodeUpkeep.d.ts +140 -0
  230. package/dist/runnerUtility/nodeUpkeep.d.ts.map +1 -0
  231. package/dist/runnerUtility/nodeUpkeep.js +348 -0
  232. package/dist/runnerUtility/nodeUpkeep.js.map +1 -0
  233. package/dist/runnerUtility/nodeUpkeepTiming.d.ts +14 -0
  234. package/dist/runnerUtility/nodeUpkeepTiming.d.ts.map +1 -0
  235. package/dist/runnerUtility/nodeUpkeepTiming.js +21 -0
  236. package/dist/runnerUtility/nodeUpkeepTiming.js.map +1 -0
  237. package/dist/runnerUtility/packageManagerShims.d.ts +10 -0
  238. package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -1
  239. package/dist/runnerUtility/packageManagerShims.js +67 -3
  240. package/dist/runnerUtility/packageManagerShims.js.map +1 -1
  241. package/dist/runnerUtility/pueueDaemon.d.ts +73 -8
  242. package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
  243. package/dist/runnerUtility/pueueDaemon.js +90 -15
  244. package/dist/runnerUtility/pueueDaemon.js.map +1 -1
  245. package/dist/runnerUtility/runnerCommands.d.ts +7 -1
  246. package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
  247. package/dist/runnerUtility/runnerCommands.js +119 -16
  248. package/dist/runnerUtility/runnerCommands.js.map +1 -1
  249. package/dist/runnerUtility/runnerHome.d.ts +34 -0
  250. package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
  251. package/dist/runnerUtility/runnerHome.js +17 -3
  252. package/dist/runnerUtility/runnerHome.js.map +1 -1
  253. package/dist/runnerUtility/serviceCommon.d.ts +2 -0
  254. package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
  255. package/dist/runnerUtility/serviceCommon.js +3 -1
  256. package/dist/runnerUtility/serviceCommon.js.map +1 -1
  257. package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
  258. package/dist/runnerUtility/serviceManager.js +7 -2
  259. package/dist/runnerUtility/serviceManager.js.map +1 -1
  260. package/dist/runnerUtility/simctlGuard.d.ts +38 -0
  261. package/dist/runnerUtility/simctlGuard.d.ts.map +1 -0
  262. package/dist/runnerUtility/simctlGuard.js +166 -0
  263. package/dist/runnerUtility/simctlGuard.js.map +1 -0
  264. package/dist/runners/bootstrapLine.d.ts +3 -4
  265. package/dist/runners/bootstrapLine.d.ts.map +1 -1
  266. package/dist/runners/bootstrapLine.js +108 -83
  267. package/dist/runners/bootstrapLine.js.map +1 -1
  268. package/dist/runners/hubPackage.d.ts +1 -1
  269. package/dist/runners/hubPackage.d.ts.map +1 -1
  270. package/dist/runners/hubPackage.js +5 -6
  271. package/dist/runners/hubPackage.js.map +1 -1
  272. package/dist/runners/hubPairing.d.ts +19 -0
  273. package/dist/runners/hubPairing.d.ts.map +1 -1
  274. package/dist/runners/hubPairing.js +38 -0
  275. package/dist/runners/hubPairing.js.map +1 -1
  276. package/dist/runners/hubRegistry.d.ts +8 -0
  277. package/dist/runners/hubRegistry.d.ts.map +1 -1
  278. package/dist/runners/hubRegistry.js +6 -0
  279. package/dist/runners/hubRegistry.js.map +1 -1
  280. package/dist/runners/pairCode.d.ts +34 -3
  281. package/dist/runners/pairCode.d.ts.map +1 -1
  282. package/dist/runners/pairCode.js +65 -13
  283. package/dist/runners/pairCode.js.map +1 -1
  284. package/dist/runners/runnerGroups.d.ts +22 -0
  285. package/dist/runners/runnerGroups.d.ts.map +1 -0
  286. package/dist/runners/runnerGroups.js +41 -0
  287. package/dist/runners/runnerGroups.js.map +1 -0
  288. package/dist/runners/runnersCli.d.ts +5 -2
  289. package/dist/runners/runnersCli.d.ts.map +1 -1
  290. package/dist/runners/runnersCli.js +59 -9
  291. package/dist/runners/runnersCli.js.map +1 -1
  292. package/dist/runners/runnersList.d.ts +1 -1
  293. package/dist/runners/runnersList.d.ts.map +1 -1
  294. package/dist/runners/runnersList.js +3 -1
  295. package/dist/runners/runnersList.js.map +1 -1
  296. package/dist/runners/runnersOverview.d.ts.map +1 -1
  297. package/dist/runners/runnersOverview.js +8 -4
  298. package/dist/runners/runnersOverview.js.map +1 -1
  299. package/dist/scheduler/checkStatus.d.ts +2 -0
  300. package/dist/scheduler/checkStatus.d.ts.map +1 -1
  301. package/dist/scheduler/checkStatus.js +5 -4
  302. package/dist/scheduler/checkStatus.js.map +1 -1
  303. package/dist/scheduler/delivery.d.ts +2 -1
  304. package/dist/scheduler/delivery.d.ts.map +1 -1
  305. package/dist/scheduler/delivery.js +5 -1
  306. package/dist/scheduler/delivery.js.map +1 -1
  307. package/dist/scheduler/mcpSurface.d.ts +7 -3
  308. package/dist/scheduler/mcpSurface.d.ts.map +1 -1
  309. package/dist/scheduler/mcpSurface.js +48 -22
  310. package/dist/scheduler/mcpSurface.js.map +1 -1
  311. package/dist/scheduler/workerWatch.d.ts +33 -10
  312. package/dist/scheduler/workerWatch.d.ts.map +1 -1
  313. package/dist/scheduler/workerWatch.js +37 -11
  314. package/dist/scheduler/workerWatch.js.map +1 -1
  315. package/dist/state.d.ts +95 -2
  316. package/dist/state.d.ts.map +1 -1
  317. package/dist/state.js +145 -7
  318. package/dist/state.js.map +1 -1
  319. package/dist/testTimings.d.ts +6 -2
  320. package/dist/testTimings.d.ts.map +1 -1
  321. package/dist/testTimings.js +12 -1
  322. package/dist/testTimings.js.map +1 -1
  323. package/dist/types.d.ts +2 -1
  324. package/dist/types.d.ts.map +1 -1
  325. package/dist/utils/agentPlugin.d.ts +2 -1
  326. package/dist/utils/agentPlugin.d.ts.map +1 -1
  327. package/dist/utils/agentPlugin.js +2 -1
  328. package/dist/utils/agentPlugin.js.map +1 -1
  329. package/dist/utils/botSkills.d.ts +1 -1
  330. package/dist/utils/claudeApiAgentStop.d.ts +64 -0
  331. package/dist/utils/claudeApiAgentStop.d.ts.map +1 -0
  332. package/dist/utils/claudeApiAgentStop.js +85 -0
  333. package/dist/utils/claudeApiAgentStop.js.map +1 -0
  334. package/dist/utils/claudeApiCredit.d.ts +168 -0
  335. package/dist/utils/claudeApiCredit.d.ts.map +1 -0
  336. package/dist/utils/claudeApiCredit.js +260 -0
  337. package/dist/utils/claudeApiCredit.js.map +1 -0
  338. package/dist/utils/claudeApiCreditRecheck.d.ts +120 -0
  339. package/dist/utils/claudeApiCreditRecheck.d.ts.map +1 -0
  340. package/dist/utils/claudeApiCreditRecheck.js +173 -0
  341. package/dist/utils/claudeApiCreditRecheck.js.map +1 -0
  342. package/dist/utils/claudeCompactHook.d.ts +18 -10
  343. package/dist/utils/claudeCompactHook.d.ts.map +1 -1
  344. package/dist/utils/claudeCompactHook.js +35 -14
  345. package/dist/utils/claudeCompactHook.js.map +1 -1
  346. package/dist/utils/claudeProfileUsageLines.d.ts +13 -1
  347. package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -1
  348. package/dist/utils/claudeProfileUsageLines.js +75 -4
  349. package/dist/utils/claudeProfileUsageLines.js.map +1 -1
  350. package/dist/utils/claudeProfileUsageViews.d.ts +46 -0
  351. package/dist/utils/claudeProfileUsageViews.d.ts.map +1 -0
  352. package/dist/utils/claudeProfileUsageViews.js +114 -0
  353. package/dist/utils/claudeProfileUsageViews.js.map +1 -0
  354. package/dist/utils/claudeProfiles.d.ts +15 -0
  355. package/dist/utils/claudeProfiles.d.ts.map +1 -1
  356. package/dist/utils/claudeProfiles.js +54 -0
  357. package/dist/utils/claudeProfiles.js.map +1 -1
  358. package/dist/utils/claudeUsage.d.ts +94 -36
  359. package/dist/utils/claudeUsage.d.ts.map +1 -1
  360. package/dist/utils/claudeUsage.js +134 -60
  361. package/dist/utils/claudeUsage.js.map +1 -1
  362. package/dist/utils/compactOnIdle.d.ts +140 -15
  363. package/dist/utils/compactOnIdle.d.ts.map +1 -1
  364. package/dist/utils/compactOnIdle.js +209 -23
  365. package/dist/utils/compactOnIdle.js.map +1 -1
  366. package/dist/utils/compactSelfReviewFlags.d.ts +50 -0
  367. package/dist/utils/compactSelfReviewFlags.d.ts.map +1 -0
  368. package/dist/utils/compactSelfReviewFlags.js +120 -0
  369. package/dist/utils/compactSelfReviewFlags.js.map +1 -0
  370. package/dist/utils/fallbackChain.d.ts +18 -7
  371. package/dist/utils/fallbackChain.d.ts.map +1 -1
  372. package/dist/utils/fallbackChain.js +28 -12
  373. package/dist/utils/fallbackChain.js.map +1 -1
  374. package/dist/utils/openCodeCompactPlugin.d.ts +28 -7
  375. package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
  376. package/dist/utils/openCodeCompactPlugin.js +80 -15
  377. package/dist/utils/openCodeCompactPlugin.js.map +1 -1
  378. package/dist/utils/runnersScreenPlan.d.ts +51 -20
  379. package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
  380. package/dist/utils/runnersScreenPlan.js +143 -28
  381. package/dist/utils/runnersScreenPlan.js.map +1 -1
  382. package/dist/utils/streamedCompactionSummary.d.ts +65 -0
  383. package/dist/utils/streamedCompactionSummary.d.ts.map +1 -0
  384. package/dist/utils/streamedCompactionSummary.js +108 -0
  385. package/dist/utils/streamedCompactionSummary.js.map +1 -0
  386. package/package.json +2 -2
  387. package/remoteRun/ensureNode.sh +288 -0
  388. package/remoteRun/runner.sh +2252 -115
  389. package/agent-plugin/skills/charness-manager/SKILL.md +0 -157
  390. package/remoteRun/pickNode.sh +0 -65
@@ -0,0 +1,288 @@
1
+ #!/bin/sh
2
+ # ensureNode.sh — gives a runner its OWN Node.js: the official build from nodejs.org, checked against nodejs.org's SHASUMS256.txt, in a folder of its own
3
+ # that no package manager (brew, nvm, an OS package) ever touches or moves. A runner never runs on a shared Node: a system one is the admin's to change,
4
+ # and a job that wants a package manager or a global package cannot write into a system folder.
5
+ #
6
+ # ensureNode.sh root <account> [<base> [<homes> [<dist> [<major>]]]] the ADMIN pairing line, as ROOT, from its root-owned copy of the package (never
7
+ # from the account's folder), BEFORE anything is started under Node
8
+ # ensureNode.sh own <base> [<dist> [<major>]] as the runner account itself: the pairing line run without sudo, a runner that moves off a system
9
+ # Node, and an own install that looks for a newer release of its line
10
+ #
11
+ # Prints the real path of the `node` binary on stdout, or says why there is none on stderr (exit 1). Everything meant for a person goes to stderr.
12
+ #
13
+ # Which Node: the newest LTS release of Node.js that is $min_major.$min_minor or newer AND still ships Corepack (Node.js $max_major at most: 25 and later
14
+ # do not), read from nodejs.org/dist/index.json for this machine (linux or darwin, x64 or arm64). With a <major> given (an install that is already there
15
+ # asks for the newest release of ITS line) it is the newest release of that line, LTS or not. The release's own SHASUMS256.txt names its archive and
16
+ # the SHA-256, which is compared with the download BEFORE a byte of it is unpacked; the archive is fetched with curl or wget (a total time limit on
17
+ # each) and unpacked into a work folder next to its final place and moved there whole: a folder `<base>/v<version>` is complete or absent. One that is
18
+ # there and runs is REUSED — a second pairing downloads an archive only for a newer release — and when nodejs.org cannot be reached the newest install
19
+ # already in <base> is used, with a line saying so. The trust is TLS to nodejs.org (the same as every installer of Node); the signature of
20
+ # SHASUMS256.txt is not checked. Only x86-64 and ARM64 machines, glibc Linux and macOS can be runners: nodejs.org's Linux builds need glibc.
21
+ #
22
+ # `root`: <base> is `/usr/local/lib/charness-runner/node`, a folder only root can write. The Node is unpacked by root, owned by root, never writable by
23
+ # group or others, and it qualifies only when ALL of these hold (checked every time, also for a reused install — and BEFORE root runs any Node of it):
24
+ # - its real path (links followed) is outside every home folder: /Users/<name>, /home/<name>, root's own. A program in a home is the other user's to
25
+ # change, and the runner would stop working the day that home is closed (chmod 700);
26
+ # - the account can run it (`sudo -u <account> test -x`) and CANNOT write it, nor any folder above it (`test -w`): root runs it, and root must never
27
+ # execute anything the account — which runs the agents' code — can change. The base is judged before root writes into it: the deepest folder of it
28
+ # that exists, then its real path, which is what every later step uses (so a link cannot be pointed elsewhere between the check and the use);
29
+ # - it is Node.js $min_major.$min_minor or newer.
30
+ # The account is judged with `sudo -u <account> test …` only: nothing of the account's is executed. `$2` is validated by the line (a plain account name).
31
+ # A root install is refreshed only by the next admin line.
32
+ #
33
+ # `own`: <base> is the account's own folder (`~/.charness-runner/node`); nobody else is involved, so none of the above is asked.
34
+ #
35
+ # Test seams, used by the unit tests and not by the line: `$4` replaces the home patterns (space-separated `case` patterns), `$5` / `$3` the download
36
+ # place (a `file://` folder laid out like nodejs.org/dist). `<major>` is the last argument of both modes.
37
+ set -u
38
+ unfit_reason=
39
+ writable_at=
40
+ min_major=22
41
+ min_minor=12
42
+ max_major=24
43
+ default_dist=https://nodejs.org/dist
44
+ default_root_base=/usr/local/lib/charness-runner/node
45
+ shasums_timeout=60
46
+ archive_timeout=900
47
+
48
+ say() { echo "charness-runner: $*" >&2; }
49
+ fail() { say "$*"; exit 1; }
50
+
51
+ mode=${1:-}
52
+ case $mode in
53
+ root)
54
+ [ $# -ge 2 ] || fail "usage: ensureNode.sh root <account> [<base>]"
55
+ a=$2
56
+ base=${3:-$default_root_base}
57
+ homes=${4:-"/Users/* /home/* */root/*"}
58
+ dist=${5:-$default_dist}
59
+ line=${6:-}
60
+ umask 022;;
61
+ own)
62
+ [ $# -ge 2 ] || fail "usage: ensureNode.sh own <base>"
63
+ a=
64
+ base=$2
65
+ homes=
66
+ dist=${3:-$default_dist}
67
+ line=${4:-}
68
+ umask 077;;
69
+ *) fail "usage: ensureNode.sh root <account> | own <base>";;
70
+ esac
71
+ case $line in ""|*[!0-9]*) [ -z "$line" ] || fail "the line of Node.js to keep to must be a major number, not $line";; esac
72
+
73
+ case $(uname -s) in
74
+ Linux) os=linux;;
75
+ Darwin) os=darwin;;
76
+ *) fail "only macOS and Linux";;
77
+ esac
78
+ case $(uname -m) in
79
+ x86_64|amd64) arch=x64;;
80
+ aarch64|arm64) arch=arm64;;
81
+ *) fail "a runner supports only x86-64 and ARM64 processors, and this one is $(uname -m)";;
82
+ esac
83
+ # A shell started under Rosetta says x86_64 on an Apple Silicon Mac; the native build is the right one there.
84
+ if [ "$os" = darwin ] && [ "$arch" = x64 ] && [ "$(sysctl -n sysctl.proc_translated 2>/dev/null)" = 1 ]; then arch=arm64; fi
85
+ # nodejs.org's Linux builds are glibc builds. A runner never runs on a system Node, so there is no way round this: it cannot be a runner.
86
+ if [ "$os" = linux ] && ldd --version 2>&1 | grep -qi musl; then fail "this Linux uses musl libc (Alpine), and nodejs.org's Node.js builds, which every runner runs on, need glibc: this machine cannot be a runner"; fi
87
+ # How nodejs.org's index.json names the build of this machine.
88
+ case $os-$arch in
89
+ linux-x64) index_file=linux-x64;;
90
+ linux-arm64) index_file=linux-arm64;;
91
+ darwin-x64) index_file=osx-x64-tar;;
92
+ darwin-arm64) index_file=osx-arm64-tar;;
93
+ esac
94
+
95
+ # The real path of $1, links followed. Without `readlink -f` (macOS before 12.3) the links are followed by hand and the folder is resolved by `cd -P`.
96
+ real_path() {
97
+ readlink -f "$1" 2>/dev/null && return 0
98
+ p=$1; hops=0
99
+ while [ -L "$p" ] && [ "$hops" -lt 20 ]; do
100
+ l=$(readlink "$p") || return 1
101
+ case $l in /*) p=$l;; *) p=${p%/*}/$l;; esac
102
+ hops=$((hops + 1))
103
+ done
104
+ [ -e "$p" ] || return 1
105
+ d=$(cd -P "$(dirname "$p")" 2>/dev/null && pwd -P) || return 1
106
+ printf '%s/%s\n' "$d" "${p##*/}"
107
+ }
108
+
109
+ # Is $1, or a folder above it, writable by the account? Sets `writable_at` to the first one found.
110
+ account_can_write() {
111
+ w=$1
112
+ while [ -n "$w" ] && [ "$w" != / ]; do
113
+ if sudo -u "$a" test -w "$w"; then writable_at=$w; return 0; fi
114
+ w=${w%/*}
115
+ done
116
+ return 1
117
+ }
118
+
119
+ # Root mode: may root run from the real path $1? Not when it is inside a home, nor when the account can write it or a folder above it. Sets `unfit_reason`.
120
+ place_is_fit() {
121
+ unfit_reason=
122
+ if in_a_home "$1"; then
123
+ unfit_reason="$1 is inside a home folder: root runs nothing from somebody's home. Pass a folder outside the homes"
124
+ return 1
125
+ fi
126
+ writable_at=
127
+ if account_can_write "$1"; then
128
+ unfit_reason="$a can write $writable_at, and root runs this Node.js: a folder only root can write is needed (the default is $default_root_base)"
129
+ return 1
130
+ fi
131
+ return 0
132
+ }
133
+
134
+ refuse_unfit_place() {
135
+ place_is_fit "$1" || fail "$unfit_reason"
136
+ }
137
+
138
+ # May root run the Node program $1? (Own mode: always.) The same rules as for a place, and the account must be able to run it. Sets `unfit_reason`.
139
+ node_place_is_fit() {
140
+ [ "$mode" = root ] || return 0
141
+ fit_real=$(real_path "$1") || { unfit_reason="cannot find the real path of $1"; return 1; }
142
+ place_is_fit "$fit_real" || return 1
143
+ sudo -u "$a" test -x "$fit_real" || { unfit_reason="$a cannot run $fit_real: its folders must be open to everyone"; return 1; }
144
+ return 0
145
+ }
146
+
147
+ in_a_home() {
148
+ set -f
149
+ for pattern in $homes; do
150
+ case $1 in $pattern) set +f; return 0;; esac
151
+ done
152
+ set +f
153
+ return 1
154
+ }
155
+
156
+ # Does the Node program $1 run and is it $min_major.$min_minor or newer?
157
+ node_is_usable() {
158
+ "$1" -e "var v=process.versions.node.split(/[.]/);process.exit(v[0]>$min_major||v[0]==$min_major&&v[1]>=$min_minor?0:1)" >/dev/null 2>&1
159
+ }
160
+
161
+ # fetch <url> <file> <seconds>: curl, else wget; both with a time limit for the whole transfer (wget only has per-read ones, so it runs under `timeout` where
162
+ # the machine has one) and https only after a redirect.
163
+ fetch() {
164
+ if command -v curl >/dev/null 2>&1; then
165
+ curl -fsSL --proto-redir '=https' --connect-timeout 20 --max-time "$3" -o "$2" "$1"
166
+ elif command -v wget >/dev/null 2>&1; then
167
+ if command -v timeout >/dev/null 2>&1; then timeout "$3" wget -q -T 60 -t 2 -O "$2" "$1"
168
+ elif command -v gtimeout >/dev/null 2>&1; then gtimeout "$3" wget -q -T 60 -t 2 -O "$2" "$1"
169
+ else wget -q -T 60 -t 2 -O "$2" "$1"
170
+ fi
171
+ else
172
+ say "neither curl nor wget is on this machine, so Node.js cannot be downloaded: install one of them and paste again"
173
+ return 2
174
+ fi
175
+ }
176
+
177
+ sha256_of() {
178
+ if command -v sha256sum >/dev/null 2>&1; then sha256sum "$1" | cut -d ' ' -f 1
179
+ elif command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d ' ' -f 1
180
+ elif command -v openssl >/dev/null 2>&1; then openssl dgst -sha256 "$1" | sed 's/^.*= //'
181
+ else return 1
182
+ fi
183
+ }
184
+
185
+ # The newest install in <base> whose Node runs (and, as root, that root may run — one that is not is skipped, never executed), as its version folder name
186
+ # (`v22.20.1`), or nothing. With a <major> given, only that line.
187
+ newest_installed() {
188
+ best=; best_rank=-1
189
+ for folder in "$base"/v*; do
190
+ [ -x "$folder/bin/node" ] || continue
191
+ v=${folder##*/v}
192
+ case $v in ""|*[!0-9.]*) continue;; esac
193
+ major=${v%%.*}; rest=${v#*.}
194
+ case $rest in *.*) ;; *) continue;; esac
195
+ minor=${rest%%.*}; patch=${rest#*.}
196
+ case $patch in ""|*.*) continue;; esac
197
+ [ -z "$line" ] || [ "$major" = "$line" ] || continue
198
+ node_place_is_fit "$folder/bin/node" || continue
199
+ node_is_usable "$folder/bin/node" || continue
200
+ rank=$((major * 1000000 + minor * 1000 + patch))
201
+ if [ "$rank" -gt "$best_rank" ]; then best_rank=$rank; best=v$v; fi
202
+ done
203
+ printf '%s\n' "$best"
204
+ }
205
+
206
+ # select_release <index.json>: the release to install, as `v22.20.1`, or nothing. Of the LTS releases that have a build for this machine (or, with a <major>
207
+ # given, the releases of that line), the highest version from $min_major.$min_minor up to $max_major (Node.js 25 and later do not ship Corepack, which the
208
+ # runner's yarn and pnpm come from) — by number, not by date: a security release of an older line can be the newest entry.
209
+ select_release() {
210
+ if [ -n "$line" ]; then candidates=$(grep "^{\"version\":\"v$line[.]" "$1" | grep "\"$index_file\"")
211
+ else candidates=$(grep '"lts":"' "$1" | grep "\"$index_file\"")
212
+ fi
213
+ printf '%s\n' "$candidates" | sed -n 's/^{"version":"v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)".*/\1 \2 \3/p' | {
214
+ best=; best_rank=-1
215
+ while read -r maj min pat; do
216
+ [ "$maj" -ge "$min_major" ] && [ "$maj" -le "$max_major" ] || continue
217
+ if [ "$maj" -eq "$min_major" ] && [ "$min" -lt "$min_minor" ]; then continue; fi
218
+ rank=$((maj * 1000000 + min * 1000 + pat))
219
+ if [ "$rank" -gt "$best_rank" ]; then best_rank=$rank; best=v$maj.$min.$pat; fi
220
+ done
221
+ printf '%s\n' "$best"
222
+ }
223
+ }
224
+
225
+ # As root, the base is judged BEFORE anything is created or written in it, and every later step uses its REAL path: a base the account can write (or one that
226
+ # leads into a home) would have root unpack into the account's reach, and a link in it that the account re-points between the check and the use would
227
+ # do the same.
228
+ if [ "$mode" = root ]; then
229
+ probe=$base
230
+ while [ ! -e "$probe" ] && [ "$probe" != / ]; do
231
+ probe=${probe%/*}
232
+ [ -n "$probe" ] || probe=/
233
+ done
234
+ probe_real=$(real_path "$probe") || fail "cannot find the real path of $probe"
235
+ refuse_unfit_place "$probe_real"
236
+ fi
237
+ mkdir -p "$base" || fail "cannot create $base"
238
+ if [ "$mode" = root ]; then
239
+ base=$(real_path "$base") || fail "cannot find the real path of $base"
240
+ refuse_unfit_place "$base"
241
+ fi
242
+ work=$(mktemp -d "$base/.install.XXXXXXXX") || fail "cannot write into $base"
243
+ trap 'rm -rf "$work"' EXIT
244
+ trap 'exit 1' INT TERM
245
+
246
+ release=
247
+ if fetch "$dist/index.json" "$work/index.json" "$shasums_timeout"; then
248
+ release=$(select_release "$work/index.json")
249
+ if [ -n "$line" ]; then wanted="Node.js $line.x release"; else wanted="LTS release of Node.js $min_major.$min_minor to $max_major.x"; fi
250
+ [ -n "$release" ] || fail "nodejs.org's list has no $wanted with a build for $os-$arch"
251
+ else
252
+ release=$(newest_installed)
253
+ [ -n "$release" ] || fail "could not get the list of Node.js releases from nodejs.org (see above), and there is no Node.js in $base to use instead: check this machine's connection to nodejs.org and paste again"
254
+ say "could not get the list of Node.js releases from nodejs.org: using the Node.js $release that is already installed in $base"
255
+ fi
256
+
257
+ target=$base/$release
258
+ if [ -x "$target/bin/node" ] && node_place_is_fit "$target/bin/node" && node_is_usable "$target/bin/node"; then
259
+ say "Node.js $release for the runner is already in $target"
260
+ else
261
+ say "installing Node.js $release for the runner into $target (the official build from nodejs.org, checksum checked)"
262
+ archive=node-$release-$os-$arch.tar.gz
263
+ fetch "$dist/$release/SHASUMS256.txt" "$work/SHASUMS256.txt" "$shasums_timeout" || fail "could not get $dist/$release/SHASUMS256.txt: nothing was installed"
264
+ entry=$(grep -E "^[0-9a-f]{64} $(printf '%s' "$archive" | sed 's/[.]/[.]/g')\$" "$work/SHASUMS256.txt" | head -n 1)
265
+ [ -n "$entry" ] || fail "nodejs.org's SHASUMS256.txt of $release has no $archive"
266
+ sha=${entry%% *}
267
+ fetch "$dist/$release/$archive" "$work/node.tar.gz" "$archive_timeout" || fail "could not download $dist/$release/$archive: nothing was installed"
268
+ got=$(sha256_of "$work/node.tar.gz") || fail "no sha256sum, shasum or openssl on this machine to check the download with: install one and paste again"
269
+ [ "$got" = "$sha" ] || fail "the download of $archive does not match nodejs.org's SHASUMS256.txt (got $got, expected $sha): nothing was installed"
270
+ mkdir "$work/node" || fail "cannot write into $base"
271
+ # `--no-same-owner`: root's files stay root's, never the uid the archive was made with (which could be the account's).
272
+ tar --no-same-owner -xzf "$work/node.tar.gz" -C "$work/node" --strip-components=1 || fail "could not unpack $archive: nothing was installed"
273
+ [ -x "$work/node/bin/node" ] || fail "$archive holds no bin/node: nothing was installed"
274
+ if [ "$mode" = root ]; then
275
+ chmod -R go-w,a+rX "$work/node" || fail "cannot set the rights of the unpacked Node.js"
276
+ chmod 755 "$work/node"
277
+ if [ "$(id -u)" = 0 ]; then chown -R 0:0 "$work/node" || fail "cannot give the unpacked Node.js to root"; fi
278
+ fi
279
+ node_is_usable "$work/node/bin/node" || fail "the Node.js $release that was downloaded does not run on this machine: nothing was installed"
280
+ rm -rf "$target"
281
+ mv "$work/node" "$target" || fail "cannot move the Node.js into $target"
282
+ say "Node.js $release is installed"
283
+ fi
284
+
285
+ r=$(real_path "$target/bin/node") || fail "cannot find the real path of $target/bin/node"
286
+ node_place_is_fit "$r" || fail "$unfit_reason"
287
+ node_is_usable "$r" || fail "$r does not run, or is older than Node.js $min_major.$min_minor"
288
+ printf '%s\n' "$r"