charness 4.0.1 → 4.1.1

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 (274) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/DEVELOPMENT.md +3 -2
  3. package/SETUP.md +34 -8
  4. package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
  5. package/dist/adapters/claudeCliAdapter.js +3 -2
  6. package/dist/adapters/claudeCliAdapter.js.map +1 -1
  7. package/dist/adapters/claudeJsonStreamAdapter.d.ts +61 -5
  8. package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
  9. package/dist/adapters/claudeJsonStreamAdapter.js +147 -18
  10. package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
  11. package/dist/adapters/openCodeAdapter.d.ts +1 -0
  12. package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
  13. package/dist/adapters/openCodeAdapter.js +11 -0
  14. package/dist/adapters/openCodeAdapter.js.map +1 -1
  15. package/dist/bot.d.ts.map +1 -1
  16. package/dist/bot.js +430 -297
  17. package/dist/bot.js.map +1 -1
  18. package/dist/connectors/jira/answerSink.d.ts +8 -0
  19. package/dist/connectors/jira/answerSink.d.ts.map +1 -1
  20. package/dist/connectors/jira/answerSink.js +15 -0
  21. package/dist/connectors/jira/answerSink.js.map +1 -1
  22. package/dist/connectors/jira/config.d.ts +16 -0
  23. package/dist/connectors/jira/config.d.ts.map +1 -1
  24. package/dist/connectors/jira/config.js +21 -2
  25. package/dist/connectors/jira/config.js.map +1 -1
  26. package/dist/connectors/jira/connector.d.ts +10 -3
  27. package/dist/connectors/jira/connector.d.ts.map +1 -1
  28. package/dist/connectors/jira/connector.js +21 -3
  29. package/dist/connectors/jira/connector.js.map +1 -1
  30. package/dist/connectors/jira/inbound.d.ts +200 -18
  31. package/dist/connectors/jira/inbound.d.ts.map +1 -1
  32. package/dist/connectors/jira/inbound.js +814 -43
  33. package/dist/connectors/jira/inbound.js.map +1 -1
  34. package/dist/connectors/jira/prompt.d.ts +46 -0
  35. package/dist/connectors/jira/prompt.d.ts.map +1 -1
  36. package/dist/connectors/jira/prompt.js +123 -15
  37. package/dist/connectors/jira/prompt.js.map +1 -1
  38. package/dist/connectors/jira/trigger.d.ts +27 -4
  39. package/dist/connectors/jira/trigger.d.ts.map +1 -1
  40. package/dist/connectors/jira/trigger.js +35 -1
  41. package/dist/connectors/jira/trigger.js.map +1 -1
  42. package/dist/connectors/jira/triggerLog.d.ts +60 -5
  43. package/dist/connectors/jira/triggerLog.d.ts.map +1 -1
  44. package/dist/connectors/jira/triggerLog.js +116 -7
  45. package/dist/connectors/jira/triggerLog.js.map +1 -1
  46. package/dist/connectors/telegram/answerSink.d.ts +12 -0
  47. package/dist/connectors/telegram/answerSink.d.ts.map +1 -1
  48. package/dist/connectors/telegram/answerSink.js +23 -0
  49. package/dist/connectors/telegram/answerSink.js.map +1 -1
  50. package/dist/connectors/telegram/botApiConnection.d.ts +2 -1
  51. package/dist/connectors/telegram/botApiConnection.d.ts.map +1 -1
  52. package/dist/connectors/telegram/botApiConnection.js +19 -1
  53. package/dist/connectors/telegram/botApiConnection.js.map +1 -1
  54. package/dist/connectors/telegram/commands/botCore.d.ts +13 -5
  55. package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
  56. package/dist/connectors/telegram/commands/runners.d.ts +29 -2
  57. package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
  58. package/dist/connectors/telegram/commands/runners.js +84 -45
  59. package/dist/connectors/telegram/commands/runners.js.map +1 -1
  60. package/dist/connectors/telegram/outbound.d.ts +1 -1
  61. package/dist/connectors/telegram/outbound.d.ts.map +1 -1
  62. package/dist/connectors/telegram/outbound.js +3 -1
  63. package/dist/connectors/telegram/outbound.js.map +1 -1
  64. package/dist/connectors/telegram/outputBacklogGlue.d.ts +1 -1
  65. package/dist/connectors/telegram/outputBacklogGlue.js +1 -1
  66. package/dist/connectors/telegram/outputFlushPlan.d.ts +23 -8
  67. package/dist/connectors/telegram/outputFlushPlan.d.ts.map +1 -1
  68. package/dist/connectors/telegram/outputFlushPlan.js +22 -13
  69. package/dist/connectors/telegram/outputFlushPlan.js.map +1 -1
  70. package/dist/connectors/telegram/pinnedNoticeSlot.d.ts +31 -0
  71. package/dist/connectors/telegram/pinnedNoticeSlot.d.ts.map +1 -0
  72. package/dist/connectors/telegram/pinnedNoticeSlot.js +43 -0
  73. package/dist/connectors/telegram/pinnedNoticeSlot.js.map +1 -0
  74. package/dist/connectors/telegram/sendOutcome.d.ts +50 -0
  75. package/dist/connectors/telegram/sendOutcome.d.ts.map +1 -0
  76. package/dist/connectors/telegram/sendOutcome.js +49 -0
  77. package/dist/connectors/telegram/sendOutcome.js.map +1 -0
  78. package/dist/connectors/telegram/telegramFailureRetry.d.ts +17 -0
  79. package/dist/connectors/telegram/telegramFailureRetry.d.ts.map +1 -0
  80. package/dist/connectors/telegram/telegramFailureRetry.js +29 -0
  81. package/dist/connectors/telegram/telegramFailureRetry.js.map +1 -0
  82. package/dist/connectors/telegram/unpinMessages.d.ts +1 -1
  83. package/dist/connectors/telegram/unpinMessages.d.ts.map +1 -1
  84. package/dist/connectors/telegram/unpinMessages.js +3 -18
  85. package/dist/connectors/telegram/unpinMessages.js.map +1 -1
  86. package/dist/hooks/claudeSkillsRestoreHook.d.ts +105 -0
  87. package/dist/hooks/claudeSkillsRestoreHook.d.ts.map +1 -0
  88. package/dist/hooks/claudeSkillsRestoreHook.js +276 -0
  89. package/dist/hooks/claudeSkillsRestoreHook.js.map +1 -0
  90. package/dist/i18n/de.d.ts.map +1 -1
  91. package/dist/i18n/de.js +4 -0
  92. package/dist/i18n/de.js.map +1 -1
  93. package/dist/i18n/en.d.ts.map +1 -1
  94. package/dist/i18n/en.js +4 -0
  95. package/dist/i18n/en.js.map +1 -1
  96. package/dist/i18n/es.d.ts.map +1 -1
  97. package/dist/i18n/es.js +4 -0
  98. package/dist/i18n/es.js.map +1 -1
  99. package/dist/i18n/fr.d.ts.map +1 -1
  100. package/dist/i18n/fr.js +4 -0
  101. package/dist/i18n/fr.js.map +1 -1
  102. package/dist/i18n/hi.d.ts.map +1 -1
  103. package/dist/i18n/hi.js +4 -0
  104. package/dist/i18n/hi.js.map +1 -1
  105. package/dist/i18n/ja.d.ts.map +1 -1
  106. package/dist/i18n/ja.js +4 -0
  107. package/dist/i18n/ja.js.map +1 -1
  108. package/dist/i18n/ka.d.ts.map +1 -1
  109. package/dist/i18n/ka.js +4 -0
  110. package/dist/i18n/ka.js.map +1 -1
  111. package/dist/i18n/pt.d.ts.map +1 -1
  112. package/dist/i18n/pt.js +4 -0
  113. package/dist/i18n/pt.js.map +1 -1
  114. package/dist/i18n/ru.d.ts.map +1 -1
  115. package/dist/i18n/ru.js +4 -0
  116. package/dist/i18n/ru.js.map +1 -1
  117. package/dist/i18n/uk.d.ts.map +1 -1
  118. package/dist/i18n/uk.js +4 -0
  119. package/dist/i18n/uk.js.map +1 -1
  120. package/dist/i18n/uz.d.ts.map +1 -1
  121. package/dist/i18n/uz.js +4 -0
  122. package/dist/i18n/uz.js.map +1 -1
  123. package/dist/i18n/zh.d.ts.map +1 -1
  124. package/dist/i18n/zh.js +4 -0
  125. package/dist/i18n/zh.js.map +1 -1
  126. package/dist/i18n.d.ts.map +1 -1
  127. package/dist/i18n.js +2 -1
  128. package/dist/i18n.js.map +1 -1
  129. package/dist/platform/outbound.d.ts +4 -1
  130. package/dist/platform/outbound.d.ts.map +1 -1
  131. package/dist/platform/outbound.js.map +1 -1
  132. package/dist/rateLimiter.d.ts +33 -1
  133. package/dist/rateLimiter.d.ts.map +1 -1
  134. package/dist/rateLimiter.js +91 -5
  135. package/dist/rateLimiter.js.map +1 -1
  136. package/dist/requests/requestHeader.d.ts.map +1 -1
  137. package/dist/requests/requestHeader.js +1 -0
  138. package/dist/requests/requestHeader.js.map +1 -1
  139. package/dist/requests/types.d.ts +4 -1
  140. package/dist/requests/types.d.ts.map +1 -1
  141. package/dist/requests/wakeUpEngine.d.ts +31 -1
  142. package/dist/requests/wakeUpEngine.d.ts.map +1 -1
  143. package/dist/requests/wakeUpEngine.js +94 -2
  144. package/dist/requests/wakeUpEngine.js.map +1 -1
  145. package/dist/requests/wakeUpRules.d.ts +7 -0
  146. package/dist/requests/wakeUpRules.d.ts.map +1 -1
  147. package/dist/requests/wakeUpRules.js +14 -0
  148. package/dist/requests/wakeUpRules.js.map +1 -1
  149. package/dist/runnerUtility/pueueDaemon.d.ts +7 -13
  150. package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
  151. package/dist/runnerUtility/pueueDaemon.js +8 -27
  152. package/dist/runnerUtility/pueueDaemon.js.map +1 -1
  153. package/dist/scheduler/engine.d.ts +17 -4
  154. package/dist/scheduler/engine.d.ts.map +1 -1
  155. package/dist/scheduler/engine.js +55 -10
  156. package/dist/scheduler/engine.js.map +1 -1
  157. package/dist/scheduler/mcpBoot.d.ts +6 -2
  158. package/dist/scheduler/mcpBoot.d.ts.map +1 -1
  159. package/dist/scheduler/mcpBoot.js +7 -1
  160. package/dist/scheduler/mcpBoot.js.map +1 -1
  161. package/dist/scheduler/mcpSurface.d.ts.map +1 -1
  162. package/dist/scheduler/mcpSurface.js +18 -9
  163. package/dist/scheduler/mcpSurface.js.map +1 -1
  164. package/dist/selfUpdate/selfCheck.d.ts.map +1 -1
  165. package/dist/selfUpdate/selfCheck.js +1 -1
  166. package/dist/selfUpdate/selfCheck.js.map +1 -1
  167. package/dist/sendErrorClassifier.d.ts +6 -0
  168. package/dist/sendErrorClassifier.d.ts.map +1 -1
  169. package/dist/sendErrorClassifier.js +9 -0
  170. package/dist/sendErrorClassifier.js.map +1 -1
  171. package/dist/startupPromptBuffer.d.ts +8 -8
  172. package/dist/startupPromptBuffer.d.ts.map +1 -1
  173. package/dist/startupPromptBuffer.js +7 -5
  174. package/dist/startupPromptBuffer.js.map +1 -1
  175. package/dist/testTimings.d.ts +6 -3
  176. package/dist/testTimings.d.ts.map +1 -1
  177. package/dist/testTimings.js +7 -2
  178. package/dist/testTimings.js.map +1 -1
  179. package/dist/threadRouting.d.ts +23 -0
  180. package/dist/threadRouting.d.ts.map +1 -1
  181. package/dist/threadRouting.js +28 -0
  182. package/dist/threadRouting.js.map +1 -1
  183. package/dist/trackers/taskAgentSlots.d.ts +42 -3
  184. package/dist/trackers/taskAgentSlots.d.ts.map +1 -1
  185. package/dist/trackers/taskAgentSlots.js +31 -11
  186. package/dist/trackers/taskAgentSlots.js.map +1 -1
  187. package/dist/types.d.ts +16 -0
  188. package/dist/types.d.ts.map +1 -1
  189. package/dist/utils/agentPlugin.d.ts +7 -0
  190. package/dist/utils/agentPlugin.d.ts.map +1 -1
  191. package/dist/utils/agentPlugin.js +12 -0
  192. package/dist/utils/agentPlugin.js.map +1 -1
  193. package/dist/utils/claudeCompactHook.d.ts +73 -10
  194. package/dist/utils/claudeCompactHook.d.ts.map +1 -1
  195. package/dist/utils/claudeCompactHook.js +96 -17
  196. package/dist/utils/claudeCompactHook.js.map +1 -1
  197. package/dist/utils/claudeProfiles.d.ts +8 -0
  198. package/dist/utils/claudeProfiles.d.ts.map +1 -1
  199. package/dist/utils/claudeProfiles.js +12 -2
  200. package/dist/utils/claudeProfiles.js.map +1 -1
  201. package/dist/utils/claudeTranscriptEpoch.d.ts +15 -0
  202. package/dist/utils/claudeTranscriptEpoch.d.ts.map +1 -0
  203. package/dist/utils/claudeTranscriptEpoch.js +120 -0
  204. package/dist/utils/claudeTranscriptEpoch.js.map +1 -0
  205. package/dist/utils/clearStatusCoalescer.d.ts +24 -0
  206. package/dist/utils/clearStatusCoalescer.d.ts.map +1 -0
  207. package/dist/utils/clearStatusCoalescer.js +25 -0
  208. package/dist/utils/clearStatusCoalescer.js.map +1 -0
  209. package/dist/utils/compactOnIdle.d.ts +91 -34
  210. package/dist/utils/compactOnIdle.d.ts.map +1 -1
  211. package/dist/utils/compactOnIdle.js +149 -31
  212. package/dist/utils/compactOnIdle.js.map +1 -1
  213. package/dist/utils/fileSendPlan.d.ts +30 -8
  214. package/dist/utils/fileSendPlan.d.ts.map +1 -1
  215. package/dist/utils/fileSendPlan.js +37 -12
  216. package/dist/utils/fileSendPlan.js.map +1 -1
  217. package/dist/utils/fileSendService.d.ts +1 -1
  218. package/dist/utils/fileSendService.d.ts.map +1 -1
  219. package/dist/utils/fileSendService.js +9 -1
  220. package/dist/utils/fileSendService.js.map +1 -1
  221. package/dist/utils/groupOutputBacklog.d.ts +90 -0
  222. package/dist/utils/groupOutputBacklog.d.ts.map +1 -0
  223. package/dist/utils/groupOutputBacklog.js +134 -0
  224. package/dist/utils/groupOutputBacklog.js.map +1 -0
  225. package/dist/utils/imageDimensions.d.ts +32 -0
  226. package/dist/utils/imageDimensions.d.ts.map +1 -0
  227. package/dist/utils/imageDimensions.js +181 -0
  228. package/dist/utils/imageDimensions.js.map +1 -0
  229. package/dist/utils/jsonStreamHost.d.ts +35 -9
  230. package/dist/utils/jsonStreamHost.d.ts.map +1 -1
  231. package/dist/utils/jsonStreamHost.js +59 -16
  232. package/dist/utils/jsonStreamHost.js.map +1 -1
  233. package/dist/utils/lostWork.d.ts +8 -2
  234. package/dist/utils/lostWork.d.ts.map +1 -1
  235. package/dist/utils/lostWork.js +9 -5
  236. package/dist/utils/lostWork.js.map +1 -1
  237. package/dist/utils/messageSendService.d.ts +26 -3
  238. package/dist/utils/messageSendService.d.ts.map +1 -1
  239. package/dist/utils/messageSendService.js +35 -3
  240. package/dist/utils/messageSendService.js.map +1 -1
  241. package/dist/utils/openCodeCompactPlugin.d.ts +33 -0
  242. package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
  243. package/dist/utils/openCodeCompactPlugin.js +192 -1
  244. package/dist/utils/openCodeCompactPlugin.js.map +1 -1
  245. package/dist/utils/promptDelivery.d.ts +11 -2
  246. package/dist/utils/promptDelivery.d.ts.map +1 -1
  247. package/dist/utils/promptDelivery.js +3 -3
  248. package/dist/utils/promptDelivery.js.map +1 -1
  249. package/dist/utils/skillsRestore.d.ts +235 -0
  250. package/dist/utils/skillsRestore.d.ts.map +1 -0
  251. package/dist/utils/skillsRestore.js +515 -0
  252. package/dist/utils/skillsRestore.js.map +1 -0
  253. package/dist/utils/statusFlushDecision.js +1 -1
  254. package/dist/utils/streamedCompactionSummary.d.ts +4 -4
  255. package/dist/utils/streamedCompactionSummary.js +5 -5
  256. package/dist/utils/streamedCompactionSummary.js.map +1 -1
  257. package/dist/utils/streamedOutputLanding.d.ts +14 -0
  258. package/dist/utils/streamedOutputLanding.d.ts.map +1 -0
  259. package/dist/utils/streamedOutputLanding.js +45 -0
  260. package/dist/utils/streamedOutputLanding.js.map +1 -0
  261. package/dist/utils/typingLoopBackstop.d.ts +8 -7
  262. package/dist/utils/typingLoopBackstop.d.ts.map +1 -1
  263. package/dist/utils/typingLoopBackstop.js +6 -5
  264. package/dist/utils/typingLoopBackstop.js.map +1 -1
  265. package/npm-shrinkwrap.json +2 -2
  266. package/package.json +1 -1
  267. package/dist/utils/clearThreadOutputQueues.d.ts +0 -44
  268. package/dist/utils/clearThreadOutputQueues.d.ts.map +0 -1
  269. package/dist/utils/clearThreadOutputQueues.js +0 -39
  270. package/dist/utils/clearThreadOutputQueues.js.map +0 -1
  271. package/dist/utils/groupFinalizePlan.d.ts +0 -36
  272. package/dist/utils/groupFinalizePlan.d.ts.map +0 -1
  273. package/dist/utils/groupFinalizePlan.js +0 -31
  274. package/dist/utils/groupFinalizePlan.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description The longest the bot waits for the text an agent streamed before a tool call to land in the topic before it posts
