cconnect 2.2.5__tar.gz → 2.2.7__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.
- {cconnect-2.2.5 → cconnect-2.2.7}/PKG-INFO +9 -1
- {cconnect-2.2.5 → cconnect-2.2.7}/README.md +7 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/cconnect.egg-info/PKG-INFO +9 -1
- {cconnect-2.2.5 → cconnect-2.2.7}/cconnect.egg-info/SOURCES.txt +14 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/cconnect.egg-info/requires.txt +1 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/access.py +2 -2
- {cconnect-2.2.5 → cconnect-2.2.7}/core/app.py +3 -1
- {cconnect-2.2.5 → cconnect-2.2.7}/core/cli.py +92 -71
- cconnect-2.2.7/core/detached.py +41 -0
- cconnect-2.2.7/core/devices/tools.json +32 -0
- cconnect-2.2.7/core/migrations/versions/20261115_1b175242d337_devices.py +36 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/models.py +34 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/paths.py +8 -0
- cconnect-2.2.7/core/prompts/DEVICES.md +8 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/release.py +1 -1
- cconnect-2.2.7/core/self_update.py +63 -0
- cconnect-2.2.7/mcps/devices.py +368 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/pyproject.toml +2 -1
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/browser.py +1 -2
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/claude.py +11 -5
- cconnect-2.2.7/routers/devices.py +274 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/settings.py +3 -7
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/system.py +4 -1
- cconnect-2.2.7/services/adb.py +248 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/browser.py +2 -2
- {cconnect-2.2.5 → cconnect-2.2.7}/services/claude_assets.py +135 -40
- {cconnect-2.2.5 → cconnect-2.2.7}/services/claude_manage.py +36 -6
- {cconnect-2.2.5 → cconnect-2.2.7}/services/claude_runtime.py +19 -21
- {cconnect-2.2.5 → cconnect-2.2.7}/services/cli_settings.py +9 -3
- {cconnect-2.2.5 → cconnect-2.2.7}/services/database_data.py +5 -15
- {cconnect-2.2.5 → cconnect-2.2.7}/services/databases.py +2 -9
- cconnect-2.2.7/services/device_screen.py +485 -0
- cconnect-2.2.7/services/device_tools.py +148 -0
- cconnect-2.2.7/services/devices.py +626 -0
- cconnect-2.2.7/services/discovery.py +54 -0
- cconnect-2.2.7/services/frames.py +17 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/live_sessions.py +12 -2
- {cconnect-2.2.5 → cconnect-2.2.7}/services/mcp_lazy.py +2 -2
- cconnect-2.2.7/services/plugin_updates.py +59 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/processes.py +51 -16
- {cconnect-2.2.5 → cconnect-2.2.7}/services/project_files.py +7 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/repo.py +17 -2
- {cconnect-2.2.5 → cconnect-2.2.7}/services/sessions.py +19 -5
- {cconnect-2.2.5 → cconnect-2.2.7}/services/settings_store.py +14 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/shared.py +17 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/cconnect.egg-info/dependency_links.txt +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/cconnect.egg-info/entry_points.txt +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/cconnect.egg-info/top_level.txt +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/__init__.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/capture/manifest.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/capture/offscreen.html +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/capture/offscreen.js +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/capture/worker.js +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/cli_manager.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/config.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/databases/engines.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/db.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/display.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/migrations/env.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/migrations/script.py.mako +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/migrations/versions/20261107_7d5d3c3df2d8_baseline.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/migrations/versions/20261107_ba9d242701ac_trash_timestamps.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/migrations/versions/20261107_e27b5df5f03a_server_state.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/migrations/versions/20261108_4c1f0a9e2b7d_mcp_catalogs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packages.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/builtin.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect/accents.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect/pack.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect/terminal/black.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect/themes/cconnect-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect/themes/cconnect-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/backgrounds/doodles.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/pack.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/nord.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/ayu-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/ayu-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/ayu-mirage.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/claude-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/claude-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/dracula.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/everforest-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/everforest-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/github-dark-hc.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/github-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/github-dimmed.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/github-light-hc.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/github-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/kanagawa.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/monokai.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/nord.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/one-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/tokyo-night.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/ubuntu-dark.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/ubuntu-light.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/vscode-light-modern.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/packs/schema.json +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/process_job.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/process_tree.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/BLOCKS.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/BROWSER.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/CCONNECT.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/COMMIT.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/INSTALL.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/MODS.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/SUGGESTIONS.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/prompts/TOOLS.md +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/rate_limit.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/responses.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/scripts/browse.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/scripts/mcp_bridge.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/scripts/page_frame.js +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/scripts/page_icon.js +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/sdk.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/settings_defs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/slugs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/core/ws.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/__init__.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/browser.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/check_progress.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/components.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/databases.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/definition.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/delegate.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/media.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/packs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/session.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/shared_files.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/mcps/terminal.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/middleware/__init__.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/middleware/error_handler.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/middleware/public_auth.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/middleware/security.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/__init__.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/accounts.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/agents.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/capabilities.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/chat.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/cli.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/databases.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/git.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/health.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/list.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/network.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/packs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/pages.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/projects.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/sessions.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/shared.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/routers/terminal.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/schemas/__init__.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/schemas/accounts.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/schemas/chat.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/schemas/chat_events.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/schemas/contract.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/schemas/network.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/__init__.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/accounts.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/acp_events.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/acp_peer.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/agent_connections.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/agent_mcp.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/agent_registry.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/agent_sessions.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/agents.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/api_errors.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/asset_icons.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/attachments.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/blocks.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/categories.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/chat_list.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/claude_status.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/cli_info.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/cli_login.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/control_requests.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/database_engines.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/database_tunnels.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/delegate_runner.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/delegate_runs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/delegates.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/diffs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/directories.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/directory_watch.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/elicitation.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/event_rows.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/file_info.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/files.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/git.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/git_ops.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/hook_events.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/memory_pressure.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/mods.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/network.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/pack_format.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/packs.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/pages.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/persistent_sessions.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/project_watch.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/projects.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/prompt_cache.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/providers.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/questions.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/rewind.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/shared_links.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/shared_watch.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/speedtest.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/system_monitor.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/system_watch.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/terminal.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/todos.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/tool_calls.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/tool_props.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/trash.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/usage.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/services/visibility.py +0 -0
- {cconnect-2.2.5 → cconnect-2.2.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cconnect
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.7
|
|
4
4
|
Summary: Remote bridge between the CConnect client and Claude Code
|
|
5
5
|
Author: jahirtrap
|
|
6
6
|
License-Expression: MIT
|
|
@@ -40,6 +40,7 @@ Requires-Dist: rarfile>=4.2
|
|
|
40
40
|
Requires-Dist: av>=18.1
|
|
41
41
|
Requires-Dist: pypdf>=7.0.1
|
|
42
42
|
Requires-Dist: watchfiles>=1.2.0
|
|
43
|
+
Requires-Dist: zeroconf>=0.154.0
|
|
43
44
|
Requires-Dist: pywinpty>=2.0.13; sys_platform == "win32"
|
|
44
45
|
Requires-Dist: ptyprocess>=0.7.0; sys_platform != "win32"
|
|
45
46
|
Provides-Extra: dev
|
|
@@ -166,6 +167,13 @@ with the tailnet mode or a public one.
|
|
|
166
167
|
open with the security key, and Claude gets them as tools in turns sent with it: it queries,
|
|
167
168
|
changes data, exports, manages connections and drivers, and each query shows in the chat with
|
|
168
169
|
its rows.
|
|
170
|
+
- **Devices.** The Android phones, tablets and emulators the server reaches with adb, listed as
|
|
171
|
+
they appear: plugged in over USB, paired over Wi‑Fi with a QR code or a pairing code and found
|
|
172
|
+
again on their own, or started from the machine's Android SDK. Tapping one mirrors its screen
|
|
173
|
+
live through scrcpy, with touch, keyboard, the navigation keys, rotation, screenshots, APK
|
|
174
|
+
installs and logcat. The server uses the adb it has, or downloads adb and scrcpy's server with
|
|
175
|
+
one tap; nothing else is bundled. Behind the security key, and Claude gets the same devices as
|
|
176
|
+
tools in turns sent with it: list, screenshot, shell, logcat, tap and type, install and manage.
|
|
169
177
|
- **Notes.** A Markdown editor with formatting, search and syntax highlighting.
|
|
170
178
|
|
|
171
179
|
### The PC
|
|
@@ -118,6 +118,13 @@ with the tailnet mode or a public one.
|
|
|
118
118
|
open with the security key, and Claude gets them as tools in turns sent with it: it queries,
|
|
119
119
|
changes data, exports, manages connections and drivers, and each query shows in the chat with
|
|
120
120
|
its rows.
|
|
121
|
+
- **Devices.** The Android phones, tablets and emulators the server reaches with adb, listed as
|
|
122
|
+
they appear: plugged in over USB, paired over Wi‑Fi with a QR code or a pairing code and found
|
|
123
|
+
again on their own, or started from the machine's Android SDK. Tapping one mirrors its screen
|
|
124
|
+
live through scrcpy, with touch, keyboard, the navigation keys, rotation, screenshots, APK
|
|
125
|
+
installs and logcat. The server uses the adb it has, or downloads adb and scrcpy's server with
|
|
126
|
+
one tap; nothing else is bundled. Behind the security key, and Claude gets the same devices as
|
|
127
|
+
tools in turns sent with it: list, screenshot, shell, logcat, tap and type, install and manage.
|
|
121
128
|
- **Notes.** A Markdown editor with formatting, search and syntax highlighting.
|
|
122
129
|
|
|
123
130
|
### The PC
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cconnect
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.7
|
|
4
4
|
Summary: Remote bridge between the CConnect client and Claude Code
|
|
5
5
|
Author: jahirtrap
|
|
6
6
|
License-Expression: MIT
|
|
@@ -40,6 +40,7 @@ Requires-Dist: rarfile>=4.2
|
|
|
40
40
|
Requires-Dist: av>=18.1
|
|
41
41
|
Requires-Dist: pypdf>=7.0.1
|
|
42
42
|
Requires-Dist: watchfiles>=1.2.0
|
|
43
|
+
Requires-Dist: zeroconf>=0.154.0
|
|
43
44
|
Requires-Dist: pywinpty>=2.0.13; sys_platform == "win32"
|
|
44
45
|
Requires-Dist: ptyprocess>=0.7.0; sys_platform != "win32"
|
|
45
46
|
Provides-Extra: dev
|
|
@@ -166,6 +167,13 @@ with the tailnet mode or a public one.
|
|
|
166
167
|
open with the security key, and Claude gets them as tools in turns sent with it: it queries,
|
|
167
168
|
changes data, exports, manages connections and drivers, and each query shows in the chat with
|
|
168
169
|
its rows.
|
|
170
|
+
- **Devices.** The Android phones, tablets and emulators the server reaches with adb, listed as
|
|
171
|
+
they appear: plugged in over USB, paired over Wi‑Fi with a QR code or a pairing code and found
|
|
172
|
+
again on their own, or started from the machine's Android SDK. Tapping one mirrors its screen
|
|
173
|
+
live through scrcpy, with touch, keyboard, the navigation keys, rotation, screenshots, APK
|
|
174
|
+
installs and logcat. The server uses the adb it has, or downloads adb and scrcpy's server with
|
|
175
|
+
one tap; nothing else is bundled. Behind the security key, and Claude gets the same devices as
|
|
176
|
+
tools in turns sent with it: list, screenshot, shell, logcat, tap and type, install and manage.
|
|
169
177
|
- **Notes.** A Markdown editor with formatting, search and syntax highlighting.
|
|
170
178
|
|
|
171
179
|
### The PC
|
|
@@ -13,6 +13,7 @@ core/cli.py
|
|
|
13
13
|
core/cli_manager.py
|
|
14
14
|
core/config.py
|
|
15
15
|
core/db.py
|
|
16
|
+
core/detached.py
|
|
16
17
|
core/display.py
|
|
17
18
|
core/models.py
|
|
18
19
|
core/packages.py
|
|
@@ -23,6 +24,7 @@ core/rate_limit.py
|
|
|
23
24
|
core/release.py
|
|
24
25
|
core/responses.py
|
|
25
26
|
core/sdk.py
|
|
27
|
+
core/self_update.py
|
|
26
28
|
core/settings_defs.py
|
|
27
29
|
core/slugs.py
|
|
28
30
|
core/ws.py
|
|
@@ -31,12 +33,14 @@ core/capture/offscreen.html
|
|
|
31
33
|
core/capture/offscreen.js
|
|
32
34
|
core/capture/worker.js
|
|
33
35
|
core/databases/engines.json
|
|
36
|
+
core/devices/tools.json
|
|
34
37
|
core/migrations/env.py
|
|
35
38
|
core/migrations/script.py.mako
|
|
36
39
|
core/migrations/versions/20261107_7d5d3c3df2d8_baseline.py
|
|
37
40
|
core/migrations/versions/20261107_ba9d242701ac_trash_timestamps.py
|
|
38
41
|
core/migrations/versions/20261107_e27b5df5f03a_server_state.py
|
|
39
42
|
core/migrations/versions/20261108_4c1f0a9e2b7d_mcp_catalogs.py
|
|
43
|
+
core/migrations/versions/20261115_1b175242d337_devices.py
|
|
40
44
|
core/packs/builtin.json
|
|
41
45
|
core/packs/schema.json
|
|
42
46
|
core/packs/cconnect/accents.json
|
|
@@ -112,6 +116,7 @@ core/prompts/BLOCKS.md
|
|
|
112
116
|
core/prompts/BROWSER.md
|
|
113
117
|
core/prompts/CCONNECT.md
|
|
114
118
|
core/prompts/COMMIT.md
|
|
119
|
+
core/prompts/DEVICES.md
|
|
115
120
|
core/prompts/INSTALL.md
|
|
116
121
|
core/prompts/MODS.md
|
|
117
122
|
core/prompts/SUGGESTIONS.md
|
|
@@ -127,6 +132,7 @@ mcps/components.py
|
|
|
127
132
|
mcps/databases.py
|
|
128
133
|
mcps/definition.py
|
|
129
134
|
mcps/delegate.py
|
|
135
|
+
mcps/devices.py
|
|
130
136
|
mcps/media.py
|
|
131
137
|
mcps/packs.py
|
|
132
138
|
mcps/session.py
|
|
@@ -145,6 +151,7 @@ routers/chat.py
|
|
|
145
151
|
routers/claude.py
|
|
146
152
|
routers/cli.py
|
|
147
153
|
routers/databases.py
|
|
154
|
+
routers/devices.py
|
|
148
155
|
routers/git.py
|
|
149
156
|
routers/health.py
|
|
150
157
|
routers/list.py
|
|
@@ -167,6 +174,7 @@ services/__init__.py
|
|
|
167
174
|
services/accounts.py
|
|
168
175
|
services/acp_events.py
|
|
169
176
|
services/acp_peer.py
|
|
177
|
+
services/adb.py
|
|
170
178
|
services/agent_connections.py
|
|
171
179
|
services/agent_mcp.py
|
|
172
180
|
services/agent_registry.py
|
|
@@ -194,13 +202,18 @@ services/databases.py
|
|
|
194
202
|
services/delegate_runner.py
|
|
195
203
|
services/delegate_runs.py
|
|
196
204
|
services/delegates.py
|
|
205
|
+
services/device_screen.py
|
|
206
|
+
services/device_tools.py
|
|
207
|
+
services/devices.py
|
|
197
208
|
services/diffs.py
|
|
198
209
|
services/directories.py
|
|
199
210
|
services/directory_watch.py
|
|
211
|
+
services/discovery.py
|
|
200
212
|
services/elicitation.py
|
|
201
213
|
services/event_rows.py
|
|
202
214
|
services/file_info.py
|
|
203
215
|
services/files.py
|
|
216
|
+
services/frames.py
|
|
204
217
|
services/git.py
|
|
205
218
|
services/git_ops.py
|
|
206
219
|
services/hook_events.py
|
|
@@ -213,6 +226,7 @@ services/pack_format.py
|
|
|
213
226
|
services/packs.py
|
|
214
227
|
services/pages.py
|
|
215
228
|
services/persistent_sessions.py
|
|
229
|
+
services/plugin_updates.py
|
|
216
230
|
services/processes.py
|
|
217
231
|
services/project_files.py
|
|
218
232
|
services/project_watch.py
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""The security key gating what belongs to the machine itself: shells, ignored files and
|
|
1
|
+
"""The security key gating what belongs to the machine itself: shells, ignored files, database connections and Android devices."""
|
|
2
2
|
|
|
3
3
|
import hmac
|
|
4
4
|
from typing import Optional
|
|
@@ -6,7 +6,7 @@ from typing import Optional
|
|
|
6
6
|
from core.config import PUBLIC_ACCESS_TOKEN, SECURITY_KEY
|
|
7
7
|
|
|
8
8
|
KEY_HEADER = "X-Security-Key"
|
|
9
|
-
KEYED_CAPABILITIES = ("terminal", "databases")
|
|
9
|
+
KEYED_CAPABILITIES = ("terminal", "databases", "devices")
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def gated() -> bool:
|
|
@@ -57,8 +57,10 @@ async def lifespan(app: FastAPI):
|
|
|
57
57
|
project_watch.hub.stop()
|
|
58
58
|
system_watch.hub.stop()
|
|
59
59
|
network.watchdog.stop()
|
|
60
|
-
from services import databases, live_sessions
|
|
60
|
+
from services import databases, device_screen, devices, live_sessions
|
|
61
61
|
await live_sessions.close_processes()
|
|
62
|
+
await device_screen.close_all()
|
|
63
|
+
devices.hub.close()
|
|
62
64
|
await asyncio.to_thread(databases.close_all)
|
|
63
65
|
paths.RUNTIME_FILE.unlink(missing_ok=True)
|
|
64
66
|
|
|
@@ -24,7 +24,7 @@ import psutil
|
|
|
24
24
|
import qrcode
|
|
25
25
|
from dotenv import set_key
|
|
26
26
|
|
|
27
|
-
from core import cli_manager, paths, process_tree, release, sdk
|
|
27
|
+
from core import cli_manager, detached, paths, process_tree, release, sdk, self_update
|
|
28
28
|
from core.config import PORT, RESTART_EXIT_CODE, SUPERVISOR_VAR
|
|
29
29
|
from services import agent_registry, repo, system_monitor
|
|
30
30
|
|
|
@@ -37,7 +37,11 @@ _PROVIDERS = ("tailscale", "tailnet", "caddy")
|
|
|
37
37
|
_PRIVATE_PROVIDERS = ("tailnet",)
|
|
38
38
|
_STOP_TIMEOUT = 10
|
|
39
39
|
_POLL_SECONDS = 0.5
|
|
40
|
-
|
|
40
|
+
_WINDOWS_APP = "tailscale-ipn.exe"
|
|
41
|
+
_MAC_APP = "Tailscale"
|
|
42
|
+
_TAILSCALE_WAIT = 30
|
|
43
|
+
_SIGNED_OUT = ("NeedsLogin", "NoState")
|
|
44
|
+
_NOT_UP = ("", *_SIGNED_OUT)
|
|
41
45
|
_APP = "core.app:app"
|
|
42
46
|
_COMMANDS = ("run", "expose", "stop", "restart", "status", "logs", "doctor", "update", "key")
|
|
43
47
|
_TOP_FLAGS = ("-h", "--help", "-v", "--version")
|
|
@@ -83,10 +87,8 @@ def _security_key_row(generated: bool) -> tuple[str, str]:
|
|
|
83
87
|
return ("Security key", f"{os.environ[_SECURITY_KEY_VAR]}{' [Auto]' if generated else ''}")
|
|
84
88
|
|
|
85
89
|
|
|
86
|
-
def _print_security_key(generated: bool
|
|
90
|
+
def _print_security_key(generated: bool) -> None:
|
|
87
91
|
_print_rows([_security_key_row(generated)])
|
|
88
|
-
if qr:
|
|
89
|
-
_print_qr(json.dumps({"security_key": os.environ[_SECURITY_KEY_VAR]}, separators=(",", ":")))
|
|
90
92
|
|
|
91
93
|
|
|
92
94
|
def _tailscale_status() -> dict:
|
|
@@ -106,14 +108,41 @@ def _tailscale_status() -> dict:
|
|
|
106
108
|
return {}
|
|
107
109
|
|
|
108
110
|
|
|
111
|
+
def _app_running(name: str) -> bool:
|
|
112
|
+
return any(process.info["name"] == name for process in psutil.process_iter(["name"]))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def _open_app(tailscale: str) -> bool:
|
|
116
|
+
if sys.platform == "win32":
|
|
117
|
+
app = Path(tailscale).with_name(_WINDOWS_APP)
|
|
118
|
+
if not app.is_file() or _app_running(_WINDOWS_APP):
|
|
119
|
+
return False
|
|
120
|
+
os.startfile(app)
|
|
121
|
+
elif sys.platform == "darwin":
|
|
122
|
+
if _app_running(_MAC_APP) or subprocess.run(["open", "-a", _MAC_APP], capture_output=True).returncode != 0:
|
|
123
|
+
return False
|
|
124
|
+
else:
|
|
125
|
+
return False
|
|
126
|
+
with suppress(OSError, subprocess.SubprocessError):
|
|
127
|
+
subprocess.run(
|
|
128
|
+
["tailscale", "wait", "--timeout", f"{_TAILSCALE_WAIT}s"],
|
|
129
|
+
capture_output=True, text=True, timeout=_TAILSCALE_WAIT + _STOP_TIMEOUT,
|
|
130
|
+
)
|
|
131
|
+
return True
|
|
132
|
+
|
|
133
|
+
|
|
109
134
|
def _require_tailscale() -> dict:
|
|
110
|
-
|
|
135
|
+
tailscale = shutil.which("tailscale")
|
|
136
|
+
if tailscale is None:
|
|
111
137
|
_abort("Tailscale is not installed. Get it from https://tailscale.com/download and try again.")
|
|
112
138
|
status = _tailscale_status()
|
|
113
139
|
state = status.get("BackendState") or ""
|
|
140
|
+
if state in _NOT_UP and _open_app(tailscale):
|
|
141
|
+
status = _tailscale_status()
|
|
142
|
+
state = status.get("BackendState") or ""
|
|
114
143
|
if not state:
|
|
115
144
|
_abort("Tailscale is installed but not running. Start the Tailscale app or service and try again.")
|
|
116
|
-
if state in
|
|
145
|
+
if state in _SIGNED_OUT:
|
|
117
146
|
_abort("Tailscale is not signed in. Run 'tailscale up', then try again.")
|
|
118
147
|
if state == "Stopped":
|
|
119
148
|
subprocess.run(["tailscale", "up"], capture_output=True, text=True, timeout=60)
|
|
@@ -297,29 +326,6 @@ def _expose(
|
|
|
297
326
|
_print_qr(json.dumps(payload, separators=(",", ":")))
|
|
298
327
|
|
|
299
328
|
|
|
300
|
-
def _running_pid() -> int | None:
|
|
301
|
-
"""PID of a live detached launcher, or None when the recorded one is gone."""
|
|
302
|
-
try:
|
|
303
|
-
pid = int(paths.DETACHED_PID_FILE.read_text(encoding="utf-8").strip())
|
|
304
|
-
except (OSError, ValueError):
|
|
305
|
-
return None
|
|
306
|
-
try:
|
|
307
|
-
process = psutil.Process(pid)
|
|
308
|
-
if _MODULE in " ".join(process.cmdline()):
|
|
309
|
-
return pid
|
|
310
|
-
except (psutil.Error, OSError):
|
|
311
|
-
pass
|
|
312
|
-
paths.DETACHED_PID_FILE.unlink(missing_ok=True)
|
|
313
|
-
return None
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
def _detached_provider() -> str:
|
|
317
|
-
"""The provider the detached run exposed with."""
|
|
318
|
-
with suppress(OSError):
|
|
319
|
-
return paths.DETACHED_PROVIDER_FILE.read_text(encoding="utf-8").strip()
|
|
320
|
-
return ""
|
|
321
|
-
|
|
322
|
-
|
|
323
329
|
def _spawn_detached() -> int:
|
|
324
330
|
handle = paths.DETACHED_LOG_FILE.open("ab")
|
|
325
331
|
kwargs: dict = {
|
|
@@ -334,7 +340,7 @@ def _spawn_detached() -> int:
|
|
|
334
340
|
kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
|
|
335
341
|
else:
|
|
336
342
|
kwargs["start_new_session"] = True
|
|
337
|
-
process = subprocess.Popen([sys.executable, "-m",
|
|
343
|
+
process = subprocess.Popen([sys.executable, "-m", detached.CLI_MODULE], **kwargs)
|
|
338
344
|
paths.DETACHED_PID_FILE.write_text(str(process.pid), encoding="utf-8")
|
|
339
345
|
return process.pid
|
|
340
346
|
|
|
@@ -344,18 +350,17 @@ def _terminate_tree(pid: int) -> None:
|
|
|
344
350
|
|
|
345
351
|
|
|
346
352
|
def _close_exposure() -> None:
|
|
347
|
-
|
|
348
|
-
if
|
|
353
|
+
exposed = detached.provider()
|
|
354
|
+
if exposed == "tailscale":
|
|
349
355
|
_stop_tailscale_funnel()
|
|
350
|
-
elif
|
|
356
|
+
elif exposed == "tailnet":
|
|
351
357
|
_stop_tailscale_serve()
|
|
352
358
|
paths.DETACHED_PROVIDER_FILE.unlink(missing_ok=True)
|
|
353
359
|
|
|
354
360
|
|
|
355
361
|
def _serving(port: int) -> bool:
|
|
356
|
-
"""True once the recorded server itself listens on the port, not whatever else took it."""
|
|
357
362
|
with suppress(psutil.Error, KeyError, ValueError):
|
|
358
|
-
sockets = psutil.Process(int(
|
|
363
|
+
sockets = psutil.Process(int(detached.runtime()["PID"])).net_connections(kind="tcp")
|
|
359
364
|
return any(sock.status == psutil.CONN_LISTEN and sock.laddr.port == port for sock in sockets)
|
|
360
365
|
return False
|
|
361
366
|
|
|
@@ -379,7 +384,7 @@ def _supervisor(live: dict[str, str]) -> psutil.Process | None:
|
|
|
379
384
|
|
|
380
385
|
|
|
381
386
|
def _hand_over() -> None:
|
|
382
|
-
live =
|
|
387
|
+
live = detached.runtime()
|
|
383
388
|
if not live:
|
|
384
389
|
return
|
|
385
390
|
supervisor = _supervisor(live)
|
|
@@ -394,19 +399,19 @@ def _hand_over() -> None:
|
|
|
394
399
|
|
|
395
400
|
|
|
396
401
|
def _refuse_second() -> None:
|
|
397
|
-
live =
|
|
402
|
+
live = detached.runtime()
|
|
398
403
|
if not live:
|
|
399
404
|
return
|
|
400
405
|
how = (
|
|
401
406
|
f"It runs in the background: stop it with {_invocation()} stop."
|
|
402
|
-
if
|
|
407
|
+
if detached.running_pid() is not None
|
|
403
408
|
else "Stop it in its terminal, or move it to the background with --detach."
|
|
404
409
|
)
|
|
405
410
|
_abort(f"a backend is already running (pid {live['PID']} on port {live.get('PORT', '?')}). {how}")
|
|
406
411
|
|
|
407
412
|
|
|
408
413
|
def _stop_detached() -> None:
|
|
409
|
-
pid =
|
|
414
|
+
pid = detached.running_pid()
|
|
410
415
|
if pid is None:
|
|
411
416
|
print("No detached backend is running.")
|
|
412
417
|
else:
|
|
@@ -423,7 +428,6 @@ def _invocation() -> str:
|
|
|
423
428
|
|
|
424
429
|
|
|
425
430
|
def _flag_parser() -> argparse.ArgumentParser:
|
|
426
|
-
"""The launcher's original flags, accepted alongside the subcommands."""
|
|
427
431
|
parser = argparse.ArgumentParser(description="CConnect backend launcher.")
|
|
428
432
|
parser.add_argument("--expose", choices=list(_PROVIDERS), default="",
|
|
429
433
|
help="Serve the backend through the given provider: tailnet keeps it "
|
|
@@ -440,7 +444,7 @@ def _flag_parser() -> argparse.ArgumentParser:
|
|
|
440
444
|
help="Print the key that unlocks the terminal and ignored files, generating it the first time.")
|
|
441
445
|
parser.add_argument("--rotate", action="store_true",
|
|
442
446
|
help="With --security-key, replace the existing key instead of printing it.")
|
|
443
|
-
parser.set_defaults(command="", source="", force=False, json=False, follow=False)
|
|
447
|
+
parser.set_defaults(command="", source="", force=False, json=False, follow=False, plan=False)
|
|
444
448
|
return parser
|
|
445
449
|
|
|
446
450
|
|
|
@@ -449,7 +453,7 @@ def _command_parser() -> argparse.ArgumentParser:
|
|
|
449
453
|
parser.add_argument("-v", "--version", action="version", version=f"cconnect {release.VERSION}")
|
|
450
454
|
parser.set_defaults(
|
|
451
455
|
expose="", public_host="", detach=False, port=None,
|
|
452
|
-
security_key=False, rotate=False, source="", force=False, json=False, follow=False,
|
|
456
|
+
security_key=False, rotate=False, source="", force=False, json=False, follow=False, plan=False,
|
|
453
457
|
)
|
|
454
458
|
commands = parser.add_subparsers(dest="command")
|
|
455
459
|
|
|
@@ -479,7 +483,9 @@ def _command_parser() -> argparse.ArgumentParser:
|
|
|
479
483
|
|
|
480
484
|
commands.add_parser("doctor", help="Check what the backend needs on this machine.")
|
|
481
485
|
|
|
482
|
-
commands.add_parser("update", help="Upgrade this install to the latest release.")
|
|
486
|
+
update = commands.add_parser("update", help="Upgrade this install to the latest release.")
|
|
487
|
+
update.add_argument("--plan", action="store_true",
|
|
488
|
+
help="Print the upgrade command as JSON instead of running it, for the desktop app.")
|
|
483
489
|
|
|
484
490
|
key = commands.add_parser("key", help="Print the key that unlocks the terminal and ignored files.")
|
|
485
491
|
key.add_argument("--rotate", action="store_true",
|
|
@@ -499,23 +505,9 @@ def _parse(argv: list[str]) -> argparse.Namespace:
|
|
|
499
505
|
return args
|
|
500
506
|
|
|
501
507
|
|
|
502
|
-
def _runtime() -> dict[str, str]:
|
|
503
|
-
"""What the running server recorded, empty when the pid it wrote is gone."""
|
|
504
|
-
try:
|
|
505
|
-
recorded = dict(
|
|
506
|
-
entry.split("=", 1)
|
|
507
|
-
for entry in paths.RUNTIME_FILE.read_text(encoding="utf-8").split()
|
|
508
|
-
if "=" in entry
|
|
509
|
-
)
|
|
510
|
-
except OSError:
|
|
511
|
-
return {}
|
|
512
|
-
pid = int(recorded.get("PID") or 0)
|
|
513
|
-
return recorded if pid and psutil.pid_exists(pid) else {}
|
|
514
|
-
|
|
515
|
-
|
|
516
508
|
def _print_status(as_json: bool) -> None:
|
|
517
|
-
live =
|
|
518
|
-
|
|
509
|
+
live = detached.runtime()
|
|
510
|
+
launcher = detached.running_pid()
|
|
519
511
|
if as_json:
|
|
520
512
|
print(json.dumps({
|
|
521
513
|
"version": release.VERSION,
|
|
@@ -524,7 +516,7 @@ def _print_status(as_json: bool) -> None:
|
|
|
524
516
|
"port": int(live.get("PORT") or PORT),
|
|
525
517
|
"pid": int(live.get("PID") or 0) or None,
|
|
526
518
|
"running": bool(live),
|
|
527
|
-
"detached":
|
|
519
|
+
"detached": launcher,
|
|
528
520
|
}))
|
|
529
521
|
return
|
|
530
522
|
rows = [
|
|
@@ -532,8 +524,8 @@ def _print_status(as_json: bool) -> None:
|
|
|
532
524
|
("Data", str(paths.DATA_DIR)),
|
|
533
525
|
("Server", f"pid {live['PID']} on port {live.get('PORT', '?')}" if live else "not running"),
|
|
534
526
|
]
|
|
535
|
-
if
|
|
536
|
-
rows.append(("Detached", f"pid {
|
|
527
|
+
if launcher is not None:
|
|
528
|
+
rows.append(("Detached", f"pid {launcher}"))
|
|
537
529
|
_print_rows(rows)
|
|
538
530
|
|
|
539
531
|
|
|
@@ -553,7 +545,7 @@ def _print_logs(follow: bool) -> None:
|
|
|
553
545
|
|
|
554
546
|
|
|
555
547
|
def _restart() -> None:
|
|
556
|
-
live =
|
|
548
|
+
live = detached.runtime()
|
|
557
549
|
if not live:
|
|
558
550
|
_abort("No backend is running.")
|
|
559
551
|
paths.RESTART_FLAG.touch()
|
|
@@ -581,7 +573,7 @@ def _port_taken(port: int) -> bool:
|
|
|
581
573
|
|
|
582
574
|
|
|
583
575
|
def _port_state(port: int) -> str:
|
|
584
|
-
live =
|
|
576
|
+
live = detached.runtime()
|
|
585
577
|
if live and int(live.get("PORT") or 0) == port:
|
|
586
578
|
return f"{port}, this backend (pid {live['PID']})"
|
|
587
579
|
return f"{port}, taken by another program" if _port_taken(port) else f"{port}, free"
|
|
@@ -604,16 +596,45 @@ def _doctor(port: int) -> None:
|
|
|
604
596
|
])
|
|
605
597
|
|
|
606
598
|
|
|
607
|
-
def
|
|
599
|
+
def _print_upgrade(command: list[str]) -> None:
|
|
600
|
+
print(f"\n {' '.join(command)}\n")
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
def _update_after_exit(command: list[str]) -> None:
|
|
604
|
+
live = detached.runtime()
|
|
605
|
+
if live and detached.running_pid() is None:
|
|
606
|
+
_abort(
|
|
607
|
+
f"a backend is running (pid {live['PID']}) from the files the update replaces. "
|
|
608
|
+
"Stop it first, or start it with --detach and the update restarts it."
|
|
609
|
+
)
|
|
610
|
+
_print_upgrade(command)
|
|
611
|
+
restart = self_update.restart_command()
|
|
612
|
+
self_update.hand_over(command, restart)
|
|
613
|
+
if restart:
|
|
614
|
+
_stop_detached()
|
|
615
|
+
print(f"\n The upgrade runs once this command exits. Log: {paths.UPDATE_LOG_FILE}")
|
|
616
|
+
if restart:
|
|
617
|
+
print(" The backend starts again when it finishes.")
|
|
618
|
+
print()
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
def _update(plan: bool) -> None:
|
|
608
622
|
if not paths.INSTALLED:
|
|
609
623
|
_abort("this is a git checkout, not an installed release: update it with git pull.")
|
|
610
|
-
|
|
624
|
+
command = repo.upgrade_command()
|
|
625
|
+
if plan:
|
|
626
|
+
print(json.dumps({"command": command}))
|
|
627
|
+
return
|
|
628
|
+
if self_update.needed():
|
|
629
|
+
_update_after_exit(command)
|
|
630
|
+
return
|
|
631
|
+
_print_upgrade(command)
|
|
611
632
|
result = repo.upgrade()
|
|
612
633
|
if result["message"]:
|
|
613
634
|
print(f"{result['message']}\n")
|
|
614
635
|
if not result["ok"]:
|
|
615
636
|
_abort(f"the upgrade failed. Stop the server and try again: {_invocation()} stop")
|
|
616
|
-
if result["changed"] and
|
|
637
|
+
if result["changed"] and detached.runtime():
|
|
617
638
|
print(" The server that is running keeps the old version until it restarts.\n")
|
|
618
639
|
|
|
619
640
|
|
|
@@ -623,7 +644,7 @@ def main():
|
|
|
623
644
|
os.environ["PORT"] = str(port)
|
|
624
645
|
|
|
625
646
|
if args.command == "key":
|
|
626
|
-
_print_security_key(_ensure_security_key(args.rotate)
|
|
647
|
+
_print_security_key(_ensure_security_key(args.rotate))
|
|
627
648
|
if args.rotate:
|
|
628
649
|
print(" Every device has to enter it again, and a running backend needs a restart.\n")
|
|
629
650
|
return
|
|
@@ -645,7 +666,7 @@ def main():
|
|
|
645
666
|
return
|
|
646
667
|
|
|
647
668
|
if args.command == "update":
|
|
648
|
-
_update()
|
|
669
|
+
_update(args.plan)
|
|
649
670
|
return
|
|
650
671
|
|
|
651
672
|
if args.command == "stop":
|
|
@@ -653,7 +674,7 @@ def main():
|
|
|
653
674
|
return
|
|
654
675
|
|
|
655
676
|
if args.detach:
|
|
656
|
-
running =
|
|
677
|
+
running = detached.running_pid()
|
|
657
678
|
if running is not None:
|
|
658
679
|
_abort(f"a detached backend is already running (pid {running}). Use --stop first.")
|
|
659
680
|
_hand_over()
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from contextlib import suppress
|
|
2
|
+
|
|
3
|
+
import psutil
|
|
4
|
+
|
|
5
|
+
from core import paths
|
|
6
|
+
|
|
7
|
+
CLI_MODULE = "core.cli"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def runtime() -> dict[str, str]:
|
|
11
|
+
try:
|
|
12
|
+
recorded = dict(
|
|
13
|
+
entry.split("=", 1)
|
|
14
|
+
for entry in paths.RUNTIME_FILE.read_text(encoding="utf-8").split()
|
|
15
|
+
if "=" in entry
|
|
16
|
+
)
|
|
17
|
+
except OSError:
|
|
18
|
+
return {}
|
|
19
|
+
pid = int(recorded.get("PID") or 0)
|
|
20
|
+
return recorded if pid and psutil.pid_exists(pid) else {}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def running_pid() -> int | None:
|
|
24
|
+
try:
|
|
25
|
+
pid = int(paths.DETACHED_PID_FILE.read_text(encoding="utf-8").strip())
|
|
26
|
+
except (OSError, ValueError):
|
|
27
|
+
return None
|
|
28
|
+
try:
|
|
29
|
+
process = psutil.Process(pid)
|
|
30
|
+
if CLI_MODULE in " ".join(process.cmdline()):
|
|
31
|
+
return pid
|
|
32
|
+
except (psutil.Error, OSError):
|
|
33
|
+
pass
|
|
34
|
+
paths.DETACHED_PID_FILE.unlink(missing_ok=True)
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def provider() -> str:
|
|
39
|
+
with suppress(OSError):
|
|
40
|
+
return paths.DETACHED_PROVIDER_FILE.read_text(encoding="utf-8").strip()
|
|
41
|
+
return ""
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"adb": {
|
|
3
|
+
"version": "37.0.3",
|
|
4
|
+
"folder": "platform-tools",
|
|
5
|
+
"archives": {
|
|
6
|
+
"win32": {
|
|
7
|
+
"url": "https://dl.google.com/android/repository/platform-tools_r37.0.3-win.zip",
|
|
8
|
+
"sha256": "b5d2015f5d5b7a24a2ac646a245f20f63fb501e4174c61863c74bed1df6de4bd",
|
|
9
|
+
"size": 8188595,
|
|
10
|
+
"executable": "adb.exe"
|
|
11
|
+
},
|
|
12
|
+
"darwin": {
|
|
13
|
+
"url": "https://dl.google.com/android/repository/platform-tools_r37.0.3-darwin.zip",
|
|
14
|
+
"sha256": "f89baeb829903ceaf3ac92a78a2d25152728049d6316ebeaaca06d716e64842d",
|
|
15
|
+
"size": 16597640,
|
|
16
|
+
"executable": "adb"
|
|
17
|
+
},
|
|
18
|
+
"linux": {
|
|
19
|
+
"url": "https://dl.google.com/android/repository/platform-tools_r37.0.3-linux.zip",
|
|
20
|
+
"sha256": "214548146cadb2ca3508143d8a1d4be4c59de5bb837253e3ede89ed74cf450d1",
|
|
21
|
+
"size": 9571024,
|
|
22
|
+
"executable": "adb"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scrcpy": {
|
|
27
|
+
"version": "5.0.1",
|
|
28
|
+
"url": "https://github.com/Genymobile/scrcpy/releases/download/v5.0.1/scrcpy-server-v5.0.1",
|
|
29
|
+
"sha256": "764eb6f79811d5211fe9df341120882ba9994c7a61b897d7bf3fb662e53bc536",
|
|
30
|
+
"size": 733930
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""devices
|
|
2
|
+
|
|
3
|
+
Revision ID: 1b175242d337
|
|
4
|
+
Revises: 4c1f0a9e2b7d
|
|
5
|
+
Create Date: 2026-11-15 03:19:11.126143
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
from alembic import op
|
|
12
|
+
|
|
13
|
+
revision: str = '1b175242d337'
|
|
14
|
+
down_revision: Union[str, Sequence[str], None] = '4c1f0a9e2b7d'
|
|
15
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
16
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
17
|
+
|
|
18
|
+
NOW = sa.text("(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
op.create_table(
|
|
23
|
+
"devices",
|
|
24
|
+
sa.Column("id", sa.String(), primary_key=True, comment="Slug of the name the device was first saved with, used in the app's routes"),
|
|
25
|
+
sa.Column("serial", sa.String(), nullable=False, unique=True, comment="Hardware serial the device reports (ro.serialno), the same over USB and Wi-Fi"),
|
|
26
|
+
sa.Column("name", sa.String(), nullable=False, comment="Name the panel shows: the device's marketing name until the user renames it"),
|
|
27
|
+
sa.Column("model", sa.String(), nullable=False, comment="Model the device reports (ro.product.model)"),
|
|
28
|
+
sa.Column("address", sa.String(), nullable=True, comment="host:port it was last reached at over Wi-Fi, to connect it again where mDNS does not reach; NULL for a device only seen over USB"),
|
|
29
|
+
sa.Column("created_at", sa.String(), nullable=False, server_default=NOW, comment="When it was first seen authorized, in UTC"),
|
|
30
|
+
sa.Column("seen_at", sa.String(), nullable=False, server_default=NOW, comment="When it was last connected, in UTC; the panel lists saved devices newest first"),
|
|
31
|
+
comment="Android devices the Devices panel has seen authorized, so one paired over Wi-Fi keeps its name and can be connected again",
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def downgrade() -> None:
|
|
36
|
+
op.drop_table("devices")
|