cconnect 2.1.0__tar.gz → 2.1.1__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 (206) hide show
  1. {cconnect-2.1.0 → cconnect-2.1.1}/PKG-INFO +2 -2
  2. {cconnect-2.1.0 → cconnect-2.1.1}/cconnect.egg-info/PKG-INFO +2 -2
  3. {cconnect-2.1.0 → cconnect-2.1.1}/cconnect.egg-info/requires.txt +1 -1
  4. {cconnect-2.1.0 → cconnect-2.1.1}/core/cli_manager.py +1 -3
  5. {cconnect-2.1.0 → cconnect-2.1.1}/core/config.py +0 -15
  6. {cconnect-2.1.0 → cconnect-2.1.1}/core/db.py +1 -1
  7. {cconnect-2.1.0 → cconnect-2.1.1}/core/models.py +9 -10
  8. {cconnect-2.1.0 → cconnect-2.1.1}/core/release.py +1 -1
  9. {cconnect-2.1.0 → cconnect-2.1.1}/core/ws.py +30 -4
  10. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/check_progress.py +2 -1
  11. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/packs.py +4 -3
  12. {cconnect-2.1.0 → cconnect-2.1.1}/middleware/public_auth.py +0 -1
  13. {cconnect-2.1.0 → cconnect-2.1.1}/pyproject.toml +1 -1
  14. {cconnect-2.1.0 → cconnect-2.1.1}/routers/browser.py +3 -12
  15. {cconnect-2.1.0 → cconnect-2.1.1}/routers/chat.py +29 -34
  16. {cconnect-2.1.0 → cconnect-2.1.1}/routers/claude.py +4 -4
  17. {cconnect-2.1.0 → cconnect-2.1.1}/routers/list.py +2 -5
  18. {cconnect-2.1.0 → cconnect-2.1.1}/routers/network.py +2 -5
  19. {cconnect-2.1.0 → cconnect-2.1.1}/routers/projects.py +2 -5
  20. {cconnect-2.1.0 → cconnect-2.1.1}/routers/sessions.py +1 -1
  21. {cconnect-2.1.0 → cconnect-2.1.1}/routers/system.py +2 -5
  22. {cconnect-2.1.0 → cconnect-2.1.1}/routers/terminal.py +5 -14
  23. {cconnect-2.1.0 → cconnect-2.1.1}/services/accounts.py +0 -1
  24. {cconnect-2.1.0 → cconnect-2.1.1}/services/chat_list.py +21 -46
  25. {cconnect-2.1.0 → cconnect-2.1.1}/services/claude_runtime.py +21 -18
  26. {cconnect-2.1.0 → cconnect-2.1.1}/services/delegate_runner.py +10 -13
  27. {cconnect-2.1.0 → cconnect-2.1.1}/services/directory_watch.py +20 -45
  28. {cconnect-2.1.0 → cconnect-2.1.1}/services/live_sessions.py +5 -10
  29. cconnect-2.1.1/services/processes.py +351 -0
  30. {cconnect-2.1.0 → cconnect-2.1.1}/services/project_watch.py +38 -67
  31. {cconnect-2.1.0 → cconnect-2.1.1}/services/sessions.py +176 -132
  32. {cconnect-2.1.0 → cconnect-2.1.1}/services/settings_store.py +1 -2
  33. {cconnect-2.1.0 → cconnect-2.1.1}/services/shared.py +39 -29
  34. {cconnect-2.1.0 → cconnect-2.1.1}/services/terminal.py +0 -1
  35. cconnect-2.1.0/services/processes.py +0 -179
  36. {cconnect-2.1.0 → cconnect-2.1.1}/cconnect.egg-info/SOURCES.txt +0 -0
  37. {cconnect-2.1.0 → cconnect-2.1.1}/cconnect.egg-info/dependency_links.txt +0 -0
  38. {cconnect-2.1.0 → cconnect-2.1.1}/cconnect.egg-info/entry_points.txt +0 -0
  39. {cconnect-2.1.0 → cconnect-2.1.1}/cconnect.egg-info/top_level.txt +0 -0
  40. {cconnect-2.1.0/services → cconnect-2.1.1/core}/__init__.py +0 -0
  41. {cconnect-2.1.0 → cconnect-2.1.1}/core/access.py +0 -0
  42. {cconnect-2.1.0 → cconnect-2.1.1}/core/app.py +0 -0
  43. {cconnect-2.1.0 → cconnect-2.1.1}/core/cli.py +0 -0
  44. {cconnect-2.1.0 → cconnect-2.1.1}/core/data_migration.py +0 -0
  45. {cconnect-2.1.0 → cconnect-2.1.1}/core/display.py +0 -0
  46. {cconnect-2.1.0 → cconnect-2.1.1}/core/packages.py +0 -0
  47. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/builtin.json +0 -0
  48. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect/accents.json +0 -0
  49. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect/pack.json +0 -0
  50. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect/terminal/black.json +0 -0
  51. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect/themes/cconnect-dark.json +0 -0
  52. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect/themes/cconnect-light.json +0 -0
  53. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
  54. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
  55. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/pack.json +0 -0
  56. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
  57. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
  58. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
  59. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
  60. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
  61. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
  62. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
  63. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
  64. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
  65. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
  66. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
  67. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
  68. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
  69. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
  70. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
  71. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/nord.json +0 -0
  72. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
  73. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
  74. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
  75. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
  76. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
  77. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
  78. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
  79. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
  80. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
  81. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
  82. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
  83. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
  84. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
  85. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
  86. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
  87. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +0 -0
  88. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/claude-dark.json +0 -0
  89. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/claude-light.json +0 -0
  90. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/dracula.json +0 -0
  91. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-dark-hc.json +0 -0
  92. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-dark.json +0 -0
  93. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-dimmed.json +0 -0
  94. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-light-hc.json +0 -0
  95. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-light.json +0 -0
  96. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
  97. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/nord.json +0 -0
  98. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/one-dark.json +0 -0
  99. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
  100. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
  101. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
  102. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/tokyo-night.json +0 -0
  103. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
  104. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +0 -0
  105. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-hc-dark.json +0 -0
  106. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-hc-light.json +0 -0
  107. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-light-modern.json +0 -0
  108. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
  109. {cconnect-2.1.0 → cconnect-2.1.1}/core/packs/schema.json +0 -0
  110. {cconnect-2.1.0 → cconnect-2.1.1}/core/paths.py +0 -0
  111. {cconnect-2.1.0 → cconnect-2.1.1}/core/process_job.py +0 -0
  112. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/BLOCKS.md +0 -0
  113. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/BROWSER.md +0 -0
  114. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/CCONNECT.md +0 -0
  115. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/COMMIT.md +0 -0
  116. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/INSTALL.md +0 -0
  117. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/MODS.md +0 -0
  118. {cconnect-2.1.0 → cconnect-2.1.1}/core/prompts/SUGGESTIONS.md +0 -0
  119. {cconnect-2.1.0 → cconnect-2.1.1}/core/rate_limit.py +0 -0
  120. {cconnect-2.1.0 → cconnect-2.1.1}/core/responses.py +0 -0
  121. {cconnect-2.1.0 → cconnect-2.1.1}/core/scripts/browse.py +0 -0
  122. {cconnect-2.1.0 → cconnect-2.1.1}/core/scripts/mcp_bridge.py +0 -0
  123. {cconnect-2.1.0 → cconnect-2.1.1}/core/scripts/page_icon.js +0 -0
  124. {cconnect-2.1.0 → cconnect-2.1.1}/core/sdk.py +0 -0
  125. {cconnect-2.1.0 → cconnect-2.1.1}/core/settings_defs.py +0 -0
  126. {cconnect-2.1.0 → cconnect-2.1.1}/core/slugs.py +0 -0
  127. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/__init__.py +0 -0
  128. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/browser.py +0 -0
  129. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/components.py +0 -0
  130. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/delegate.py +0 -0
  131. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/media.py +0 -0
  132. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/session.py +0 -0
  133. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/shared_files.py +0 -0
  134. {cconnect-2.1.0 → cconnect-2.1.1}/mcps/terminal.py +0 -0
  135. {cconnect-2.1.0/schemas → cconnect-2.1.1/middleware}/__init__.py +0 -0
  136. {cconnect-2.1.0 → cconnect-2.1.1}/middleware/error_handler.py +0 -0
  137. {cconnect-2.1.0 → cconnect-2.1.1}/middleware/security.py +0 -0
  138. {cconnect-2.1.0 → cconnect-2.1.1}/routers/__init__.py +0 -0
  139. {cconnect-2.1.0 → cconnect-2.1.1}/routers/accounts.py +0 -0
  140. {cconnect-2.1.0 → cconnect-2.1.1}/routers/agents.py +0 -0
  141. {cconnect-2.1.0 → cconnect-2.1.1}/routers/capabilities.py +0 -0
  142. {cconnect-2.1.0 → cconnect-2.1.1}/routers/cli.py +0 -0
  143. {cconnect-2.1.0 → cconnect-2.1.1}/routers/git.py +0 -0
  144. {cconnect-2.1.0 → cconnect-2.1.1}/routers/health.py +0 -0
  145. {cconnect-2.1.0 → cconnect-2.1.1}/routers/packs.py +0 -0
  146. {cconnect-2.1.0 → cconnect-2.1.1}/routers/pages.py +0 -0
  147. {cconnect-2.1.0 → cconnect-2.1.1}/routers/settings.py +0 -0
  148. {cconnect-2.1.0 → cconnect-2.1.1}/routers/shared.py +0 -0
  149. {cconnect-2.1.0/middleware → cconnect-2.1.1/schemas}/__init__.py +0 -0
  150. {cconnect-2.1.0 → cconnect-2.1.1}/schemas/accounts.py +0 -0
  151. {cconnect-2.1.0 → cconnect-2.1.1}/schemas/chat.py +0 -0
  152. {cconnect-2.1.0 → cconnect-2.1.1}/schemas/network.py +0 -0
  153. {cconnect-2.1.0/core → cconnect-2.1.1/services}/__init__.py +0 -0
  154. {cconnect-2.1.0 → cconnect-2.1.1}/services/account_login.py +0 -0
  155. {cconnect-2.1.0 → cconnect-2.1.1}/services/acp_events.py +0 -0
  156. {cconnect-2.1.0 → cconnect-2.1.1}/services/acp_peer.py +0 -0
  157. {cconnect-2.1.0 → cconnect-2.1.1}/services/agent_connections.py +0 -0
  158. {cconnect-2.1.0 → cconnect-2.1.1}/services/agent_mcp.py +0 -0
  159. {cconnect-2.1.0 → cconnect-2.1.1}/services/agent_registry.py +0 -0
  160. {cconnect-2.1.0 → cconnect-2.1.1}/services/agent_sessions.py +0 -0
  161. {cconnect-2.1.0 → cconnect-2.1.1}/services/agents.py +0 -0
  162. {cconnect-2.1.0 → cconnect-2.1.1}/services/api_errors.py +0 -0
  163. {cconnect-2.1.0 → cconnect-2.1.1}/services/attachments.py +0 -0
  164. {cconnect-2.1.0 → cconnect-2.1.1}/services/blocks.py +0 -0
  165. {cconnect-2.1.0 → cconnect-2.1.1}/services/browser.py +0 -0
  166. {cconnect-2.1.0 → cconnect-2.1.1}/services/categories.py +0 -0
  167. {cconnect-2.1.0 → cconnect-2.1.1}/services/claude_assets.py +0 -0
  168. {cconnect-2.1.0 → cconnect-2.1.1}/services/claude_manage.py +0 -0
  169. {cconnect-2.1.0 → cconnect-2.1.1}/services/claude_status.py +0 -0
  170. {cconnect-2.1.0 → cconnect-2.1.1}/services/cli_info.py +0 -0
  171. {cconnect-2.1.0 → cconnect-2.1.1}/services/cli_settings.py +0 -0
  172. {cconnect-2.1.0 → cconnect-2.1.1}/services/control_requests.py +0 -0
  173. {cconnect-2.1.0 → cconnect-2.1.1}/services/delegate_runs.py +0 -0
  174. {cconnect-2.1.0 → cconnect-2.1.1}/services/delegates.py +0 -0
  175. {cconnect-2.1.0 → cconnect-2.1.1}/services/diffs.py +0 -0
  176. {cconnect-2.1.0 → cconnect-2.1.1}/services/directories.py +0 -0
  177. {cconnect-2.1.0 → cconnect-2.1.1}/services/elicitation.py +0 -0
  178. {cconnect-2.1.0 → cconnect-2.1.1}/services/event_rows.py +0 -0
  179. {cconnect-2.1.0 → cconnect-2.1.1}/services/files.py +0 -0
  180. {cconnect-2.1.0 → cconnect-2.1.1}/services/git.py +0 -0
  181. {cconnect-2.1.0 → cconnect-2.1.1}/services/git_ops.py +0 -0
  182. {cconnect-2.1.0 → cconnect-2.1.1}/services/mods.py +0 -0
  183. {cconnect-2.1.0 → cconnect-2.1.1}/services/network.py +0 -0
  184. {cconnect-2.1.0 → cconnect-2.1.1}/services/pack_format.py +0 -0
  185. {cconnect-2.1.0 → cconnect-2.1.1}/services/packs.py +0 -0
  186. {cconnect-2.1.0 → cconnect-2.1.1}/services/pages.py +0 -0
  187. {cconnect-2.1.0 → cconnect-2.1.1}/services/persistent_sessions.py +0 -0
  188. {cconnect-2.1.0 → cconnect-2.1.1}/services/project_files.py +0 -0
  189. {cconnect-2.1.0 → cconnect-2.1.1}/services/projects.py +0 -0
  190. {cconnect-2.1.0 → cconnect-2.1.1}/services/prompt_cache.py +0 -0
  191. {cconnect-2.1.0 → cconnect-2.1.1}/services/providers.py +0 -0
  192. {cconnect-2.1.0 → cconnect-2.1.1}/services/questions.py +0 -0
  193. {cconnect-2.1.0 → cconnect-2.1.1}/services/repo.py +0 -0
  194. {cconnect-2.1.0 → cconnect-2.1.1}/services/rewind.py +0 -0
  195. {cconnect-2.1.0 → cconnect-2.1.1}/services/shared_links.py +0 -0
  196. {cconnect-2.1.0 → cconnect-2.1.1}/services/shared_watch.py +0 -0
  197. {cconnect-2.1.0 → cconnect-2.1.1}/services/speedtest.py +0 -0
  198. {cconnect-2.1.0 → cconnect-2.1.1}/services/system_monitor.py +0 -0
  199. {cconnect-2.1.0 → cconnect-2.1.1}/services/system_watch.py +0 -0
  200. {cconnect-2.1.0 → cconnect-2.1.1}/services/todos.py +0 -0
  201. {cconnect-2.1.0 → cconnect-2.1.1}/services/tool_calls.py +0 -0
  202. {cconnect-2.1.0 → cconnect-2.1.1}/services/tool_props.py +0 -0
  203. {cconnect-2.1.0 → cconnect-2.1.1}/services/trash.py +0 -0
  204. {cconnect-2.1.0 → cconnect-2.1.1}/services/usage.py +0 -0
  205. {cconnect-2.1.0 → cconnect-2.1.1}/services/visibility.py +0 -0
  206. {cconnect-2.1.0 → cconnect-2.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cconnect
3
- Version: 2.1.0
3
+ Version: 2.1.1
4
4
  Summary: Remote bridge between the CConnect client and Claude Code
5
5
  Author: jahirtrap
6
6
  License-Expression: MIT
@@ -30,7 +30,7 @@ Requires-Dist: psutil>=5.9.0
30
30
  Requires-Dist: nvidia-ml-py>=12.0.0
31
31
  Requires-Dist: py7zr>=1.0.0
32
32
  Requires-Dist: rarfile>=4.2
33
- Requires-Dist: watchdog>=4.0.0
33
+ Requires-Dist: watchfiles>=1.2.0
34
34
  Requires-Dist: pywinpty>=2.0.13; sys_platform == "win32"
35
35
  Requires-Dist: ptyprocess>=0.7.0; sys_platform != "win32"
36
36
  Provides-Extra: dev
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cconnect
3
- Version: 2.1.0
3
+ Version: 2.1.1
4
4
  Summary: Remote bridge between the CConnect client and Claude Code
5
5
  Author: jahirtrap
6
6
  License-Expression: MIT
@@ -30,7 +30,7 @@ Requires-Dist: psutil>=5.9.0
30
30
  Requires-Dist: nvidia-ml-py>=12.0.0
31
31
  Requires-Dist: py7zr>=1.0.0
32
32
  Requires-Dist: rarfile>=4.2
33
- Requires-Dist: watchdog>=4.0.0
33
+ Requires-Dist: watchfiles>=1.2.0
34
34
  Requires-Dist: pywinpty>=2.0.13; sys_platform == "win32"
35
35
  Requires-Dist: ptyprocess>=0.7.0; sys_platform != "win32"
36
36
  Provides-Extra: dev
@@ -14,7 +14,7 @@ psutil>=5.9.0
14
14
  nvidia-ml-py>=12.0.0
15
15
  py7zr>=1.0.0
16
16
  rarfile>=4.2
17
- watchdog>=4.0.0
17
+ watchfiles>=1.2.0
18
18
 
19
19
  [:sys_platform != "win32"]
20
20
  ptyprocess>=0.7.0
@@ -15,8 +15,6 @@ from typing import Optional
15
15
  from core.settings_defs import SETTINGS
16
16
  from services import settings_store
17
17
 
18
- # Same fallback locations the SDK's own _find_cli scans after PATH, using the
19
- # platform-correct binary name (claude.exe on Windows, claude elsewhere).
20
18
  _CLI_NAME = "claude.exe" if platform.system() == "Windows" else "claude"
21
19
  _KNOWN_LOCATIONS = (
22
20
  Path.home() / ".local/bin" / _CLI_NAME,
@@ -148,7 +146,7 @@ def update_cli(source: Optional[str] = None, custom_path: Optional[str] = None)
148
146
  def set_source(source: str, custom_path: Optional[str] = None) -> None:
149
147
  if source == "custom" and not (custom_path and Path(custom_path).exists()):
150
148
  raise ValueError("custom source requires an existing path")
151
- settings_store.set("cli_source", source) # validates against the registry's allowed set
149
+ settings_store.set("cli_source", source)
152
150
  settings_store.set("cli_custom_path", custom_path)
153
151
  invalidate_version_cache()
154
152
 
@@ -25,16 +25,12 @@ CLAUDE_PROJECTS_DIR = os.environ.get(
25
25
  str(Path.home() / ".claude" / "projects"),
26
26
  )
27
27
 
28
- # Restart contract between run.py (supervisor) and POST /api/system/restart.
29
28
  RESTART_EXIT_CODE = 42
30
29
 
31
- # Fallback cwd when the mobile starts a chat without picking a directory and the
32
- # active connection has none. The parent of a checkout, home when installed.
33
30
  DEFAULT_CWD = os.environ.get(
34
31
  "DEFAULT_CWD", str(Path.home() if paths.INSTALLED else paths.BACKEND_DIR.parent)
35
32
  )
36
33
 
37
- # Fallback used only if the SDK can't be introspected yet.
38
34
  _FALLBACK_PERMISSION_MODES = ("default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "auto")
39
35
 
40
36
  DEFAULT_PERMISSION_MODE = os.environ.get("DEFAULT_PERMISSION_MODE", "bypassPermissions")
@@ -43,14 +39,12 @@ FALLBACK_PERMISSION_MODE = "auto"
43
39
  _RUNNING_AS_ROOT = getattr(os, "geteuid", lambda: -1)() == 0
44
40
  DEFAULT_EFFORT = os.environ.get("DEFAULT_EFFORT", "xhigh")
45
41
 
46
- # Pseudo-level surfaced in capabilities; run_prompt expands it to xhigh + the ultracode setting.
47
42
  ULTRACODE_EFFORT = "ultracode"
48
43
 
49
44
  DEFAULT_MODEL = os.environ.get("DEFAULT_MODEL", "opus[1m]")
50
45
 
51
46
  REQUEST_LIMIT_BYTES = 32 * 1024 * 1024
52
47
 
53
- # Display labels for permission modes (the SDK only exposes the raw ids).
54
48
  PERMISSION_LABELS = {
55
49
  "default": "Default",
56
50
  "acceptEdits": "Accept edits",
@@ -60,13 +54,8 @@ PERMISSION_LABELS = {
60
54
  "auto": "Auto",
61
55
  }
62
56
 
63
- # The named set Claude uses for agent colors; the app maps each to a swatch.
64
57
  COLORS = ["red", "orange", "yellow", "green", "cyan", "blue", "purple", "pink"]
65
58
 
66
- # Slash commands CConnect handles itself. kind="client" is handled in-app; kind="prompt"
67
- # is forwarded to the CLI; kind="usage" fetches plan usage out-of-band. require_confirmation
68
- # prompts first. own_description keeps ours when the CLI describes a behaviour we changed.
69
- # Everything else the CLI reports is appended as kind="prompt" (see services/cli_info).
70
59
  COMMANDS = [
71
60
  {"name": "clear", "description": "Clear this conversation", "kind": "client",
72
61
  "require_confirmation": True, "own_description": True},
@@ -103,16 +92,12 @@ def resolve_permission_mode(mode: str | None) -> str:
103
92
  return mode if mode in permission_modes() else FALLBACK_PERMISSION_MODE
104
93
 
105
94
 
106
- # Gated by CCONNECT_AUTH_ACTIVE so a token left in .env from a previous --expose run
107
- # doesn't auth-gate plain `python run.py`.
108
95
  PUBLIC_ACCESS_TOKEN: str | None = (
109
96
  os.environ.get("PUBLIC_ACCESS_TOKEN") if os.environ.get("CCONNECT_AUTH_ACTIVE") == "1" else None
110
97
  )
111
98
 
112
99
  SECURITY_KEY: str | None = os.environ.get("SECURITY_KEY") or None
113
100
 
114
- # Chromium driven over CDP for the browser pane. Its own profile, so it never touches
115
- # the user's real one, and a debug port of its own so it can coexist with other tooling.
116
101
  BROWSER_EXECUTABLE = os.environ.get("BROWSER_EXECUTABLE", "")
117
102
  BROWSER_DEBUG_PORT = int(os.environ.get("BROWSER_DEBUG_PORT", "9333"))
118
103
  BROWSER_HEADLESS = os.environ.get("BROWSER_HEADLESS", "1") not in ("0", "false", "False")
@@ -49,7 +49,7 @@ def _add_missing_columns() -> list[str]:
49
49
 
50
50
  def init_db() -> None:
51
51
  """Create the missing tables and append the missing columns."""
52
- from core import models # noqa: F401 (register models on Base before create_all)
52
+ from core import models # noqa: F401
53
53
  db_existed = paths.DB_FILE.exists()
54
54
  before = set(inspect(engine).get_table_names())
55
55
  Base.metadata.create_all(engine)
@@ -34,23 +34,26 @@ class SessionCategory(Base):
34
34
  )
35
35
 
36
36
 
37
- class SessionPlacement(Base):
37
+ class _InCategory:
38
+ category_id: Mapped[Optional[str]] = mapped_column(
39
+ nullable=True,
40
+ comment="Category holding the chat; NULL keeps it in the uncategorised group",
41
+ )
42
+
43
+
44
+ class SessionPlacement(_InCategory, Base):
38
45
  __tablename__ = "session_placement"
39
46
 
40
47
  session_id: Mapped[str] = mapped_column(
41
48
  primary_key=True,
42
49
  comment="Transcript id on disk; rows whose session is gone are pruned",
43
50
  )
44
- category_id: Mapped[Optional[str]] = mapped_column(
45
- nullable=True,
46
- comment="Category holding the chat; NULL keeps it in the uncategorised group",
47
- )
48
51
  position: Mapped[float] = mapped_column(
49
52
  comment="Sort key inside the category, only read while the order is manual",
50
53
  )
51
54
 
52
55
 
53
- class AgentSessionPlacement(Base):
56
+ class AgentSessionPlacement(_InCategory, Base):
54
57
  __tablename__ = "agent_session_placement"
55
58
 
56
59
  agent: Mapped[str] = mapped_column(
@@ -61,10 +64,6 @@ class AgentSessionPlacement(Base):
61
64
  primary_key=True,
62
65
  comment="Session id the agent gave the chat; the row goes when the chat is deleted from the app or the agent is removed",
63
66
  )
64
- category_id: Mapped[Optional[str]] = mapped_column(
65
- nullable=True,
66
- comment="Category holding the chat; NULL keeps it in the uncategorised group",
67
- )
68
67
  position: Mapped[float] = mapped_column(
69
68
  comment="Sort key inside the category among that agent's chats, only read while the order is manual",
70
69
  )
@@ -1,5 +1,5 @@
1
1
  """The version contract, read by the API and by the packaging metadata."""
2
2
 
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  SUPPORTED_APP = ">=2.0.5"
5
5
  SUPPORTED_CLI = ">=2.1.300"
@@ -1,10 +1,11 @@
1
1
  """WebSocket frames: orjson instead of the stdlib encoder Starlette's send_json uses."""
2
2
 
3
3
  import asyncio
4
+ import json
4
5
  from typing import Any, Callable, Optional, Protocol
5
6
 
6
7
  import orjson
7
- from fastapi import WebSocket, WebSocketDisconnect
8
+ from fastapi import WebSocket, WebSocketDisconnect, status
8
9
  from fastapi.encoders import jsonable_encoder
9
10
  from loguru import logger
10
11
 
@@ -21,15 +22,40 @@ async def send_event(ws: WebSocket, payload: Any) -> None:
21
22
  await ws.send_text(orjson.dumps(payload, default=jsonable_encoder).decode())
22
23
 
23
24
 
25
+ async def refuse(ws: WebSocket) -> None:
26
+ await ws.close(code=status.WS_1008_POLICY_VIOLATION)
27
+
28
+
29
+ async def accept_authorized(ws: WebSocket) -> bool:
30
+ """Accept the socket when it carries the bearer, and reject its handshake otherwise."""
31
+ if not ws_bearer_ok(ws):
32
+ await refuse(ws)
33
+ return False
34
+ await ws.accept()
35
+ return True
36
+
37
+
38
+ async def opening_message(ws: WebSocket) -> Optional[dict]:
39
+ """The first message of an accepted socket, or None once the socket is closed."""
40
+ if not await accept_authorized(ws):
41
+ return None
42
+ try:
43
+ opening = await ws.receive_json()
44
+ except (WebSocketDisconnect, RuntimeError, json.JSONDecodeError):
45
+ return None
46
+ if not isinstance(opening, dict):
47
+ await refuse(ws)
48
+ return None
49
+ return opening
50
+
51
+
24
52
  async def stream_watch(
25
53
  ws: WebSocket,
26
54
  hub: WatchHub,
27
55
  on_message: Optional[Callable[[asyncio.Queue, dict], None]] = None,
28
56
  ) -> None:
29
- if not ws_bearer_ok(ws):
30
- await ws.close(code=1008)
57
+ if not await accept_authorized(ws):
31
58
  return
32
- await ws.accept()
33
59
  queue = hub.subscribe()
34
60
 
35
61
  async def pump():
@@ -1,5 +1,6 @@
1
1
  """Cross-chat progress query: summarize what's happening in another Claude Code project."""
2
2
 
3
+ import asyncio
3
4
  from pathlib import Path
4
5
  from typing import Any, Optional
5
6
 
@@ -158,7 +159,7 @@ async def _summarize(project_key: str, session_id: Optional[str] = None, account
158
159
  file = _session_file(project_key, session_id) if session_id else _latest_session_file(project_key)
159
160
  if not file or not file.is_file():
160
161
  return None
161
- transcript, has_work = _transcript_for_progress(file)
162
+ transcript, has_work = await asyncio.to_thread(_transcript_for_progress, file)
162
163
  if not transcript:
163
164
  return None
164
165
  if not has_work:
@@ -41,9 +41,10 @@ GUIDE = "\n".join(
41
41
  f"{MANIFEST}: " + '{"schema": ' + str(SCHEMA["schema"]) + ', "name", "version", "author"?, '
42
42
  '"contributors"?: [names], "description"?, "id"?, "preview"?: path of an image in the pack, '
43
43
  '"use"?: [ids of this pack]}.',
44
- "preview is the pack's icon, drawn 44 px wide in the app's lists, while the app draws the pack's banner "
45
- "itself from its theme colors. Make it square, as an SVG or a raster no bigger than 256x256, with a creative "
46
- "motif of the pack's own and no text: a screenshot or fine detail turns to noise at that size.",
44
+ "preview is the pack's icon, drawn 44 px wide in the app's lists. Make it square, as an SVG or a raster no "
45
+ "bigger than 256x256, with a creative motif of the pack's own and no text: a screenshot or fine detail "
46
+ "turns to noise at that size. The app draws the pack's banner itself from its theme colors, so never "
47
+ "render screenshots, mockups or previews of a theme to show the user: they see it when they install it.",
47
48
  "Every other file is optional and takes its id from its name.",
48
49
  "use is what the app's Use button applies, and without it the button is not offered: the first light "
49
50
  "theme, dark theme, terminal, accent and background listed, and the first font of each kind. For the "
@@ -9,7 +9,6 @@ from core.config import PUBLIC_ACCESS_TOKEN
9
9
  from core.responses import api_response
10
10
  from services import agent_mcp, pages
11
11
 
12
- # Open so the mobile app can probe connectivity before it has a token.
13
12
  _OPEN_PATHS = frozenset({"/api/health", "/api/agents/browse"})
14
13
  _OPEN_PREFIXES = (f"{agent_mcp.PATH}/", f"{pages.PATH}/")
15
14
 
@@ -37,7 +37,7 @@ dependencies = [
37
37
  "nvidia-ml-py>=12.0.0",
38
38
  "py7zr>=1.0.0",
39
39
  "rarfile>=4.2",
40
- "watchdog>=4.0.0",
40
+ "watchfiles>=1.2.0",
41
41
  "pywinpty>=2.0.13; sys_platform == 'win32'",
42
42
  "ptyprocess>=0.7.0; sys_platform != 'win32'",
43
43
  ]
@@ -6,8 +6,7 @@ import json
6
6
  from fastapi import APIRouter, WebSocket, WebSocketDisconnect
7
7
 
8
8
  from core.responses import api_response
9
- from core.ws import send_event
10
- from middleware.public_auth import ws_bearer_ok
9
+ from core.ws import opening_message, send_event
11
10
  from services import browser
12
11
  from services.browser import BrowserSession
13
12
 
@@ -67,16 +66,8 @@ async def _dispatch(session: BrowserSession, payload: dict):
67
66
 
68
67
  @router.websocket("/browser/ws")
69
68
  async def browser_ws(ws: WebSocket):
70
- if not ws_bearer_ok(ws):
71
- await ws.close(code=1008)
72
- return
73
- await ws.accept()
74
- try:
75
- opening = await ws.receive_json()
76
- except (WebSocketDisconnect, RuntimeError, json.JSONDecodeError):
77
- return
78
- if not isinstance(opening, dict):
79
- await ws.close(code=1008)
69
+ opening = await opening_message(ws)
70
+ if opening is None:
80
71
  return
81
72
 
82
73
  session = browser.session
@@ -18,9 +18,8 @@ from core import paths
18
18
  from core.access import key_matches
19
19
  from core.config import DEFAULT_CWD, permission_modes, resolve_permission_mode
20
20
  from core.responses import api_response
21
- from core.ws import send_event
21
+ from core.ws import accept_authorized, send_event
22
22
  from mcps import terminal as terminal_mcp
23
- from middleware.public_auth import ws_bearer_ok
24
23
  from schemas.chat import (
25
24
  AgentLoginMessage,
26
25
  ModActionMessage,
@@ -83,6 +82,7 @@ class _Session:
83
82
  self.partial: bool = False
84
83
  self.agent: str | None = None
85
84
  self.locale: str | None = None
85
+ self.side_of: str | None = None
86
86
 
87
87
 
88
88
  def _build_turn_runner(session, text: str, attachments: list[str] | None = None, seed_id: str | None = None, wanted=None, capabilities=None, on_transport=None, adopt=False, shown=None):
@@ -98,14 +98,6 @@ def _build_turn_runner(session, text: str, attachments: list[str] | None = None,
98
98
  compacted = False
99
99
  is_compact_cmd = text.strip() == "/compact" or text.strip().startswith("/compact ")
100
100
  is_local_cmd = text.strip().startswith("/") and not is_compact_cmd
101
- boundaries_before = (
102
- sessions_service.compact_boundary_count(state.cwd, state.session_id)
103
- if is_compact_cmd and state.cwd and state.session_id else 0
104
- )
105
- local_cmds_before = (
106
- sessions_service.local_command_count(state.cwd, state.session_id)
107
- if is_local_cmd and state.cwd and state.session_id else 0
108
- )
109
101
  prompt_text, prompt_images = text, None
110
102
  if attachments:
111
103
  from services import attachments as attachments_service
@@ -169,12 +161,13 @@ def _build_turn_runner(session, text: str, attachments: list[str] | None = None,
169
161
  sessions_service.record_prompt_history(state.cwd, state.session_id, prompt_text)
170
162
  yield event
171
163
  finally:
164
+ since = written_from if state.session_id == resumed_sid else 0
172
165
  if state.cwd and state.session_id:
173
166
  await asyncio.to_thread(
174
167
  sessions_service.normalize_session_entrypoint,
175
168
  state.cwd,
176
169
  state.session_id,
177
- written_from if state.session_id == resumed_sid else 0,
170
+ since,
178
171
  )
179
172
  if state.cwd and state.session_id:
180
173
  if fresh and not adopted and not is_local_cmd and not is_compact_cmd:
@@ -185,21 +178,21 @@ def _build_turn_runner(session, text: str, attachments: list[str] | None = None,
185
178
  accounts.resolve(state.account),
186
179
  )
187
180
  )
188
- # The token counts and summary are written to the transcript only after the turn.
189
181
  if is_compact_cmd:
190
- after = sessions_service.compact_boundary_count(state.cwd, state.session_id)
191
- if after > boundaries_before:
192
- data = sessions_service.latest_compact(state.cwd, state.session_id)
182
+ if await asyncio.to_thread(sessions_service.compacted_since, state.cwd, state.session_id, since):
183
+ data = await asyncio.to_thread(sessions_service.latest_compact, state.cwd, state.session_id)
193
184
  if data:
194
185
  yield {"type": "compact", **data}
195
186
  if data.get("post_tokens"):
196
187
  yield {"type": "context", "context_tokens": data["post_tokens"]}
197
188
  elif compacted:
198
- data = sessions_service.latest_compact(state.cwd, state.session_id)
189
+ data = await asyncio.to_thread(sessions_service.latest_compact, state.cwd, state.session_id)
199
190
  if data:
200
191
  yield {"type": "compact_summary", **data}
201
- elif is_local_cmd and sessions_service.local_command_count(state.cwd, state.session_id) > local_cmds_before:
202
- md = sessions_service.latest_local_command(state.cwd, state.session_id)
192
+ elif is_local_cmd:
193
+ md = await asyncio.to_thread(
194
+ sessions_service.local_command_since, state.cwd, state.session_id, since
195
+ )
203
196
  if md:
204
197
  yield {"type": "command", "markdown": md}
205
198
 
@@ -262,7 +255,7 @@ async def _start_turn(session, mid, text, attachments, prefs=None, capabilities=
262
255
  if mid:
263
256
  await session.commit_user(mid, text)
264
257
  return True
265
- turn_start = _turn_start(session, prefs)
258
+ turn_start = await asyncio.to_thread(_turn_start, session, prefs)
266
259
  if not session.start(
267
260
  _build_turn_runner(session, text, attachments, seed_id=mid, wanted=lambda: visibility.ceiling(session.wanted()), capabilities=capabilities, on_transport=session.set_transport),
268
261
  seed_id=mid,
@@ -278,7 +271,7 @@ async def _start_turn(session, mid, text, attachments, prefs=None, capabilities=
278
271
 
279
272
  async def _adopt_turn(session, prefs=None, capabilities=None):
280
273
  """Show a turn the CLI started on its own, such as a prompt a mod submitted, as it runs."""
281
- turn_start = _turn_start(session, prefs)
274
+ turn_start = await asyncio.to_thread(_turn_start, session, prefs)
282
275
  if session.start(
283
276
  _build_turn_runner(session, "", wanted=lambda: visibility.ceiling(session.wanted()), capabilities=capabilities, on_transport=session.set_transport, adopt=True, shown=session.shown_size),
284
277
  ):
@@ -298,7 +291,7 @@ def _side_model(state: _Session) -> str | None:
298
291
  return _resolve_model(state.model)
299
292
 
300
293
 
301
- def _build_side_runner(main_state: _Session, side_state: _Session, question: str, resume_id: str | None, capabilities: list[str]):
294
+ def _build_side_runner(main_state: _Session, side_state: _Session, question: str, resume_id: str | None, capabilities: list[str], channel: str):
302
295
  """LiveSession runner for one quick-chat turn: runs the isolated side question (with the
303
296
  interaction callback for permissions/AskUserQuestion) and records the side SDK session id
304
297
  so it can be resumed/reattached like the main turn. The trailing ``done`` is added by the
@@ -306,7 +299,9 @@ def _build_side_runner(main_state: _Session, side_state: _Session, question: str
306
299
  def factory(ask_user, emit):
307
300
  async def gen():
308
301
  from services.claude_runtime import ask_side_question
309
- context = sessions_service.session_context(main_state.cwd, main_state.session_id or "")
302
+ context = await asyncio.to_thread(
303
+ sessions_service.session_context, main_state.cwd, main_state.session_id or ""
304
+ )
310
305
  async for ev in ask_side_question(
311
306
  question, context, resume_id,
312
307
  partial=settings_store.get("streaming"),
@@ -317,6 +312,7 @@ def _build_side_runner(main_state: _Session, side_state: _Session, question: str
317
312
  emit=emit,
318
313
  capabilities=capabilities,
319
314
  locale=main_state.locale,
315
+ channel=channel,
320
316
  session_info=lambda: {
321
317
  "session_id": side_state.session_id,
322
318
  "cwd": str(paths.AI_WORKDIR),
@@ -375,15 +371,12 @@ async def _send_mod_reply(send, session, rid: int, work):
375
371
 
376
372
  @router.websocket("/chat/ws")
377
373
  async def chat_ws(ws: WebSocket):
378
- if not ws_bearer_ok(ws):
379
- # Close before accept() so the handshake is rejected at the HTTP layer.
380
- await ws.close(code=1008)
374
+ if not await accept_authorized(ws):
381
375
  return
382
- await ws.accept()
383
376
  send_lock = asyncio.Lock()
384
- session = None # main lane
385
- side_session = None # quick-chat lane
386
- bg_tasks: set = set() # keep refs so fire-and-forget tasks aren't GC'd mid-run
377
+ session = None
378
+ side_session = None
379
+ bg_tasks: set = set()
387
380
 
388
381
  async def send(payload: dict):
389
382
  async with send_lock:
@@ -453,6 +446,7 @@ async def chat_ws(ws: WebSocket):
453
446
  session.state.locale = msg.locale or session.state.locale
454
447
  if previous is not None and previous is not session:
455
448
  await previous.detach(sink)
449
+ committed = await asyncio.to_thread(_committed_index, session, seen["prefs"]) if by_session else None
456
450
  await send({
457
451
  "type": "ready",
458
452
  "session_id": session.state.session_id,
@@ -464,7 +458,7 @@ async def chat_ws(ws: WebSocket):
464
458
  "activity": session.activity,
465
459
  "resident": session.resident_alive,
466
460
  "resumed": bool(by_session),
467
- "committed_count": _committed_index(session, seen["prefs"]) if by_session else None,
461
+ "committed_count": committed,
468
462
  "queued": session.queued_items(),
469
463
  "agent": session.state.agent,
470
464
  })
@@ -478,7 +472,8 @@ async def chat_ws(ws: WebSocket):
478
472
  if not session.running and session.agent.todos:
479
473
  await send({"type": "todos", "items": session.agent.todos})
480
474
  elif not session.running and session.state.session_id:
481
- tasks = sessions_service.session_tasks(
475
+ tasks = await asyncio.to_thread(
476
+ sessions_service.session_tasks,
482
477
  session.state.session_id,
483
478
  sessions_service.project_key_for(session.state.cwd or ""),
484
479
  )
@@ -648,9 +643,10 @@ async def chat_ws(ws: WebSocket):
648
643
  side_state = _Session()
649
644
  side_state.cwd = session.state.cwd
650
645
  side_state.session_id = resume_id
646
+ side_state.side_of = session.channel
651
647
  side_session = registry.create(side_state)
652
648
  await side_session.attach(send)
653
- if not side_session.start(_build_side_runner(session.state, side_session.state, question, resume_id, seen["capabilities"])):
649
+ if not side_session.start(_build_side_runner(session.state, side_session.state, question, resume_id, seen["capabilities"], side_session.channel)):
654
650
  await send({"type": "error", "message": "busy: a side question is already running", "channel": side_session.channel})
655
651
 
656
652
  elif mtype == "usage":
@@ -714,7 +710,7 @@ async def chat_ws(ws: WebSocket):
714
710
  if session is not None and session.agent is not None and sid == session.agent.session_id:
715
711
  items = visible_rows(session.agent.rows, seen["prefs"])
716
712
  else:
717
- items = sessions_service.get_session_messages(project, sid, seen["prefs"])
713
+ items = await asyncio.to_thread(sessions_service.get_session_messages, project, sid, seen["prefs"])
718
714
  except ValueError as exc:
719
715
  await send({"type": "error", "message": str(exc)})
720
716
  continue
@@ -743,7 +739,6 @@ async def chat_ws(ws: WebSocket):
743
739
  except Exception as exc:
744
740
  logger.error(f"chat_ws error: {type(exc).__name__}: {exc}")
745
741
  finally:
746
- # Detach only — the workers keep running so a reconnect can re-attach.
747
742
  if session is not None:
748
743
  await session.detach(sink)
749
744
  if side_session is not None:
@@ -30,8 +30,8 @@ class PromptBody(BaseModel):
30
30
 
31
31
 
32
32
  class PluginActionBody(BaseModel):
33
- action: str # install | uninstall | enable | disable | update
34
- plugin: str # name@marketplace
33
+ action: str
34
+ plugin: str
35
35
 
36
36
 
37
37
  class PluginOptionsBody(BaseModel):
@@ -54,8 +54,8 @@ class SkillInstallBody(BaseModel):
54
54
 
55
55
 
56
56
  class MarketplaceActionBody(BaseModel):
57
- action: str # add | remove | update
58
- target: str # source for add, name otherwise
57
+ action: str
58
+ target: str
59
59
 
60
60
 
61
61
  class McpAddBody(BaseModel):
@@ -11,8 +11,7 @@ import asyncio
11
11
  from fastapi import APIRouter, WebSocket, WebSocketDisconnect
12
12
  from loguru import logger
13
13
 
14
- from core.ws import send_event
15
- from middleware.public_auth import ws_bearer_ok
14
+ from core.ws import accept_authorized, send_event
16
15
  from services.chat_list import hub
17
16
 
18
17
  router = APIRouter(tags=["List"])
@@ -20,10 +19,8 @@ router = APIRouter(tags=["List"])
20
19
 
21
20
  @router.websocket("/list/ws")
22
21
  async def list_ws(ws: WebSocket):
23
- if not ws_bearer_ok(ws):
24
- await ws.close(code=1008)
22
+ if not await accept_authorized(ws):
25
23
  return
26
- await ws.accept()
27
24
  queue = hub.subscribe()
28
25
 
29
26
  async def pump():
@@ -5,8 +5,7 @@ import asyncio
5
5
  from fastapi import APIRouter, WebSocket, WebSocketDisconnect
6
6
 
7
7
  from core.responses import api_response
8
- from core.ws import send_event
9
- from middleware.public_auth import ws_bearer_ok
8
+ from core.ws import accept_authorized, send_event
10
9
  from schemas.network import SudoRequest, WifiConnectRequest, InterfaceRequest, RadioRequest
11
10
  from services import network, speedtest
12
11
 
@@ -82,10 +81,8 @@ async def get_job(job_id: str):
82
81
 
83
82
  @router.websocket("/network/speedtest/ws")
84
83
  async def speedtest_ws(ws: WebSocket):
85
- if not ws_bearer_ok(ws):
86
- await ws.close(code=1008)
84
+ if not await accept_authorized(ws):
87
85
  return
88
- await ws.accept()
89
86
  try:
90
87
  async for event in speedtest.run():
91
88
  await send_event(ws, event)
@@ -10,8 +10,7 @@ from loguru import logger
10
10
 
11
11
  from core.access import key_matches
12
12
  from core.responses import api_response, file_response
13
- from core.ws import send_event
14
- from middleware.public_auth import ws_bearer_ok
13
+ from core.ws import accept_authorized, send_event
15
14
  from services import project_files, project_watch
16
15
 
17
16
  router = APIRouter()
@@ -54,10 +53,8 @@ def project_diff(project_key: str, path: str):
54
53
 
55
54
  @router.websocket("/projects/ws")
56
55
  async def projects_ws(ws: WebSocket):
57
- if not ws_bearer_ok(ws):
58
- await ws.close(code=1008)
56
+ if not await accept_authorized(ws):
59
57
  return
60
- await ws.accept()
61
58
  queue = project_watch.hub.subscribe()
62
59
 
63
60
  async def pump():
@@ -278,7 +278,7 @@ class RewindBody(BaseModel):
278
278
  project: str
279
279
  user_message_id: str
280
280
  rewind_id: str
281
- mode: str # "both" (code + conversation) | "conversation"
281
+ mode: str
282
282
 
283
283
 
284
284
  def _session_cwd(project: str, session_id: str) -> str:
@@ -9,8 +9,7 @@ from core import paths
9
9
  from core.access import key_matches
10
10
  from core.config import RESTART_EXIT_CODE
11
11
  from core.responses import api_response
12
- from core.ws import send_event
13
- from middleware.public_auth import ws_bearer_ok
12
+ from core.ws import accept_authorized, send_event
14
13
  from services import directories, live_sessions, processes, repo, system_monitor, system_watch
15
14
 
16
15
  router = APIRouter(tags=["system"])
@@ -85,10 +84,8 @@ def list_dirs(
85
84
 
86
85
  @router.websocket("/system/ws")
87
86
  async def system_ws(ws: WebSocket):
88
- if not ws_bearer_ok(ws):
89
- await ws.close(code=1008)
87
+ if not await accept_authorized(ws):
90
88
  return
91
- await ws.accept()
92
89
  queue = system_watch.hub.subscribe()
93
90
  try:
94
91
  while True: