charness 4.1.0 → 4.2.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 (312) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/DEVELOPMENT.md +11 -5
  3. package/{COMMERCIAL-LICENSE.md → LICENSE-COMMERCIAL.md} +1 -1
  4. package/MIGRATION_3_TO_4.md +1 -1
  5. package/README.md +4 -1
  6. package/SETUP.md +37 -9
  7. package/agent-plugin/skills/charness-delegate-claude/SKILL.md +1 -0
  8. package/agent-plugin/skills/charness-orchestration/SKILL.md +1 -0
  9. package/dist/adapters/adapterNames.d.ts +2 -0
  10. package/dist/adapters/adapterNames.d.ts.map +1 -1
  11. package/dist/adapters/adapterNames.js +3 -1
  12. package/dist/adapters/adapterNames.js.map +1 -1
  13. package/dist/adapters/claudeJsonStreamAdapter.d.ts +74 -5
  14. package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
  15. package/dist/adapters/claudeJsonStreamAdapter.js +164 -20
  16. package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
  17. package/dist/adapters/openCodeAdapter.d.ts +31 -2
  18. package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
  19. package/dist/adapters/openCodeAdapter.js +84 -8
  20. package/dist/adapters/openCodeAdapter.js.map +1 -1
  21. package/dist/adapters/terminalAdapter.d.ts.map +1 -1
  22. package/dist/adapters/terminalAdapter.js +2 -1
  23. package/dist/adapters/terminalAdapter.js.map +1 -1
  24. package/dist/bot.d.ts.map +1 -1
  25. package/dist/bot.js +769 -118
  26. package/dist/bot.js.map +1 -1
  27. package/dist/cli/claudeProfiles.d.ts +3 -0
  28. package/dist/cli/claudeProfiles.d.ts.map +1 -1
  29. package/dist/cli/claudeProfiles.js +8 -0
  30. package/dist/cli/claudeProfiles.js.map +1 -1
  31. package/dist/connectors/jira/answerSink.d.ts +8 -0
  32. package/dist/connectors/jira/answerSink.d.ts.map +1 -1
  33. package/dist/connectors/jira/answerSink.js +15 -0
  34. package/dist/connectors/jira/answerSink.js.map +1 -1
  35. package/dist/connectors/jira/config.d.ts +16 -0
  36. package/dist/connectors/jira/config.d.ts.map +1 -1
  37. package/dist/connectors/jira/config.js +21 -2
  38. package/dist/connectors/jira/config.js.map +1 -1
  39. package/dist/connectors/jira/connector.d.ts +10 -3
  40. package/dist/connectors/jira/connector.d.ts.map +1 -1
  41. package/dist/connectors/jira/connector.js +21 -3
  42. package/dist/connectors/jira/connector.js.map +1 -1
  43. package/dist/connectors/jira/inbound.d.ts +200 -18
  44. package/dist/connectors/jira/inbound.d.ts.map +1 -1
  45. package/dist/connectors/jira/inbound.js +814 -43
  46. package/dist/connectors/jira/inbound.js.map +1 -1
  47. package/dist/connectors/jira/prompt.d.ts +46 -0
  48. package/dist/connectors/jira/prompt.d.ts.map +1 -1
  49. package/dist/connectors/jira/prompt.js +123 -15
  50. package/dist/connectors/jira/prompt.js.map +1 -1
  51. package/dist/connectors/jira/trigger.d.ts +27 -4
  52. package/dist/connectors/jira/trigger.d.ts.map +1 -1
  53. package/dist/connectors/jira/trigger.js +35 -1
  54. package/dist/connectors/jira/trigger.js.map +1 -1
  55. package/dist/connectors/jira/triggerLog.d.ts +60 -5
  56. package/dist/connectors/jira/triggerLog.d.ts.map +1 -1
  57. package/dist/connectors/jira/triggerLog.js +116 -7
  58. package/dist/connectors/jira/triggerLog.js.map +1 -1
  59. package/dist/connectors/telegram/commands/botCore.d.ts +5 -2
  60. package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
  61. package/dist/connectors/telegram/commands/claudeAccounts.d.ts +5 -0
  62. package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
  63. package/dist/connectors/telegram/commands/claudeAccounts.js +15 -39
  64. package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
  65. package/dist/connectors/telegram/commands/compaction.d.ts +6 -0
  66. package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
  67. package/dist/connectors/telegram/commands/compaction.js +8 -1
  68. package/dist/connectors/telegram/commands/compaction.js.map +1 -1
  69. package/dist/connectors/telegram/commands/questionSetAside.d.ts +111 -0
  70. package/dist/connectors/telegram/commands/questionSetAside.d.ts.map +1 -0
  71. package/dist/connectors/telegram/commands/questionSetAside.js +637 -0
  72. package/dist/connectors/telegram/commands/questionSetAside.js.map +1 -0
  73. package/dist/connectors/telegram/commands/questionWait.d.ts +21 -0
  74. package/dist/connectors/telegram/commands/questionWait.d.ts.map +1 -0
  75. package/dist/connectors/telegram/commands/questionWait.js +109 -0
  76. package/dist/connectors/telegram/commands/questionWait.js.map +1 -0
  77. package/dist/connectors/telegram/commands/runners.d.ts +28 -1
  78. package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
  79. package/dist/connectors/telegram/commands/runners.js +75 -40
  80. package/dist/connectors/telegram/commands/runners.js.map +1 -1
  81. package/dist/connectors/telegram/commands/topicAccess.js +1 -1
  82. package/dist/connectors/telegram/commands/topicAccess.js.map +1 -1
  83. package/dist/connectors/telegram/commands/topicCommand.d.ts +0 -2
  84. package/dist/connectors/telegram/commands/topicCommand.d.ts.map +1 -1
  85. package/dist/connectors/telegram/commands/topicCommand.js +4 -5
  86. package/dist/connectors/telegram/commands/topicCommand.js.map +1 -1
  87. package/dist/connectors/telegram/commands/topicStatus.d.ts +24 -0
  88. package/dist/connectors/telegram/commands/topicStatus.d.ts.map +1 -0
  89. package/dist/connectors/telegram/commands/topicStatus.js +148 -0
  90. package/dist/connectors/telegram/commands/topicStatus.js.map +1 -0
  91. package/dist/connectors/telegram/firstUpdateBatchNote.d.ts +30 -0
  92. package/dist/connectors/telegram/firstUpdateBatchNote.d.ts.map +1 -0
  93. package/dist/connectors/telegram/firstUpdateBatchNote.js +39 -0
  94. package/dist/connectors/telegram/firstUpdateBatchNote.js.map +1 -0
  95. package/dist/connectors/telegram/inbound.d.ts +12 -0
  96. package/dist/connectors/telegram/inbound.d.ts.map +1 -1
  97. package/dist/connectors/telegram/inbound.js +31 -3
  98. package/dist/connectors/telegram/inbound.js.map +1 -1
  99. package/dist/connectors/telegram/sendOutcome.d.ts +3 -1
  100. package/dist/connectors/telegram/sendOutcome.d.ts.map +1 -1
  101. package/dist/connectors/telegram/sendOutcome.js.map +1 -1
  102. package/dist/connectors/telegram/telegramFailureRetry.d.ts +8 -0
  103. package/dist/connectors/telegram/telegramFailureRetry.d.ts.map +1 -1
  104. package/dist/connectors/telegram/telegramFailureRetry.js +8 -0
  105. package/dist/connectors/telegram/telegramFailureRetry.js.map +1 -1
  106. package/dist/connectors/telegram/topicIndicator.d.ts +86 -0
  107. package/dist/connectors/telegram/topicIndicator.d.ts.map +1 -0
  108. package/dist/connectors/telegram/topicIndicator.js +490 -0
  109. package/dist/connectors/telegram/topicIndicator.js.map +1 -0
  110. package/dist/connectors/telegram/waitingTopicRenames.d.ts +39 -0
  111. package/dist/connectors/telegram/waitingTopicRenames.d.ts.map +1 -0
  112. package/dist/connectors/telegram/waitingTopicRenames.js +48 -0
  113. package/dist/connectors/telegram/waitingTopicRenames.js.map +1 -0
  114. package/dist/i18n/de.d.ts.map +1 -1
  115. package/dist/i18n/de.js +51 -0
  116. package/dist/i18n/de.js.map +1 -1
  117. package/dist/i18n/en.d.ts.map +1 -1
  118. package/dist/i18n/en.js +51 -0
  119. package/dist/i18n/en.js.map +1 -1
  120. package/dist/i18n/es.d.ts.map +1 -1
  121. package/dist/i18n/es.js +51 -0
  122. package/dist/i18n/es.js.map +1 -1
  123. package/dist/i18n/fr.d.ts.map +1 -1
  124. package/dist/i18n/fr.js +51 -0
  125. package/dist/i18n/fr.js.map +1 -1
  126. package/dist/i18n/hi.d.ts.map +1 -1
  127. package/dist/i18n/hi.js +51 -0
  128. package/dist/i18n/hi.js.map +1 -1
  129. package/dist/i18n/ja.d.ts.map +1 -1
  130. package/dist/i18n/ja.js +51 -0
  131. package/dist/i18n/ja.js.map +1 -1
  132. package/dist/i18n/ka.d.ts.map +1 -1
  133. package/dist/i18n/ka.js +51 -0
  134. package/dist/i18n/ka.js.map +1 -1
  135. package/dist/i18n/pt.d.ts.map +1 -1
  136. package/dist/i18n/pt.js +51 -0
  137. package/dist/i18n/pt.js.map +1 -1
  138. package/dist/i18n/ru.d.ts.map +1 -1
  139. package/dist/i18n/ru.js +51 -0
  140. package/dist/i18n/ru.js.map +1 -1
  141. package/dist/i18n/uk.d.ts.map +1 -1
  142. package/dist/i18n/uk.js +51 -0
  143. package/dist/i18n/uk.js.map +1 -1
  144. package/dist/i18n/uz.d.ts.map +1 -1
  145. package/dist/i18n/uz.js +51 -0
  146. package/dist/i18n/uz.js.map +1 -1
  147. package/dist/i18n/zh.d.ts.map +1 -1
  148. package/dist/i18n/zh.js +51 -0
  149. package/dist/i18n/zh.js.map +1 -1
  150. package/dist/i18n.d.ts.map +1 -1
  151. package/dist/i18n.js +2 -1
  152. package/dist/i18n.js.map +1 -1
  153. package/dist/instanceSettings.d.ts +19 -1
  154. package/dist/instanceSettings.d.ts.map +1 -1
  155. package/dist/instanceSettings.js +35 -2
  156. package/dist/instanceSettings.js.map +1 -1
  157. package/dist/openCodeOpenQuestion.d.ts +12 -4
  158. package/dist/openCodeOpenQuestion.d.ts.map +1 -1
  159. package/dist/openCodeOpenQuestion.js +16 -7
  160. package/dist/openCodeOpenQuestion.js.map +1 -1
  161. package/dist/openCodeQuestionFlow.d.ts +10 -2
  162. package/dist/openCodeQuestionFlow.d.ts.map +1 -1
  163. package/dist/openCodeQuestionFlow.js +27 -5
  164. package/dist/openCodeQuestionFlow.js.map +1 -1
  165. package/dist/postToSession.d.ts +9 -0
  166. package/dist/postToSession.d.ts.map +1 -1
  167. package/dist/postToSession.js +15 -2
  168. package/dist/postToSession.js.map +1 -1
  169. package/dist/requests/requestHeader.d.ts.map +1 -1
  170. package/dist/requests/requestHeader.js +1 -0
  171. package/dist/requests/requestHeader.js.map +1 -1
  172. package/dist/requests/types.d.ts +4 -1
  173. package/dist/requests/types.d.ts.map +1 -1
  174. package/dist/requests/wakeUpEngine.d.ts +31 -1
  175. package/dist/requests/wakeUpEngine.d.ts.map +1 -1
  176. package/dist/requests/wakeUpEngine.js +94 -2
  177. package/dist/requests/wakeUpEngine.js.map +1 -1
  178. package/dist/requests/wakeUpRules.d.ts +7 -0
  179. package/dist/requests/wakeUpRules.d.ts.map +1 -1
  180. package/dist/requests/wakeUpRules.js +14 -0
  181. package/dist/requests/wakeUpRules.js.map +1 -1
  182. package/dist/scheduler/engine.d.ts +17 -4
  183. package/dist/scheduler/engine.d.ts.map +1 -1
  184. package/dist/scheduler/engine.js +55 -10
  185. package/dist/scheduler/engine.js.map +1 -1
  186. package/dist/scheduler/mcpBoot.d.ts +6 -2
  187. package/dist/scheduler/mcpBoot.d.ts.map +1 -1
  188. package/dist/scheduler/mcpBoot.js +7 -1
  189. package/dist/scheduler/mcpBoot.js.map +1 -1
  190. package/dist/scheduler/mcpSurface.d.ts.map +1 -1
  191. package/dist/scheduler/mcpSurface.js +18 -9
  192. package/dist/scheduler/mcpSurface.js.map +1 -1
  193. package/dist/sendErrorClassifier.d.ts +6 -0
  194. package/dist/sendErrorClassifier.d.ts.map +1 -1
  195. package/dist/sendErrorClassifier.js +9 -0
  196. package/dist/sendErrorClassifier.js.map +1 -1
  197. package/dist/startupPromptBuffer.d.ts +8 -8
  198. package/dist/startupPromptBuffer.d.ts.map +1 -1
  199. package/dist/startupPromptBuffer.js +7 -5
  200. package/dist/startupPromptBuffer.js.map +1 -1
  201. package/dist/state.d.ts +98 -6
  202. package/dist/state.d.ts.map +1 -1
  203. package/dist/state.js +149 -7
  204. package/dist/state.js.map +1 -1
  205. package/dist/testTimings.d.ts +12 -3
  206. package/dist/testTimings.d.ts.map +1 -1
  207. package/dist/testTimings.js +23 -2
  208. package/dist/testTimings.js.map +1 -1
  209. package/dist/threadRouting.d.ts +23 -0
  210. package/dist/threadRouting.d.ts.map +1 -1
  211. package/dist/threadRouting.js +28 -0
  212. package/dist/threadRouting.js.map +1 -1
  213. package/dist/todos/registry.d.ts +2 -0
  214. package/dist/todos/registry.d.ts.map +1 -1
  215. package/dist/todos/registry.js +3 -1
  216. package/dist/todos/registry.js.map +1 -1
  217. package/dist/trackers/taskAgentSlots.d.ts +42 -3
  218. package/dist/trackers/taskAgentSlots.d.ts.map +1 -1
  219. package/dist/trackers/taskAgentSlots.js +31 -11
  220. package/dist/trackers/taskAgentSlots.js.map +1 -1
  221. package/dist/types.d.ts +95 -0
  222. package/dist/types.d.ts.map +1 -1
  223. package/dist/utils/claudeCompactHook.d.ts +3 -1
  224. package/dist/utils/claudeCompactHook.d.ts.map +1 -1
  225. package/dist/utils/claudeCompactHook.js +3 -1
  226. package/dist/utils/claudeCompactHook.js.map +1 -1
  227. package/dist/utils/claudeLimitSwitch.d.ts +1 -1
  228. package/dist/utils/claudeLimitSwitch.d.ts.map +1 -1
  229. package/dist/utils/claudeLimitSwitch.js +1 -1
  230. package/dist/utils/claudeLimitSwitch.js.map +1 -1
  231. package/dist/utils/claudeProfileSync.d.ts +88 -0
  232. package/dist/utils/claudeProfileSync.d.ts.map +1 -0
  233. package/dist/utils/claudeProfileSync.js +198 -0
  234. package/dist/utils/claudeProfileSync.js.map +1 -0
  235. package/dist/utils/claudeProfiles.d.ts +101 -6
  236. package/dist/utils/claudeProfiles.d.ts.map +1 -1
  237. package/dist/utils/claudeProfiles.js +288 -23
  238. package/dist/utils/claudeProfiles.js.map +1 -1
  239. package/dist/utils/claudeUsageRefresher.d.ts +8 -1
  240. package/dist/utils/claudeUsageRefresher.d.ts.map +1 -1
  241. package/dist/utils/claudeUsageRefresher.js +11 -1
  242. package/dist/utils/claudeUsageRefresher.js.map +1 -1
  243. package/dist/utils/cutButtonLabel.d.ts +7 -0
  244. package/dist/utils/cutButtonLabel.d.ts.map +1 -0
  245. package/dist/utils/cutButtonLabel.js +17 -0
  246. package/dist/utils/cutButtonLabel.js.map +1 -0
  247. package/dist/utils/fileSendPlan.d.ts +30 -8
  248. package/dist/utils/fileSendPlan.d.ts.map +1 -1
  249. package/dist/utils/fileSendPlan.js +37 -12
  250. package/dist/utils/fileSendPlan.js.map +1 -1
  251. package/dist/utils/fileSendService.d.ts +1 -1
  252. package/dist/utils/fileSendService.d.ts.map +1 -1
  253. package/dist/utils/fileSendService.js +9 -1
  254. package/dist/utils/fileSendService.js.map +1 -1
  255. package/dist/utils/imageDimensions.d.ts +32 -0
  256. package/dist/utils/imageDimensions.d.ts.map +1 -0
  257. package/dist/utils/imageDimensions.js +181 -0
  258. package/dist/utils/imageDimensions.js.map +1 -0
  259. package/dist/utils/jsonStreamHost.d.ts +35 -9
  260. package/dist/utils/jsonStreamHost.d.ts.map +1 -1
  261. package/dist/utils/jsonStreamHost.js +59 -16
  262. package/dist/utils/jsonStreamHost.js.map +1 -1
  263. package/dist/utils/limitSwitchPlan.d.ts +44 -0
  264. package/dist/utils/limitSwitchPlan.d.ts.map +1 -0
  265. package/dist/utils/limitSwitchPlan.js +54 -0
  266. package/dist/utils/limitSwitchPlan.js.map +1 -0
  267. package/dist/utils/lostWork.d.ts +8 -2
  268. package/dist/utils/lostWork.d.ts.map +1 -1
  269. package/dist/utils/lostWork.js +9 -5
  270. package/dist/utils/lostWork.js.map +1 -1
  271. package/dist/utils/promptDelivery.d.ts +11 -2
  272. package/dist/utils/promptDelivery.d.ts.map +1 -1
  273. package/dist/utils/promptDelivery.js +3 -3
  274. package/dist/utils/promptDelivery.js.map +1 -1
  275. package/dist/utils/questionWaitChoices.d.ts +20 -0
  276. package/dist/utils/questionWaitChoices.d.ts.map +1 -0
  277. package/dist/utils/questionWaitChoices.js +31 -0
  278. package/dist/utils/questionWaitChoices.js.map +1 -0
  279. package/dist/utils/questionWaitPlan.d.ts +166 -0
  280. package/dist/utils/questionWaitPlan.d.ts.map +1 -0
  281. package/dist/utils/questionWaitPlan.js +237 -0
  282. package/dist/utils/questionWaitPlan.js.map +1 -0
  283. package/dist/utils/replyQuote.d.ts +10 -0
  284. package/dist/utils/replyQuote.d.ts.map +1 -1
  285. package/dist/utils/replyQuote.js +18 -7
  286. package/dist/utils/replyQuote.js.map +1 -1
  287. package/dist/utils/talkerAccess.d.ts +2 -2
  288. package/dist/utils/talkerAccess.d.ts.map +1 -1
  289. package/dist/utils/talkerAccess.js +5 -4
  290. package/dist/utils/talkerAccess.js.map +1 -1
  291. package/dist/utils/telegramError.d.ts +6 -0
  292. package/dist/utils/telegramError.d.ts.map +1 -1
  293. package/dist/utils/telegramError.js +12 -0
  294. package/dist/utils/telegramError.js.map +1 -1
  295. package/dist/utils/topicAccessScreenPlan.d.ts +1 -1
  296. package/dist/utils/topicAccessScreenPlan.d.ts.map +1 -1
  297. package/dist/utils/topicAccessScreenPlan.js +3 -7
  298. package/dist/utils/topicAccessScreenPlan.js.map +1 -1
  299. package/dist/utils/topicIndicatorPlan.d.ts +143 -0
  300. package/dist/utils/topicIndicatorPlan.d.ts.map +1 -0
  301. package/dist/utils/topicIndicatorPlan.js +202 -0
  302. package/dist/utils/topicIndicatorPlan.js.map +1 -0
  303. package/dist/utils/topicIndicatorSources.d.ts +40 -0
  304. package/dist/utils/topicIndicatorSources.d.ts.map +1 -0
  305. package/dist/utils/topicIndicatorSources.js +31 -0
  306. package/dist/utils/topicIndicatorSources.js.map +1 -0
  307. package/dist/utils/topicStatusPlan.d.ts +90 -0
  308. package/dist/utils/topicStatusPlan.d.ts.map +1 -0
  309. package/dist/utils/topicStatusPlan.js +160 -0
  310. package/dist/utils/topicStatusPlan.js.map +1 -0
  311. package/npm-shrinkwrap.json +2 -2
  312. package/package.json +2 -2