3
+ * what the call asks for (its answer, its messages, its question). The landing may take as long as Telegram does — a long text
4
+ * goes out in several paced messages — but a send that never finishes must not hold the agent's tool call, and with it its
5
+ * turn, for ever: a misplaced answer is better than a stuck agent.
6
+ */
7
+ export declare const streamedOutputLandingLimitMs = 60000;
8
+ /**
9
+ * @description Start `land` now and resolve when it is over — it landed, it failed (logged, never thrown at the caller) or
10
+ * {@link streamedOutputLandingLimitMs} passed (warned about; the landing goes on in the background and its late end changes
11
+ * nothing). `owner` names the conversation in the log lines. Never rejects, so a caller may start it and await it later.
12
+ */
13
+ export declare function landStreamedOutputWithinLimit(land: () => Promise<void>, owner: string): Promise<void>;
14
+ //# sourceMappingURL=streamedOutputLanding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streamedOutputLanding.d.ts","sourceRoot":"","sources":["../../src/utils/streamedOutputLanding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BrG"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.streamedOutputLandingLimitMs = void 0;
4
+ exports.landStreamedOutputWithinLimit = landStreamedOutputWithinLimit;
5
+ /**
6
+ * @description The longest the bot waits for the text an agent streamed before a tool call to land in the topic before it posts
7
+ * what the call asks for (its answer, its messages, its question). The landing may take as long as Telegram does — a long text
8
+ * goes out in several paced messages — but a send that never finishes must not hold the agent's tool call, and with it its
9
+ * turn, for ever: a misplaced answer is better than a stuck agent.
10
+ */
11
+ exports.streamedOutputLandingLimitMs = 60_000;
12
+ /**
13
+ * @description Start `land` now and resolve when it is over — it landed, it failed (logged, never thrown at the caller) or
14
+ * {@link streamedOutputLandingLimitMs} passed (warned about; the landing goes on in the background and its late end changes
15
+ * nothing). `owner` names the conversation in the log lines. Never rejects, so a caller may start it and await it later.
16
+ */
17
+ function landStreamedOutputWithinLimit(land, owner) {
18
+ return new Promise((resolve) => {
19
+ const limitTimer = setTimeout(() => {
20
+ console.warn(`[send] ${owner}: the streamed text was still going out ${exports.streamedOutputLandingLimitMs / 1000} s after it was asked for — going on without waiting for it`);
21
+ resolve();
22
+ }, exports.streamedOutputLandingLimitMs);
23
+ const reportFailure = (error) => {
24
+ console.error(`[send] ${owner}: the streamed text could not be landed before what follows it:`, error instanceof Error ? error.message : error);
25
+ };
26
+ const finish = () => {
27
+ clearTimeout(limitTimer);
28
+ resolve();
29
+ };
30
+ let landing;
31
+ try {
32
+ landing = land();
33
+ }
34
+ catch (error) {
35
+ reportFailure(error instanceof Error ? error : String(error));
36
+ finish();
37
+ return;
38
+ }
39
+ landing.then(finish, (error) => {
40
+ reportFailure(error instanceof Error ? error : String(error));
41
+ finish();
42
+ });
43
+ });
44
+ }
45
+ //# sourceMappingURL=streamedOutputLanding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streamedOutputLanding.js","sourceRoot":"","sources":["../../src/utils/streamedOutputLanding.ts"],"names":[],"mappings":";;;AAaA,sEA0BC;AAvCD;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,IAAyB,EAAE,KAAa;IACpF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,EAAE;YACjC,OAAO,CAAC,IAAI,CAAC,UAAU,KAAK,2CAA2C,oCAA4B,GAAG,IAAI,6DAA6D,CAAC,CAAC;YACzK,OAAO,EAAE,CAAC;QACZ,CAAC,EAAE,oCAA4B,CAAC,CAAC;QACjC,MAAM,aAAa,GAAG,CAAC,KAA2D,EAAQ,EAAE;YAC1F,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,iEAAiE,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAClJ,CAAC,CAAC;QACF,MAAM,MAAM,GAAG,GAAS,EAAE;YACxB,YAAY,CAAC,UAAU,CAAC,CAAC;YACzB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QACF,IAAI,OAAsB,CAAC;QAC3B,IAAI,CAAC;YACH,OAAO,GAAG,IAAI,EAAE,CAAC;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,aAAa,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC9D,MAAM,EAAE,CAAC;YACT,OAAO;QACT,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7B,aAAa,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC9D,MAAM,EAAE,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -7,8 +7,8 @@
7
7
  * `checkShouldKeepTyping` (`isOutputStreaming || isAdapterBusy`) goes false, and
8
8
  * has NO absolute bound. `jsonStreamBusyWatchdog` already covers a stuck
9
9
  * `isBusy` (a missed terminal `result`). This backstop covers the OTHER input:
10
- * `isOutputStreaming`, which reads `q.pendingOutput !== null || q.isProcessing ||
11
- * q.debounceTimer !== null`. A leaked non-null `debounceTimer` (the `isFinal`
10
+ * `isOutputStreaming`, which reads "the backlog holds text || it is sending ||
11
+ * q.debounceTimer !== null". A leaked non-null `debounceTimer` (the `isFinal`
12
12
  * fast-path in `queueOutput` cleared the timer but left the handle set) pins
13
13
  * `isOutputStreaming` true forever → the indicator hangs unbounded even though
14
14
  * the output queue is empty (live 2026-07-19, a json-stream group topic firing
@@ -22,11 +22,12 @@
22
22
  * and on OpenCode it sets no busy flag at all → vetoed;
23
23
  * - a live DM draft is a real stream (`isTransportStreaming`) → vetoed;
24
24
  * - real text waiting to send (`hasPendingOutput`) or an in-flight send
25
- * (`isProcessing`, which may legitimately be a slow API call) → vetoed.
25
+ * (`isProcessing`: the backlog's send loop runs, which may legitimately be a
26
+ * slow API call) → vetoed.
26
27
  * Only when the adapter is idle, nothing is drafting, the queue is empty AND an
27
28
  * un-fired debounce handle lingers does it fire. A LIVE debounce is ALWAYS armed
28
- * WITH pending text (both `queueOutput` and `processOutputQueue` arm it only when
29
- * `pendingOutput` is set, nulling it the instant it fires), so "debounce armed +
29
+ * WITH pending text (both `queueOutput` and the retry of text a failure put back
30
+ * arm it only when the backlog holds text, nulling it the instant it fires), so "debounce armed +
30
31
  * empty queue" can only be the dead/stale handle from the leak — never a real
31
32
  * in-flight turn. The decision is therefore safe by construction: it truncates a
32
33
  * leak, never work.
@@ -45,9 +46,9 @@ export interface TypingLoopBackstopInput {
45
46
  isCompacting: boolean;
46
47
  /** The output transport (DM draft cursor) reports an active live stream. */
47
48
  isTransportStreaming: boolean;
48
- /** `q.pendingOutput !== null` — real agent text still waiting to be sent. */
49
+ /** The topic's output backlog holds text (`checkHasPendingOutput`) — real agent text still waiting to be sent. */
49
50
  hasPendingOutput: boolean;
50
- /** `q.isProcessing` — a flush is actively awaiting a send (possibly slow). */
51
+ /** `q.isDraining` — the backlog's send loop is awaiting a send (possibly slow). */
51
52
  isProcessing: boolean;
52
53
  /** `q.debounceTimer !== null` — a debounce timer HANDLE is present. */
53
54
  hasDebounceTimer: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"typingLoopBackstop.d.ts","sourceRoot":"","sources":["../../src/utils/typingLoopBackstop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,oBAAoB,EAAE,OAAO,CAAC;IAC9B,6EAA6E;IAC7E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,8EAA8E;IAC9E,YAAY,EAAE,OAAO,CAAC;IACtB,uEAAuE;IACvE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAiBhF"}
1
+ {"version":3,"file":"typingLoopBackstop.d.ts","sourceRoot":"","sources":["../../src/utils/typingLoopBackstop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kHAAkH;IAClH,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mFAAmF;IACnF,YAAY,EAAE,OAAO,CAAC;IACtB,uEAAuE;IACvE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAiBhF"}
@@ -8,8 +8,8 @@
8
8
  * `checkShouldKeepTyping` (`isOutputStreaming || isAdapterBusy`) goes false, and
9
9
  * has NO absolute bound. `jsonStreamBusyWatchdog` already covers a stuck
10
10
  * `isBusy` (a missed terminal `result`). This backstop covers the OTHER input:
11
- * `isOutputStreaming`, which reads `q.pendingOutput !== null || q.isProcessing ||
12
- * q.debounceTimer !== null`. A leaked non-null `debounceTimer` (the `isFinal`
11
+ * `isOutputStreaming`, which reads "the backlog holds text || it is sending ||
12
+ * q.debounceTimer !== null". A leaked non-null `debounceTimer` (the `isFinal`
13
13
  * fast-path in `queueOutput` cleared the timer but left the handle set) pins
14
14
  * `isOutputStreaming` true forever → the indicator hangs unbounded even though
15
15
  * the output queue is empty (live 2026-07-19, a json-stream group topic firing
@@ -23,11 +23,12 @@
23
23
  * and on OpenCode it sets no busy flag at all → vetoed;
24
24
  * - a live DM draft is a real stream (`isTransportStreaming`) → vetoed;
25
25
  * - real text waiting to send (`hasPendingOutput`) or an in-flight send
26
- * (`isProcessing`, which may legitimately be a slow API call) → vetoed.
26
+ * (`isProcessing`: the backlog's send loop runs, which may legitimately be a
27
+ * slow API call) → vetoed.
27
28
  * Only when the adapter is idle, nothing is drafting, the queue is empty AND an
28
29
  * un-fired debounce handle lingers does it fire. A LIVE debounce is ALWAYS armed
29
- * WITH pending text (both `queueOutput` and `processOutputQueue` arm it only when
30
- * `pendingOutput` is set, nulling it the instant it fires), so "debounce armed +
30
+ * WITH pending text (both `queueOutput` and the retry of text a failure put back
31
+ * arm it only when the backlog holds text, nulling it the instant it fires), so "debounce armed +
31
32
  * empty queue" can only be the dead/stale handle from the leak — never a real
32
33
  * in-flight turn. The decision is therefore safe by construction: it truncates a
33
34
  * leak, never work.
@@ -1 +1 @@
1
- {"version":3,"file":"typingLoopBackstop.js","sourceRoot":"","sources":["../../src/utils/typingLoopBackstop.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;AAgCH,4DAiBC;AAzBD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,KAA8B;IACrE,+EAA+E;IAC/E,uDAAuD;IACvD,IAAI,KAAK,CAAC,aAAa;QAAE,OAAO,KAAK,CAAC;IACtC,+EAA+E;IAC/E,+DAA+D;IAC/D,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IACrC,gEAAgE;IAChE,IAAI,KAAK,CAAC,oBAAoB;QAAE,OAAO,KAAK,CAAC;IAC7C,0CAA0C;IAC1C,IAAI,KAAK,CAAC,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACzC,2EAA2E;IAC3E,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IACrC,8EAA8E;IAC9E,+EAA+E;IAC/E,2EAA2E;IAC3E,OAAO,KAAK,CAAC,gBAAgB,CAAC;AAChC,CAAC"}
1
+ {"version":3,"file":"typingLoopBackstop.js","sourceRoot":"","sources":["../../src/utils/typingLoopBackstop.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;AAgCH,4DAiBC;AAzBD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,KAA8B;IACrE,+EAA+E;IAC/E,uDAAuD;IACvD,IAAI,KAAK,CAAC,aAAa;QAAE,OAAO,KAAK,CAAC;IACtC,+EAA+E;IAC/E,+DAA+D;IAC/D,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IACrC,gEAAgE;IAChE,IAAI,KAAK,CAAC,oBAAoB;QAAE,OAAO,KAAK,CAAC;IAC7C,0CAA0C;IAC1C,IAAI,KAAK,CAAC,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACzC,2EAA2E;IAC3E,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IACrC,8EAA8E;IAC9E,+EAA+E;IAC/E,2EAA2E;IAC3E,OAAO,KAAK,CAAC,gBAAgB,CAAC;AAChC,CAAC"}
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "charness",
3
- "version": "4.0.1",
3
+ "version": "4.1.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "charness",
9
- "version": "4.0.1",
9
+ "version": "4.1.1",
10
10
  "dependencies": {
11
11
  "@modelcontextprotocol/sdk": "^1.29.0",
12
12
  "abort-controller": "^3.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "charness",
3
- "version": "4.0.1",
3
+ "version": "4.1.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "Sergei Solo",
6
6
  "description": "Harness for running Claude Code / OpenCode agents in the cloud or on your laptop, controlled from Telegram or Jira.",
@@ -1,44 +0,0 @@
1
- import type { PendingOutputSegment } from '../connectors/telegram/outputFlushPlan';
2
- /**
3
- * @description Minimal shape of the bot's per-thread output queue that
4
- * {@link clearThreadOutputQueues} needs to drop. Mirrors the load-bearing
5
- * fields of `bot.ts`'s `OutputQueueState` so the clear logic stays a pure,
6
- * unit-testable function instead of reaching into module-private maps.
7
- */
8
- export interface ClearableOutputQueue {
9
- /** Coalesced, not-yet-sent agent output, oldest first. Empty = nothing queued. */
10
- pendingSegments: PendingOutputSegment[];
11
- /** Armed debounce timer that would flush the pending segments. `null` = none. */
12
- debounceTimer: NodeJS.Timeout | null;
13
- }
14
- /**
15
- * @description Minimal shape of the bot's per-thread status coalescer that
16
- * {@link clearThreadOutputQueues} needs to drop. Mirrors the load-bearing
17
- * fields of `bot.ts`'s `StatusCoalesceState`.
18
- */
19
- export interface ClearableStatusCoalescer {
20
- /** Latest status frame not yet sent. `null` = nothing pending. */
21
- pendingText: string | null;
22
- /**
23
- * Armed timer that would resume a flush deferred during a 429 cooldown.
24
- * `null` = none. Optional so older callers that don't track it still type.
25
- */
26
- deferRetryTimer?: NodeJS.Timeout | null;
27
- }
28
- /**
29
- * @description Atomically drop a thread's bot-side queued-but-unsent agent
30
- * output when its session stops.
31
- *
32
- * Without this, output that was coalesced before the user stopped the agent
33
- * keeps draining into the topic *after* the "stopped" confirmation — observed
34
- * live when a Telegram 429 backlog delayed the flush. We only touch the
35
- * bot-side queues: the stop confirmation and any already-in-flight Telegram
36
- * send (`processOutputQueue` has already taken `out` locally; `flushStatusCoalescer`
37
- * has already taken `text`) are at the API layer and are intentionally left
38
- * alone — that single in-flight message may still land, but nothing queued
39
- * behind it does.
40
- *
41
- * Idempotent: clearing an already-empty queue is a no-op.
42
- */
43
- export declare function clearThreadOutputQueues(queue: ClearableOutputQueue | undefined, coalescer: ClearableStatusCoalescer | undefined): void;
44
- //# sourceMappingURL=clearThreadOutputQueues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clearThreadOutputQueues.d.ts","sourceRoot":"","sources":["../../src/utils/clearThreadOutputQueues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,iFAAiF;IACjF,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,kEAAkE;IAClE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,oBAAoB,GAAG,SAAS,EACvC,SAAS,EAAE,wBAAwB,GAAG,SAAS,GAC9C,IAAI,CAmBN"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clearThreadOutputQueues = clearThreadOutputQueues;
4
- /**
5
- * @description Atomically drop a thread's bot-side queued-but-unsent agent
6
- * output when its session stops.
7
- *
8
- * Without this, output that was coalesced before the user stopped the agent
9
- * keeps draining into the topic *after* the "stopped" confirmation — observed
10
- * live when a Telegram 429 backlog delayed the flush. We only touch the
11
- * bot-side queues: the stop confirmation and any already-in-flight Telegram
12
- * send (`processOutputQueue` has already taken `out` locally; `flushStatusCoalescer`
13
- * has already taken `text`) are at the API layer and are intentionally left
14
- * alone — that single in-flight message may still land, but nothing queued
15
- * behind it does.
16
- *
17
- * Idempotent: clearing an already-empty queue is a no-op.
18
- */
19
- function clearThreadOutputQueues(queue, coalescer) {
20
- if (queue) {
21
- queue.pendingSegments = [];
22
- if (queue.debounceTimer) {
23
- clearTimeout(queue.debounceTimer);
24
- queue.debounceTimer = null;
25
- }
26
- }
27
- if (coalescer) {
28
- // Nulling `pendingText` makes the running flush loop (if any) exit on its
29
- // next iteration without sending a stale frame. The coalescer can also
30
- // hold a defer-retry timer armed during a 429 cooldown — cancel it too,
31
- // otherwise it would fire into a stopped session.
32
- coalescer.pendingText = null;
33
- if (coalescer.deferRetryTimer) {
34
- clearTimeout(coalescer.deferRetryTimer);
35
- coalescer.deferRetryTimer = null;
36
- }
37
- }
38
- }
39
- //# sourceMappingURL=clearThreadOutputQueues.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clearThreadOutputQueues.js","sourceRoot":"","sources":["../../src/utils/clearThreadOutputQueues.ts"],"names":[],"mappings":";;AA6CA,0DAsBC;AArCD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,uBAAuB,CACrC,KAAuC,EACvC,SAA+C;IAE/C,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;YACxB,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAClC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,IAAI,SAAS,EAAE,CAAC;QACd,0EAA0E;QAC1E,uEAAuE;QACvE,wEAAwE;QACxE,kDAAkD;QAClD,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;QAC7B,IAAI,SAAS,CAAC,eAAe,EAAE,CAAC;YAC9B,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;YACxC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC;QACnC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * @description Pure decision for the GROUP output transport's `finalizeInFlight`
3
- * (S2): given the thread's coalesced output-queue state at a settle/teardown
4
- * boundary, decide whether there is an unsent remainder to force-deliver (so the
5
- * agent's final answer is never discarded) or the turn is already fully
6
- * delivered (a no-op — no duplicate post).
7
- *
8
- * Extracted from `bot.ts`'s `finalizeGroupOutput` so the "remainder vs no-op"
9
- * + importance decision is unit-testable without the Telegraf / queue
10
- * machinery. The bot-side function owns the imperative drain (snapshot + null
11
- * the buffer, then `sendOutputImmediate`); this owns only the decision.
12
- *
13
- * The group queue already SEPARATES what landed from what is pending:
14
- * `lastMessageText` holds the last landed message and the pending segments hold the
15
- * coalesced-but-unsent remainder. So the "reconcile final accumulated vs last
16
- * landed" reduces to: send the pending segments, in order, if there are any. No text
17
- * diff is needed — the queue is the single source of the remainder.
18
- */
19
- import type { PendingOutputSegment } from '../connectors/telegram/outputFlushPlan';
20
- /** The load-bearing fields of `bot.ts`'s `OutputQueueState` the decision needs. */
21
- export interface GroupFinalizeInput {
22
- /** Coalesced, not-yet-sent agent output, oldest first. Empty = nothing pending. */
23
- pendingSegments: readonly PendingOutputSegment[];
24
- }
25
- /**
26
- * @description The finalize plan: either nothing to do (fully delivered), or the
27
- * exact remainder to send — segment by segment, each landing as it was queued.
28
- */
29
- export type GroupFinalizePlan = {
30
- action: 'noop';
31
- } | {
32
- action: 'send';
33
- segments: PendingOutputSegment[];
34
- };
35
- export declare function getGroupFinalizePlan(input: GroupFinalizeInput): GroupFinalizePlan;
36
- //# sourceMappingURL=groupFinalizePlan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groupFinalizePlan.d.ts","sourceRoot":"","sources":["../../src/utils/groupFinalizePlan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,mFAAmF;AACnF,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,eAAe,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClD;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAC;AAEzD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,CAOjF"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- /**
3
- * @description Pure decision for the GROUP output transport's `finalizeInFlight`
4
- * (S2): given the thread's coalesced output-queue state at a settle/teardown
5
- * boundary, decide whether there is an unsent remainder to force-deliver (so the
6
- * agent's final answer is never discarded) or the turn is already fully
7
- * delivered (a no-op — no duplicate post).
8
- *
9
- * Extracted from `bot.ts`'s `finalizeGroupOutput` so the "remainder vs no-op"
10
- * + importance decision is unit-testable without the Telegraf / queue
11
- * machinery. The bot-side function owns the imperative drain (snapshot + null
12
- * the buffer, then `sendOutputImmediate`); this owns only the decision.
13
- *
14
- * The group queue already SEPARATES what landed from what is pending:
15
- * `lastMessageText` holds the last landed message and the pending segments hold the
16
- * coalesced-but-unsent remainder. So the "reconcile final accumulated vs last
17
- * landed" reduces to: send the pending segments, in order, if there are any. No text
18
- * diff is needed — the queue is the single source of the remainder.
19
- */
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.getGroupFinalizePlan = getGroupFinalizePlan;
22
- function getGroupFinalizePlan(input) {
23
- // A fully-delivered turn (no pending remainder) — and segments holding only
24
- // whitespace, which would earn a Telegram error and are not a real answer — is
25
- // a no-op, so a settle/teardown never double-posts.
26
- const segments = input.pendingSegments.filter((segment) => segment.output.trim() !== '');
27
- if (segments.length === 0)
28
- return { action: 'noop' };
29
- return { action: 'send', segments };
30
- }
31
- //# sourceMappingURL=groupFinalizePlan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groupFinalizePlan.js","sourceRoot":"","sources":["../../src/utils/groupFinalizePlan.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAkBH,oDAOC;AAPD,SAAgB,oBAAoB,CAAC,KAAyB;IAC5D,4EAA4E;IAC5E,+EAA+E;IAC/E,oDAAoD;IACpD,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACzF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACrD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACtC,CAAC"}