cconnect 2.0.3__tar.gz → 2.0.5__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 (201) hide show
  1. {cconnect-2.0.3 → cconnect-2.0.5}/PKG-INFO +1 -1
  2. {cconnect-2.0.3 → cconnect-2.0.5}/cconnect.egg-info/PKG-INFO +1 -1
  3. {cconnect-2.0.3 → cconnect-2.0.5}/cconnect.egg-info/SOURCES.txt +10 -1
  4. {cconnect-2.0.3 → cconnect-2.0.5}/core/app.py +4 -2
  5. {cconnect-2.0.3 → cconnect-2.0.5}/core/cli.py +88 -10
  6. {cconnect-2.0.3 → cconnect-2.0.5}/core/packages.py +12 -2
  7. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect/themes/cconnect-dark.json +4 -1
  8. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect/themes/cconnect-light.json +4 -1
  9. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/catppuccin-latte.json +4 -1
  10. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +4 -1
  11. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/claude-dark.json +4 -1
  12. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/claude-light.json +4 -1
  13. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/dracula.json +4 -1
  14. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/github-dark-hc.json +4 -1
  15. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/github-dark.json +4 -1
  16. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/github-dimmed.json +4 -1
  17. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/github-light-hc.json +4 -1
  18. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/github-light.json +4 -1
  19. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/gruvbox-dark.json +4 -1
  20. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/nord.json +4 -1
  21. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/one-dark.json +4 -1
  22. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/rose-pine.json +4 -1
  23. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/solarized-dark.json +4 -1
  24. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/solarized-light.json +4 -1
  25. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/tokyo-night.json +4 -1
  26. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +4 -1
  27. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +4 -1
  28. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/vscode-hc-dark.json +4 -1
  29. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/vscode-hc-light.json +4 -1
  30. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/vscode-light-modern.json +4 -1
  31. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/themes/vscode-light-plus.json +4 -1
  32. cconnect-2.0.5/core/packs/schema.json +115 -0
  33. {cconnect-2.0.3 → cconnect-2.0.5}/core/paths.py +4 -0
  34. cconnect-2.0.5/core/process_job.py +89 -0
  35. {cconnect-2.0.3 → cconnect-2.0.5}/core/release.py +2 -2
  36. {cconnect-2.0.3 → cconnect-2.0.5}/core/settings_defs.py +2 -2
  37. cconnect-2.0.5/core/slugs.py +12 -0
  38. {cconnect-2.0.3 → cconnect-2.0.5}/core/ws.py +8 -3
  39. cconnect-2.0.5/mcps/delegate.py +336 -0
  40. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/packs.py +6 -1
  41. {cconnect-2.0.3 → cconnect-2.0.5}/routers/accounts.py +9 -1
  42. cconnect-2.0.5/routers/agents.py +249 -0
  43. {cconnect-2.0.3 → cconnect-2.0.5}/routers/chat.py +77 -7
  44. {cconnect-2.0.3 → cconnect-2.0.5}/routers/sessions.py +4 -2
  45. {cconnect-2.0.3 → cconnect-2.0.5}/routers/system.py +2 -1
  46. {cconnect-2.0.3 → cconnect-2.0.5}/schemas/accounts.py +5 -0
  47. {cconnect-2.0.3 → cconnect-2.0.5}/schemas/chat.py +12 -0
  48. {cconnect-2.0.3 → cconnect-2.0.5}/services/accounts.py +18 -3
  49. cconnect-2.0.5/services/acp_events.py +350 -0
  50. cconnect-2.0.5/services/acp_peer.py +128 -0
  51. cconnect-2.0.5/services/agent_connections.py +290 -0
  52. cconnect-2.0.5/services/agent_registry.py +84 -0
  53. cconnect-2.0.5/services/agent_sessions.py +804 -0
  54. cconnect-2.0.5/services/agents.py +401 -0
  55. {cconnect-2.0.3 → cconnect-2.0.5}/services/attachments.py +2 -2
  56. {cconnect-2.0.3 → cconnect-2.0.5}/services/chat_list.py +10 -2
  57. {cconnect-2.0.3 → cconnect-2.0.5}/services/claude_runtime.py +30 -6
  58. {cconnect-2.0.3 → cconnect-2.0.5}/services/delegate_runner.py +81 -168
  59. cconnect-2.0.5/services/delegate_runs.py +67 -0
  60. cconnect-2.0.5/services/delegates.py +103 -0
  61. cconnect-2.0.5/services/event_rows.py +89 -0
  62. {cconnect-2.0.3 → cconnect-2.0.5}/services/live_sessions.py +81 -13
  63. {cconnect-2.0.3 → cconnect-2.0.5}/services/pack_format.py +7 -12
  64. {cconnect-2.0.3 → cconnect-2.0.5}/services/persistent_sessions.py +2 -7
  65. {cconnect-2.0.3 → cconnect-2.0.5}/services/repo.py +9 -7
  66. {cconnect-2.0.3 → cconnect-2.0.5}/services/sessions.py +35 -13
  67. {cconnect-2.0.3 → cconnect-2.0.5}/services/terminal.py +42 -10
  68. {cconnect-2.0.3 → cconnect-2.0.5}/services/visibility.py +6 -0
  69. cconnect-2.0.3/core/packs/schema.json +0 -79
  70. cconnect-2.0.3/mcps/delegate.py +0 -234
  71. cconnect-2.0.3/routers/delegates.py +0 -24
  72. cconnect-2.0.3/services/delegate_runs.py +0 -113
  73. cconnect-2.0.3/services/delegates.py +0 -130
  74. {cconnect-2.0.3 → cconnect-2.0.5}/cconnect.egg-info/dependency_links.txt +0 -0
  75. {cconnect-2.0.3 → cconnect-2.0.5}/cconnect.egg-info/entry_points.txt +0 -0
  76. {cconnect-2.0.3 → cconnect-2.0.5}/cconnect.egg-info/requires.txt +0 -0
  77. {cconnect-2.0.3 → cconnect-2.0.5}/cconnect.egg-info/top_level.txt +0 -0
  78. {cconnect-2.0.3 → cconnect-2.0.5}/core/__init__.py +0 -0
  79. {cconnect-2.0.3 → cconnect-2.0.5}/core/access.py +0 -0
  80. {cconnect-2.0.3 → cconnect-2.0.5}/core/cli_manager.py +0 -0
  81. {cconnect-2.0.3 → cconnect-2.0.5}/core/config.py +0 -0
  82. {cconnect-2.0.3 → cconnect-2.0.5}/core/data_migration.py +0 -0
  83. {cconnect-2.0.3 → cconnect-2.0.5}/core/db.py +0 -0
  84. {cconnect-2.0.3 → cconnect-2.0.5}/core/display.py +0 -0
  85. {cconnect-2.0.3 → cconnect-2.0.5}/core/models.py +0 -0
  86. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/builtin.json +0 -0
  87. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect/accents.json +0 -0
  88. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect/pack.json +0 -0
  89. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect/terminal/black.json +0 -0
  90. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
  91. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
  92. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/pack.json +0 -0
  93. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
  94. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
  95. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
  96. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
  97. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
  98. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
  99. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
  100. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
  101. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
  102. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
  103. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
  104. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
  105. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
  106. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
  107. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
  108. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/nord.json +0 -0
  109. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
  110. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
  111. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
  112. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
  113. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
  114. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
  115. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
  116. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
  117. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
  118. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
  119. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
  120. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
  121. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
  122. {cconnect-2.0.3 → cconnect-2.0.5}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
  123. {cconnect-2.0.3 → cconnect-2.0.5}/core/prompts/BLOCKS.md +0 -0
  124. {cconnect-2.0.3 → cconnect-2.0.5}/core/prompts/BROWSER.md +0 -0
  125. {cconnect-2.0.3 → cconnect-2.0.5}/core/prompts/CCONNECT.md +0 -0
  126. {cconnect-2.0.3 → cconnect-2.0.5}/core/prompts/COMMIT.md +0 -0
  127. {cconnect-2.0.3 → cconnect-2.0.5}/core/prompts/MODS.md +0 -0
  128. {cconnect-2.0.3 → cconnect-2.0.5}/core/prompts/SUGGESTIONS.md +0 -0
  129. {cconnect-2.0.3 → cconnect-2.0.5}/core/rate_limit.py +0 -0
  130. {cconnect-2.0.3 → cconnect-2.0.5}/core/responses.py +0 -0
  131. {cconnect-2.0.3 → cconnect-2.0.5}/core/scripts/page_icon.js +0 -0
  132. {cconnect-2.0.3 → cconnect-2.0.5}/core/sdk.py +0 -0
  133. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/__init__.py +0 -0
  134. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/browser.py +0 -0
  135. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/check_progress.py +0 -0
  136. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/components.py +0 -0
  137. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/media.py +0 -0
  138. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/session.py +0 -0
  139. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/shared_files.py +0 -0
  140. {cconnect-2.0.3 → cconnect-2.0.5}/mcps/terminal.py +0 -0
  141. {cconnect-2.0.3 → cconnect-2.0.5}/middleware/__init__.py +0 -0
  142. {cconnect-2.0.3 → cconnect-2.0.5}/middleware/error_handler.py +0 -0
  143. {cconnect-2.0.3 → cconnect-2.0.5}/middleware/public_auth.py +0 -0
  144. {cconnect-2.0.3 → cconnect-2.0.5}/middleware/security.py +0 -0
  145. {cconnect-2.0.3 → cconnect-2.0.5}/pyproject.toml +0 -0
  146. {cconnect-2.0.3 → cconnect-2.0.5}/routers/__init__.py +0 -0
  147. {cconnect-2.0.3 → cconnect-2.0.5}/routers/browser.py +0 -0
  148. {cconnect-2.0.3 → cconnect-2.0.5}/routers/capabilities.py +0 -0
  149. {cconnect-2.0.3 → cconnect-2.0.5}/routers/claude.py +0 -0
  150. {cconnect-2.0.3 → cconnect-2.0.5}/routers/cli.py +0 -0
  151. {cconnect-2.0.3 → cconnect-2.0.5}/routers/git.py +0 -0
  152. {cconnect-2.0.3 → cconnect-2.0.5}/routers/health.py +0 -0
  153. {cconnect-2.0.3 → cconnect-2.0.5}/routers/list.py +0 -0
  154. {cconnect-2.0.3 → cconnect-2.0.5}/routers/network.py +0 -0
  155. {cconnect-2.0.3 → cconnect-2.0.5}/routers/packs.py +0 -0
  156. {cconnect-2.0.3 → cconnect-2.0.5}/routers/projects.py +0 -0
  157. {cconnect-2.0.3 → cconnect-2.0.5}/routers/settings.py +0 -0
  158. {cconnect-2.0.3 → cconnect-2.0.5}/routers/shared.py +0 -0
  159. {cconnect-2.0.3 → cconnect-2.0.5}/routers/terminal.py +0 -0
  160. {cconnect-2.0.3 → cconnect-2.0.5}/schemas/__init__.py +0 -0
  161. {cconnect-2.0.3 → cconnect-2.0.5}/schemas/network.py +0 -0
  162. {cconnect-2.0.3 → cconnect-2.0.5}/services/__init__.py +0 -0
  163. {cconnect-2.0.3 → cconnect-2.0.5}/services/account_login.py +0 -0
  164. {cconnect-2.0.3 → cconnect-2.0.5}/services/api_errors.py +0 -0
  165. {cconnect-2.0.3 → cconnect-2.0.5}/services/blocks.py +0 -0
  166. {cconnect-2.0.3 → cconnect-2.0.5}/services/browser.py +0 -0
  167. {cconnect-2.0.3 → cconnect-2.0.5}/services/categories.py +0 -0
  168. {cconnect-2.0.3 → cconnect-2.0.5}/services/claude_assets.py +0 -0
  169. {cconnect-2.0.3 → cconnect-2.0.5}/services/claude_manage.py +0 -0
  170. {cconnect-2.0.3 → cconnect-2.0.5}/services/claude_status.py +0 -0
  171. {cconnect-2.0.3 → cconnect-2.0.5}/services/cli_info.py +0 -0
  172. {cconnect-2.0.3 → cconnect-2.0.5}/services/cli_settings.py +0 -0
  173. {cconnect-2.0.3 → cconnect-2.0.5}/services/diffs.py +0 -0
  174. {cconnect-2.0.3 → cconnect-2.0.5}/services/directories.py +0 -0
  175. {cconnect-2.0.3 → cconnect-2.0.5}/services/directory_watch.py +0 -0
  176. {cconnect-2.0.3 → cconnect-2.0.5}/services/files.py +0 -0
  177. {cconnect-2.0.3 → cconnect-2.0.5}/services/git.py +0 -0
  178. {cconnect-2.0.3 → cconnect-2.0.5}/services/git_ops.py +0 -0
  179. {cconnect-2.0.3 → cconnect-2.0.5}/services/mods.py +0 -0
  180. {cconnect-2.0.3 → cconnect-2.0.5}/services/network.py +0 -0
  181. {cconnect-2.0.3 → cconnect-2.0.5}/services/packs.py +0 -0
  182. {cconnect-2.0.3 → cconnect-2.0.5}/services/project_files.py +0 -0
  183. {cconnect-2.0.3 → cconnect-2.0.5}/services/project_watch.py +0 -0
  184. {cconnect-2.0.3 → cconnect-2.0.5}/services/projects.py +0 -0
  185. {cconnect-2.0.3 → cconnect-2.0.5}/services/prompt_cache.py +0 -0
  186. {cconnect-2.0.3 → cconnect-2.0.5}/services/providers.py +0 -0
  187. {cconnect-2.0.3 → cconnect-2.0.5}/services/questions.py +0 -0
  188. {cconnect-2.0.3 → cconnect-2.0.5}/services/rewind.py +0 -0
  189. {cconnect-2.0.3 → cconnect-2.0.5}/services/settings_store.py +0 -0
  190. {cconnect-2.0.3 → cconnect-2.0.5}/services/shared.py +0 -0
  191. {cconnect-2.0.3 → cconnect-2.0.5}/services/shared_links.py +0 -0
  192. {cconnect-2.0.3 → cconnect-2.0.5}/services/shared_watch.py +0 -0
  193. {cconnect-2.0.3 → cconnect-2.0.5}/services/speedtest.py +0 -0
  194. {cconnect-2.0.3 → cconnect-2.0.5}/services/system_monitor.py +0 -0
  195. {cconnect-2.0.3 → cconnect-2.0.5}/services/system_watch.py +0 -0
  196. {cconnect-2.0.3 → cconnect-2.0.5}/services/todos.py +0 -0
  197. {cconnect-2.0.3 → cconnect-2.0.5}/services/tool_calls.py +0 -0
  198. {cconnect-2.0.3 → cconnect-2.0.5}/services/tool_props.py +0 -0
  199. {cconnect-2.0.3 → cconnect-2.0.5}/services/trash.py +0 -0
  200. {cconnect-2.0.3 → cconnect-2.0.5}/services/usage.py +0 -0
  201. {cconnect-2.0.3 → cconnect-2.0.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cconnect
3
- Version: 2.0.3
3
+ Version: 2.0.5
4
4
  Summary: Remote bridge between the CConnect client and Claude Code
5
5
  Author: jahirtrap
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cconnect
3
- Version: 2.0.3
3
+ Version: 2.0.5
4
4
  Summary: Remote bridge between the CConnect client and Claude Code
5
5
  Author: jahirtrap
6
6
  License-Expression: MIT
@@ -17,11 +17,13 @@ core/display.py
17
17
  core/models.py
18
18
  core/packages.py
19
19
  core/paths.py
20
+ core/process_job.py
20
21
  core/rate_limit.py
21
22
  core/release.py
22
23
  core/responses.py
23
24
  core/sdk.py
24
25
  core/settings_defs.py
26
+ core/slugs.py
25
27
  core/ws.py
26
28
  core/packs/builtin.json
27
29
  core/packs/schema.json
@@ -109,12 +111,12 @@ middleware/public_auth.py
109
111
  middleware/security.py
110
112
  routers/__init__.py
111
113
  routers/accounts.py
114
+ routers/agents.py
112
115
  routers/browser.py
113
116
  routers/capabilities.py
114
117
  routers/chat.py
115
118
  routers/claude.py
116
119
  routers/cli.py
117
- routers/delegates.py
118
120
  routers/git.py
119
121
  routers/health.py
120
122
  routers/list.py
@@ -133,6 +135,12 @@ schemas/network.py
133
135
  services/__init__.py
134
136
  services/account_login.py
135
137
  services/accounts.py
138
+ services/acp_events.py
139
+ services/acp_peer.py
140
+ services/agent_connections.py
141
+ services/agent_registry.py
142
+ services/agent_sessions.py
143
+ services/agents.py
136
144
  services/api_errors.py
137
145
  services/attachments.py
138
146
  services/blocks.py
@@ -151,6 +159,7 @@ services/delegates.py
151
159
  services/diffs.py
152
160
  services/directories.py
153
161
  services/directory_watch.py
162
+ services/event_rows.py
154
163
  services/files.py
155
164
  services/git.py
156
165
  services/git_ops.py
@@ -31,6 +31,8 @@ async def lifespan(app: FastAPI):
31
31
  init_db()
32
32
  settings_store.load()
33
33
  cli_settings.migrate()
34
+ from services import delegates
35
+ delegates.migrate()
34
36
  from services import accounts
35
37
  await asyncio.to_thread(accounts.link_all_shared_dirs)
36
38
  paths.RUNTIME_FILE.write_text(f"PORT={PORT}\nPID={os.getpid()}\n", encoding="utf-8")
@@ -55,8 +57,8 @@ async def lifespan(app: FastAPI):
55
57
  project_watch.hub.stop()
56
58
  system_watch.hub.stop()
57
59
  network.watchdog.stop()
58
- from services import persistent_sessions
59
- await persistent_sessions.pool.close_all()
60
+ from services import live_sessions
61
+ await live_sessions.close_processes()
60
62
  paths.RUNTIME_FILE.unlink(missing_ok=True)
61
63
 
62
64
 
@@ -13,16 +13,18 @@ import shutil
13
13
  import socket
14
14
  import subprocess
15
15
  import sys
16
+ import time
16
17
  from contextlib import suppress
18
+ from datetime import datetime
17
19
  from pathlib import Path
18
20
  from urllib.parse import urlparse
19
21
 
20
22
  import psutil
21
23
  import qrcode
22
24
 
23
- from core import data_migration, paths, release
25
+ from core import cli_manager, data_migration, paths, release, sdk
24
26
  from core.config import PORT, RESTART_EXIT_CODE
25
- from services import repo, system_monitor
27
+ from services import agent_registry, repo, system_monitor
26
28
 
27
29
  _ENV_PATH = paths.ENV_FILE
28
30
  _TOKEN_VAR = "PUBLIC_ACCESS_TOKEN"
@@ -34,7 +36,8 @@ _STOP_TIMEOUT = 10
34
36
  _POLL_SECONDS = 0.5
35
37
  _MODULE = "core.cli"
36
38
  _APP = "core.app:app"
37
- _COMMANDS = ("run", "expose", "stop", "status", "update", "migrate", "key")
39
+ _COMMANDS = ("run", "expose", "stop", "restart", "status", "logs", "doctor", "update", "migrate", "key")
40
+ _TOP_FLAGS = ("-h", "--help", "-v", "--version")
38
41
 
39
42
 
40
43
  def _abort(msg: str) -> None:
@@ -408,21 +411,23 @@ def _flag_parser() -> argparse.ArgumentParser:
408
411
  f"{_HOSTNAME_VAR}, then to <user>-<ip>.sslip.io.")