@@ -0,0 +1,490 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTopicIndicator = createTopicIndicator;
4
+ const sessionKey_1 = require("../../sessionKey");
5
+ const state_1 = require("../../state");
6
+ const rateLimiter_1 = require("../../rateLimiter");
7
+ const sendErrorClassifier_1 = require("../../sendErrorClassifier");
8
+ const telegramError_1 = require("../../utils/telegramError");
9
+ const topicIndicatorPlan_1 = require("../../utils/topicIndicatorPlan");
10
+ const sessionKeyCodec_1 = require("./sessionKeyCodec");
11
+ const topicCommand_1 = require("./commands/topicCommand");
12
+ const telegramFailureRetry_1 = require("./telegramFailureRetry");
13
+ /** How many of the names the bot wrote are remembered per topic. */
14
+ const recentAppliedNamesLimit = 3;
15
+ const noStatusInputs = { hasOpenQuestion: false, isStuck: false, isWorking: false, isFinished: false, isAsleep: false };
16
+ const noCounts = { agents: 0, queued: 0 };
17
+ /** How often a look that waits for the updates that waited while the bot was down looks again whether they are handled. */
18
+ const backlogPollMs = 500;
19
+ /** How long, counted from `start()`, no name is written for them at most. */
20
+ const backlogMaxWaitMs = 30_000;
21
+ /** Telegram's answer to a rename that changes nothing: the topic already has the name. */
22
+ const topicNotModifiedPattern = /TOPIC_NOT_MODIFIED/i;
23
+ /**
24
+ * @description Build the status mark of topic names over its ports: the look at a topic (`requestRefresh`), the owner's change of a
25
+ * switch (`requestRefresh(key, { isOwnerChange: true })`), the bot's own «renamed» line (`handleOwnRenameLine`), the name put back
26
+ * (`restoreBaseName`), and the sweep and the boot wave (`start`).
27
+ */
28
+ function createTopicIndicator(ports) {
29
+ const { getState, checkIsMarkableTopic, checkIsUnbinding, getPrefs, sendTopicName, deleteMessage, checkIsBacklogHandled, windows, getNowMs, setTimer, log } = ports;
30
+ const runtimes = new Map();
31
+ /** One write at a time per topic: the look inside the lock is the latest, so a stale name is never written. */
32
+ const writeLock = new state_1.KeyLock();
33
+ const renameRefusals = new Map();
34
+ const lineDeletionRefusedChats = new Set();
35
+ /** The chats whose refusal is already logged (one line per boot, however often the sweep tries again). */
36
+ const loggedRefusedChats = new Set();
37
+ let sweepTimer = null;
38
+ let waveTimer = null;
39
+ /** Opens once the updates that waited are handled (or the cap after `start()` ran out) and stays open: from then on nothing waits for them. */
40
+ let isBootGateOpen = false;
41
+ let bootStartedAtMs = null;
42
+ let areRefusalsLoaded = false;
43
+ function getRuntime(keyString) {
44
+ let runtime = runtimes.get(keyString);
45
+ if (!runtime) {
46
+ runtime = {
47
+ timer: null,
48
+ isLookQueued: false,
49
+ lastRenameAtMs: null,
50
+ heldName: null,
51
+ heldSinceMs: 0,
52
+ isOwnerChangePending: false,
53
+ lastLoggedFailure: null,
54
+ failureCount: 0,
55
+ retryNotBeforeMs: null,
56
+ recentAppliedNames: [],
57
+ };
58
+ runtimes.set(keyString, runtime);
59
+ }
60
+ return runtime;
61
+ }
62
+ /**
63
+ * What the topic shows and what it should show — `null` when it cannot carry a mark (not a topic, not bound, its own name unknown).
64
+ * Notes, as a side effect, since when the wanted name has been the wanted one. A closed topic shows its owner's own name, like a topic
65
+ * without an agent.
66
+ */
67
+ function observeTopic(key) {
68
+ if (!checkIsMarkableTopic(key) || checkIsUnbinding(key))
69
+ return null;
70
+ const binding = getState().getBinding(key);
71
+ if (!binding || binding.topicName === undefined)
72
+ return null;
73
+ const prefs = getPrefs(key);
74
+ const isShown = binding.closed !== true;
75
+ const inputs = isShown ? ports.getStatusInputs(key) : noStatusInputs;
76
+ const runtime = getRuntime((0, sessionKey_1.keyToString)(key));
77
+ const desiredStatus = (0, topicIndicatorPlan_1.resolveTopicStatus)(inputs, prefs);
78
+ const counts = isShown
79
+ ? { agents: prefs.agents ? ports.getAgentsCount(key) : 0, queued: prefs.queued ? ports.getQueuedCount(key) : 0 }
80
+ : noCounts;
81
+ const desiredName = (0, topicIndicatorPlan_1.composeIndicatorName)(binding.topicName, desiredStatus, counts, prefs);
82
+ if (runtime.heldName !== desiredName) {
83
+ runtime.heldName = desiredName;
84
+ runtime.heldSinceMs = getNowMs();
85
+ }
86
+ return { base: binding.topicName, appliedName: binding.indicatorAppliedName ?? binding.topicName, desiredName, desiredStatus };
87
+ }
88
+ function planRename(view, runtime) {
89
+ const inputs = {
90
+ desiredName: view.desiredName,
91
+ desiredStatus: view.desiredStatus,
92
+ appliedName: view.appliedName,
93
+ heldSinceMs: runtime.heldSinceMs,
94
+ lastRenameAtMs: runtime.lastRenameAtMs,
95
+ isOwnerChange: runtime.isOwnerChangePending,
96
+ retryNotBeforeMs: runtime.retryNotBeforeMs,
97
+ nowMs: getNowMs(),
98
+ settleMs: windows.settleMs,
99
+ minGapMs: windows.minGapMs,
100
+ };
101
+ return (0, topicIndicatorPlan_1.planIndicatorRename)(inputs);
102
+ }
103
+ function dropTimer(runtime) {
104
+ runtime.timer?.cancel();
105
+ runtime.timer = null;
106
+ }
107
+ /** Log a failure of `key`'s topic once per distinct cause. */
108
+ function logFailureOnce(key, runtime, line) {
109
+ if (runtime.lastLoggedFailure === line)
110
+ return;
111
+ runtime.lastLoggedFailure = line;
112
+ log(`[topic-indicator] ${(0, sessionKey_1.keyToString)(key)}: ${line}`);
113
+ }
114
+ /**
115
+ * The refusals the bindings remember from before this boot (`indicatorRenameRefused`), loaded on first use: a restart does not send one
116
+ * failing call per such topic — the sweep's probe is the first to try again.
117
+ */
118
+ function ensureRefusalsLoaded() {
119
+ if (areRefusalsLoaded)
120
+ return;
121
+ areRefusalsLoaded = true;
122
+ for (const { key, data } of getState().listBindings()) {
123
+ if (data.indicatorRenameRefused === true && checkIsMarkableTopic(key))
124
+ recordRefusal(key, { isRemembered: true });
125
+ }
126
+ }
127
+ /** Whether Telegram refused `key`'s topic a rename for want of the right and the sweep has not let it try again. */
128
+ function checkIsRefused(key) {
129
+ ensureRefusalsLoaded();
130
+ return renameRefusals.get((0, sessionKeyCodec_1.getTelegramChatId)(key))?.topicKeys.has((0, sessionKey_1.keyToString)(key)) === true;
131
+ }
132
+ /** Forget in the binding that the topic was refused (a rename went through, or the probe of it said nothing). Never rejects. */
133
+ function clearRefusalFlag(key) {
134
+ void getState().setBindingTopicNaming(key, { indicatorRenameRefused: null }).catch((error) => {
135
+ log(`[topic-indicator] ${(0, sessionKey_1.keyToString)(key)}: saving that the rename is no longer refused failed: ${error instanceof Error ? error.message : error}`);
136
+ });
137
+ }
138
+ /**
139
+ * The topic was refused for want of the right: remember it in memory and with the binding (a probe that is refused again goes to the end),
140
+ * and say so once per chat per boot. `isRemembered`: it is the binding's memory of an earlier boot being loaded — nothing to save.
141
+ */
142
+ function recordRefusal(key, options = {}) {
143
+ const chatId = (0, sessionKeyCodec_1.getTelegramChatId)(key);
144
+ const keyString = (0, sessionKey_1.keyToString)(key);
145
+ const refusal = renameRefusals.get(chatId) ?? { topicKeys: new Set(), probeKey: null, isProbeSilent: false };
146
+ renameRefusals.set(chatId, refusal);
147
+ refusal.topicKeys.delete(keyString);
148
+ refusal.topicKeys.add(keyString);
149
+ if (refusal.probeKey === keyString) {
150
+ refusal.probeKey = null;
151
+ refusal.isProbeSilent = false;
152
+ }
153
+ if (options.isRemembered !== true && getState().getBinding(key)?.indicatorRenameRefused !== true) {
154
+ void getState().setBindingTopicNaming(key, { indicatorRenameRefused: true }).catch((error) => {
155
+ log(`[topic-indicator] ${keyString}: saving the refused rename failed: ${error instanceof Error ? error.message : error}`);
156
+ });
157
+ }
158
+ if (!loggedRefusedChats.has(`rename:${chatId}`)) {
159
+ loggedRefusedChats.add(`rename:${chatId}`);
160
+ log(`[topic-indicator] chat ${chatId}: the bot may not rename topics it did not make (needs the «Manage topics» admin right) — no status marks on those until it does`);
161
+ }
162
+ }
163
+ /** The look at `key` found nothing to write: when it is the probe of a refused chat, the probe is silent (it says nothing about the right). */
164
+ function noteProbeSilent(key) {
165
+ const refusal = renameRefusals.get((0, sessionKeyCodec_1.getTelegramChatId)(key));
166
+ if (refusal && refusal.probeKey === (0, sessionKey_1.keyToString)(key))
167
+ refusal.isProbeSilent = true;
168
+ }
169
+ /** A rename was written: when it was the probe of a refused chat, the right is back — the chat's other topics try again. */
170
+ function noteRenameWritten(key) {
171
+ const chatId = (0, sessionKeyCodec_1.getTelegramChatId)(key);
172
+ const refusal = renameRefusals.get(chatId);
173
+ if (!refusal || refusal.probeKey !== (0, sessionKey_1.keyToString)(key))
174
+ return;
175
+ renameRefusals.delete(chatId);
176
+ for (const keyString of refusal.topicKeys) {
177
+ const refusedKey = (0, sessionKey_1.tryKeyFromString)(keyString);
178
+ if (refusedKey)
179
+ requestRefresh(refusedKey);
180
+ }
181
+ }
182
+ /** What a failed rename means: the right is missing → remembered for this topic; the name already is the one, or the topic is gone → no retry; else a failure to log and retry. */
183
+ function classifyRenameError(key, runtime, error) {
184
+ if ((0, topicCommand_1.checkIsMissingTopicRightsError)(error)) {
185
+ recordRefusal(key);
186
+ return 'refused';
187
+ }
188
+ const description = (0, sendErrorClassifier_1.checkIsApiError)(error) ? (0, sendErrorClassifier_1.getErrorDescription)(error) : error instanceof Error ? error.message : String(error);
189
+ if (topicNotModifiedPattern.test(description))
190
+ return 'noChange';
191
+ logFailureOnce(key, runtime, `renaming the topic failed: ${description}`);
192
+ // A deleted or closed topic cannot be renamed: the reopen event and the sweep look again, no timer does.
193
+ return (0, sendErrorClassifier_1.classifySendError)(error) === 'other' ? 'failed' : 'gone';
194
+ }
195
+ /** Remember the name just written, newest first. */
196
+ function noteAppliedName(runtime, name) {
197
+ runtime.recentAppliedNames = [name, ...runtime.recentAppliedNames.filter((recent) => recent !== name)].slice(0, recentAppliedNamesLimit);
198
+ }
199
+ /** Look at the topic again after a backoff that grows with each failure in a row (a 429's own cooldown is the floor), at most one sweep. */
200
+ function scheduleRetry(key, runtime, error) {
201
+ runtime.failureCount += 1;
202
+ const backoffMs = Math.min(windows.minGapMs * 2 ** (runtime.failureCount - 1), windows.sweepIntervalMs);
203
+ const delayMs = (0, rateLimiter_1.checkIsRateLimitedError)(error) ? Math.max(backoffMs, error.retryAfterMs) : backoffMs;
204
+ // A change signal looks at the topic before the timer fires: the plan holds every name but a ❓ edge back until this instant.
205
+ runtime.retryNotBeforeMs = getNowMs() + delayMs;
206
+ dropTimer(runtime);
207
+ runtime.timer = setTimer(() => {
208
+ runtime.timer = null;
209
+ look(key);
210
+ }, delayMs);
211
+ }
212
+ /** Write the name the topic should show now, if the plan still says so inside the lock. */
213
+ async function writeDesiredName(key) {
214
+ return writeLock.withLock((0, sessionKey_1.keyToString)(key), async () => {
215
+ if (checkIsRefused(key))
216
+ return { outcome: 'refused' };
217
+ const view = observeTopic(key);
218
+ if (view === null) {
219
+ noteProbeSilent(key);
220
+ return { outcome: 'idle' };
221
+ }
222
+ const runtime = getRuntime((0, sessionKey_1.keyToString)(key));
223
+ const plan = planRename(view, runtime);
224
+ if (plan.kind !== 'now') {
225
+ if (plan.kind === 'none')
226
+ noteProbeSilent(key);
227
+ return { outcome: 'idle' };
228
+ }
229
+ try {
230
+ await sendTopicName(key, view.desiredName);
231
+ }
232
+ catch (error) {
233
+ const kind = classifyRenameError(key, runtime, error);
234
+ // A topic that is gone, or whose rename fails in a way no retry can change (`checkIsTelegramFailureRetryable`: a rejection other than
235
+ // 429 / 5xx, or an error that is neither an answer nor the network's), gives no verdict on the right: were its probe kept for the
236
+ // answer, one deleted topic would keep the chat's other refused topics from ever being probed again. A failure that is no answer (a
237
+ // timeout, a reset), a 429 or a 5xx is no verdict either way: the probe is KEPT, and its armed retry decides — an outage hits every
238
+ // topic alike, so dropping one probe per sweep would only spend a failing call on each.
239
+ if (kind === 'failed') {
240
+ if (!(0, telegramFailureRetry_1.checkIsTelegramFailureRetryable)(error))
241
+ noteProbeSilent(key);
242
+ return { outcome: 'failed', error };
243
+ }
244
+ runtime.retryNotBeforeMs = null;
245
+ if (kind === 'refused')
246
+ return { outcome: 'refused' };
247
+ if (kind === 'gone') {
248
+ noteProbeSilent(key);
249
+ return { outcome: 'idle' };
250
+ }
251
+ }
252
+ runtime.lastRenameAtMs = getNowMs();
253
+ runtime.isOwnerChangePending = false;
254
+ runtime.lastLoggedFailure = null;
255
+ runtime.failureCount = 0;
256
+ runtime.retryNotBeforeMs = null;
257
+ noteAppliedName(runtime, view.desiredName);
258
+ await getState().setBindingTopicNaming(key, { indicatorAppliedName: view.desiredName, indicatorRenameRefused: null }).catch((error) => {
259
+ log(`[topic-indicator] ${(0, sessionKey_1.keyToString)(key)}: saving the applied name failed: ${error instanceof Error ? error.message : error}`);
260
+ });
261
+ noteRenameWritten(key);
262
+ return { outcome: 'written' };
263
+ });
264
+ }
265
+ /**
266
+ * Whether the updates that waited while the bot was down are handled — or the wait for them ran out. Until then NO look writes: a signal of
267
+ * the boot itself (an agent that is gone, a question dropped) asks for a write that comes at once, and the owner's rename made during the
268
+ * downtime — still waiting for its update — would be overwritten with the old name.
269
+ */
270
+ function checkIsBootGateOpen() {
271
+ if (!isBootGateOpen && (checkIsBacklogHandled() || (bootStartedAtMs !== null && getNowMs() - bootStartedAtMs >= backlogMaxWaitMs)))
272
+ isBootGateOpen = true;
273
+ return isBootGateOpen;
274
+ }
275
+ /** The look at one topic: plan, and either write now, wait for the instant the plan names, or do nothing. */
276
+ function look(key) {
277
+ const runtime = getRuntime((0, sessionKey_1.keyToString)(key));
278
+ dropTimer(runtime);
279
+ if (checkIsRefused(key))
280
+ return;
281
+ if (!checkIsBootGateOpen()) {
282
+ runtime.timer = setTimer(() => {
283
+ runtime.timer = null;
284
+ look(key);
285
+ }, backlogPollMs);
286
+ return;
287
+ }
288
+ const view = observeTopic(key);
289
+ if (view === null) {
290
+ noteProbeSilent(key);
291
+ return;
292
+ }
293
+ const plan = planRename(view, runtime);
294
+ if (plan.kind === 'none') {
295
+ runtime.isOwnerChangePending = false;
296
+ noteProbeSilent(key);
297
+ return;
298
+ }
299
+ if (plan.kind === 'at') {
300
+ runtime.timer = setTimer(() => {
301
+ runtime.timer = null;
302
+ look(key);
303
+ }, Math.max(0, plan.atMs - getNowMs()));
304
+ return;
305
+ }
306
+ // The state may have moved while the call was in flight: look again after a name WAS written. A failure a later try may fix is tried
307
+ // again after a backoff (the latest wanted name, not a stale one); a refused right is the sweep's probe's business.
308
+ void writeDesiredName(key).then(({ outcome, error }) => {
309
+ if (outcome === 'written')
310
+ look(key);
311
+ else if (outcome === 'failed')
312
+ scheduleRetry(key, runtime, error);
313
+ });
314
+ }
315
+ /**
316
+ * @description Look at `key`'s topic: its status or its counts may have changed. Cheap and safe to call at every change signal — a
317
+ * burst of calls in one tick is one look. `isOwnerChange`: the owner just changed what is shown, which skips the gap between
318
+ * two renames. A key that cannot carry a mark, and a topic whose own name the bot does not know, are left alone.
319
+ */
320
+ function requestRefresh(key, options = {}) {
321
+ if (!checkIsMarkableTopic(key) || checkIsUnbinding(key))
322
+ return;
323
+ const runtime = getRuntime((0, sessionKey_1.keyToString)(key));
324
+ if (options.isOwnerChange === true)
325
+ runtime.isOwnerChangePending = true;
326
+ if (runtime.isLookQueued)
327
+ return;
328
+ runtime.isLookQueued = true;
329
+ setImmediate(() => {
330
+ runtime.isLookQueued = false;
331
+ look(key);
332
+ });
333
+ }
334
+ /** @description Look at every bound topic. */
335
+ function refreshAll(options = {}) {
336
+ for (const { key } of getState().listBindings())
337
+ requestRefresh(key, options);
338
+ }
339
+ /**
340
+ * @description The bot's own «renamed the topic» service line came back as an update: delete it, so the topic shows no trace of a
341
+ * status change. Best effort — without the right to delete the renames still happen and the lines stay (the picker says so); a line
342
+ * that is already gone is fine, and any other failure (a reset, a 429 after its retry) is logged once and says nothing about the right.
343
+ */
344
+ async function handleOwnRenameLine(key, messageId) {
345
+ try {
346
+ await deleteMessage(key, messageId);
347
+ }
348
+ catch (error) {
349
+ if ((0, telegramError_1.checkIsMessageNotFoundError)(error))
350
+ return;
351
+ if (!(0, telegramError_1.checkIsMessageDeletionRefusedError)(error)) {
352
+ const description = (0, sendErrorClassifier_1.checkIsApiError)(error) ? (0, sendErrorClassifier_1.getErrorDescription)(error) : error instanceof Error ? error.message : String(error);
353
+ logFailureOnce(key, getRuntime((0, sessionKey_1.keyToString)(key)), `deleting the «renamed the topic» line failed: ${description}`);
354
+ return;
355
+ }
356
+ const chatId = (0, sessionKeyCodec_1.getTelegramChatId)(key);
357
+ lineDeletionRefusedChats.add(chatId);
358
+ if (!loggedRefusedChats.has(`delete:${chatId}`)) {
359
+ loggedRefusedChats.add(`delete:${chatId}`);
360
+ log(`[topic-indicator] chat ${chatId}: a «renamed the topic» line of the bot stayed (the bot may not delete it) — each status change leaves one in the topic`);
361
+ }
362
+ }
363
+ }
364
+ /**
365
+ * @description Put the owner's own name back at once, whatever the plan says: the topic is leaving the feature (an unbind, a switch
366
+ * turned off for it). Resolves when the name is written or nothing was to be done; never rejects. It is the last write of an unbind: a
367
+ * look queued before it finds the topic unbinding and writes nothing.
368
+ */
369
+ async function restoreBaseName(key) {
370
+ if (!checkIsMarkableTopic(key))
371
+ return;
372
+ const runtime = getRuntime((0, sessionKey_1.keyToString)(key));
373
+ dropTimer(runtime);
374
+ await writeLock.withLock((0, sessionKey_1.keyToString)(key), async () => {
375
+ const binding = getState().getBinding(key);
376
+ if (!binding || binding.topicName === undefined || (binding.indicatorAppliedName ?? binding.topicName) === binding.topicName)
377
+ return;
378
+ if (checkIsRefused(key))
379
+ return;
380
+ try {
381
+ await sendTopicName(key, binding.topicName);
382
+ }
383
+ catch (error) {
384
+ if (classifyRenameError(key, runtime, error) !== 'noChange')
385
+ return;
386
+ }
387
+ runtime.lastRenameAtMs = getNowMs();
388
+ runtime.retryNotBeforeMs = null;
389
+ noteAppliedName(runtime, binding.topicName);
390
+ await getState().setBindingTopicNaming(key, { indicatorAppliedName: binding.topicName, indicatorRenameRefused: null }).catch((error) => {
391
+ log(`[topic-indicator] ${(0, sessionKey_1.keyToString)(key)}: saving the restored name failed: ${error instanceof Error ? error.message : error}`);
392
+ });
393
+ });
394
+ }
395
+ /** The topic's marks and its refusal forgotten in memory: its binding is gone. */
396
+ function forgetKeyString(keyString) {
397
+ const runtime = runtimes.get(keyString);
398
+ if (runtime)
399
+ dropTimer(runtime);
400
+ runtimes.delete(keyString);
401
+ for (const [chatId, refusal] of renameRefusals) {
402
+ refusal.topicKeys.delete(keyString);
403
+ if (refusal.probeKey === keyString) {
404
+ refusal.probeKey = null;
405
+ refusal.isProbeSilent = false;
406
+ }
407
+ if (refusal.topicKeys.size === 0 && refusal.probeKey === null)
408
+ renameRefusals.delete(chatId);
409
+ }
410
+ }
411
+ /** @description The topic's marks forgotten in memory (its binding is gone): it is never probed again for the right. */
412
+ function forgetTopic(key) {
413
+ forgetKeyString((0, sessionKey_1.keyToString)(key));
414
+ }
415
+ /** @description How the marks stand in `key`'s chat, for the picker's hints. */
416
+ function getHealth(key) {
417
+ ensureRefusalsLoaded();
418
+ const chatId = (0, sessionKeyCodec_1.getTelegramChatId)(key);
419
+ return { isRenameRefused: renameRefusals.has(chatId), isLineDeletionRefused: lineDeletionRefusedChats.has(chatId) };
420
+ }
421
+ /** @description The names the bot wrote to `key`'s topic last, newest first — what the owner may still have been looking at when he saved a name. */
422
+ function getRecentAppliedNames(key) {
423
+ return runtimes.get((0, sessionKey_1.keyToString)(key))?.recentAppliedNames ?? [];
424
+ }
425
+ /**
426
+ * Let ONE refused topic of each refused chat try again (the probe), the oldest first. A probe the last sweep left without a result —
427
+ * nothing wanted writing, it said nothing about the right — is dropped from the refusal (and from its binding) and the next refused
428
+ * topic is probed instead; the chat is released when no refused topic is left. The deletion refusals are forgotten: the next line tells.
429
+ */
430
+ function chooseRefusalProbes() {
431
+ ensureRefusalsLoaded();
432
+ lineDeletionRefusedChats.clear();
433
+ for (const [chatId, refusal] of renameRefusals) {
434
+ if (refusal.probeKey !== null) {
435
+ // The probe has no result yet (its call waits on the send gate, or its name on the settle time): it stays the probe one more round.
436
+ if (!refusal.isProbeSilent)
437
+ continue;
438
+ const silentProbeKey = (0, sessionKey_1.tryKeyFromString)(refusal.probeKey);
439
+ refusal.probeKey = null;
440
+ refusal.isProbeSilent = false;
441
+ if (silentProbeKey)
442
+ clearRefusalFlag(silentProbeKey);
443
+ }
444
+ const [probeKey] = refusal.topicKeys;
445
+ if (probeKey === undefined) {
446
+ renameRefusals.delete(chatId);
447
+ continue;
448
+ }
449
+ refusal.topicKeys.delete(probeKey);
450
+ refusal.probeKey = probeKey;
451
+ }
452
+ }
453
+ /** The sweep: a look at every topic, for the changes no event announces; a refused chat is probed with one topic. */
454
+ function armSweep() {
455
+ sweepTimer = setTimer(() => {
456
+ const boundKeys = new Set(getState().listBindings().map(({ key }) => (0, sessionKey_1.keyToString)(key)));
457
+ for (const keyString of [...runtimes.keys()]) {
458
+ if (!boundKeys.has(keyString))
459
+ forgetKeyString(keyString);
460
+ }
461
+ chooseRefusalProbes();
462
+ refreshAll();
463
+ armSweep();
464
+ }, windows.sweepIntervalMs);
465
+ }
466
+ /** The boot wave: a look at every topic once the boot is over (each look waits for the updates that waited while the bot was down). */
467
+ function startBootWave() {
468
+ waveTimer = setTimer(() => {
469
+ waveTimer = null;
470
+ refreshAll();
471
+ }, windows.bootWaveDelayMs);
472
+ }
473
+ /** @description Start the boot wave and the sweep; called once the bot polls. */
474
+ function start() {
475
+ bootStartedAtMs = getNowMs();
476
+ startBootWave();
477
+ armSweep();
478
+ }
479
+ /** @description Stop every timer (the bot shuts down). The names stay as they are; the next boot's wave re-syncs them. */
480
+ function stop() {
481
+ sweepTimer?.cancel();
482
+ sweepTimer = null;
483
+ waveTimer?.cancel();
484
+ waveTimer = null;
485
+ for (const runtime of runtimes.values())
486
+ dropTimer(runtime);
487
+ }
488
+ return { requestRefresh, refreshAll, handleOwnRenameLine, restoreBaseName, forgetTopic, getHealth, getRecentAppliedNames, start, stop };
489
+ }
490
+ //# sourceMappingURL=topicIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topicIndicator.js","sourceRoot":"","sources":["../../../src/connectors/telegram/topicIndicator.ts"],"names":[],"mappings":";;AA0JA,oDAycC;AAtlBD,iDAAiE;AACjE,uCAAuD;AACvD,mDAA4D;AAC5D,mEAAoG;AACpG,6DAA4G;AAC5G,uEASwC;AACxC,uDAAsD;AACtD,0DAAyE;AACzE,iEAAyE;AAiGzE,oEAAoE;AACpE,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAUlC,MAAM,cAAc,GAAsB,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC3I,MAAM,QAAQ,GAAyB,EAAE,MAAM,EAAE,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E,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9B,CAAC;IAED,uIAAuI;IACvI,SAAS,aAAa;QACpB,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE;YACxB,SAAS,GAAG,IAAI,CAAC;YACjB,UAAU,EAAE,CAAC;QACf,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9B,CAAC;IAED,iFAAiF;IACjF,SAAS,KAAK;QACZ,eAAe,GAAG,QAAQ,EAAE,CAAC;QAC7B,aAAa,EAAE,CAAC;QAChB,QAAQ,EAAE,CAAC;IACb,CAAC;IAED,0HAA0H;IAC1H,SAAS,IAAI;QACX,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,UAAU,GAAG,IAAI,CAAC;QAClB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,GAAG,IAAI,CAAC;QACjB,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE;YAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC1I,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @description The topic renames that waited for the bot while it was down for longer than a hot reload. A COLD start drops every update
3
+ * that waited (`dropPendingUpdates` — a flood of replies to old messages is worse), and with them an owner's rename of a topic: the bot
4
+ * would then write the old name plus a mark over it. So before the drop the waiting updates are READ once, only the `forum_topic_edited`
5
+ * service messages are kept, and the bot applies them through the same path as a live rename; everything else is dropped as before.
6
+ *
7
+ * Telegram keeps an unconfirmed update for up to 24 hours and hands out at most 100 per `getUpdates`; reading with `timeout: 0` returns at
8
+ * once and an `offset` past a page confirms it, which is fine — the launch drops what is left. Telegram REMEMBERS `allowed_updates` between
9
+ * calls, so the read asks for the bot's FULL list (a partial one would unsubscribe the rest until the launch's first poll resets it, and
10
+ * for good if the process died in between) and keeps only the renames in code.
11
+ */
12
+ import type { Message, Update } from 'telegraf/typings/core/types/typegram';
13
+ import type { UpdateType } from 'telegraf/typings/telegram-types';
14
+ /** A `forum_topic_edited` service message that carries a new name (an icon-only edit has none). */
15
+ export type WaitingTopicRename = Message.ForumTopicEditedMessage & {
16
+ forum_topic_edited: {
17
+ name: string;
18
+ };
19
+ };
20
+ /** The `getUpdates` call the reader needs: it only ever reads (`timeout: 0`) and asks for the bot's own list of update types. */
21
+ export interface WaitingUpdatesRequest {
22
+ offset?: number;
23
+ limit: number;
24
+ timeout: 0;
25
+ allowed_updates: readonly UpdateType[];
26
+ }
27
+ /** How many updates one read takes — the most the Bot API gives. */
28
+ export declare const waitingUpdatesPageSize = 100;
29
+ /** How many pages are read at most: 5000 updates is more than a group produces in a day of downtime, and a stuck loop must end. */
30
+ export declare const waitingUpdatesMaxPages = 50;
31
+ /** @description The rename of a topic in `update`, if it is one. */
32
+ export declare function getWaitingTopicRename(update: Update): WaitingTopicRename | null;
33
+ /**
34
+ * @description Read what waits for the bot and keep the topic renames, oldest first (the last rename of a topic wins when they are applied
35
+ * in order). `allowedUpdates` is the bot's own subscription, handed back to Telegram unchanged. Resolves what was read so far when a call
36
+ * fails — a rename that is missed is the old behaviour, not a failed boot — and reports the failure through `onError`.
37
+ */
38
+ export declare function readWaitingTopicRenames(getUpdates: (request: WaitingUpdatesRequest) => Promise<readonly Update[]>, onError: (error: unknown) => void, allowedUpdates: readonly UpdateType[]): Promise<WaitingTopicRename[]>;
39
+ //# sourceMappingURL=waitingTopicRenames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitingTopicRenames.d.ts","sourceRoot":"","sources":["../../../src/connectors/telegram/waitingTopicRenames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,mGAAmG;AACnG,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,uBAAuB,GAAG;IAAE,kBAAkB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAE5G,iIAAiI;AACjI,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,CAAC;IACX,eAAe,EAAE,SAAS,UAAU,EAAE,CAAC;CACxC;AAED,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,mIAAmI;AACnI,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAMzC,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAG/E;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,EAC1E,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACjC,cAAc,EAAE,SAAS,UAAU,EAAE,GACpC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAoB/B"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitingUpdatesMaxPages = exports.waitingUpdatesPageSize = void 0;
4
+ exports.getWaitingTopicRename = getWaitingTopicRename;
5
+ exports.readWaitingTopicRenames = readWaitingTopicRenames;
6
+ /** How many updates one read takes — the most the Bot API gives. */
7
+ exports.waitingUpdatesPageSize = 100;
8
+ /** How many pages are read at most: 5000 updates is more than a group produces in a day of downtime, and a stuck loop must end. */
9
+ exports.waitingUpdatesMaxPages = 50;
10
+ function checkIsNamedTopicEdit(message) {
11
+ return typeof message.forum_topic_edited.name === 'string' && message.forum_topic_edited.name !== '';
12
+ }
13
+ /** @description The rename of a topic in `update`, if it is one. */
14
+ function getWaitingTopicRename(update) {
15
+ if (!('message' in update) || !('forum_topic_edited' in update.message))
16
+ return null;
17
+ return checkIsNamedTopicEdit(update.message) ? update.message : null;
18
+ }
19
+ /**
20
+ * @description Read what waits for the bot and keep the topic renames, oldest first (the last rename of a topic wins when they are applied
21
+ * in order). `allowedUpdates` is the bot's own subscription, handed back to Telegram unchanged. Resolves what was read so far when a call
22
+ * fails — a rename that is missed is the old behaviour, not a failed boot — and reports the failure through `onError`.
23
+ */
24
+ async function readWaitingTopicRenames(getUpdates, onError, allowedUpdates) {
25
+ const renames = [];
26
+ let offset;
27
+ for (let pageIndex = 0; pageIndex < exports.waitingUpdatesMaxPages; pageIndex += 1) {
28
+ let page;
29
+ try {
30
+ page = await getUpdates({ ...(offset === undefined ? {} : { offset }), limit: exports.waitingUpdatesPageSize, timeout: 0, allowed_updates: allowedUpdates });
31
+ }
32
+ catch (error) {
33
+ onError(error);
34
+ return renames;
35
+ }
36
+ for (const update of page) {
37
+ const rename = getWaitingTopicRename(update);
38
+ if (rename)
39
+ renames.push(rename);
40
+ }
41
+ const lastUpdate = page.at(-1);
42
+ if (lastUpdate === undefined || page.length < exports.waitingUpdatesPageSize)
43
+ return renames;
44
+ offset = lastUpdate.update_id + 1;
45
+ }
46
+ return renames;
47
+ }
48
+ //# sourceMappingURL=waitingTopicRenames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitingTopicRenames.js","sourceRoot":"","sources":["../../../src/connectors/telegram/waitingTopicRenames.ts"],"names":[],"mappings":";;;AAmCA,sDAGC;AAOD,0DAwBC;AA5CD,oEAAoE;AACvD,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAC1C,mIAAmI;AACtH,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAEzC,SAAS,qBAAqB,CAAC,OAAwC;IACrE,OAAO,OAAO,OAAO,CAAC,kBAAkB,CAAC,IAAI,KAAK,QAA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AE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,8BAAsB;YAAE,OAAO,OAAO,CAAC;QACrF,MAAM,GAAG,UAAU,CAAC,SAAS,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/i18n/de.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAw0CzC,CAAC"}
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/i18n/de.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA23CzC,CAAC"}