cconnect 2.1.3__tar.gz → 2.2.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 (244) hide show
  1. {cconnect-2.1.3 → cconnect-2.2.1}/PKG-INFO +8 -3
  2. {cconnect-2.1.3 → cconnect-2.2.1}/cconnect.egg-info/PKG-INFO +8 -3
  3. {cconnect-2.1.3 → cconnect-2.2.1}/cconnect.egg-info/SOURCES.txt +34 -4
  4. {cconnect-2.1.3 → cconnect-2.2.1}/cconnect.egg-info/requires.txt +6 -1
  5. {cconnect-2.1.3 → cconnect-2.2.1}/core/access.py +9 -1
  6. {cconnect-2.1.3 → cconnect-2.2.1}/core/app.py +7 -8
  7. cconnect-2.2.1/core/capture/manifest.json +9 -0
  8. cconnect-2.2.1/core/capture/offscreen.html +5 -0
  9. cconnect-2.2.1/core/capture/offscreen.js +139 -0
  10. cconnect-2.2.1/core/capture/worker.js +21 -0
  11. {cconnect-2.1.3 → cconnect-2.2.1}/core/cli.py +14 -99
  12. {cconnect-2.1.3 → cconnect-2.2.1}/core/cli_manager.py +1 -1
  13. {cconnect-2.1.3 → cconnect-2.2.1}/core/config.py +2 -0
  14. cconnect-2.2.1/core/databases/engines.json +172 -0
  15. cconnect-2.2.1/core/db.py +85 -0
  16. cconnect-2.2.1/core/migrations/env.py +17 -0
  17. cconnect-2.2.1/core/migrations/script.py.mako +24 -0
  18. cconnect-2.2.1/core/migrations/versions/20261107_7d5d3c3df2d8_baseline.py +89 -0
  19. cconnect-2.2.1/core/migrations/versions/20261107_ba9d242701ac_trash_timestamps.py +46 -0
  20. cconnect-2.2.1/core/migrations/versions/20261107_e27b5df5f03a_server_state.py +136 -0
  21. cconnect-2.2.1/core/migrations/versions/20261108_4c1f0a9e2b7d_mcp_catalogs.py +33 -0
  22. cconnect-2.2.1/core/models.py +430 -0
  23. {cconnect-2.1.3 → cconnect-2.2.1}/core/packages.py +10 -3
  24. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect/themes/cconnect-dark.json +1 -1
  25. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect/themes/cconnect-light.json +3 -3
  26. cconnect-2.2.1/core/packs/cconnect-extras/themes/ayu-dark.json +39 -0
  27. cconnect-2.2.1/core/packs/cconnect-extras/themes/ayu-light.json +39 -0
  28. cconnect-2.2.1/core/packs/cconnect-extras/themes/ayu-mirage.json +39 -0
  29. cconnect-2.2.1/core/packs/cconnect-extras/themes/everforest-dark.json +39 -0
  30. cconnect-2.2.1/core/packs/cconnect-extras/themes/everforest-light.json +39 -0
  31. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/github-dark-hc.json +1 -1
  32. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/github-light-hc.json +1 -1
  33. cconnect-2.2.1/core/packs/cconnect-extras/themes/kanagawa.json +39 -0
  34. cconnect-2.2.1/core/packs/cconnect-extras/themes/monokai.json +39 -0
  35. cconnect-2.2.1/core/packs/cconnect-extras/themes/ubuntu-dark.json +39 -0
  36. cconnect-2.2.1/core/packs/cconnect-extras/themes/ubuntu-light.json +39 -0
  37. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/schema.json +2 -2
  38. {cconnect-2.1.3 → cconnect-2.2.1}/core/paths.py +3 -9
  39. cconnect-2.2.1/core/process_tree.py +30 -0
  40. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/MODS.md +4 -2
  41. cconnect-2.2.1/core/prompts/TOOLS.md +6 -0
  42. {cconnect-2.1.3 → cconnect-2.2.1}/core/release.py +3 -3
  43. cconnect-2.2.1/core/scripts/page_frame.js +39 -0
  44. {cconnect-2.1.3 → cconnect-2.2.1}/core/sdk.py +18 -5
  45. {cconnect-2.1.3 → cconnect-2.2.1}/core/settings_defs.py +3 -1
  46. {cconnect-2.1.3 → cconnect-2.2.1}/core/slugs.py +7 -0
  47. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/__init__.py +67 -18
  48. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/browser.py +35 -42
  49. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/check_progress.py +14 -7
  50. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/components.py +21 -14
  51. cconnect-2.2.1/mcps/databases.py +584 -0
  52. cconnect-2.2.1/mcps/definition.py +20 -0
  53. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/delegate.py +34 -36
  54. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/packs.py +26 -31
  55. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/session.py +89 -83
  56. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/shared_files.py +30 -34
  57. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/terminal.py +60 -72
  58. {cconnect-2.1.3 → cconnect-2.2.1}/middleware/public_auth.py +2 -2
  59. {cconnect-2.1.3 → cconnect-2.2.1}/pyproject.toml +8 -3
  60. {cconnect-2.1.3 → cconnect-2.2.1}/routers/accounts.py +16 -8
  61. {cconnect-2.1.3 → cconnect-2.2.1}/routers/browser.py +40 -3
  62. {cconnect-2.1.3 → cconnect-2.2.1}/routers/capabilities.py +2 -1
  63. {cconnect-2.1.3 → cconnect-2.2.1}/routers/chat.py +56 -22
  64. {cconnect-2.1.3 → cconnect-2.2.1}/routers/claude.py +49 -2
  65. cconnect-2.2.1/routers/databases.py +238 -0
  66. {cconnect-2.1.3 → cconnect-2.2.1}/routers/health.py +5 -0
  67. {cconnect-2.1.3 → cconnect-2.2.1}/routers/packs.py +8 -3
  68. {cconnect-2.1.3 → cconnect-2.2.1}/routers/pages.py +3 -1
  69. {cconnect-2.1.3 → cconnect-2.2.1}/routers/sessions.py +12 -6
  70. {cconnect-2.1.3 → cconnect-2.2.1}/routers/shared.py +17 -7
  71. {cconnect-2.1.3 → cconnect-2.2.1}/schemas/chat.py +3 -1
  72. {cconnect-2.1.3 → cconnect-2.2.1}/schemas/chat_events.py +87 -7
  73. {cconnect-2.1.3 → cconnect-2.2.1}/services/accounts.py +128 -177
  74. {cconnect-2.1.3 → cconnect-2.2.1}/services/acp_events.py +6 -2
  75. {cconnect-2.1.3 → cconnect-2.2.1}/services/agent_sessions.py +43 -51
  76. {cconnect-2.1.3 → cconnect-2.2.1}/services/agents.py +27 -44
  77. {cconnect-2.1.3 → cconnect-2.2.1}/services/attachments.py +23 -4
  78. {cconnect-2.1.3 → cconnect-2.2.1}/services/browser.py +347 -68
  79. {cconnect-2.1.3 → cconnect-2.2.1}/services/claude_assets.py +147 -28
  80. {cconnect-2.1.3 → cconnect-2.2.1}/services/claude_manage.py +33 -37
  81. {cconnect-2.1.3 → cconnect-2.2.1}/services/claude_runtime.py +117 -45
  82. {cconnect-2.1.3 → cconnect-2.2.1}/services/cli_info.py +70 -36
  83. cconnect-2.2.1/services/cli_login.py +242 -0
  84. {cconnect-2.1.3 → cconnect-2.2.1}/services/cli_settings.py +5 -23
  85. cconnect-2.2.1/services/database_data.py +790 -0
  86. cconnect-2.2.1/services/database_engines.py +207 -0
  87. cconnect-2.2.1/services/database_tunnels.py +116 -0
  88. cconnect-2.2.1/services/databases.py +376 -0
  89. {cconnect-2.1.3 → cconnect-2.2.1}/services/delegate_runs.py +26 -26
  90. {cconnect-2.1.3 → cconnect-2.2.1}/services/delegates.py +0 -25
  91. {cconnect-2.1.3 → cconnect-2.2.1}/services/directories.py +3 -1
  92. {cconnect-2.1.3 → cconnect-2.2.1}/services/directory_watch.py +22 -2
  93. {cconnect-2.1.3 → cconnect-2.2.1}/services/event_rows.py +9 -3
  94. {cconnect-2.1.3 → cconnect-2.2.1}/services/git.py +5 -0
  95. {cconnect-2.1.3 → cconnect-2.2.1}/services/git_ops.py +2 -4
  96. cconnect-2.2.1/services/hook_events.py +98 -0
  97. {cconnect-2.1.3 → cconnect-2.2.1}/services/live_sessions.py +88 -17
  98. cconnect-2.2.1/services/mcp_lazy.py +660 -0
  99. cconnect-2.2.1/services/memory_pressure.py +99 -0
  100. {cconnect-2.1.3 → cconnect-2.2.1}/services/network.py +19 -10
  101. {cconnect-2.1.3 → cconnect-2.2.1}/services/pages.py +12 -0
  102. {cconnect-2.1.3 → cconnect-2.2.1}/services/persistent_sessions.py +11 -0
  103. {cconnect-2.1.3 → cconnect-2.2.1}/services/project_files.py +2 -2
  104. {cconnect-2.1.3 → cconnect-2.2.1}/services/project_watch.py +18 -6
  105. {cconnect-2.1.3 → cconnect-2.2.1}/services/repo.py +4 -10
  106. {cconnect-2.1.3 → cconnect-2.2.1}/services/rewind.py +14 -28
  107. {cconnect-2.1.3 → cconnect-2.2.1}/services/sessions.py +205 -68
  108. {cconnect-2.1.3 → cconnect-2.2.1}/services/settings_store.py +1 -0
  109. {cconnect-2.1.3 → cconnect-2.2.1}/services/shared.py +9 -2
  110. {cconnect-2.1.3 → cconnect-2.2.1}/services/system_monitor.py +9 -1
  111. {cconnect-2.1.3 → cconnect-2.2.1}/services/terminal.py +2 -3
  112. cconnect-2.2.1/services/todos.py +49 -0
  113. {cconnect-2.1.3 → cconnect-2.2.1}/services/tool_calls.py +36 -4
  114. {cconnect-2.1.3 → cconnect-2.2.1}/services/tool_props.py +1 -1
  115. {cconnect-2.1.3 → cconnect-2.2.1}/services/trash.py +4 -4
  116. {cconnect-2.1.3 → cconnect-2.2.1}/services/usage.py +10 -0
  117. {cconnect-2.1.3 → cconnect-2.2.1}/services/visibility.py +13 -3
  118. cconnect-2.1.3/core/data_migration.py +0 -145
  119. cconnect-2.1.3/core/db.py +0 -66
  120. cconnect-2.1.3/core/models.py +0 -133
  121. cconnect-2.1.3/core/packs/cconnect-extras/themes/vscode-hc-dark.json +0 -39
  122. cconnect-2.1.3/core/packs/cconnect-extras/themes/vscode-hc-light.json +0 -39
  123. cconnect-2.1.3/services/account_login.py +0 -158
  124. cconnect-2.1.3/services/todos.py +0 -64
  125. {cconnect-2.1.3 → cconnect-2.2.1}/cconnect.egg-info/dependency_links.txt +0 -0
  126. {cconnect-2.1.3 → cconnect-2.2.1}/cconnect.egg-info/entry_points.txt +0 -0
  127. {cconnect-2.1.3 → cconnect-2.2.1}/cconnect.egg-info/top_level.txt +0 -0
  128. {cconnect-2.1.3 → cconnect-2.2.1}/core/__init__.py +0 -0
  129. {cconnect-2.1.3 → cconnect-2.2.1}/core/display.py +0 -0
  130. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/builtin.json +0 -0
  131. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect/accents.json +0 -0
  132. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect/pack.json +0 -0
  133. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect/terminal/black.json +0 -0
  134. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
  135. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
  136. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/pack.json +0 -0
  137. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
  138. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
  139. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
  140. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
  141. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
  142. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
  143. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
  144. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
  145. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
  146. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
  147. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
  148. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
  149. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
  150. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
  151. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
  152. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/nord.json +0 -0
  153. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
  154. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
  155. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
  156. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
  157. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
  158. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
  159. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
  160. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
  161. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
  162. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
  163. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
  164. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
  165. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
  166. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
  167. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
  168. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +0 -0
  169. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/claude-dark.json +0 -0
  170. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/claude-light.json +0 -0
  171. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/dracula.json +0 -0
  172. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/github-dark.json +0 -0
  173. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/github-dimmed.json +0 -0
  174. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/github-light.json +0 -0
  175. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
  176. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/nord.json +0 -0
  177. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/one-dark.json +0 -0
  178. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
  179. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
  180. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
  181. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/tokyo-night.json +0 -0
  182. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
  183. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +0 -0
  184. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/vscode-light-modern.json +0 -0
  185. {cconnect-2.1.3 → cconnect-2.2.1}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
  186. {cconnect-2.1.3 → cconnect-2.2.1}/core/process_job.py +0 -0
  187. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/BLOCKS.md +0 -0
  188. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/BROWSER.md +0 -0
  189. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/CCONNECT.md +0 -0
  190. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/COMMIT.md +0 -0
  191. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/INSTALL.md +0 -0
  192. {cconnect-2.1.3 → cconnect-2.2.1}/core/prompts/SUGGESTIONS.md +0 -0
  193. {cconnect-2.1.3 → cconnect-2.2.1}/core/rate_limit.py +0 -0
  194. {cconnect-2.1.3 → cconnect-2.2.1}/core/responses.py +0 -0
  195. {cconnect-2.1.3 → cconnect-2.2.1}/core/scripts/browse.py +0 -0
  196. {cconnect-2.1.3 → cconnect-2.2.1}/core/scripts/mcp_bridge.py +0 -0
  197. {cconnect-2.1.3 → cconnect-2.2.1}/core/scripts/page_icon.js +0 -0
  198. {cconnect-2.1.3 → cconnect-2.2.1}/core/ws.py +0 -0
  199. {cconnect-2.1.3 → cconnect-2.2.1}/mcps/media.py +0 -0
  200. {cconnect-2.1.3 → cconnect-2.2.1}/middleware/__init__.py +0 -0
  201. {cconnect-2.1.3 → cconnect-2.2.1}/middleware/error_handler.py +0 -0
  202. {cconnect-2.1.3 → cconnect-2.2.1}/middleware/security.py +0 -0
  203. {cconnect-2.1.3 → cconnect-2.2.1}/routers/__init__.py +0 -0
  204. {cconnect-2.1.3 → cconnect-2.2.1}/routers/agents.py +0 -0
  205. {cconnect-2.1.3 → cconnect-2.2.1}/routers/cli.py +0 -0
  206. {cconnect-2.1.3 → cconnect-2.2.1}/routers/git.py +0 -0
  207. {cconnect-2.1.3 → cconnect-2.2.1}/routers/list.py +0 -0
  208. {cconnect-2.1.3 → cconnect-2.2.1}/routers/network.py +0 -0
  209. {cconnect-2.1.3 → cconnect-2.2.1}/routers/projects.py +0 -0
  210. {cconnect-2.1.3 → cconnect-2.2.1}/routers/settings.py +0 -0
  211. {cconnect-2.1.3 → cconnect-2.2.1}/routers/system.py +0 -0
  212. {cconnect-2.1.3 → cconnect-2.2.1}/routers/terminal.py +0 -0
  213. {cconnect-2.1.3 → cconnect-2.2.1}/schemas/__init__.py +0 -0
  214. {cconnect-2.1.3 → cconnect-2.2.1}/schemas/accounts.py +0 -0
  215. {cconnect-2.1.3 → cconnect-2.2.1}/schemas/contract.py +0 -0
  216. {cconnect-2.1.3 → cconnect-2.2.1}/schemas/network.py +0 -0
  217. {cconnect-2.1.3 → cconnect-2.2.1}/services/__init__.py +0 -0
  218. {cconnect-2.1.3 → cconnect-2.2.1}/services/acp_peer.py +0 -0
  219. {cconnect-2.1.3 → cconnect-2.2.1}/services/agent_connections.py +0 -0
  220. {cconnect-2.1.3 → cconnect-2.2.1}/services/agent_mcp.py +0 -0
  221. {cconnect-2.1.3 → cconnect-2.2.1}/services/agent_registry.py +0 -0
  222. {cconnect-2.1.3 → cconnect-2.2.1}/services/api_errors.py +0 -0
  223. {cconnect-2.1.3 → cconnect-2.2.1}/services/blocks.py +0 -0
  224. {cconnect-2.1.3 → cconnect-2.2.1}/services/categories.py +0 -0
  225. {cconnect-2.1.3 → cconnect-2.2.1}/services/chat_list.py +0 -0
  226. {cconnect-2.1.3 → cconnect-2.2.1}/services/claude_status.py +0 -0
  227. {cconnect-2.1.3 → cconnect-2.2.1}/services/control_requests.py +0 -0
  228. {cconnect-2.1.3 → cconnect-2.2.1}/services/delegate_runner.py +0 -0
  229. {cconnect-2.1.3 → cconnect-2.2.1}/services/diffs.py +0 -0
  230. {cconnect-2.1.3 → cconnect-2.2.1}/services/elicitation.py +0 -0
  231. {cconnect-2.1.3 → cconnect-2.2.1}/services/files.py +0 -0
  232. {cconnect-2.1.3 → cconnect-2.2.1}/services/mods.py +0 -0
  233. {cconnect-2.1.3 → cconnect-2.2.1}/services/pack_format.py +0 -0
  234. {cconnect-2.1.3 → cconnect-2.2.1}/services/packs.py +0 -0
  235. {cconnect-2.1.3 → cconnect-2.2.1}/services/processes.py +0 -0
  236. {cconnect-2.1.3 → cconnect-2.2.1}/services/projects.py +0 -0
  237. {cconnect-2.1.3 → cconnect-2.2.1}/services/prompt_cache.py +0 -0
  238. {cconnect-2.1.3 → cconnect-2.2.1}/services/providers.py +0 -0
  239. {cconnect-2.1.3 → cconnect-2.2.1}/services/questions.py +0 -0
  240. {cconnect-2.1.3 → cconnect-2.2.1}/services/shared_links.py +0 -0
  241. {cconnect-2.1.3 → cconnect-2.2.1}/services/shared_watch.py +0 -0
  242. {cconnect-2.1.3 → cconnect-2.2.1}/services/speedtest.py +0 -0
  243. {cconnect-2.1.3 → cconnect-2.2.1}/services/system_watch.py +0 -0
  244. {cconnect-2.1.3 → cconnect-2.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cconnect
3
- Version: 2.1.3
3
+ Version: 2.2.1
4
4
  Summary: Remote bridge between the CConnect client and Claude Code
5
5
  Author: jahirtrap
6
6
  License-Expression: MIT
@@ -12,22 +12,27 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: Operating System :: OS Independent
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Topic :: Software Development
15
- Requires-Python: >=3.11
15
+ Requires-Python: >=3.11.4
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: fastapi>=0.136.0
18
18
  Requires-Dist: uvicorn[standard]>=0.45.0
19
19
  Requires-Dist: pydantic>=2.13.3
20
20
  Requires-Dist: loguru>=0.7.3
21
21
  Requires-Dist: orjson>=3.12.0
22
- Requires-Dist: python-dotenv>=1.0.0
22
+ Requires-Dist: python-dotenv>=1.2.4
23
23
  Requires-Dist: slowapi>=0.1.9
24
24
  Requires-Dist: httpx>=0.28.0
25
25
  Requires-Dist: websockets>=13.0
26
26
  Requires-Dist: claude-agent-sdk>=0.2.167
27
+ Requires-Dist: mcp<3,>=2
27
28
  Requires-Dist: qrcode>=7.4.2
28
29
  Requires-Dist: sqlalchemy>=2.0.0
30
+ Requires-Dist: alembic>=1.20.1
31
+ Requires-Dist: sqlglot>=30.30.0
29
32
  Requires-Dist: pillow>=10.0.0
30
33
  Requires-Dist: psutil>=5.9.0
34
+ Requires-Dist: pyyaml>=6.0.3
35
+ Requires-Dist: packaging>=26.3
31
36
  Requires-Dist: nvidia-ml-py>=12.0.0
32
37
  Requires-Dist: py7zr>=1.0.0
33
38
  Requires-Dist: py7zz>=1.5.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cconnect
3
- Version: 2.1.3
3
+ Version: 2.2.1
4
4
  Summary: Remote bridge between the CConnect client and Claude Code
5
5
  Author: jahirtrap
6
6
  License-Expression: MIT
@@ -12,22 +12,27 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: Operating System :: OS Independent
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Topic :: Software Development
15
- Requires-Python: >=3.11
15
+ Requires-Python: >=3.11.4
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: fastapi>=0.136.0
18
18
  Requires-Dist: uvicorn[standard]>=0.45.0
19
19
  Requires-Dist: pydantic>=2.13.3
20
20
  Requires-Dist: loguru>=0.7.3
21
21
  Requires-Dist: orjson>=3.12.0
22
- Requires-Dist: python-dotenv>=1.0.0
22
+ Requires-Dist: python-dotenv>=1.2.4
23
23
  Requires-Dist: slowapi>=0.1.9
24
24
  Requires-Dist: httpx>=0.28.0
25
25
  Requires-Dist: websockets>=13.0
26
26
  Requires-Dist: claude-agent-sdk>=0.2.167
27
+ Requires-Dist: mcp<3,>=2
27
28
  Requires-Dist: qrcode>=7.4.2
28
29
  Requires-Dist: sqlalchemy>=2.0.0
30
+ Requires-Dist: alembic>=1.20.1
31
+ Requires-Dist: sqlglot>=30.30.0
29
32
  Requires-Dist: pillow>=10.0.0
30
33
  Requires-Dist: psutil>=5.9.0
34
+ Requires-Dist: pyyaml>=6.0.3
35
+ Requires-Dist: packaging>=26.3
31
36
  Requires-Dist: nvidia-ml-py>=12.0.0
32
37
  Requires-Dist: py7zr>=1.0.0
33
38
  Requires-Dist: py7zz>=1.5.0
@@ -11,13 +11,13 @@ core/app.py
11
11
  core/cli.py
12
12
  core/cli_manager.py
13
13
  core/config.py
14
- core/data_migration.py
15
14
  core/db.py
16
15
  core/display.py
17
16
  core/models.py
18
17
  core/packages.py
19
18
  core/paths.py
20
19
  core/process_job.py
20
+ core/process_tree.py
21
21
  core/rate_limit.py
22
22
  core/release.py
23
23
  core/responses.py
@@ -25,6 +25,17 @@ core/sdk.py
25
25
  core/settings_defs.py
26
26
  core/slugs.py
27
27
  core/ws.py
28
+ core/capture/manifest.json
29
+ core/capture/offscreen.html
30
+ core/capture/offscreen.js
31
+ core/capture/worker.js
32
+ core/databases/engines.json
33
+ core/migrations/env.py
34
+ core/migrations/script.py.mako
35
+ core/migrations/versions/20261107_7d5d3c3df2d8_baseline.py
36
+ core/migrations/versions/20261107_ba9d242701ac_trash_timestamps.py
37
+ core/migrations/versions/20261107_e27b5df5f03a_server_state.py
38
+ core/migrations/versions/20261108_4c1f0a9e2b7d_mcp_catalogs.py
28
39
  core/packs/builtin.json
29
40
  core/packs/schema.json
30
41
  core/packs/cconnect/accents.json
@@ -62,27 +73,34 @@ core/packs/cconnect-extras/terminal/vscode-dark-modern.json
62
73
  core/packs/cconnect-extras/terminal/vscode-hc-dark.json
63
74
  core/packs/cconnect-extras/terminal/vscode-hc-light.json
64
75
  core/packs/cconnect-extras/terminal/vscode-light-modern.json
76
+ core/packs/cconnect-extras/themes/ayu-dark.json
77
+ core/packs/cconnect-extras/themes/ayu-light.json
78
+ core/packs/cconnect-extras/themes/ayu-mirage.json
65
79
  core/packs/cconnect-extras/themes/catppuccin-latte.json
66
80
  core/packs/cconnect-extras/themes/catppuccin-mocha.json
67
81
  core/packs/cconnect-extras/themes/claude-dark.json
68
82
  core/packs/cconnect-extras/themes/claude-light.json
69
83
  core/packs/cconnect-extras/themes/dracula.json
84
+ core/packs/cconnect-extras/themes/everforest-dark.json
85
+ core/packs/cconnect-extras/themes/everforest-light.json
70
86
  core/packs/cconnect-extras/themes/github-dark-hc.json
71
87
  core/packs/cconnect-extras/themes/github-dark.json
72
88
  core/packs/cconnect-extras/themes/github-dimmed.json
73
89
  core/packs/cconnect-extras/themes/github-light-hc.json
74
90
  core/packs/cconnect-extras/themes/github-light.json
75
91
  core/packs/cconnect-extras/themes/gruvbox-dark.json
92
+ core/packs/cconnect-extras/themes/kanagawa.json
93
+ core/packs/cconnect-extras/themes/monokai.json
76
94
  core/packs/cconnect-extras/themes/nord.json
77
95
  core/packs/cconnect-extras/themes/one-dark.json
78
96
  core/packs/cconnect-extras/themes/rose-pine.json
79
97
  core/packs/cconnect-extras/themes/solarized-dark.json
80
98
  core/packs/cconnect-extras/themes/solarized-light.json
81
99
  core/packs/cconnect-extras/themes/tokyo-night.json
100
+ core/packs/cconnect-extras/themes/ubuntu-dark.json
101
+ core/packs/cconnect-extras/themes/ubuntu-light.json
82
102
  core/packs/cconnect-extras/themes/vscode-dark-modern.json
83
103
  core/packs/cconnect-extras/themes/vscode-dark-plus.json
84
- core/packs/cconnect-extras/themes/vscode-hc-dark.json
85
- core/packs/cconnect-extras/themes/vscode-hc-light.json
86
104
  core/packs/cconnect-extras/themes/vscode-light-modern.json
87
105
  core/packs/cconnect-extras/themes/vscode-light-plus.json
88
106
  core/packs/cconnect/terminal/black.json
@@ -95,13 +113,17 @@ core/prompts/COMMIT.md
95
113
  core/prompts/INSTALL.md
96
114
  core/prompts/MODS.md
97
115
  core/prompts/SUGGESTIONS.md
116
+ core/prompts/TOOLS.md
98
117
  core/scripts/browse.py
99
118
  core/scripts/mcp_bridge.py
119
+ core/scripts/page_frame.js
100
120
  core/scripts/page_icon.js
101
121
  mcps/__init__.py
102
122
  mcps/browser.py
103
123
  mcps/check_progress.py
104
124
  mcps/components.py
125
+ mcps/databases.py
126
+ mcps/definition.py
105
127
  mcps/delegate.py
106
128
  mcps/media.py
107
129
  mcps/packs.py
@@ -120,6 +142,7 @@ routers/capabilities.py
120
142
  routers/chat.py
121
143
  routers/claude.py
122
144
  routers/cli.py
145
+ routers/databases.py
123
146
  routers/git.py
124
147
  routers/health.py
125
148
  routers/list.py
@@ -139,7 +162,6 @@ schemas/chat_events.py
139
162
  schemas/contract.py
140
163
  schemas/network.py
141
164
  services/__init__.py
142
- services/account_login.py
143
165
  services/accounts.py
144
166
  services/acp_events.py
145
167
  services/acp_peer.py
@@ -159,8 +181,13 @@ services/claude_manage.py
159
181
  services/claude_runtime.py
160
182
  services/claude_status.py
161
183
  services/cli_info.py
184
+ services/cli_login.py
162
185
  services/cli_settings.py
163
186
  services/control_requests.py
187
+ services/database_data.py
188
+ services/database_engines.py
189
+ services/database_tunnels.py
190
+ services/databases.py
164
191
  services/delegate_runner.py
165
192
  services/delegate_runs.py
166
193
  services/delegates.py
@@ -172,7 +199,10 @@ services/event_rows.py
172
199
  services/files.py
173
200
  services/git.py
174
201
  services/git_ops.py
202
+ services/hook_events.py
175
203
  services/live_sessions.py
204
+ services/mcp_lazy.py
205
+ services/memory_pressure.py
176
206
  services/mods.py
177
207
  services/network.py
178
208
  services/pack_format.py
@@ -3,15 +3,20 @@ uvicorn[standard]>=0.45.0
3
3
  pydantic>=2.13.3
4
4
  loguru>=0.7.3
5
5
  orjson>=3.12.0
6
- python-dotenv>=1.0.0
6
+ python-dotenv>=1.2.4
7
7
  slowapi>=0.1.9
8
8
  httpx>=0.28.0
9
9
  websockets>=13.0
10
10
  claude-agent-sdk>=0.2.167
11
+ mcp<3,>=2
11
12
  qrcode>=7.4.2
12
13
  sqlalchemy>=2.0.0
14
+ alembic>=1.20.1
15
+ sqlglot>=30.30.0
13
16
  pillow>=10.0.0
14
17
  psutil>=5.9.0
18
+ pyyaml>=6.0.3
19
+ packaging>=26.3
15
20
  nvidia-ml-py>=12.0.0
16
21
  py7zr>=1.0.0
17
22
  py7zz>=1.5.0
@@ -1,10 +1,12 @@
1
- """The security key gating what belongs to the machine itself: shells and ignored files."""
1
+ """The security key gating what belongs to the machine itself: shells, ignored files and database connections."""
2
2
 
3
3
  import hmac
4
+ from typing import Optional
4
5
 
5
6
  from core.config import PUBLIC_ACCESS_TOKEN, SECURITY_KEY
6
7
 
7
8
  KEY_HEADER = "X-Security-Key"
9
+ KEYED_CAPABILITIES = ("terminal", "databases")
8
10
 
9
11
 
10
12
  def gated() -> bool:
@@ -15,3 +17,9 @@ def key_matches(candidate: str) -> bool:
15
17
  if not gated():
16
18
  return True
17
19
  return bool(SECURITY_KEY) and hmac.compare_digest(candidate or "", SECURITY_KEY)
20
+
21
+
22
+ def authorize(capabilities: list[str], key: Optional[str]) -> list[str]:
23
+ if key_matches(key or ""):
24
+ return list(capabilities)
25
+ return [item for item in capabilities if item not in KEYED_CAPABILITIES]
@@ -12,13 +12,13 @@ from fastapi.middleware.cors import CORSMiddleware
12
12
  from fastapi.middleware.gzip import GZipMiddleware
13
13
  from slowapi.errors import RateLimitExceeded
14
14
 
15
- from core import data_migration, paths
15
+ from core import paths
16
16
  from core.config import PORT
17
17
  from core.db import init_db
18
18
  from core.rate_limit import limiter
19
19
  from core.responses import api_response
20
20
  from core.sdk import ensure_sdk_installed, ensure_subscription_auth
21
- from services import agent_mcp, cli_settings, settings_store, system_monitor
21
+ from services import agent_mcp, mcp_lazy, settings_store, system_monitor
22
22
  from middleware.error_handler import register_error_handlers
23
23
  from middleware.public_auth import register_public_auth_middleware
24
24
  from middleware.security import register_security_middleware
@@ -27,15 +27,10 @@ import routers as routers_pkg
27
27
 
28
28
  @asynccontextmanager
29
29
  async def lifespan(app: FastAPI):
30
- data_migration.migrate()
31
30
  init_db()
32
31
  settings_store.load()
33
- cli_settings.migrate()
34
- from services import delegates
35
- delegates.migrate()
36
32
  from services import accounts
37
33
  await asyncio.to_thread(accounts.purge_forgotten)
38
- await asyncio.to_thread(accounts.link_all_shared_dirs)
39
34
  paths.RUNTIME_FILE.write_text(f"PORT={PORT}\nPID={os.getpid()}\n", encoding="utf-8")
40
35
  system_monitor.setup_log_capture()
41
36
  ensure_subscription_auth()
@@ -51,6 +46,8 @@ async def lifespan(app: FastAPI):
51
46
  await system_watch.hub.start()
52
47
  from services import network
53
48
  await network.watchdog.start()
49
+ from services import live_sessions, memory_pressure
50
+ memory_pressure.watch(live_sessions.registry.relieve)
54
51
  yield
55
52
  chat_list.hub.stop()
56
53
  shared_watch.hub.stop()
@@ -58,8 +55,9 @@ async def lifespan(app: FastAPI):
58
55
  project_watch.hub.stop()
59
56
  system_watch.hub.stop()
60
57
  network.watchdog.stop()
61
- from services import live_sessions
58
+ from services import databases, live_sessions
62
59
  await live_sessions.close_processes()
60
+ await asyncio.to_thread(databases.close_all)
63
61
  paths.RUNTIME_FILE.unlink(missing_ok=True)
64
62
 
65
63
 
@@ -100,6 +98,7 @@ for module_info in pkgutil.iter_modules(routers_pkg.__path__):
100
98
  app.include_router(module.router, prefix="/api")
101
99
 
102
100
  app.mount(agent_mcp.PATH, agent_mcp.asgi)
101
+ app.mount(mcp_lazy.PATH, mcp_lazy.asgi)
103
102
 
104
103
 
105
104
  @app.api_route(
@@ -0,0 +1,9 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "CConnect",
4
+ "description": "Streams the active tab to the CConnect app.",
5
+ "version": "1.0",
6
+ "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7v/ygmzXCAXShPly9x1lkHurdKU24PUkLUROHI1J2Zp0wobWMjHGbpaoclA+xYI8+loAYXPMPDJ/AwhadP7xQqYcarvrfvj0X7gSAvay359F1LznQJFVTOTssy593VmZNeXcC2S12cnKMmpC5bMt8X5afLs5rRLU9zDqG8Po8aD3mNgqc5wewnn64OJDIX4/wjF7/iz3JtCWgdn1dpWJYHfIwQEfDXN2zshLPd/F3xa4/RZcrAUTlA37lLnkBDzTzbvk0S5NZxDxaoHpnkdJfPs7jx5w1jWab0HNwksWvmrfhyyb/ioZLrCg7+KOnGzjkHp+nxGXvVivzZjSXUaSfQIDAQAB",
7
+ "permissions": ["tabCapture", "offscreen", "tabs"],
8
+ "background": { "service_worker": "worker.js" }
9
+ }
@@ -0,0 +1,5 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head><meta charset="utf-8"></head>
4
+ <body><script src="offscreen.js"></script></body>
5
+ </html>
@@ -0,0 +1,139 @@
1
+ const CODEC = "vp09.00.10.08";
2
+ const KEY = 1;
3
+ const DELTA = 2;
4
+ const HEADER = 9;
5
+ const QUEUE_LIMIT = 2;
6
+ const FEED_BACKLOG = 8 * 1024 * 1024;
7
+ const STILL_MS = 200;
8
+ const FRAME_RATE = 60;
9
+
10
+ let session = null;
11
+
12
+ const frameOptions = (key, quantizer) => ({ keyFrame: key, vp9: { quantizer } });
13
+
14
+ const send = (current, chunk) => {
15
+ if (current.socket.readyState !== WebSocket.OPEN) return;
16
+ if (current.socket.bufferedAmount > FEED_BACKLOG) {
17
+ current.wantKey = true;
18
+ return;
19
+ }
20
+ const buffer = new ArrayBuffer(HEADER + chunk.byteLength);
21
+ const view = new DataView(buffer);
22
+ view.setUint8(0, chunk.type === "key" ? KEY : DELTA);
23
+ view.setFloat64(1, chunk.timestamp);
24
+ chunk.copyTo(new Uint8Array(buffer, HEADER));
25
+ current.socket.send(buffer);
26
+ };
27
+
28
+ const keyNow = (current) => {
29
+ if (!current.held || current.encoder.state !== "configured" || current.encoder.encodeQueueSize) {
30
+ current.wantKey = true;
31
+ return;
32
+ }
33
+ current.wantKey = false;
34
+ current.encoder.encode(current.held, frameOptions(true, current.dirty ? current.motion : current.still));
35
+ };
36
+
37
+ const refine = (current) => {
38
+ current.timer = null;
39
+ if (!current.held || !current.dirty || current.encoder.state !== "configured" || current.encoder.encodeQueueSize) return;
40
+ current.dirty = false;
41
+ current.encoder.encode(current.held, frameOptions(false, current.still));
42
+ };
43
+
44
+ const pump = async (current, reader) => {
45
+ while (session === current) {
46
+ const { value: frame, done } = await reader.read();
47
+ if (done || session !== current) {
48
+ frame?.close();
49
+ return;
50
+ }
51
+ current.held?.close();
52
+ current.held = frame.clone();
53
+ if (current.timer !== null) clearTimeout(current.timer);
54
+ current.timer = setTimeout(() => refine(current), STILL_MS);
55
+ if (current.encoder.encodeQueueSize > QUEUE_LIMIT) {
56
+ frame.close();
57
+ continue;
58
+ }
59
+ const key = current.wantKey;
60
+ current.wantKey = false;
61
+ current.dirty = true;
62
+ current.encoder.encode(frame, frameOptions(key, current.motion));
63
+ frame.close();
64
+ }
65
+ };
66
+
67
+ const stop = () => {
68
+ const current = session;
69
+ session = null;
70
+ if (!current) return;
71
+ if (current.timer !== null) clearTimeout(current.timer);
72
+ current.held?.close();
73
+ if (current.encoder.state !== "closed") current.encoder.close();
74
+ current.stream.getTracks().forEach((track) => track.stop());
75
+ if (current.socket.readyState <= WebSocket.OPEN) current.socket.close();
76
+ };
77
+
78
+ const capture = async ({ streamId, width, height, feed, motion, still }) => {
79
+ stop();
80
+ const stream = await navigator.mediaDevices.getUserMedia({
81
+ audio: false,
82
+ video: {
83
+ mandatory: {
84
+ chromeMediaSource: "tab",
85
+ chromeMediaSourceId: streamId,
86
+ minWidth: width,
87
+ maxWidth: width,
88
+ minHeight: height,
89
+ maxHeight: height,
90
+ maxFrameRate: FRAME_RATE,
91
+ },
92
+ },
93
+ });
94
+ const track = stream.getVideoTracks()[0];
95
+ const settings = track.getSettings();
96
+ const socket = new WebSocket(feed);
97
+ socket.binaryType = "arraybuffer";
98
+ await new Promise((done, fail) => {
99
+ socket.addEventListener("open", done, { once: true });
100
+ socket.addEventListener("error", () => fail(new Error("feed refused")), { once: true });
101
+ });
102
+ const current = { stream, socket, encoder: null, held: null, timer: null, wantKey: true, dirty: false, motion, still };
103
+ session = current;
104
+ socket.onmessage = (event) => {
105
+ if (event.data === "key") keyNow(current);
106
+ };
107
+ socket.onclose = () => {
108
+ if (session === current) stop();
109
+ };
110
+ current.encoder = new VideoEncoder({
111
+ output: (chunk) => send(current, chunk),
112
+ error: () => {
113
+ if (session === current) stop();
114
+ },
115
+ });
116
+ current.encoder.configure({
117
+ codec: CODEC,
118
+ width: settings.width,
119
+ height: settings.height,
120
+ framerate: FRAME_RATE,
121
+ latencyMode: "realtime",
122
+ bitrateMode: "quantizer",
123
+ });
124
+ socket.send(JSON.stringify({ type: "stream", codec: CODEC, width: settings.width, height: settings.height }));
125
+ void pump(current, new MediaStreamTrackProcessor({ track }).readable.getReader());
126
+ return { width: settings.width, height: settings.height };
127
+ };
128
+
129
+ chrome.runtime.onMessage.addListener((message, _sender, respond) => {
130
+ if (message.op === "capture") {
131
+ capture(message).then(respond, (error) => respond({ error: String(error) }));
132
+ return true;
133
+ }
134
+ if (message.op === "stop") {
135
+ stop();
136
+ respond({});
137
+ }
138
+ return false;
139
+ });
@@ -0,0 +1,21 @@
1
+ const OFFSCREEN = "offscreen.html";
2
+
3
+ const offscreenOpen = async () => {
4
+ const contexts = await chrome.runtime.getContexts({ contextTypes: ["OFFSCREEN_DOCUMENT"] });
5
+ if (contexts.length) return true;
6
+ await chrome.offscreen.createDocument({ url: OFFSCREEN, reasons: ["USER_MEDIA"], justification: "Streams the active tab to the CConnect app" });
7
+ return true;
8
+ };
9
+
10
+ globalThis.__capture = async (options) => {
11
+ const [tab] = await chrome.tabs.query({ active: true, lastFocusedWindow: true });
12
+ if (!tab) throw new Error("no active tab");
13
+ const streamId = await chrome.tabCapture.getMediaStreamId({ targetTabId: tab.id });
14
+ await offscreenOpen();
15
+ return chrome.runtime.sendMessage({ op: "capture", streamId, ...options });
16
+ };
17
+
18
+ globalThis.__stop = async () => {
19
+ const contexts = await chrome.runtime.getContexts({ contextTypes: ["OFFSCREEN_DOCUMENT"] });
20
+ if (contexts.length) await chrome.runtime.sendMessage({ op: "stop" });
21
+ };