409
412
  parser.add_argument("--detach", action="store_true",
410
413
  help="Run in the background and return; the server outlives the terminal.")
414
+ parser.add_argument("--port", type=int, default=None, help=f"Port to serve on instead of {PORT}.")
411
415
  parser.add_argument("--stop", action="store_true",
412
416
  help="Stop a backend previously started with --detach.")
413
417
  parser.add_argument("--security-key", action="store_true",
414
418
  help="Print the key that unlocks the terminal and ignored files, generating it the first time.")
415
419
  parser.add_argument("--rotate", action="store_true",
416
420
  help="With --security-key, replace the existing key instead of printing it.")
417
- parser.set_defaults(command="", source="", force=False, json=False)
421
+ parser.set_defaults(command="", source="", force=False, json=False, follow=False)
418
422
  return parser
419
423
 
420
424
 
421
425
  def _command_parser() -> argparse.ArgumentParser:
422
426
  parser = argparse.ArgumentParser(prog="cconnect", description="CConnect backend.")
427
+ parser.add_argument("-v", "--version", action="version", version=f"cconnect {release.VERSION}")
423
428
  parser.set_defaults(
424
- production=False, expose="", public_host="", detach=False,
425
- security_key=False, rotate=False, source="", force=False, json=False,
429
+ production=False, expose="", public_host="", detach=False, port=None,
430
+ security_key=False, rotate=False, source="", force=False, json=False, follow=False,
426
431
  )
427
432
  commands = parser.add_subparsers(dest="command")
428
433
 
@@ -431,6 +436,7 @@ def _command_parser() -> argparse.ArgumentParser:
431
436
  help="No reload, multi-worker (Linux/macOS only).")
432
437
  run.add_argument("--detach", action="store_true",
433
438
  help="Run in the background; the server outlives the terminal.")
439
+ run.add_argument("--port", type=int, default=None, help=f"Port to serve on instead of {PORT}.")
434
440
 
435
441
  expose = commands.add_parser("expose", help="Serve over the internet, token-gated.")
436
442
  expose.add_argument("provider", choices=list(_PROVIDERS))
@@ -441,12 +447,20 @@ def _command_parser() -> argparse.ArgumentParser:
441
447
  help="Run in the background; the server outlives the terminal.")
442
448
  expose.add_argument("--production", action="store_true",
443
449
  help="No reload, multi-worker (Linux/macOS only).")
450
+ expose.add_argument("--port", type=int, default=None, help=f"Port to serve on instead of {PORT}.")
444
451
 
445
452
  commands.add_parser("stop", help="Stop a backend started with --detach.")
446
453
 
454
+ commands.add_parser("restart", help="Restart the backend that is running.")
455
+
447
456
  status = commands.add_parser("status", help="Version, where the data lives and what is running.")
