ccgram 2.2.2__tar.gz → 2.2.3__tar.gz

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 (188) hide show
  1. {ccgram-2.2.2 → ccgram-2.2.3}/CHANGELOG.md +9 -0
  2. {ccgram-2.2.2 → ccgram-2.2.3}/PKG-INFO +1 -1
  3. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/_version.py +2 -2
  4. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/cc_commands.py +32 -32
  5. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/main.py +4 -1
  6. {ccgram-2.2.2 → ccgram-2.2.3}/.claude/rules/architecture.md +0 -0
  7. {ccgram-2.2.2 → ccgram-2.2.3}/.claude/rules/message-handling.md +0 -0
  8. {ccgram-2.2.2 → ccgram-2.2.3}/.claude/rules/topic-architecture.md +0 -0
  9. {ccgram-2.2.2 → ccgram-2.2.3}/.claude/skills/releasing/SKILL.md +0 -0
  10. {ccgram-2.2.2 → ccgram-2.2.3}/.env.example +0 -0
  11. {ccgram-2.2.2 → ccgram-2.2.3}/.github/workflows/ci.yml +0 -0
  12. {ccgram-2.2.2 → ccgram-2.2.3}/.github/workflows/release.yml +0 -0
  13. {ccgram-2.2.2 → ccgram-2.2.3}/.gitignore +0 -0
  14. {ccgram-2.2.2 → ccgram-2.2.3}/CLAUDE.md +0 -0
  15. {ccgram-2.2.2 → ccgram-2.2.3}/LICENSE +0 -0
  16. {ccgram-2.2.2 → ccgram-2.2.3}/Makefile +0 -0
  17. {ccgram-2.2.2 → ccgram-2.2.3}/README.md +0 -0
  18. {ccgram-2.2.2 → ccgram-2.2.3}/cliff.toml +0 -0
  19. {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/README.md +0 -0
  20. {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/architecture-map.md +0 -0
  21. {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/codebase-index.md +0 -0
  22. {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/extension-and-fix-playbook.md +0 -0
  23. {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/tooling-and-tests.md +0 -0
  24. {ccgram-2.2.2 → ccgram-2.2.3}/docs/guides.md +0 -0
  25. {ccgram-2.2.2 → ccgram-2.2.3}/llm.txt +0 -0
  26. {ccgram-2.2.2 → ccgram-2.2.3}/pyproject.toml +0 -0
  27. {ccgram-2.2.2 → ccgram-2.2.3}/scripts/generate_homebrew_formula.py +0 -0
  28. {ccgram-2.2.2 → ccgram-2.2.3}/scripts/restart.sh +0 -0
  29. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/__init__.py +0 -0
  30. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/bot.py +0 -0
  31. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/cli.py +0 -0
  32. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/codex_status.py +0 -0
  33. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/command_catalog.py +0 -0
  34. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/config.py +0 -0
  35. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/doctor_cmd.py +0 -0
  36. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/JetBrainsMono-Regular.ttf +0 -0
  37. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/LICENSE-JetBrainsMono.txt +0 -0
  38. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/LICENSE-NotoSansMono.txt +0 -0
  39. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/LICENSE-Symbola.txt +0 -0
  40. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/NotoSansMonoCJKsc-Regular.otf +0 -0
  41. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/Symbola.ttf +0 -0
  42. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/__init__.py +0 -0
  43. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/callback_data.py +0 -0
  44. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/callback_helpers.py +0 -0
  45. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/cleanup.py +0 -0
  46. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/command_history.py +0 -0
  47. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/directory_browser.py +0 -0
  48. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/directory_callbacks.py +0 -0
  49. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/file_handler.py +0 -0
  50. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/history.py +0 -0
  51. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/history_callbacks.py +0 -0
  52. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/hook_events.py +0 -0
  53. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/interactive_callbacks.py +0 -0
  54. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/interactive_ui.py +0 -0
  55. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/message_queue.py +0 -0
  56. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/message_sender.py +0 -0
  57. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/recovery_callbacks.py +0 -0
  58. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/response_builder.py +0 -0
  59. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/restore_command.py +0 -0
  60. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/resume_command.py +0 -0
  61. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/screenshot_callbacks.py +0 -0
  62. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/sessions_dashboard.py +0 -0
  63. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/status_polling.py +0 -0
  64. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/sync_command.py +0 -0
  65. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/text_handler.py +0 -0
  66. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/topic_emoji.py +0 -0
  67. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/upgrade.py +0 -0
  68. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/user_state.py +0 -0
  69. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/voice_callbacks.py +0 -0
  70. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/voice_handler.py +0 -0
  71. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/window_callbacks.py +0 -0
  72. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/hook.py +0 -0
  73. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/interactive_prompt_formatter.py +0 -0
  74. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/markdown_v2.py +0 -0
  75. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/monitor_state.py +0 -0
  76. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/__init__.py +0 -0
  77. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/_jsonl.py +0 -0
  78. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/base.py +0 -0
  79. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/claude.py +0 -0
  80. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/codex.py +0 -0
  81. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/gemini.py +0 -0
  82. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/registry.py +0 -0
  83. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/screen_buffer.py +0 -0
  84. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/screenshot.py +0 -0
  85. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/session.py +0 -0
  86. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/session_monitor.py +0 -0
  87. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/state_persistence.py +0 -0
  88. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/status_cmd.py +0 -0
  89. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/telegram_request.py +0 -0
  90. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/telegram_sender.py +0 -0
  91. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/terminal_parser.py +0 -0
  92. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/tmux_manager.py +0 -0
  93. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/transcript_parser.py +0 -0
  94. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/utils.py +0 -0
  95. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/whisper/__init__.py +0 -0
  96. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/whisper/base.py +0 -0
  97. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/whisper/httpx_transcriber.py +0 -0
  98. {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/window_resolver.py +0 -0
  99. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/conftest.py +0 -0
  100. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/__init__.py +0 -0
  101. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_command_history.py +0 -0
  102. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_history.py +0 -0
  103. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_response_builder.py +0 -0
  104. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_voice_handler.py +0 -0
  105. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_bot_callbacks.py +0 -0
  106. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_callback_auth.py +0 -0
  107. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_cc_commands.py +0 -0
  108. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_claude_characterization.py +0 -0
  109. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_cleanup.py +0 -0
  110. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_cli.py +0 -0
  111. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_codex_status.py +0 -0
  112. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_command_catalog.py +0 -0
  113. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_commands_command.py +0 -0
  114. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_config.py +0 -0
  115. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_directory_browser.py +0 -0
  116. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_doctor_cmd.py +0 -0
  117. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_emdash_integration.py +0 -0
  118. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_external_discovery.py +0 -0
  119. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_file_handler.py +0 -0
  120. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_forward_command.py +0 -0
  121. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_group_filter.py +0 -0
  122. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_handle_new_window.py +0 -0
  123. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_hook.py +0 -0
  124. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_hook_events.py +0 -0
  125. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_interactive_prompt_formatter.py +0 -0
  126. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_interactive_ui.py +0 -0
  127. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_jsonl_providers.py +0 -0
  128. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_kill_command.py +0 -0
  129. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_markdown_v2.py +0 -0
  130. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_message_queue_properties.py +0 -0
  131. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_message_sender.py +0 -0
  132. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_monitor_state.py +0 -0
  133. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_new_command.py +0 -0
  134. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_new_window_sync.py +0 -0
  135. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_autodetect.py +0 -0
  136. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_contracts.py +0 -0
  137. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_registry.py +0 -0
  138. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_selection.py +0 -0
  139. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_recovery_ui.py +0 -0
  140. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_restore_command.py +0 -0
  141. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_resume_command.py +0 -0
  142. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_screen_buffer.py +0 -0
  143. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session.py +0 -0
  144. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_favorites.py +0 -0
  145. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_monitor.py +0 -0
  146. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_monitor_events.py +0 -0
  147. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_notification_mode.py +0 -0
  148. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_sessions_dashboard.py +0 -0
  149. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_state_migration.py +0 -0
  150. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_buttons.py +0 -0
  151. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_cmd.py +0 -0
  152. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_polling.py +0 -0
  153. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_recall_callback.py +0 -0
  154. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_sync_command.py +0 -0
  155. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_task_utils.py +0 -0
  156. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_telegram_request.py +0 -0
  157. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_telegram_sender.py +0 -0
  158. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_terminal_parser.py +0 -0
  159. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_text_handler.py +0 -0
  160. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_tmux_autodetect.py +0 -0
  161. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_tool_batching.py +0 -0
  162. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_topic_edited.py +0 -0
  163. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_topic_emoji.py +0 -0
  164. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_transcript_parser.py +0 -0
  165. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_utils.py +0 -0
  166. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_vim_mode.py +0 -0
  167. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_window_callbacks.py +0 -0
  168. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/whisper/__init__.py +0 -0
  169. {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/whisper/test_transcriber.py +0 -0
  170. {ccgram-2.2.2 → ccgram-2.2.3}/tests/conftest.py +0 -0
  171. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/__init__.py +0 -0
  172. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/_helpers.py +0 -0
  173. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/conftest.py +0 -0
  174. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_claude_lifecycle.py +0 -0
  175. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_codex_lifecycle.py +0 -0
  176. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_gemini_lifecycle.py +0 -0
  177. {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_voice_lifecycle.py +0 -0
  178. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/conftest.py +0 -0
  179. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_autodetect_integration.py +0 -0
  180. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_config_integration.py +0 -0
  181. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_hook_pipeline.py +0 -0
  182. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_message_dispatch.py +0 -0
  183. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_monitor_flow.py +0 -0
  184. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_monitor_state_integration.py +0 -0
  185. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_state_roundtrip.py +0 -0
  186. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_tmux_manager.py +0 -0
  187. {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_whisper_integration.py +0 -0
  188. {ccgram-2.2.2 → ccgram-2.2.3}/uv.lock +0 -0
@@ -4,8 +4,17 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+ ## [2.2.3] - 2026-03-20
8
+
9
+ ### Fixed
10
+ - Respect Telegram cooldown period and log version at startup
11
+
7
12
  ## [2.2.2] - 2026-03-20
8
13
 
14
+ ### Documentation
15
+ - Update CHANGELOG.md for v2.2.2
16
+
17
+
9
18
  ### Fixed
10
19
  - Handle Telegram flood control during startup command registration
11
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccgram
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: CCGram — manage AI coding agents from Telegram via tmux
5
5
  Project-URL: Homepage, https://github.com/alexei-led/ccgram
6
6
  Project-URL: Repository, https://github.com/alexei-led/ccgram
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '2.2.2'
32
- __version_tuple__ = version_tuple = (2, 2, 2)
31
+ __version__ = version = '2.2.3'
32
+ __version_tuple__ = version_tuple = (2, 2, 3)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -290,37 +290,37 @@ async def register_commands(
290
290
 
291
291
  from telegram.error import RetryAfter
292
292
 
293
- max_attempts = 3
294
- for attempt in range(1, max_attempts + 1):
295
- try:
296
- if scope is None:
297
- await bot.delete_my_commands()
298
- await bot.set_my_commands(bot_commands)
299
- else:
300
- await bot.delete_my_commands(scope=scope)
301
- await bot.set_my_commands(bot_commands, scope=scope)
302
- break
303
- except RetryAfter as e:
304
- retry_secs = min(
305
- 60,
306
- (
307
- e.retry_after
308
- if isinstance(e.retry_after, int)
309
- else int(e.retry_after.total_seconds())
310
- ),
293
+ max_startup_wait = 120 # Don't block startup longer than this
294
+
295
+ try:
296
+ if scope is None:
297
+ await bot.delete_my_commands()
298
+ await bot.set_my_commands(bot_commands)
299
+ else:
300
+ await bot.delete_my_commands(scope=scope)
301
+ await bot.set_my_commands(bot_commands, scope=scope)
302
+ except RetryAfter as e:
303
+ retry_secs = (
304
+ e.retry_after
305
+ if isinstance(e.retry_after, int)
306
+ else int(e.retry_after.total_seconds())
307
+ )
308
+ if retry_secs > max_startup_wait:
309
+ logger.warning(
310
+ "Telegram flood control: %ds cooldown, skipping command registration"
311
+ " (will retry in 10min refresh cycle)",
312
+ retry_secs,
311
313
  )
312
- if attempt < max_attempts:
313
- logger.warning(
314
- "Telegram flood control registering commands, retry in %ds (attempt %d/%d)",
315
- retry_secs,
316
- attempt,
317
- max_attempts,
318
- )
319
- await asyncio.sleep(retry_secs)
320
- else:
321
- logger.warning(
322
- "Telegram flood control registering commands, giving up after %d attempts",
323
- max_attempts,
324
- )
325
- return
314
+ return
315
+ logger.warning(
316
+ "Telegram flood control: retrying command registration in %ds",
317
+ retry_secs,
318
+ )
319
+ await asyncio.sleep(retry_secs)
320
+ if scope is None:
321
+ await bot.delete_my_commands()
322
+ await bot.set_my_commands(bot_commands)
323
+ else:
324
+ await bot.delete_my_commands(scope=scope)
325
+ await bot.set_my_commands(bot_commands, scope=scope)
326
326
  logger.info("Registered %d bot commands (%d CC)", len(bot_commands), cc_count)
@@ -129,7 +129,10 @@ def run_bot() -> None:
129
129
 
130
130
  logger.info("Tmux session '%s' ready", session.session_name)
131
131
 
132
- logger.info("Starting Telegram bot...")
132
+ from . import __version__
133
+
134
+ dev = "+dev" if "+unknown" in __version__ or ".dev" in __version__ else ""
135
+ logger.info("Starting ccgram %s%s", __version__, dev)
133
136
  from .bot import create_bot
134
137
 
135
138
  application = create_bot()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes