charness 3.10.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 (477) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/DEVELOPMENT.md +3 -3
  3. package/README.md +3 -2
  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 +331 -152
  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/botCore.d.ts +1 -0
  38. package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
  39. package/dist/connectors/telegram/commands/botSkills.js +1 -1
  40. package/dist/connectors/telegram/commands/claudeAccounts.d.ts +6 -1
  41. package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
  42. package/dist/connectors/telegram/commands/claudeAccounts.js +12 -9
  43. package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
  44. package/dist/connectors/telegram/commands/compaction.d.ts +11 -0
  45. package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
  46. package/dist/connectors/telegram/commands/compaction.js +208 -22
  47. package/dist/connectors/telegram/commands/compaction.js.map +1 -1
  48. package/dist/connectors/telegram/commands/runners.d.ts +5 -1
  49. package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
  50. package/dist/connectors/telegram/commands/runners.js +151 -30
  51. package/dist/connectors/telegram/commands/runners.js.map +1 -1
  52. package/dist/connectors/telegram/foldedMessage.d.ts +24 -0
  53. package/dist/connectors/telegram/foldedMessage.d.ts.map +1 -0
  54. package/dist/connectors/telegram/foldedMessage.js +39 -0
  55. package/dist/connectors/telegram/foldedMessage.js.map +1 -0
  56. package/dist/connectors/telegram/inbound.d.ts +24 -1
  57. package/dist/connectors/telegram/inbound.d.ts.map +1 -1
  58. package/dist/connectors/telegram/inbound.js +77 -1
  59. package/dist/connectors/telegram/inbound.js.map +1 -1
  60. package/dist/connectors/telegram/renderAgentHtml.d.ts +15 -0
  61. package/dist/connectors/telegram/renderAgentHtml.d.ts.map +1 -1
  62. package/dist/connectors/telegram/renderAgentHtml.js +11 -1
  63. package/dist/connectors/telegram/renderAgentHtml.js.map +1 -1
  64. package/dist/connectors/telegram/runnerPairingMessages.d.ts +2 -7
  65. package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
  66. package/dist/connectors/telegram/runnerPairingMessages.js +5 -19
  67. package/dist/connectors/telegram/runnerPairingMessages.js.map +1 -1
  68. package/dist/connectors/telegram/unpinMessages.d.ts +12 -0
  69. package/dist/connectors/telegram/unpinMessages.d.ts.map +1 -0
  70. package/dist/connectors/telegram/unpinMessages.js +44 -0
  71. package/dist/connectors/telegram/unpinMessages.js.map +1 -0
  72. package/dist/i18n/de.d.ts.map +1 -1
  73. package/dist/i18n/de.js +63 -11
  74. package/dist/i18n/de.js.map +1 -1
  75. package/dist/i18n/en.d.ts.map +1 -1
  76. package/dist/i18n/en.js +63 -11
  77. package/dist/i18n/en.js.map +1 -1
  78. package/dist/i18n/es.d.ts.map +1 -1
  79. package/dist/i18n/es.js +63 -11
  80. package/dist/i18n/es.js.map +1 -1
  81. package/dist/i18n/fr.d.ts.map +1 -1
  82. package/dist/i18n/fr.js +63 -11
  83. package/dist/i18n/fr.js.map +1 -1
  84. package/dist/i18n/hi.d.ts.map +1 -1
  85. package/dist/i18n/hi.js +63 -11
  86. package/dist/i18n/hi.js.map +1 -1
  87. package/dist/i18n/ja.d.ts.map +1 -1
  88. package/dist/i18n/ja.js +63 -11
  89. package/dist/i18n/ja.js.map +1 -1
  90. package/dist/i18n/ka.d.ts.map +1 -1
  91. package/dist/i18n/ka.js +63 -11
  92. package/dist/i18n/ka.js.map +1 -1
  93. package/dist/i18n/pt.d.ts.map +1 -1
  94. package/dist/i18n/pt.js +63 -11
  95. package/dist/i18n/pt.js.map +1 -1
  96. package/dist/i18n/ru.d.ts.map +1 -1
  97. package/dist/i18n/ru.js +63 -11
  98. package/dist/i18n/ru.js.map +1 -1
  99. package/dist/i18n/uk.d.ts.map +1 -1
  100. package/dist/i18n/uk.js +63 -11
  101. package/dist/i18n/uk.js.map +1 -1
  102. package/dist/i18n/uz.d.ts.map +1 -1
  103. package/dist/i18n/uz.js +63 -11
  104. package/dist/i18n/uz.js.map +1 -1
  105. package/dist/i18n/zh.d.ts.map +1 -1
  106. package/dist/i18n/zh.js +63 -11
  107. package/dist/i18n/zh.js.map +1 -1
  108. package/dist/installManager.d.ts.map +1 -1
  109. package/dist/installManager.js +3 -0
  110. package/dist/installManager.js.map +1 -1
  111. package/dist/instanceLock.d.ts.map +1 -1
  112. package/dist/instanceLock.js +2 -1
  113. package/dist/instanceLock.js.map +1 -1
  114. package/dist/outputTrace.d.ts +6 -0
  115. package/dist/outputTrace.d.ts.map +1 -1
  116. package/dist/outputTrace.js +13 -0
  117. package/dist/outputTrace.js.map +1 -1
  118. package/dist/platform/outbound.d.ts +14 -1
  119. package/dist/platform/outbound.d.ts.map +1 -1
  120. package/dist/platform/outbound.js.map +1 -1
  121. package/dist/remoteRun/cleanReport.d.ts +45 -0
  122. package/dist/remoteRun/cleanReport.d.ts.map +1 -0
  123. package/dist/remoteRun/cleanReport.js +84 -0
  124. package/dist/remoteRun/cleanReport.js.map +1 -0
  125. package/dist/remoteRun/cliArgs.d.ts +18 -0
  126. package/dist/remoteRun/cliArgs.d.ts.map +1 -1
  127. package/dist/remoteRun/cliArgs.js +100 -4
  128. package/dist/remoteRun/cliArgs.js.map +1 -1
  129. package/dist/remoteRun/commands.d.ts +30 -1
  130. package/dist/remoteRun/commands.d.ts.map +1 -1
  131. package/dist/remoteRun/commands.js +84 -9
  132. package/dist/remoteRun/commands.js.map +1 -1
  133. package/dist/remoteRun/exitCodes.d.ts +5 -0
  134. package/dist/remoteRun/exitCodes.d.ts.map +1 -1
  135. package/dist/remoteRun/exitCodes.js +6 -1
  136. package/dist/remoteRun/exitCodes.js.map +1 -1
  137. package/dist/remoteRun/foreground.d.ts +6 -0
  138. package/dist/remoteRun/foreground.d.ts.map +1 -1
  139. package/dist/remoteRun/foreground.js +13 -1
  140. package/dist/remoteRun/foreground.js.map +1 -1
  141. package/dist/remoteRun/interrupts.d.ts.map +1 -1
  142. package/dist/remoteRun/interrupts.js +2 -2
  143. package/dist/remoteRun/interrupts.js.map +1 -1
  144. package/dist/remoteRun/jobFiles.d.ts +6 -1
  145. package/dist/remoteRun/jobFiles.d.ts.map +1 -1
  146. package/dist/remoteRun/jobFiles.js +14 -0
  147. package/dist/remoteRun/jobFiles.js.map +1 -1
  148. package/dist/remoteRun/jobId.d.ts +5 -0
  149. package/dist/remoteRun/jobId.d.ts.map +1 -1
  150. package/dist/remoteRun/jobId.js +10 -0
  151. package/dist/remoteRun/jobId.js.map +1 -1
  152. package/dist/remoteRun/jobState.d.ts.map +1 -1
  153. package/dist/remoteRun/jobState.js +3 -2
  154. package/dist/remoteRun/jobState.js.map +1 -1
  155. package/dist/remoteRun/pairedRunners.d.ts +1 -1
  156. package/dist/remoteRun/pairedRunners.d.ts.map +1 -1
  157. package/dist/remoteRun/pairedRunners.js +4 -0
  158. package/dist/remoteRun/pairedRunners.js.map +1 -1
  159. package/dist/remoteRun/pathPatterns.d.ts +1 -1
  160. package/dist/remoteRun/pathPatterns.js +1 -1
  161. package/dist/remoteRun/probe.d.ts +58 -5
  162. package/dist/remoteRun/probe.d.ts.map +1 -1
  163. package/dist/remoteRun/probe.js +107 -11
  164. package/dist/remoteRun/probe.js.map +1 -1
  165. package/dist/remoteRun/probeTiming.d.ts +15 -0
  166. package/dist/remoteRun/probeTiming.d.ts.map +1 -0
  167. package/dist/remoteRun/probeTiming.js +23 -0
  168. package/dist/remoteRun/probeTiming.js.map +1 -0
  169. package/dist/remoteRun/project.d.ts +5 -0
  170. package/dist/remoteRun/project.d.ts.map +1 -1
  171. package/dist/remoteRun/project.js +10 -0
  172. package/dist/remoteRun/project.js.map +1 -1
  173. package/dist/remoteRun/projectConfig.d.ts +8 -1
  174. package/dist/remoteRun/projectConfig.d.ts.map +1 -1
  175. package/dist/remoteRun/projectConfig.js +18 -5
  176. package/dist/remoteRun/projectConfig.js.map +1 -1
  177. package/dist/remoteRun/pruneReport.d.ts +48 -0
  178. package/dist/remoteRun/pruneReport.d.ts.map +1 -0
  179. package/dist/remoteRun/pruneReport.js +80 -0
  180. package/dist/remoteRun/pruneReport.js.map +1 -0
  181. package/dist/remoteRun/remoteRunCli.d.ts +1 -1
  182. package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
  183. package/dist/remoteRun/remoteRunCli.js +20 -0
  184. package/dist/remoteRun/remoteRunCli.js.map +1 -1
  185. package/dist/remoteRun/runnerClient.d.ts +10 -0
  186. package/dist/remoteRun/runnerClient.d.ts.map +1 -1
  187. package/dist/remoteRun/runnerClient.js +19 -5
  188. package/dist/remoteRun/runnerClient.js.map +1 -1
  189. package/dist/remoteRun/runnerWait.d.ts.map +1 -1
  190. package/dist/remoteRun/runnerWait.js +2 -1
  191. package/dist/remoteRun/runnerWait.js.map +1 -1
  192. package/dist/remoteRun/runners.d.ts +48 -7
  193. package/dist/remoteRun/runners.d.ts.map +1 -1
  194. package/dist/remoteRun/runners.js +105 -40
  195. package/dist/remoteRun/runners.js.map +1 -1
  196. package/dist/remoteRun/runnersConfig.d.ts +24 -0
  197. package/dist/remoteRun/runnersConfig.d.ts.map +1 -1
  198. package/dist/remoteRun/runnersConfig.js +29 -2
  199. package/dist/remoteRun/runnersConfig.js.map +1 -1
  200. package/dist/remoteRun/ssh.d.ts +3 -3
  201. package/dist/remoteRun/ssh.d.ts.map +1 -1
  202. package/dist/remoteRun/ssh.js +19 -5
  203. package/dist/remoteRun/ssh.js.map +1 -1
  204. package/dist/remoteRun/submit.d.ts +1 -1
  205. package/dist/remoteRun/submit.d.ts.map +1 -1
  206. package/dist/remoteRun/submit.js +30 -2
  207. package/dist/remoteRun/submit.js.map +1 -1
  208. package/dist/runnerUtility/adminService.d.ts.map +1 -1
  209. package/dist/runnerUtility/adminService.js +5 -5
  210. package/dist/runnerUtility/adminService.js.map +1 -1
  211. package/dist/runnerUtility/appInstall.d.ts +9 -0
  212. package/dist/runnerUtility/appInstall.d.ts.map +1 -1
  213. package/dist/runnerUtility/appInstall.js +12 -2
  214. package/dist/runnerUtility/appInstall.js.map +1 -1
  215. package/dist/runnerUtility/execEnv.d.ts +1 -1
  216. package/dist/runnerUtility/execEnv.d.ts.map +1 -1
  217. package/dist/runnerUtility/execEnv.js +23 -5
  218. package/dist/runnerUtility/execEnv.js.map +1 -1
  219. package/dist/runnerUtility/guiAgentHeal.d.ts +3 -3
  220. package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -1
  221. package/dist/runnerUtility/guiAgentHeal.js +6 -4
  222. package/dist/runnerUtility/guiAgentHeal.js.map +1 -1
  223. package/dist/runnerUtility/homeFolders.d.ts +1 -0
  224. package/dist/runnerUtility/homeFolders.d.ts.map +1 -1
  225. package/dist/runnerUtility/homeFolders.js +2 -1
  226. package/dist/runnerUtility/homeFolders.js.map +1 -1
  227. package/dist/runnerUtility/iosCheck.d.ts +2 -0
  228. package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
  229. package/dist/runnerUtility/iosCheck.js +12 -3
  230. package/dist/runnerUtility/iosCheck.js.map +1 -1
  231. package/dist/runnerUtility/isolatedCommand.d.ts +0 -2
  232. package/dist/runnerUtility/isolatedCommand.d.ts.map +1 -1
  233. package/dist/runnerUtility/isolatedCommand.js +4 -11
  234. package/dist/runnerUtility/isolatedCommand.js.map +1 -1
  235. package/dist/runnerUtility/keepAwake.d.ts +47 -10
  236. package/dist/runnerUtility/keepAwake.d.ts.map +1 -1
  237. package/dist/runnerUtility/keepAwake.js +108 -31
  238. package/dist/runnerUtility/keepAwake.js.map +1 -1
  239. package/dist/runnerUtility/launcher.d.ts +4 -0
  240. package/dist/runnerUtility/launcher.d.ts.map +1 -1
  241. package/dist/runnerUtility/launcher.js +31 -13
  242. package/dist/runnerUtility/launcher.js.map +1 -1
  243. package/dist/runnerUtility/linkLoop.d.ts +4 -0
  244. package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
  245. package/dist/runnerUtility/linkLoop.js +15 -6
  246. package/dist/runnerUtility/linkLoop.js.map +1 -1
  247. package/dist/runnerUtility/managedNode.d.ts +84 -0
  248. package/dist/runnerUtility/managedNode.d.ts.map +1 -0
  249. package/dist/runnerUtility/managedNode.js +165 -0
  250. package/dist/runnerUtility/managedNode.js.map +1 -0
  251. package/dist/runnerUtility/nodeOnPath.d.ts +10 -0
  252. package/dist/runnerUtility/nodeOnPath.d.ts.map +1 -0
  253. package/dist/runnerUtility/nodeOnPath.js +49 -0
  254. package/dist/runnerUtility/nodeOnPath.js.map +1 -0
  255. package/dist/runnerUtility/nodeUpkeep.d.ts +140 -0
  256. package/dist/runnerUtility/nodeUpkeep.d.ts.map +1 -0
  257. package/dist/runnerUtility/nodeUpkeep.js +348 -0
  258. package/dist/runnerUtility/nodeUpkeep.js.map +1 -0
  259. package/dist/runnerUtility/nodeUpkeepTiming.d.ts +14 -0
  260. package/dist/runnerUtility/nodeUpkeepTiming.d.ts.map +1 -0
  261. package/dist/runnerUtility/nodeUpkeepTiming.js +21 -0
  262. package/dist/runnerUtility/nodeUpkeepTiming.js.map +1 -0
  263. package/dist/runnerUtility/packageManagerShims.d.ts +10 -0
  264. package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -1
  265. package/dist/runnerUtility/packageManagerShims.js +67 -3
  266. package/dist/runnerUtility/packageManagerShims.js.map +1 -1
  267. package/dist/runnerUtility/pueueDaemon.d.ts +73 -8
  268. package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
  269. package/dist/runnerUtility/pueueDaemon.js +90 -15
  270. package/dist/runnerUtility/pueueDaemon.js.map +1 -1
  271. package/dist/runnerUtility/runnerCommands.d.ts +7 -1
  272. package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
  273. package/dist/runnerUtility/runnerCommands.js +119 -16
  274. package/dist/runnerUtility/runnerCommands.js.map +1 -1
  275. package/dist/runnerUtility/runnerHome.d.ts +34 -0
  276. package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
  277. package/dist/runnerUtility/runnerHome.js +17 -3
  278. package/dist/runnerUtility/runnerHome.js.map +1 -1
  279. package/dist/runnerUtility/serviceCommon.d.ts +2 -0
  280. package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
  281. package/dist/runnerUtility/serviceCommon.js +3 -1
  282. package/dist/runnerUtility/serviceCommon.js.map +1 -1
  283. package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
  284. package/dist/runnerUtility/serviceManager.js +7 -2
  285. package/dist/runnerUtility/serviceManager.js.map +1 -1
  286. package/dist/runnerUtility/simctlGuard.d.ts +38 -0
  287. package/dist/runnerUtility/simctlGuard.d.ts.map +1 -0
  288. package/dist/runnerUtility/simctlGuard.js +166 -0
  289. package/dist/runnerUtility/simctlGuard.js.map +1 -0
  290. package/dist/runners/bootstrapLine.d.ts +3 -4
  291. package/dist/runners/bootstrapLine.d.ts.map +1 -1
  292. package/dist/runners/bootstrapLine.js +108 -83
  293. package/dist/runners/bootstrapLine.js.map +1 -1
  294. package/dist/runners/hubPackage.d.ts +1 -1
  295. package/dist/runners/hubPackage.d.ts.map +1 -1
  296. package/dist/runners/hubPackage.js +5 -6
  297. package/dist/runners/hubPackage.js.map +1 -1
  298. package/dist/runners/hubPairing.d.ts +19 -0
  299. package/dist/runners/hubPairing.d.ts.map +1 -1
  300. package/dist/runners/hubPairing.js +38 -0
  301. package/dist/runners/hubPairing.js.map +1 -1
  302. package/dist/runners/hubRegistry.d.ts +8 -0
  303. package/dist/runners/hubRegistry.d.ts.map +1 -1
  304. package/dist/runners/hubRegistry.js +6 -0
  305. package/dist/runners/hubRegistry.js.map +1 -1
  306. package/dist/runners/pairCode.d.ts +34 -3
  307. package/dist/runners/pairCode.d.ts.map +1 -1
  308. package/dist/runners/pairCode.js +65 -13
  309. package/dist/runners/pairCode.js.map +1 -1
  310. package/dist/runners/runnerGroups.d.ts +22 -0
  311. package/dist/runners/runnerGroups.d.ts.map +1 -0
  312. package/dist/runners/runnerGroups.js +41 -0
  313. package/dist/runners/runnerGroups.js.map +1 -0
  314. package/dist/runners/runnersCli.d.ts +5 -2
  315. package/dist/runners/runnersCli.d.ts.map +1 -1
  316. package/dist/runners/runnersCli.js +59 -9
  317. package/dist/runners/runnersCli.js.map +1 -1
  318. package/dist/runners/runnersList.d.ts +1 -1
  319. package/dist/runners/runnersList.d.ts.map +1 -1
  320. package/dist/runners/runnersList.js +3 -1
  321. package/dist/runners/runnersList.js.map +1 -1
  322. package/dist/runners/runnersOverview.d.ts.map +1 -1
  323. package/dist/runners/runnersOverview.js +8 -4
  324. package/dist/runners/runnersOverview.js.map +1 -1
  325. package/dist/scheduler/checkRun.d.ts +9 -10
  326. package/dist/scheduler/checkRun.d.ts.map +1 -1
  327. package/dist/scheduler/checkRun.js +8 -16
  328. package/dist/scheduler/checkRun.js.map +1 -1
  329. package/dist/scheduler/checkStatus.d.ts +4 -5
  330. package/dist/scheduler/checkStatus.d.ts.map +1 -1
  331. package/dist/scheduler/checkStatus.js +11 -15
  332. package/dist/scheduler/checkStatus.js.map +1 -1
  333. package/dist/scheduler/delivery.d.ts +80 -37
  334. package/dist/scheduler/delivery.d.ts.map +1 -1
  335. package/dist/scheduler/delivery.js +121 -68
  336. package/dist/scheduler/delivery.js.map +1 -1
  337. package/dist/scheduler/mcpSurface.d.ts +13 -5
  338. package/dist/scheduler/mcpSurface.d.ts.map +1 -1
  339. package/dist/scheduler/mcpSurface.js +84 -34
  340. package/dist/scheduler/mcpSurface.js.map +1 -1
  341. package/dist/scheduler/recurrence.d.ts +32 -0
  342. package/dist/scheduler/recurrence.d.ts.map +1 -1
  343. package/dist/scheduler/recurrence.js +56 -18
  344. package/dist/scheduler/recurrence.js.map +1 -1
  345. package/dist/scheduler/scheduleText.d.ts +7 -0
  346. package/dist/scheduler/scheduleText.d.ts.map +1 -0
  347. package/dist/scheduler/scheduleText.js +55 -0
  348. package/dist/scheduler/scheduleText.js.map +1 -0
  349. package/dist/scheduler/store.d.ts +8 -2
  350. package/dist/scheduler/store.d.ts.map +1 -1
  351. package/dist/scheduler/store.js +25 -4
  352. package/dist/scheduler/store.js.map +1 -1
  353. package/dist/scheduler/types.d.ts +4 -10
  354. package/dist/scheduler/types.d.ts.map +1 -1
  355. package/dist/scheduler/workerWatch.d.ts +49 -11
  356. package/dist/scheduler/workerWatch.d.ts.map +1 -1
  357. package/dist/scheduler/workerWatch.js +57 -13
  358. package/dist/scheduler/workerWatch.js.map +1 -1
  359. package/dist/state.d.ts +95 -2
  360. package/dist/state.d.ts.map +1 -1
  361. package/dist/state.js +145 -7
  362. package/dist/state.js.map +1 -1
  363. package/dist/testTimings.d.ts +6 -2
  364. package/dist/testTimings.d.ts.map +1 -1
  365. package/dist/testTimings.js +12 -1
  366. package/dist/testTimings.js.map +1 -1
  367. package/dist/types.d.ts +2 -1
  368. package/dist/types.d.ts.map +1 -1
  369. package/dist/utils/agentPlugin.d.ts +2 -1
  370. package/dist/utils/agentPlugin.d.ts.map +1 -1
  371. package/dist/utils/agentPlugin.js +2 -1
  372. package/dist/utils/agentPlugin.js.map +1 -1
  373. package/dist/utils/botSkills.d.ts +1 -1
  374. package/dist/utils/claudeApiAgentStop.d.ts +64 -0
  375. package/dist/utils/claudeApiAgentStop.d.ts.map +1 -0
  376. package/dist/utils/claudeApiAgentStop.js +85 -0
  377. package/dist/utils/claudeApiAgentStop.js.map +1 -0
  378. package/dist/utils/claudeApiCredit.d.ts +168 -0
  379. package/dist/utils/claudeApiCredit.d.ts.map +1 -0
  380. package/dist/utils/claudeApiCredit.js +260 -0
  381. package/dist/utils/claudeApiCredit.js.map +1 -0
  382. package/dist/utils/claudeApiCreditRecheck.d.ts +120 -0
  383. package/dist/utils/claudeApiCreditRecheck.d.ts.map +1 -0
  384. package/dist/utils/claudeApiCreditRecheck.js +173 -0
  385. package/dist/utils/claudeApiCreditRecheck.js.map +1 -0
  386. package/dist/utils/claudeCompactHook.d.ts +18 -10
  387. package/dist/utils/claudeCompactHook.d.ts.map +1 -1
  388. package/dist/utils/claudeCompactHook.js +35 -14
  389. package/dist/utils/claudeCompactHook.js.map +1 -1
  390. package/dist/utils/claudeProfileUsageLines.d.ts +13 -1
  391. package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -1
  392. package/dist/utils/claudeProfileUsageLines.js +75 -4
  393. package/dist/utils/claudeProfileUsageLines.js.map +1 -1
  394. package/dist/utils/claudeProfileUsageViews.d.ts +46 -0
  395. package/dist/utils/claudeProfileUsageViews.d.ts.map +1 -0
  396. package/dist/utils/claudeProfileUsageViews.js +114 -0
  397. package/dist/utils/claudeProfileUsageViews.js.map +1 -0
  398. package/dist/utils/claudeProfiles.d.ts +15 -0
  399. package/dist/utils/claudeProfiles.d.ts.map +1 -1
  400. package/dist/utils/claudeProfiles.js +54 -0
  401. package/dist/utils/claudeProfiles.js.map +1 -1
  402. package/dist/utils/claudeUsage.d.ts +97 -36
  403. package/dist/utils/claudeUsage.d.ts.map +1 -1
  404. package/dist/utils/claudeUsage.js +142 -61
  405. package/dist/utils/claudeUsage.js.map +1 -1
  406. package/dist/utils/claudeUsageRefresher.d.ts +27 -3
  407. package/dist/utils/claudeUsageRefresher.d.ts.map +1 -1
  408. package/dist/utils/claudeUsageRefresher.js +113 -14
  409. package/dist/utils/claudeUsageRefresher.js.map +1 -1
  410. package/dist/utils/compactOnIdle.d.ts +140 -15
  411. package/dist/utils/compactOnIdle.d.ts.map +1 -1
  412. package/dist/utils/compactOnIdle.js +209 -23
  413. package/dist/utils/compactOnIdle.js.map +1 -1
  414. package/dist/utils/compactSelfReviewFlags.d.ts +50 -0
  415. package/dist/utils/compactSelfReviewFlags.d.ts.map +1 -0
  416. package/dist/utils/compactSelfReviewFlags.js +120 -0
  417. package/dist/utils/compactSelfReviewFlags.js.map +1 -0
  418. package/dist/utils/fallbackChain.d.ts +18 -7
  419. package/dist/utils/fallbackChain.d.ts.map +1 -1
  420. package/dist/utils/fallbackChain.js +28 -12
  421. package/dist/utils/fallbackChain.js.map +1 -1
  422. package/dist/utils/forwardedMark.d.ts +54 -0
  423. package/dist/utils/forwardedMark.d.ts.map +1 -0
  424. package/dist/utils/forwardedMark.js +80 -0
  425. package/dist/utils/forwardedMark.js.map +1 -0
  426. package/dist/utils/limitHeldPrompts.d.ts +8 -2
  427. package/dist/utils/limitHeldPrompts.d.ts.map +1 -1
  428. package/dist/utils/limitHeldPrompts.js +11 -4
  429. package/dist/utils/limitHeldPrompts.js.map +1 -1
  430. package/dist/utils/messageContext.d.ts +54 -0
  431. package/dist/utils/messageContext.d.ts.map +1 -0
  432. package/dist/utils/messageContext.js +58 -0
  433. package/dist/utils/messageContext.js.map +1 -0
  434. package/dist/utils/openCodeCompactPlugin.d.ts +28 -7
  435. package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
  436. package/dist/utils/openCodeCompactPlugin.js +80 -15
  437. package/dist/utils/openCodeCompactPlugin.js.map +1 -1
  438. package/dist/utils/openCodeUsage.d.ts +10 -3
  439. package/dist/utils/openCodeUsage.d.ts.map +1 -1
  440. package/dist/utils/openCodeUsage.js +19 -5
  441. package/dist/utils/openCodeUsage.js.map +1 -1
  442. package/dist/utils/replyQuote.d.ts +11 -26
  443. package/dist/utils/replyQuote.d.ts.map +1 -1
  444. package/dist/utils/replyQuote.js +9 -31
  445. package/dist/utils/replyQuote.js.map +1 -1
  446. package/dist/utils/runnersScreenPlan.d.ts +51 -20
  447. package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
  448. package/dist/utils/runnersScreenPlan.js +143 -28
  449. package/dist/utils/runnersScreenPlan.js.map +1 -1
  450. package/dist/utils/streamedCompactionSummary.d.ts +65 -0
  451. package/dist/utils/streamedCompactionSummary.d.ts.map +1 -0
  452. package/dist/utils/streamedCompactionSummary.js +108 -0
  453. package/dist/utils/streamedCompactionSummary.js.map +1 -0
  454. package/dist/utils/stripControlCharacters.d.ts +8 -0
  455. package/dist/utils/stripControlCharacters.d.ts.map +1 -0
  456. package/dist/utils/stripControlCharacters.js +16 -0
  457. package/dist/utils/stripControlCharacters.js.map +1 -0
  458. package/dist/utils/telegramError.d.ts +6 -0
  459. package/dist/utils/telegramError.d.ts.map +1 -1
  460. package/dist/utils/telegramError.js +30 -0
  461. package/dist/utils/telegramError.js.map +1 -1
  462. package/dist/utils/topicRequest.d.ts +13 -0
  463. package/dist/utils/topicRequest.d.ts.map +1 -1
  464. package/dist/utils/topicRequest.js +10 -0
  465. package/dist/utils/topicRequest.js.map +1 -1
  466. package/dist/utils/usageRefreshBudget.d.ts.map +1 -1
  467. package/dist/utils/usageRefreshBudget.js +4 -10
  468. package/dist/utils/usageRefreshBudget.js.map +1 -1
  469. package/dist/utils/waitUpTo.d.ts +8 -0
  470. package/dist/utils/waitUpTo.d.ts.map +1 -0
  471. package/dist/utils/waitUpTo.js +20 -0
  472. package/dist/utils/waitUpTo.js.map +1 -0
  473. package/package.json +2 -2
  474. package/remoteRun/ensureNode.sh +288 -0
  475. package/remoteRun/runner.sh +2252 -115
  476. package/agent-plugin/skills/charness-manager/SKILL.md +0 -156
  477. package/remoteRun/pickNode.sh +0 -65
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: charness-delivery-loop
3
+ description: "Only when this session lists NO other manager skill (neither the project's nor the user's own): a small built-in delivery loop for orchestrating detached workers — modes, builder and reviewer roles, the finish step, parallel work in worktrees, the queue, briefing. In a Charness-run session load it together with `charness-orchestration`, which holds the bot's tools. A general manager skill is listed → follow that one and do not load this."
4
+ ---
5
+
6
+ # Delivery loop (the fallback manager)
7
+
8
+ You orchestrate: workers build, test, review and commit; you decide, keep the plan honest and keep the user
9
+ informed. You never write product code and never review a diff yourself. The bot's mechanics (launching, the watch
10
+ check, accounts, reaching the user) are in `charness-orchestration`; this skill is only the loop.
11
+
12
+ ## Modes
13
+
14
+ - **autonomous** — the default for a scheduled or unattended run, or when the user says so. Drive a READY plan
15
+ (no draft marker, no open questions); ask nothing; decide from the plan and the project rules; stop and report
16
+ what you cannot resolve. Without a named plan pick one ready plan that a worker can finish alone (the oldest by
17
+ its file date); none → say "nothing to do" and stop.
18
+ - **interactive** — the user is talking to you. Answer their question first, decide every point yourself and list
19
+ the decisions for them to correct, ask only about a fork you could not resolve.
20
+
21
+ ## Rules that never bend
22
+
23
+ - Never force-push, tag, bump a version or merge a merge request.
24
+ - You check a worker's result only through another agent's report, `git log`, `git show --stat` and the plan's
25
+ checkboxes — never by reading its code, running its tests or re-running its e2e yourself.
26
+ - A change the user can see is done only with a real end-to-end test that ran and passed. Never accept a stub, a
27
+ lower-level substitute or "test debt".
28
+ - Your own bookkeeping commits (a plan edit, a recorded decision) need no approval, in either mode; workers
29
+ commit their own work.
30
+
31
+ ## Parallel work and the queue
32
+
33
+ - Reviewers and researchers run without limit alongside everything else: they only read.
34
+ - Builders: each separately released task — one that could be reviewed, merged or reverted on its own; every separate
35
+ ask in the queue counts, even when the project ships one release a day — gets its own git worktree and branch, named
36
+ in its brief; the builder commits only there. A lone task, or the scopes of ONE plan or task, works on the current
37
+ checkout. Two tasks touching the same file queue.
38
+ - Serialize what shares state: builds, test runs (devices, ports, e2e lanes — through their locks) and commits
39
+ (one at a time, path-limited). Two workers never share a file, a port, a browser profile or a device at once.
40
+ - Every new ask joins the queue the moment it is said; start it at once when nothing it needs is taken, else tell
41
+ the user its place. A long run never holds the queue: while a worker waits on a long run (a full suite, a remote
42
+ job, a busy lane), start the next independent task — in its own worktree when it is released separately.
43
+
44
+ ## Briefing
45
+
46
+ - Brief for a ready plan: its path, "implement it yourself, spawn no sub-agents", and — when several scopes go to
47
+ one builder — "your scopes are one batch: test each pointwise (unit tests and only its own new or changed e2e
48
+ flows), the full suites run once at the finish".
49
+ - Brief without a plan: like a colleague who just walked in — the goal, file paths, what to change and why. Never
50
+ "based on your findings, implement it".
51
+ - Name the skills the worker must load, never their content, and never restate project rules.
52
+ - Role skills such as `developer`, `task-review`, `review`, `commit`: name them when the project offers them.
53
+ Otherwise state the role in words — builder: implement, test, self-review, commit each scope, no push;
54
+ reviewer: read the commit range against the plan or the user's asks and report findings, change nothing.
55
+ - Reuse the warm session: rework, the next small scope, or the next role on the same task resumes the SAME worker
56
+ session instead of starting a fresh one.
57
+
58
+ ## Delivery loop — a ready plan
59
+
60
+ 1. **Build.** One builder for the whole plan (or a group of small scopes); it commits each scope as it is green.
61
+ A large or risky scope, or an independent part running in parallel, may get a builder of its own.
62
+ 2. **Bookkeeping.** A finished scope flips its `[x]`; the commit that flips the plan's last box also moves the
63
+ plan file to `completed/`.
64
+ 3. **Finish — only when the whole task is done, never per scope:**
65
+ 1. A fresh reviewer reviews ALL the task's commits once. Its brief: the plan path or the user's asks nearly
66
+ verbatim, the commit range, and the absolute path of its report file outside the worktree (e.g. its run
67
+ directory) — it writes nothing inside the worktree. Findings go back to a builder as rework, then a new review.
68
+ 2. Clean → merge the task's branch into the base by fast-forward and remove its worktree. A branch that cannot
69
+ fast-forward goes back to its builder: rebase onto the base, rerun the tests the base's new commits affect.
70
+ 3. A builder fetches; if the branch or its base moved on the remote, it pulls and rebases; then it runs ALL test
71
+ suites in full and fixes every failure.
72
+ 4. Any fixes in 3 → a separate reviewer reviews just those fixes (same report path rule), then back to 3. Push
73
+ only after a full green run with no fixes after it.
74
+ Each loop runs up to 20 cycles while the findings are concrete local fixes, telling the user about each cycle
75
+ past the third — even when new findings keep landing in the same area. A major finding, or the 20 cycles used
76
+ up: stop, leave the work for inspection, report. Never propose cutting the agreed scope to escape the loop.
77
+ 4. **Push** only when the user allowed it (in chat or in their own instructions); otherwise report it ready to
78
+ push — as a question the user will notice.
79
+
80
+ ## No plan yet — interactive
81
+
82
+ - **Bugs and small reworks:** capture each into a living plan the moment it is said (stable ids, never renumber,
83
+ never drop a deferral). An unambiguous one goes to a builder at once; only a fork you cannot resolve goes to
84
+ the user first.
85
+ - **A feature or idea:** capture a draft; a researcher worker investigates the code and the web, decides every
86
+ point itself and returns a summary, its decisions and only the forks it could not resolve. Show them, record
87
+ the locked decisions, and ask before switching to building.
88
+
89
+ ## Finally
90
+
91
+ Confirm from the reports that every changed file is listed, verification passed, the reviews are clean and the
92
+ plan is archived. Blocked or incomplete → leave the plan as it is for inspection. Report one line of outcome.
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: charness-orchestration
3
+ description: "Adds the bot's tools to a manager skill; it holds no delivery loop. In a Charness-run session (the bot's MCP tools such as schedule_create, answer_request, claude_profiles are present) load it together with this session's general manager skill (the project's or the user's own) before you dispatch, watch or resume a worker — a detached `claude -p` or `opencode run` builder, reviewer, researcher or planner — and follow that skill for the loop. This one wins only on the bot's mechanics: the watch check that fires when a worker exits OR stalls, ending the turn between wakes, accounts, reaching the user. No general manager skill listed → load `charness-delivery-loop` as well."
4
+ ---
5
+
6
+ # Orchestration add-on for a Charness session
7
+
8
+ This skill adds the bot's tools to your manager skill and holds no delivery loop. Follow the session's general manager
9
+ skill (the project's or the user's own) for modes, the loop, review, parallel work, the queue, briefing and finishing.
10
+ None listed → load `charness-delivery-loop` too. Where both speak of the same thing, this skill wins only on the
11
+ mechanics below: launching, detaching, watching, waking, accounts and reaching the user.
12
+
13
+ ## Launching workers
14
+
15
+ - Load `charness-delegate-claude` or `charness-delegate-opencode` before the first launch and follow it: the CLI the
16
+ user named, otherwise the CLI you run in.
17
+ - A worker that runs tests on a runner shares it with other jobs: its test scripts bind ports from `$REMOTE_RUN_PORT_BASE`, use
18
+ the simulator `$REMOTE_RUN_IOS_SIMULATOR_UDID` and never run `simctl shutdown all` or name `booted`; the tool's `--help` has the rest.
19
+ - Name every resource another live process holds (a checkout, a port, a device) in the brief.
20
+
21
+ ## Watch every worker with a bot check
22
+
23
+ Right after each launch, `touch "<run-dir>/watch-armed"`, then create ONE check for that worker run with
24
+ `schedule_create`: cron `*/5 * * * *`, `statusWorkerRunDir: "<run-dir>", statusEveryMinutes: 15`, a name like
25
+ `watch <role> <scope>`, and this `checkCommand` with the real PID and run directory (`<run-dir>` is an absolute path:
26
+ the check runs in the topic's folder, so a relative path or `~` points elsewhere):
27
+
28
+ ```
29
+ kill -0 <pid> 2>/dev/null || { echo "worker <pid> exited"; exit 1; }; [ -n "$(find "<run-dir>" -mmin -45 -print -quit)" ] || { echo "<run-dir>: no change for 45 min"; exit 2; }; [ -e "<run-dir>/watch-armed" ] || { echo "<run-dir>/watch-armed: missing, touch it when you arm the watch"; exit 4; }; [ -n "$(find "<run-dir>/watch-armed" -mmin -150 -print -quit)" ] || { echo "<run-dir>/watch-armed: older than 2 h 30 min"; exit 3; }
30
+ ```
31
+
32
+ - It fails on ANY of three signals: the worker's process is gone, nothing in its run directory changed for 45
33
+ minutes, or the watch was armed 2 h 30 min ago — the worker has run that long without a report. A check that
34
+ only runs `kill -0 <pid>` never fires on a hung worker — never arm one.
35
+ - The third signal counts from the age of `<run-dir>/watch-armed`: `touch` it right before you arm the check — also when
36
+ you resume a worker and arm a new check on its reused run directory, where the marker of the first run is old. A
37
+ check alerts once per failing episode and passes again when its tests do: after you looked at a worker that is fine,
38
+ `touch` the marker again and KEEP the same check — it passes at its next run and watches on (the topic reads «Worker
39
+ … is working again»); never arm a second one beside it. A run directory without that file fails at the first run with
40
+ its own exit code 4 (the topic reads «Check fired», the output «watch-armed: missing»): `touch` it and the check
41
+ passes again.
42
+ - One check may cover several runs of one step (parallel reviewers): it fires only when ALL of them have ended —
43
+ replace the first test with `kill -0 <a> 2>/dev/null || kill -0 <b> 2>/dev/null || { echo "workers <a> <b> exited"; exit 1; }`
44
+ — and its silence test names every run directory: `find "<run-dir-a>" "<run-dir-b>" -mmin -45 -print -quit`. The
45
+ `watch-armed` marker of the third test goes in the first of them.
46
+ - Runner availability and capability — for a worker that waits on a runner, and for the start of an unattended batch
47
+ that needs one: read the runner's line in `charness remote-run runners`. It must be online AND its `can:` part must
48
+ name what the job needs — a runner that is online but shows `ios: no (…)` cannot run an iOS job, so it is not free.
49
+ - When it fires the topic gets one silent sentence («Worker "<role> <scope>" finished (2 h 5 min)», «… silent for
50
+ 45 min» or «… running 2 h 30 min without a report»), never the command and never a pin — a worker that simply finished fires it too. What the user must
51
+ notice you ask as a question.
52
+ - The status arguments make the BOT post a silent status line into the topic every 15 minutes while the check
53
+ passes (`⏳ <name> · works 30 min · now: <the worker's last action>`), replacing the previous one — no wake, no
54
+ tokens, so the topic never looks frozen while you are away. Never arm a schedule of your own for status lines.
55
+ - The run directory is where the worker writes all the time (its event log). A worker that runs one long command
56
+ may write nothing for a while: add the folder that command writes to (`find "<run-dir>" "<test-output-dir>" …`).
57
+ - The check's `prompt` must stand on its own — the wake may reach a resumed or compacted you: the role, the scope
58
+ or plan path, PID, session id, run directory, and "read the result, decide, then cancel this check".
59
+ - The first failure is ALSO the "worker finished" signal. On the wake read the worker's result first (its final
60
+ event, its exit, the end of its log), then decide: finished → the next step of the loop; stalled → look at its
61
+ last tool call, stop it, resume the same session; running 2 h 30 min without a report → look at what it is doing
62
+ now and step in, or, when it is fine, `touch` the marker and KEEP this check (do not cancel it); stopped by a usage
63
+ limit → resume it at once on another account (Accounts and usage limits).
64
+ - Then cancel the check (`schedule_list` → `schedule_cancel`) — unless you kept it for a worker that is fine — which
65
+ also deletes its status line, so a finished worker leaves nothing behind. A new run gets a new check.
66
+ - Never build your own watcher: no sleep loop, `CronCreate`, `ScheduleWakeup`, background job or tmux pane. They
67
+ live in your process, which the bot stops after an idle stretch.
68
+
69
+ ## Between wakes
70
+
71
+ - After launching a worker and arming its check, write the worker state into the plan or draft (PID, session id,
72
+ account profile name, run directory, scope, check name), then END your turn. The bot stops an idle agent process and resumes the
73
+ conversation when the check wakes it; you lose nothing that is written down.
74
+ - Start workers with `setsid nohup` (the delegate skills show the command), so stopping your own process never
75
+ takes a worker down.
76
+ - A worker must never hand back a run it has not read: one that ended its turn with a build or test still in
77
+ flight is resumed to wait for it, read it and finish.
78
+
79
+ ## Accounts and usage limits
80
+
81
+ - Before every Claude worker launch call `claude_profiles` with the worker's model and start the worker with
82
+ `CLAUDE_CONFIG_DIR=<configDir>` of `recommended` (nothing when it is null). Take the account it names without
83
+ asking — it follows the operator's /limits auto-switch list (an API-credit account first, then the soonest weekly reset).
84
+ - Record the profile name beside the worker's session id. Every resume calls `claude_profiles` with
85
+ `currentProfile` = that name, so a warm worker stays on its account.
86
+ - A worker stopped by a usage limit resumes its SAME session at once, never a fresh worker (which would redo the
87
+ work): call `claude_profiles` with `currentProfile` and `isStoppedByLimit: true` and resume under the account it
88
+ recommends. `recommended: null` → nothing is usable: `schedule_create` a one-off resume (`onceAt` =
89
+ `nextAvailable.at`) whose prompt stands on its own. `nextAvailable` null too → no account names a time it frees
90
+ up: ask the user a native question (nothing can run) and `schedule_create` the same one-off retry about 30
91
+ minutes ahead.
92
+ - Your own usage limit is the bot's business: it waits or switches and then wakes you.
93
+
94
+ ## Talking to the user
95
+
96
+ - The user keeps the bot's topics muted: your plain text reaches the topic silently. Anything they must notice —
97
+ a blocker, a fork, "ready to push" — ask as a native question (Claude Code: `AskUserQuestion`; OpenCode: its
98
+ question tool); the bot pins it, and the pin notifies. In autonomous mode stop and report instead.
99
+ - A message headed `[Request <id> · from: …]` is answered through `answer_request` (`progress`, `question`,
100
+ `final`); do not repeat its text as plain text afterwards.
101
+ - The passing-run video of a new e2e test → `send_file_to_user` (H.264 `.mp4`, sent as a video). Several
102
+ separate items, e.g. one per finished scope → `send_messages_to_user`.
103
+ - Work the user wants later → `schedule_create` with `onceAt` and a prompt that stands on its own.
104
+ - Write for a non-technical reader: the status, then the next steps as a short numbered list of who does what.
105
+
106
+ ## A tracker conversation (Jira)
107
+
108
+ There are no `schedule_*` tools and nothing will wake you. Do not end your turn while a worker runs: wait in the
109
+ turn with foreground polls of at most 10 minutes each, checking the same signals (the PID, the run directory
110
+ changing, 2 h 30 min since you started waiting without a report), report interim progress with `answer_request` kind `progress`, and end with kind `final`.
111
+
112
+ ## Closing a task that ran on a runner
113
+
114
+ Done, and the LAST open task of its project folder (the tasks of one folder share ONE copy on a runner), which ran on a
115
+ runner (`charness remote-run`)? Run `charness remote-run clean` in that folder BEFORE you remove the folder or worktree
116
+ (the copy's name goes with it) and before you report; never delete other tasks' copies by hand. Report one line of outcome.
@@ -34,6 +34,12 @@ export interface OpenCodeSession {
34
34
  /** Id of the newest compaction summary message (`message.updated` with `summary: true`), learned
35
35
  * before its text streams, so its parts can be told apart from an ordinary answer. */
36
36
  compactionSummaryMessageId: string | null;
37
+ /** The bot's own `compactContext` call is open: a summary message announced now is the one that call writes. */
38
+ isBotCompactionInFlight: boolean;
39
+ /** The id of the summary message the bot's own compaction wrote (learned while its call was open), kept after the call returned: the last of its text may stream later. */
40
+ botCompactionSummaryMessageId: string | null;
41
+ /** The message the text in {@link currentResponseText} belongs to (the `messageID` of its deltas); `null` before the first delta. Reset alongside it. */
42
+ responseMessageId: string | null;
37
43
  /** {@link currentResponseText} holds that summary: its tails carry `isCompactionSummary`. Reset alongside it. */
38
44
  isResponseCompactionSummary: boolean;
39
45
  /**
@@ -1396,6 +1402,15 @@ export declare class OpenCodeAdapter extends EventEmitter implements AgentAdapte
1396
1402
  * compaction summary message marks the accumulated response as that summary.
1397
1403
  */
1398
1404
  private handleTextDelta;
1405
+ /**
1406
+ * @description Keep the buffer's text and its tails to ONE message at the edge of a compaction summary. The buffer holds
1407
+ * whatever arrives until a turn flush, so without this a tail could carry the agent's words and the first words of a
1408
+ * summary (tagged as the summary, and dropped with it when the summary is hidden), and the agent's answer after a summary
1409
+ * in the same turn would be tagged as the summary too. When the deltas move from one message to another and either of the
1410
+ * two is a summary, the pending tail is sent as it is and the buffer starts afresh: the next tail is the first of a message
1411
+ * of its own, not a continuation of the one before. Messages that are no summary share the buffer as they always did.
1412
+ */
1413
+ private followResponseMessage;
1399
1414
  /**
1400
1415
  * @description Emit only the part of `currentResponseText` not yet sent as
1401
1416
  * an `output` event, then advance `lastEmittedLength`. The bot does not
@@ -1 +1 @@
1
- {"version":3,"file":"openCodeAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/openCodeAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKtC,OAAO,KAAK,EAAE,YAAY,EAAsB,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAwB,gBAAgB,EAAE,WAAW,EAAE,uBAAuB,EAAoB,aAAa,EAAE,UAAU,EAA8B,oBAAoB,EAAE,aA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AAU,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI;IAiB1D;;;;;;;;OAQG;IACH,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI;IAerC,OAAO,CAAC,WAAW;IA6CnB;;;;;;;;OAQG;IACH,OAAO,CAAC,kCAAkC;CAG3C"}
@@ -1665,6 +1665,9 @@ class OpenCodeAdapter extends events_1.EventEmitter {
1665
1665
  lastEmittedLength: 0,
1666
1666
  outputTimer: null,
1667
1667
  compactionSummaryMessageId: null,
1668
+ isBotCompactionInFlight: false,
1669
+ botCompactionSummaryMessageId: null,
1670
+ responseMessageId: null,
1668
1671
  isResponseCompactionSummary: false,
1669
1672
  childResponseText: '',
1670
1673
  childLastEmittedLength: 0,
@@ -1894,6 +1897,7 @@ class OpenCodeAdapter extends events_1.EventEmitter {
1894
1897
  // Reset accumulated response text for new message
1895
1898
  session.currentResponseText = '';
1896
1899
  session.lastEmittedLength = 0;
1900
+ session.responseMessageId = null;
1897
1901
  session.isResponseCompactionSummary = false;
1898
1902
  // The child (sub-agent) accumulator resets with the parent's — a new turn
1899
1903
  // starts clean (a stale debounce firing later emits nothing: empty tail).
@@ -2633,6 +2637,9 @@ class OpenCodeAdapter extends events_1.EventEmitter {
2633
2637
  // compaction prompt (F2/S6) — only send it when non-empty so an ordinary
2634
2638
  // `/compact` stays byte-identical to before.
2635
2639
  const trimmedInstruction = instruction?.trim();
2640
+ // While the call is open the summary message the server announces is this call's (see `handleMessageUpdate`): the bot
2641
+ // reads its section itself after the call, so its streamed tails are marked as the bot's.
2642
+ session.isBotCompactionInFlight = true;
2636
2643
  try {
2637
2644
  await this.apiRequest('POST', buildDirectoryScopedPath(`/session/${session.sessionId}/summarize`, session.workDir), {
2638
2645
  providerID: modelRef.providerID,
@@ -2649,6 +2656,9 @@ class OpenCodeAdapter extends events_1.EventEmitter {
2649
2656
  console.warn(`[OpenCode] context compaction failed:`, reason);
2650
2657
  return { ok: false, error: (0, i18n_1.t)('compact.failed', { reason }) };
2651
2658
  }
2659
+ finally {
2660
+ session.isBotCompactionInFlight = false;
2661
+ }
2652
2662
  }
2653
2663
  /**
2654
2664
  * @description Whether this thread's directory instance loaded the bot's
@@ -2862,6 +2872,9 @@ class OpenCodeAdapter extends events_1.EventEmitter {
2862
2872
  lastEmittedLength: 0,
2863
2873
  outputTimer: null,
2864
2874
  compactionSummaryMessageId: null,
2875
+ isBotCompactionInFlight: false,
2876
+ botCompactionSummaryMessageId: null,
2877
+ responseMessageId: null,
2865
2878
  isResponseCompactionSummary: false,
2866
2879
  childResponseText: '',
2867
2880
  childLastEmittedLength: 0,
@@ -4038,8 +4051,8 @@ class OpenCodeAdapter extends events_1.EventEmitter {
4038
4051
  const text = delta || '';
4039
4052
  if (!text)
4040
4053
  return;
4041
- if (messageId !== undefined && messageId === session.compactionSummaryMessageId)
4042
- session.isResponseCompactionSummary = true;
4054
+ if (messageId !== undefined)
4055
+ this.followResponseMessage(key, session, messageId);
4043
4056
  session.currentResponseText += text;
4044
4057
  // Debounce: batch rapid SSE deltas before emitting
4045
4058
  if (session.outputTimer) {
@@ -4050,6 +4063,29 @@ class OpenCodeAdapter extends events_1.EventEmitter {
4050
4063
  this.emitResponseTail(key, session);
4051
4064
  }, sseOutputBatchMs);
4052
4065
  }
4066
+ /**
4067
+ * @description Keep the buffer's text and its tails to ONE message at the edge of a compaction summary. The buffer holds
4068
+ * whatever arrives until a turn flush, so without this a tail could carry the agent's words and the first words of a
4069
+ * summary (tagged as the summary, and dropped with it when the summary is hidden), and the agent's answer after a summary
4070
+ * in the same turn would be tagged as the summary too. When the deltas move from one message to another and either of the
4071
+ * two is a summary, the pending tail is sent as it is and the buffer starts afresh: the next tail is the first of a message
4072
+ * of its own, not a continuation of the one before. Messages that are no summary share the buffer as they always did.
4073
+ */
4074
+ followResponseMessage(key, session, messageId) {
4075
+ const isSummaryMessage = messageId === session.compactionSummaryMessageId;
4076
+ const isNewMessage = session.responseMessageId !== null && messageId !== session.responseMessageId;
4077
+ if (isNewMessage && (isSummaryMessage || session.isResponseCompactionSummary)) {
4078
+ if (session.outputTimer) {
4079
+ clearTimeout(session.outputTimer);
4080
+ session.outputTimer = null;
4081
+ }
4082
+ this.emitResponseTail(key, session);
4083
+ session.currentResponseText = '';
4084
+ session.lastEmittedLength = 0;
4085
+ }
4086
+ session.responseMessageId = messageId;
4087
+ session.isResponseCompactionSummary = isSummaryMessage;
4088
+ }
4053
4089
  /**
4054
4090
  * @description Emit only the part of `currentResponseText` not yet sent as
4055
4091
  * an `output` event, then advance `lastEmittedLength`. The bot does not
@@ -4073,8 +4109,11 @@ class OpenCodeAdapter extends events_1.EventEmitter {
4073
4109
  // `isFinal` rides only the idle-triggered flush so the bot can skip the
4074
4110
  // possibly-429-stretched debounce for the turn's last frame.
4075
4111
  const meta = { isContinuation, isFinal };
4076
- if (session.isResponseCompactionSummary)
4112
+ if (session.isResponseCompactionSummary && session.responseMessageId !== null) {
4077
4113
  meta.isCompactionSummary = true;
4114
+ meta.compactionSummaryMessageId = session.responseMessageId;
4115
+ meta.isBotIssuedCompaction = session.responseMessageId === session.botCompactionSummaryMessageId;
4116
+ }
4078
4117
  this.emit('output', key, tail, meta);
4079
4118
  session.lastEmittedLength = session.currentResponseText.length;
4080
4119
  }
@@ -4413,8 +4452,12 @@ class OpenCodeAdapter extends events_1.EventEmitter {
4413
4452
  if (info.role === 'assistant')
4414
4453
  session.sawTurnActivity = true;
4415
4454
  // The summary message is stored (and announced here) before its text streams.
4416
- if (isParentAssistantMessage && info.summary === true && info.id)
4455
+ if (isParentAssistantMessage && info.summary === true && info.id) {
4417
4456
  session.compactionSummaryMessageId = info.id;
4457
+ // A summary announced while the bot's own compaction call is open is that call's: it, not the server, started it.
4458
+ if (session.isBotCompactionInFlight)
4459
+ session.botCompactionSummaryMessageId = info.id;
4460
+ }
4418
4461
  if (info.role === 'user' && (!info.sessionID || info.sessionID === session.sessionId)) {
4419
4462
  this.noteUserMessageSeen(session, info.id);
4420
4463
  }
@@ -4986,6 +5029,7 @@ class OpenCodeAdapter extends events_1.EventEmitter {
4986
5029
  this.emitResponseTail(key, session, isFinal);
4987
5030
  session.currentResponseText = '';
4988
5031
  session.lastEmittedLength = 0;
5032
+ session.responseMessageId = null;
4989
5033
  session.isResponseCompactionSummary = false;
4990
5034
  session.childResponseText = '';
4991
5035
  session.childLastEmittedLength = 0;