448
457
  status.add_argument("--json", action="store_true", help="Print it as JSON, for other programs.")
449
458
 
459
+ logs = commands.add_parser("logs", help="Print the server log.")
460
+ logs.add_argument("-f", "--follow", action="store_true", help="Keep printing new entries as they arrive.")
461
+
462
+ commands.add_parser("doctor", help="Check what the backend needs on this machine.")
463
+
450
464
  commands.add_parser("update", help="Upgrade this install to the latest release.")
451
465
 
452
466
  migrate = commands.add_parser("migrate", help="Copy a previous data folder into this one.")
@@ -462,7 +476,7 @@ def _command_parser() -> argparse.ArgumentParser:
462
476
 
463
477
 
464
478
  def _parse(argv: list[str]) -> argparse.Namespace:
465
- legacy = bool(argv) and argv[0].startswith("-") and argv[0] not in ("-h", "--help")
479
+ legacy = bool(argv) and argv[0].startswith("-") and argv[0] not in _TOP_FLAGS
466
480
  if legacy:
467
481
  args = _flag_parser().parse_args(argv)
468
482
  args.command = "key" if args.security_key else "stop" if args.stop else "run"
@@ -511,6 +525,56 @@ def _print_status(as_json: bool) -> None:
511
525
  _print_rows(rows)
512
526
 
513
527
 
528
+ def _print_entries(page: dict) -> int:
529
+ for entry in page["items"]:
530
+ stamp = datetime.fromtimestamp(entry["ts"]).strftime("%H:%M:%S")
531
+ print(f"{stamp} {entry['level']:<8} {entry['message']}", flush=True)
532
+ return page["offset"]
533
+
534
+
535
+ def _print_logs(follow: bool) -> None:
536
+ offset = _print_entries(system_monitor.logs())
537
+ with suppress(KeyboardInterrupt):
538
+ while follow:
539
+ time.sleep(_POLL_SECONDS)
540
+ offset = _print_entries(system_monitor.logs(offset))
541
+
542
+
543
+ def _restart() -> None:
544
+ live = _runtime()
545
+ if not live:
546
+ _abort("No backend is running.")
547
+ paths.RESTART_FLAG.touch()
548
+ print(f"Restarting the backend (pid {live['PID']}).")
549
+
550
+
551
+ def _port_state(port: int) -> str:
552
+ live = _runtime()
553
+ if live and int(live.get("PORT") or 0) == port:
554
+ return f"{port}, this backend (pid {live['PID']})"
555
+ with socket.socket() as probe:
556
+ probe.settimeout(1)
557
+ taken = probe.connect_ex(("127.0.0.1", port)) == 0
558
+ return f"{port}, taken by another program" if taken else f"{port}, free"
559
+
560
+
561
+ def _doctor(port: int) -> None:
562
+ system = cli_manager.system_cli()
563
+ tools = agent_registry.node_tools()
564
+ tailscale = (_tailscale_status().get("BackendState") or "installed, not running") if shutil.which("tailscale") else None
565
+ _print_rows([
566
+ ("Version", release.VERSION),
567
+ ("Data", str(paths.DATA_DIR)),
568
+ ("Claude CLI", f"{system} ({cli_manager.cli_version(system) or 'version unknown'})" if system else "not on PATH"),
569
+ ("Bundled CLI", cli_manager.bundled_version() or "missing"),
570
+ ("Agent SDK", sdk.installed_version() or "missing"),
571
+ ("Node.js", " and ".join(tools) if tools else "node or npm missing, agents from npm cannot install"),
572
+ ("Tailscale", tailscale or "not installed"),
573
+ ("Port", _port_state(port)),
574
+ ("Security key", "set" if os.environ.get(_SECURITY_KEY_VAR) else f"not set, run {_invocation()} key"),
575
+ ])
576
+
577
+
514
578
  def _update() -> None:
515
579
  if not paths.INSTALLED:
516
580
  _abort("this is a git checkout, not an installed release: update it with git pull.")
@@ -553,6 +617,8 @@ def _migrate(source: str, force: bool) -> None:
553
617
 
554
618
  def main():
555
619
  args = _parse(sys.argv[1:])
620
+ port = args.port or PORT
621
+ os.environ["PORT"] = str(port)
556
622
 
557
623
  try:
558
624
  moved = data_migration.migrate()
@@ -571,6 +637,18 @@ def main():
571
637
  _print_status(args.json)
572
638
  return
573
639
 
640
+ if args.command == "logs":
641
+ _print_logs(args.follow)
642
+ return
643
+
644
+ if args.command == "doctor":
645
+ _doctor(port)
646
+ return
647
+
648
+ if args.command == "restart":
649
+ _restart()
650
+ return
651
+
574
652
  if args.command == "update":
575
653
  _update()
576
654
  return
@@ -592,7 +670,7 @@ def main():
592
670
  system_monitor.reset_log_file()
593
671
  key_generated = _ensure_security_key()
594
672
  if args.expose:
595
- _expose(args.expose, PORT, args.public_host, keep_running=True, key_generated=key_generated)
673
+ _expose(args.expose, port, args.public_host, keep_running=True, key_generated=key_generated)
596
674
  paths.DETACHED_PROVIDER_FILE.write_text(args.expose, encoding="utf-8")
597
675
  else:
598
676
  _print_security_key(key_generated)
@@ -608,14 +686,14 @@ def main():
608
686
  system_monitor.reset_log_file()
609
687
  key_generated = _ensure_security_key()
610
688
  if args.expose:
611
- _expose(args.expose, PORT, args.public_host, key_generated=key_generated)
689
+ _expose(args.expose, port, args.public_host, key_generated=key_generated)
612
690
  else:
613
691
  _print_security_key(key_generated)
614
692
 
615
693
  reload = not args.production and not is_windows
616
694
  workers = int(os.environ.get("WEB_CONCURRENCY", "2")) if (args.production and not is_windows) else 1
617
695
 
618
- cmd = [sys.executable, "-m", "uvicorn", _APP, "--host", "0.0.0.0", "--port", str(PORT)]
696
+ cmd = [sys.executable, "-m", "uvicorn", _APP, "--host", "0.0.0.0", "--port", str(port)]
619
697
  if reload:
620
698
  cmd += ["--reload", "--reload-exclude", str(paths.DATA_DIR)]
621
699
  elif workers > 1:
@@ -5,6 +5,8 @@ import subprocess
5
5
  import sys
6
6
  from pathlib import Path
7
7
 
8
+ NO_WINDOW = getattr(subprocess, "CREATE_NO_WINDOW", 0)
9
+
8
10
 
9
11
  def uv_tool() -> str:
10
12
  parts = Path(sys.prefix).parts
@@ -27,7 +29,15 @@ def upgrade_command(distribution: str) -> list[str]:
27
29
  return [sys.executable, "-m", "pip", "install", "--upgrade", distribution]
28
30
 
29
31
 
30
- def run(command: list[str], timeout: int) -> subprocess.CompletedProcess:
32
+ def run(command: list[str], timeout: int, cwd: Path | None = None, env: dict[str, str] | None = None) -> subprocess.CompletedProcess:
31
33
  return subprocess.run(
32
- command, capture_output=True, text=True, timeout=timeout, encoding="utf-8", errors="replace"
34
+ command,
35
+ capture_output=True,
36
+ text=True,
37
+ timeout=timeout,
38
+ encoding="utf-8",
39
+ errors="replace",
40
+ cwd=cwd,
41
+ env=env,
42
+ creationflags=NO_WINDOW,
33
43
  )
@@ -31,6 +31,9 @@
31
31
  "orange": "#ffa726",
32
32
  "cyan": "#26c6da",
33
33
  "purple": "#c084fc",
34
- "gray": "#8b949e"
34
+ "gray": "#8b949e",
35
+ "logo": "#1a1a1a",
36
+ "logo-ring": "#3f3f46",
37
+ "logo-mark": "#ededed"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d17a1b",
32
32
  "cyan": "#0e7490",
33
33
  "purple": "#8250df",
34
- "gray": "#656d76"
34
+ "gray": "#656d76",
35
+ "logo": "#1a1a1a",
36
+ "logo-ring": "#3f3f46",
37
+ "logo-mark": "#ededed"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#fe640b",
32
32
  "cyan": "#179299",
33
33
  "purple": "#8839ef",
34
- "gray": "#8c8fa1"
34
+ "gray": "#8c8fa1",
35
+ "logo": "#303446",
36
+ "logo-ring": "#51576d",
37
+ "logo-mark": "#eff1f5"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#fab387",
32
32
  "cyan": "#94e2d5",
33
33
  "purple": "#cba6f7",
34
- "gray": "#7f849c"
34
+ "gray": "#7f849c",
35
+ "logo": "#313244",
36
+ "logo-ring": "#6c7086",
37
+ "logo-mark": "#cdd6f4"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#f18a59",
32
32
  "cyan": "#2bc6a5",
33
33
  "purple": "#a89af0",
34
- "gray": "#878787"
34
+ "gray": "#878787",
35
+ "logo": "#252525",
36
+ "logo-ring": "#ffffff33",
37
+ "logo-mark": "#efefef"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#90370f",
32
32
  "cyan": "#006458",
33
33
  "purple": "#5437b8",
34
- "gray": "#878787"
34
+ "gray": "#878787",
35
+ "logo": "#191919",
36
+ "logo-ring": "#3d3d3d",
37
+ "logo-mark": "#fafafa"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#ffb86c",
32
32
  "cyan": "#8be9fd",
33
33
  "purple": "#bd93f9",
34
- "gray": "#6272a4"
34
+ "gray": "#6272a4",
35
+ "logo": "#44475a",
36
+ "logo-ring": "#6272a4",
37
+ "logo-mark": "#f8f8f2"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#fe9a2d",
32
32
  "cyan": "#39c5cf",
33
33
  "purple": "#d3abff",
34
- "gray": "#d1d7e0"
34
+ "gray": "#d1d7e0",
35
+ "logo": "#262c36",
36
+ "logo-ring": "#b7bdc8",
37
+ "logo-mark": "#ffffff"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#db6d28",
32
32
  "cyan": "#39c5cf",
33
33
  "purple": "#ab7df8",
34
- "gray": "#9198a1"
34
+ "gray": "#9198a1",
35
+ "logo": "#212830",
36
+ "logo-ring": "#3d444d",
37
+ "logo-mark": "#f0f6fc"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#cc6b2c",
32
32
  "cyan": "#39c5cf",
33
33
  "purple": "#986ee2",
34
- "gray": "#9198a1"
34
+ "gray": "#9198a1",
35
+ "logo": "#2a313c",
36
+ "logo-ring": "#3d444d",
37
+ "logo-mark": "#d1d7e0"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#702c00",
32
32
  "cyan": "#1b7c83",
33
33
  "purple": "#5e2bb4",
34
- "gray": "#393f46"
34
+ "gray": "#393f46",
35
+ "logo": "#25292e",
36
+ "logo-ring": "#59636e",
37
+ "logo-mark": "#ffffff"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#bc4c00",
32
32
  "cyan": "#1b7c83",
33
33
  "purple": "#8250df",
34
- "gray": "#59636e"
34
+ "gray": "#59636e",
35
+ "logo": "#25292e",
36
+ "logo-ring": "#454c54",
37
+ "logo-mark": "#ffffff"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#fe8019",
32
32
  "cyan": "#8ec07c",
33
33
  "purple": "#d3869b",
34
- "gray": "#928374"
34
+ "gray": "#928374",
35
+ "logo": "#504945",
36
+ "logo-ring": "#665c54",
37
+ "logo-mark": "#ebdbb2"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d08770",
32
32
  "cyan": "#88c0d0",
33
33
  "purple": "#b48ead",
34
- "gray": "#4c566a"
34
+ "gray": "#4c566a",
35
+ "logo": "#434c5e",
36
+ "logo-ring": "#4c566a",
37
+ "logo-mark": "#d8dee9"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d19a66",
32
32
  "cyan": "#56b6c2",
33
33
  "purple": "#c678dd",
34
- "gray": "#7f848e"
34
+ "gray": "#7f848e",
35
+ "logo": "#1d1f23",
36
+ "logo-ring": "#3e4452",
37
+ "logo-mark": "#abb2bf"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#ebbcba",
32
32
  "cyan": "#ebbcba",
33
33
  "purple": "#c4a7e7",
34
- "gray": "#6e6a86"
34
+ "gray": "#6e6a86",
35
+ "logo": "#26233a",
36
+ "logo-ring": "#524f67",
37
+ "logo-mark": "#e0def4"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#cb4b16",
32
32
  "cyan": "#2aa198",
33
33
  "purple": "#6c71c4",
34
- "gray": "#586e75"
34
+ "gray": "#586e75",
35
+ "logo": "#073642",
36
+ "logo-ring": "#657b83",
37
+ "logo-mark": "#839496"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#cb4b16",
32
32
  "cyan": "#2aa198",
33
33
  "purple": "#6c71c4",
34
- "gray": "#93a1a1"
34
+ "gray": "#93a1a1",
35
+ "logo": "#073642",
36
+ "logo-ring": "#586e75",
37
+ "logo-mark": "#fdf6e3"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#ff9e64",
32
32
  "cyan": "#7dcfff",
33
33
  "purple": "#9d7cd8",
34
- "gray": "#787c99"
34
+ "gray": "#787c99",
35
+ "logo": "#14141b",
36
+ "logo-ring": "#101014",
37
+ "logo-mark": "#a9b1d6"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d18616",
32
32
  "cyan": "#11a8cd",
33
33
  "purple": "#b180d7",
34
- "gray": "#9d9d9d"
34
+ "gray": "#9d9d9d",
35
+ "logo": "#313131",
36
+ "logo-ring": "#454545",
37
+ "logo-mark": "#cccccc"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d18616",
32
32
  "cyan": "#11a8cd",
33
33
  "purple": "#b180d7",
34
- "gray": "#989898"
34
+ "gray": "#989898",
35
+ "logo": "#3c3c3c",
36
+ "logo-ring": "#454545",
37
+ "logo-mark": "#d4d4d4"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#ab5a00",
32
32
  "cyan": "#00cdcd",
33
33
  "purple": "#b180d7",
34
- "gray": "#b3b3b3"
34
+ "gray": "#b3b3b3",
35
+ "logo": "#000000",
36
+ "logo-ring": "#6fc3df",
37
+ "logo-mark": "#ffffff"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#0f4a85",
32
32
  "cyan": "#0598bc",
33
33
  "purple": "#652d90",
34
- "gray": "#696969"
34
+ "gray": "#696969",
35
+ "logo": "#0f4a85",
36
+ "logo-ring": "#4b77a3",
37
+ "logo-mark": "#ffffff"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d18616",
32
32
  "cyan": "#0598bc",
33
33
  "purple": "#652d90",
34
- "gray": "#616161"
34
+ "gray": "#616161",
35
+ "logo": "#1f1f1f",
36
+ "logo-ring": "#3c3c3c",
37
+ "logo-mark": "#f8f8f8"
35
38
  }
36
39
  }
@@ -31,6 +31,9 @@
31
31
  "orange": "#d18616",
32
32
  "cyan": "#0598bc",
33
33
  "purple": "#652d90",
34
- "gray": "#717171"
34
+ "gray": "#717171",
35
+ "logo": "#2c2c2c",
36
+ "logo-ring": "#505050",
37
+ "logo-mark": "#ffffff"
35
38
  }
36
39
  }