cconnect 2.2.0__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cconnect-2.2.0 → cconnect-2.2.3}/PKG-INFO +1 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/cconnect.egg-info/PKG-INFO +1 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/cconnect.egg-info/SOURCES.txt +1 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/databases/engines.json +13 -1
- cconnect-2.2.3/core/packs/cconnect-extras/backgrounds/doodles.json +8 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/pack.json +1 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/schema.json +1 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/core/release.py +1 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/__init__.py +1 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/databases.py +9 -6
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/chat.py +2 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/databases.py +11 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/projects.py +7 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/sessions.py +11 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/browser.py +2 -74
- {cconnect-2.2.0 → cconnect-2.2.3}/services/chat_list.py +12 -7
- {cconnect-2.2.0 → cconnect-2.2.3}/services/cli_settings.py +36 -4
- {cconnect-2.2.0 → cconnect-2.2.3}/services/database_data.py +158 -14
- {cconnect-2.2.0 → cconnect-2.2.3}/services/database_engines.py +1 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/git_ops.py +5 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/services/project_watch.py +62 -34
- {cconnect-2.2.0 → cconnect-2.2.3}/services/sessions.py +32 -11
- {cconnect-2.2.0 → cconnect-2.2.3}/services/system_monitor.py +10 -1
- {cconnect-2.2.0 → cconnect-2.2.3}/cconnect.egg-info/dependency_links.txt +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/cconnect.egg-info/entry_points.txt +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/cconnect.egg-info/requires.txt +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/cconnect.egg-info/top_level.txt +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/__init__.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/access.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/app.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/capture/manifest.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/capture/offscreen.html +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/capture/offscreen.js +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/capture/worker.js +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/cli.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/cli_manager.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/config.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/db.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/display.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/migrations/env.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/migrations/script.py.mako +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/migrations/versions/20261107_7d5d3c3df2d8_baseline.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/migrations/versions/20261107_ba9d242701ac_trash_timestamps.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/migrations/versions/20261107_e27b5df5f03a_server_state.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/migrations/versions/20261108_4c1f0a9e2b7d_mcp_catalogs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/models.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packages.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/builtin.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect/accents.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect/pack.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect/terminal/black.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect/themes/cconnect-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect/themes/cconnect-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/nord.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/ayu-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/ayu-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/ayu-mirage.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/claude-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/claude-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/dracula.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/everforest-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/everforest-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/github-dark-hc.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/github-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/github-dimmed.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/github-light-hc.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/github-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/kanagawa.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/monokai.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/nord.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/one-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/tokyo-night.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/ubuntu-dark.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/ubuntu-light.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/vscode-light-modern.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/paths.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/process_job.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/process_tree.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/BLOCKS.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/BROWSER.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/CCONNECT.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/COMMIT.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/INSTALL.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/MODS.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/SUGGESTIONS.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/prompts/TOOLS.md +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/rate_limit.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/responses.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/scripts/browse.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/scripts/mcp_bridge.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/scripts/page_frame.js +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/scripts/page_icon.js +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/sdk.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/settings_defs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/slugs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/core/ws.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/browser.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/check_progress.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/components.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/definition.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/delegate.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/media.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/packs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/session.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/shared_files.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/mcps/terminal.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/middleware/__init__.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/middleware/error_handler.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/middleware/public_auth.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/middleware/security.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/pyproject.toml +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/__init__.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/accounts.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/agents.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/browser.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/capabilities.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/claude.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/cli.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/git.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/health.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/list.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/network.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/packs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/pages.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/settings.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/shared.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/system.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/routers/terminal.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/schemas/__init__.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/schemas/accounts.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/schemas/chat.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/schemas/chat_events.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/schemas/contract.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/schemas/network.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/__init__.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/accounts.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/acp_events.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/acp_peer.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/agent_connections.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/agent_mcp.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/agent_registry.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/agent_sessions.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/agents.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/api_errors.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/attachments.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/blocks.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/categories.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/claude_assets.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/claude_manage.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/claude_runtime.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/claude_status.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/cli_info.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/cli_login.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/control_requests.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/database_tunnels.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/databases.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/delegate_runner.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/delegate_runs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/delegates.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/diffs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/directories.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/directory_watch.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/elicitation.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/event_rows.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/files.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/git.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/hook_events.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/live_sessions.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/mcp_lazy.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/memory_pressure.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/mods.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/network.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/pack_format.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/packs.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/pages.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/persistent_sessions.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/processes.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/project_files.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/projects.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/prompt_cache.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/providers.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/questions.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/repo.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/rewind.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/settings_store.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/shared.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/shared_links.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/shared_watch.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/speedtest.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/system_watch.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/terminal.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/todos.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/tool_calls.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/tool_props.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/trash.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/usage.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/services/visibility.py +0 -0
- {cconnect-2.2.0 → cconnect-2.2.3}/setup.cfg +0 -0
|
@@ -43,6 +43,7 @@ core/packs/cconnect/pack.json
|
|
|
43
43
|
core/packs/cconnect-extras/pack.json
|
|
44
44
|
core/packs/cconnect-extras/backgrounds/cyberpunk.json
|
|
45
45
|
core/packs/cconnect-extras/backgrounds/darkwave.json
|
|
46
|
+
core/packs/cconnect-extras/backgrounds/doodles.json
|
|
46
47
|
core/packs/cconnect-extras/terminal/campbell.json
|
|
47
48
|
core/packs/cconnect-extras/terminal/catppuccin-latte.json
|
|
48
49
|
core/packs/cconnect-extras/terminal/catppuccin-mocha.json
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"primary_key": null,
|
|
20
20
|
"columns": null,
|
|
21
21
|
"binary": "X'{hex}'",
|
|
22
|
+
"quote": "\"",
|
|
23
|
+
"auto_increment": "",
|
|
24
|
+
"identity_sync": "",
|
|
25
|
+
"identity_insert_on": "",
|
|
26
|
+
"identity_insert_off": "",
|
|
22
27
|
"hidden_schemas": ["information_schema", "INFORMATION_SCHEMA"],
|
|
23
28
|
"options": [],
|
|
24
29
|
"extensions": [],
|
|
@@ -55,6 +60,8 @@
|
|
|
55
60
|
"read_only": ["SET TRANSACTION READ ONLY"],
|
|
56
61
|
"timeout": "SET LOCAL statement_timeout = {milliseconds}",
|
|
57
62
|
"binary": "decode('{hex}', 'hex')",
|
|
63
|
+
"auto_increment": "GENERATED BY DEFAULT AS IDENTITY",
|
|
64
|
+
"identity_sync": "SELECT setval(pg_get_serial_sequence('{table}', '{column}'), COALESCE((SELECT max({column}) FROM {table}), 0) + 1, false);",
|
|
58
65
|
"hidden_schemas": ["information_schema", "pg_catalog", "pg_toast"],
|
|
59
66
|
"returning": "cte"
|
|
60
67
|
},
|
|
@@ -69,6 +76,8 @@
|
|
|
69
76
|
"connect_timeout": "connect_timeout",
|
|
70
77
|
"read_only": ["SET TRANSACTION READ ONLY"],
|
|
71
78
|
"timeout": "SET SESSION max_execution_time = {milliseconds}",
|
|
79
|
+
"quote": "`",
|
|
80
|
+
"auto_increment": "AUTO_INCREMENT",
|
|
72
81
|
"hidden_schemas": ["information_schema", "mysql", "performance_schema", "sys"]
|
|
73
82
|
},
|
|
74
83
|
{
|
|
@@ -89,6 +98,9 @@
|
|
|
89
98
|
"sqlglot": "tsql",
|
|
90
99
|
"connect_timeout": "login_timeout",
|
|
91
100
|
"binary": "0x{hex}",
|
|
101
|
+
"auto_increment": "IDENTITY(1,1)",
|
|
102
|
+
"identity_insert_on": "SET IDENTITY_INSERT {table} ON;",
|
|
103
|
+
"identity_insert_off": "SET IDENTITY_INSERT {table} OFF;",
|
|
92
104
|
"hidden_schemas": ["INFORMATION_SCHEMA", "sys", "guest"]
|
|
93
105
|
},
|
|
94
106
|
{
|
|
@@ -126,7 +138,7 @@
|
|
|
126
138
|
{"id": "aurora_dsql", "extends": "postgresql", "label": "Amazon Aurora DSQL", "dialect": "auroradsql+psycopg", "packages": ["aurora-dsql-sqlalchemy", "psycopg[binary]"], "distributions": ["aurora-dsql-sqlalchemy", "psycopg"], "returning": null},
|
|
127
139
|
{"id": "athena", "label": "Amazon Athena", "dialect": "awsathena+rest", "packages": ["pyathena[sqlalchemy]"], "distributions": ["pyathena"], "port": 443, "sqlglot": "athena", "options": ["s3_staging_dir", "work_group"]},
|
|
128
140
|
{"id": "dynamodb", "label": "Amazon DynamoDB", "dialect": "dynamodb", "packages": ["pydynamodb"], "distributions": ["pydynamodb"], "port": 443, "options": ["region_name"]},
|
|
129
|
-
{"id": "redshift", "extends": "postgresql", "label": "Amazon Redshift", "home": "dev", "dialect": "redshift+psycopg2", "packages": ["sqlalchemy-redshift", "psycopg2-binary"], "distributions": ["sqlalchemy-redshift", "psycopg2-binary"], "port": 5439, "sqlglot": "redshift", "timeout": null, "returning": null},
|
|
141
|
+
{"id": "redshift", "extends": "postgresql", "label": "Amazon Redshift", "home": "dev", "dialect": "redshift+psycopg2", "packages": ["sqlalchemy-redshift", "psycopg2-binary"], "distributions": ["sqlalchemy-redshift", "psycopg2-binary"], "port": 5439, "sqlglot": "redshift", "timeout": null, "auto_increment": "IDENTITY(1,1)", "identity_sync": "", "returning": null},
|
|
130
142
|
{"id": "drill", "label": "Apache Drill", "dialect": "drill+sadrill", "packages": ["sqlalchemy-drill"], "distributions": ["sqlalchemy-drill"], "port": 8047, "sqlglot": "drill"},
|
|
131
143
|
{"id": "druid", "label": "Apache Druid", "dialect": "druid", "packages": ["pydruid[sqlalchemy]"], "distributions": ["pydruid"], "port": 8082, "sqlglot": "druid"},
|
|
132
144
|
{"id": "hive", "label": "Apache Hive", "dialect": "hive", "packages": ["pyhive[hive_pure_sasl]"], "distributions": ["pyhive"], "port": 10000, "sqlglot": "hive"},
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"x": { "min": 0, "max": 100 },
|
|
107
107
|
"y": { "min": 0, "max": 100 }
|
|
108
108
|
},
|
|
109
|
-
"backgroundFits": ["cover", "contain"],
|
|
109
|
+
"backgroundFits": ["cover", "contain", "tile"],
|
|
110
110
|
"accentSources": { "dynamic": "dynamic", "theme": "theme" },
|
|
111
111
|
"fontKinds": ["text", "mono", "symbols", "emoji"],
|
|
112
112
|
"fontFormats": ["woff2", "woff", "ttf", "otf"],
|
|
@@ -69,6 +69,7 @@ def _discover(context: dict) -> list[tuple[Any, Any]]:
|
|
|
69
69
|
def _probe(capabilities: Iterable[str]) -> dict:
|
|
70
70
|
return {
|
|
71
71
|
"request_compact": lambda *_args: None,
|
|
72
|
+
"reload": lambda *_args: None,
|
|
72
73
|
"session_info": lambda: {},
|
|
73
74
|
"emit": lambda *_args, **_kwargs: None,
|
|
74
75
|
"ask_user": lambda *_args, **_kwargs: None,
|
|
@@ -105,7 +105,8 @@ DB_MANAGE = Definition(
|
|
|
105
105
|
" a connection and update changes the fields given; remove deletes the connection, never the database; test"
|
|
106
106
|
" connects without saving. install and uninstall put an engine's driver on the server or take it off. open"
|
|
107
107
|
" opens a SQLite or DuckDB file as a connection for this session. export writes a table or a query to the"
|
|
108
|
-
" shared folder as CSV, or a table as SQL
|
|
108
|
+
" shared folder as CSV, or a table, a schema or the whole database as SQL with its structure and rows, and"
|
|
109
|
+
" shows the file to the user.",
|
|
109
110
|
{
|
|
110
111
|
"type": "object",
|
|
111
112
|
"properties": {
|
|
@@ -141,10 +142,10 @@ DB_MANAGE = Definition(
|
|
|
141
142
|
},
|
|
142
143
|
"description": "add and update: an SSH tunnel through another machine, with the server's ssh client.",
|
|
143
144
|
},
|
|
144
|
-
"schema": {"type": "string", "description": "export: the table's
|
|
145
|
-
"table": {"type": "string", "description": "export: the table to write."},
|
|
145
|
+
"schema": {"type": "string", "description": "export: the schema to write, or the table's; the default one when left out."},
|
|
146
|
+
"table": {"type": "string", "description": "export: the table to write. Without table and sql, the schema or the whole database is written."},
|
|
146
147
|
"sql": {"type": "string", "description": "export: a query that reads, written instead of a table."},
|
|
147
|
-
"format": {"type": "string", "enum": list(database_data.TABLE_FORMATS), "description": "export: csv
|
|
148
|
+
"format": {"type": "string", "enum": list(database_data.TABLE_FORMATS), "description": "export: csv or sql for a table, csv when left out; a schema or a database is always sql."},
|
|
148
149
|
},
|
|
149
150
|
"required": ["action"],
|
|
150
151
|
},
|
|
@@ -499,10 +500,12 @@ def _export_file(args: dict, folder: Path) -> str:
|
|
|
499
500
|
scope = _scope(args)
|
|
500
501
|
if args.get("sql"):
|
|
501
502
|
written = database_data.export_query(scope, args["sql"], folder)
|
|
502
|
-
|
|
503
|
+
elif args.get("table"):
|
|
503
504
|
written = database_data.export_table(
|
|
504
|
-
scope, args.get("schema") or None, args
|
|
505
|
+
scope, args.get("schema") or None, args["table"], None, False, "", args.get("format") or database_data.CSV, folder,
|
|
505
506
|
)
|
|
507
|
+
else:
|
|
508
|
+
written = database_data.export_dump(scope, args.get("schema") or None, folder=folder)
|
|
506
509
|
return Path(written).name
|
|
507
510
|
|
|
508
511
|
|
|
@@ -543,7 +543,8 @@ async def chat_ws(ws: WebSocket):
|
|
|
543
543
|
|
|
544
544
|
elif mtype == "set_generation":
|
|
545
545
|
if session is not None:
|
|
546
|
-
|
|
546
|
+
settled = session.state.session_id is not None or session.running or session.resident_alive
|
|
547
|
+
if msg.cwd is not None and not settled:
|
|
547
548
|
session.state.cwd = msg.cwd or DEFAULT_CWD
|
|
548
549
|
if msg.model is not None:
|
|
549
550
|
session.state.model = msg.model
|
|
@@ -86,6 +86,10 @@ class TableExport(Browse):
|
|
|
86
86
|
format: Literal[database_data.CSV, database_data.SQL] = database_data.CSV
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
class SchemaExport(Scoped):
|
|
90
|
+
schema_name: Optional[str] = Field(None, alias="schema")
|
|
91
|
+
|
|
92
|
+
|
|
89
93
|
def _failed(exc: Exception) -> Response:
|
|
90
94
|
if isinstance(exc, databases.DatabaseError) and exc.reason == database_data.WRITES:
|
|
91
95
|
return api_response(status=403)
|
|
@@ -236,3 +240,10 @@ async def export_table(connection_id: str, body: TableExport, x_security_key: st
|
|
|
236
240
|
@router.post("/databases/{connection_id}/export/query")
|
|
237
241
|
async def export_query(connection_id: str, body: Statement, x_security_key: str = Header("")):
|
|
238
242
|
return await _reading(connection_id, x_security_key, lambda: {"path": database_data.export_query(databases.Scope(connection_id, body.database), body.sql)})
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
@router.post("/databases/{connection_id}/export/dump")
|
|
246
|
+
async def export_dump(connection_id: str, body: SchemaExport, x_security_key: str = Header("")):
|
|
247
|
+
return await _reading(
|
|
248
|
+
connection_id, x_security_key, lambda: {"path": database_data.export_dump(databases.Scope(connection_id, body.database), body.schema_name)},
|
|
249
|
+
)
|
|
@@ -66,7 +66,13 @@ async def projects_ws(ws: WebSocket):
|
|
|
66
66
|
while True:
|
|
67
67
|
msg = await ws.receive_json()
|
|
68
68
|
if msg.get("type") == "watch":
|
|
69
|
-
|
|
69
|
+
folders = msg.get("folders")
|
|
70
|
+
await asyncio.to_thread(
|
|
71
|
+
project_watch.hub.watch,
|
|
72
|
+
queue,
|
|
73
|
+
str(msg.get("project_key") or ""),
|
|
74
|
+
frozenset(map(str, folders)) if isinstance(folders, list) else frozenset(),
|
|
75
|
+
)
|
|
70
76
|
except WebSocketDisconnect:
|
|
71
77
|
pass
|
|
72
78
|
except Exception as exc:
|
|
@@ -292,6 +292,7 @@ def _session_cwd(project: str, session_id: str) -> str:
|
|
|
292
292
|
|
|
293
293
|
@router.get("/sessions/{session_id}/checkpoints")
|
|
294
294
|
def get_session_checkpoints(session_id: str, project: str, until: str | None = None):
|
|
295
|
+
project = sessions_service.newest_project_key(session_id, project)
|
|
295
296
|
try:
|
|
296
297
|
return api_response(data=sessions_service.list_checkpoints(project, session_id, until))
|
|
297
298
|
except ValueError as exc:
|
|
@@ -319,6 +320,13 @@ async def rewind_session(session_id: str, body: RewindBody):
|
|
|
319
320
|
return api_response(data=result)
|
|
320
321
|
|
|
321
322
|
|
|
323
|
+
@router.delete("/sessions/{session_id}/rewind")
|
|
324
|
+
def cancel_rewind(session_id: str):
|
|
325
|
+
rewind_service.clear_pending(session_id)
|
|
326
|
+
chat_list.hub.refresh_session(session_id)
|
|
327
|
+
return api_response(message="rewind cancelled")
|
|
328
|
+
|
|
329
|
+
|
|
322
330
|
@router.get("/sessions/{session_id}/images/{message_uuid}/{index}")
|
|
323
331
|
def get_session_image(request: Request, session_id: str, message_uuid: str, index: int, project: str, trashed: bool = False):
|
|
324
332
|
try:
|
|
@@ -354,6 +362,8 @@ def get_session_messages(
|
|
|
354
362
|
):
|
|
355
363
|
if limit < 1 or limit > 500:
|
|
356
364
|
raise HTTPException(status_code=400, detail="invalid limit")
|
|
365
|
+
if not trashed:
|
|
366
|
+
project = sessions_service.newest_project_key(session_id, project)
|
|
357
367
|
try:
|
|
358
368
|
items, earlier = sessions_service.session_segment(project, session_id, {
|
|
359
369
|
"simple": simple,
|
|
@@ -380,6 +390,7 @@ def get_session_messages(
|
|
|
380
390
|
"start_index": start,
|
|
381
391
|
"has_more": start > 0,
|
|
382
392
|
"earlier": earlier,
|
|
393
|
+
"project": project,
|
|
383
394
|
"context_tokens": sessions_service.context_tokens_in(tail),
|
|
384
395
|
"cache": prompt_cache.from_entries(tail),
|
|
385
396
|
"request_bytes": weight[0],
|
|
@@ -38,9 +38,6 @@ from core.config import (
|
|
|
38
38
|
PORT,
|
|
39
39
|
)
|
|
40
40
|
|
|
41
|
-
if os.name == "nt":
|
|
42
|
-
import msvcrt
|
|
43
|
-
|
|
44
41
|
FEED_PATH = "/api/browser/feed"
|
|
45
42
|
_LOOPBACK = ("127.0.0.1", "::1")
|
|
46
43
|
_VIDEO_MOTION_QUANTIZER = 30
|
|
@@ -51,7 +48,6 @@ _CAPTURER_WAIT = 20
|
|
|
51
48
|
_CAPTURER_POLL = 0.25
|
|
52
49
|
_FIT_ATTEMPTS = 3
|
|
53
50
|
_FIT_SETTLE = 0.15
|
|
54
|
-
_PIPE_TIMEOUT = 15.0
|
|
55
51
|
_LAUNCH_TIMEOUT = 20.0
|
|
56
52
|
_CLOSE_TIMEOUT = 5.0
|
|
57
53
|
_LOAD_TIMEOUT = 20.0
|
|
@@ -276,66 +272,6 @@ def _extension_id() -> str:
|
|
|
276
272
|
_EXTENSION_ID = _extension_id()
|
|
277
273
|
|
|
278
274
|
|
|
279
|
-
class _Pipe:
|
|
280
|
-
def __init__(self):
|
|
281
|
-
self._chrome_reads, self._we_write = os.pipe()
|
|
282
|
-
self._we_read, self._chrome_writes = os.pipe()
|
|
283
|
-
self._last_id = 0
|
|
284
|
-
self._buffer = b""
|
|
285
|
-
|
|
286
|
-
def _handles(self) -> tuple[int, int]:
|
|
287
|
-
return msvcrt.get_osfhandle(self._chrome_reads), msvcrt.get_osfhandle(self._chrome_writes)
|
|
288
|
-
|
|
289
|
-
def arguments(self) -> list[str]:
|
|
290
|
-
if os.name != "nt":
|
|
291
|
-
return ["--remote-debugging-pipe"]
|
|
292
|
-
handles = self._handles()
|
|
293
|
-
for handle in handles:
|
|
294
|
-
os.set_handle_inheritable(handle, True)
|
|
295
|
-
return ["--remote-debugging-pipe", f"--remote-debugging-io-pipes={handles[0]},{handles[1]}"]
|
|
296
|
-
|
|
297
|
-
def popen_options(self) -> dict:
|
|
298
|
-
if os.name == "nt":
|
|
299
|
-
startup = subprocess.STARTUPINFO()
|
|
300
|
-
startup.lpAttributeList = {"handle_list": list(self._handles())}
|
|
301
|
-
return {"startupinfo": startup}
|
|
302
|
-
reads, writes = self._chrome_reads, self._chrome_writes
|
|
303
|
-
|
|
304
|
-
def place():
|
|
305
|
-
kept = (os.dup(reads), os.dup(writes))
|
|
306
|
-
os.dup2(kept[0], 3)
|
|
307
|
-
os.dup2(kept[1], 4)
|
|
308
|
-
|
|
309
|
-
return {"pass_fds": (reads, writes), "preexec_fn": place}
|
|
310
|
-
|
|
311
|
-
def child_started(self):
|
|
312
|
-
os.close(self._chrome_reads)
|
|
313
|
-
os.close(self._chrome_writes)
|
|
314
|
-
|
|
315
|
-
def call(self, method: str, params: Optional[dict] = None, timeout: float = _PIPE_TIMEOUT) -> dict:
|
|
316
|
-
self._last_id += 1
|
|
317
|
-
os.write(self._we_write, json.dumps({"id": self._last_id, "method": method, "params": params or {}}).encode() + b"\0")
|
|
318
|
-
deadline = time.monotonic() + timeout
|
|
319
|
-
while time.monotonic() < deadline:
|
|
320
|
-
while b"\0" in self._buffer:
|
|
321
|
-
raw, self._buffer = self._buffer.split(b"\0", 1)
|
|
322
|
-
reply = json.loads(raw)
|
|
323
|
-
if reply.get("id") == self._last_id:
|
|
324
|
-
if reply.get("error"):
|
|
325
|
-
raise RuntimeError(reply["error"].get("message") or "pipe error")
|
|
326
|
-
return reply.get("result") or {}
|
|
327
|
-
chunk = os.read(self._we_read, 65536)
|
|
328
|
-
if not chunk:
|
|
329
|
-
raise RuntimeError("pipe closed")
|
|
330
|
-
self._buffer += chunk
|
|
331
|
-
raise RuntimeError("pipe timeout")
|
|
332
|
-
|
|
333
|
-
def close(self):
|
|
334
|
-
for descriptor in (self._we_write, self._we_read):
|
|
335
|
-
with suppress(OSError):
|
|
336
|
-
os.close(descriptor)
|
|
337
|
-
|
|
338
|
-
|
|
339
275
|
def _fetch_icon(url: str, agent: str) -> str:
|
|
340
276
|
if url.startswith("data:image/"):
|
|
341
277
|
return url if len(url) <= _ICON_BYTES else ""
|
|
@@ -460,7 +396,6 @@ class BrowserSession:
|
|
|
460
396
|
self._jpeg_viewers = 0
|
|
461
397
|
self._frames = 0
|
|
462
398
|
self._unacked: list[tuple[int, Any, str]] = []
|
|
463
|
-
self._pipe: Optional[_Pipe] = None
|
|
464
399
|
self._capturer = ""
|
|
465
400
|
self._feed_token = secrets.token_urlsafe(24)
|
|
466
401
|
self._feed: Any = None
|
|
@@ -756,11 +691,9 @@ class BrowserSession:
|
|
|
756
691
|
profile = paths.BROWSER_PROFILE_DIR
|
|
757
692
|
profile.mkdir(parents=True, exist_ok=True)
|
|
758
693
|
await _close_stale(BROWSER_DEBUG_PORT)
|
|
759
|
-
self._pipe = _Pipe()
|
|
760
694
|
arguments = [
|
|
761
695
|
binary,
|
|
762
696
|
f"--remote-debugging-port={BROWSER_DEBUG_PORT}",
|
|
763
|
-
*self._pipe.arguments(),
|
|
764
697
|
"--enable-unsafe-extension-debugging",
|
|
765
698
|
f"--allowlisted-extension-id={_EXTENSION_ID}",
|
|
766
699
|
f"--user-data-dir={profile}",
|
|
@@ -782,9 +715,7 @@ class BrowserSession:
|
|
|
782
715
|
encoding="utf-8",
|
|
783
716
|
errors="replace",
|
|
784
717
|
creationflags=creation,
|
|
785
|
-
**self._pipe.popen_options(),
|
|
786
718
|
)
|
|
787
|
-
self._pipe.child_started()
|
|
788
719
|
process_job.tie(self._process.pid)
|
|
789
720
|
|
|
790
721
|
loop = asyncio.get_running_loop()
|
|
@@ -806,8 +737,8 @@ class BrowserSession:
|
|
|
806
737
|
]
|
|
807
738
|
self._agent = (await self._cdp.call("Browser.getVersion")).get("userAgent") or ""
|
|
808
739
|
logger.info(f"browser: attached to {binary}")
|
|
809
|
-
with suppress(
|
|
810
|
-
await
|
|
740
|
+
with suppress(Exception):
|
|
741
|
+
await self._cdp.call("Extensions.loadUnpacked", {"path": str(paths.CAPTURE_DIR)})
|
|
811
742
|
|
|
812
743
|
async def _find_capturer(self) -> str:
|
|
813
744
|
if self._capturer:
|
|
@@ -1298,9 +1229,6 @@ class BrowserSession:
|
|
|
1298
1229
|
self._streaming = ""
|
|
1299
1230
|
self._capture_failed = False
|
|
1300
1231
|
self._inner = (0, 0)
|
|
1301
|
-
if self._pipe is not None:
|
|
1302
|
-
self._pipe.close()
|
|
1303
|
-
self._pipe = None
|
|
1304
1232
|
|
|
1305
1233
|
if cdp is not None:
|
|
1306
1234
|
try:
|
|
@@ -64,7 +64,7 @@ class ChatListHub:
|
|
|
64
64
|
self._resident: set[str] = set()
|
|
65
65
|
self._hidden: set[str] = set()
|
|
66
66
|
self._projects: dict[str, dict] = {}
|
|
67
|
-
self._sig_cache: dict[str, tuple] = {}
|
|
67
|
+
self._sig_cache: dict[tuple[str, str], tuple] = {}
|
|
68
68
|
self._folders: dict[str, Folder] = {}
|
|
69
69
|
self._followers: set[Callable[[set[str]], None]] = set()
|
|
70
70
|
self._subscribers: set[asyncio.Queue] = set()
|
|
@@ -223,9 +223,9 @@ class ChatListHub:
|
|
|
223
223
|
def _poll_loop(self):
|
|
224
224
|
while not self._stop.wait(_POLL_SECONDS):
|
|
225
225
|
with self._scanning:
|
|
226
|
-
before = {
|
|
226
|
+
before = {key: cached[0] for key, cached in self._sig_cache.items()}
|
|
227
227
|
self._rescan(True, None)
|
|
228
|
-
written = {
|
|
228
|
+
written = {key[1] for key, cached in self._sig_cache.items() if before.get(key) != cached[0]}
|
|
229
229
|
self._tell_followers(written)
|
|
230
230
|
|
|
231
231
|
def _tell_followers(self, written: set[str]):
|
|
@@ -242,7 +242,7 @@ class ChatListHub:
|
|
|
242
242
|
return False, None
|
|
243
243
|
sid = file.stem
|
|
244
244
|
sig = (st.st_mtime, st.st_size)
|
|
245
|
-
cached = self._sig_cache.get(sid)
|
|
245
|
+
cached = self._sig_cache.get((pkey, sid))
|
|
246
246
|
if cached is not None and cached[0] == sig:
|
|
247
247
|
return True, cached[1]
|
|
248
248
|
cwd, preview, title, color, entrypoint, has_content = sessions_service._session_meta(file)
|
|
@@ -259,7 +259,7 @@ class ChatListHub:
|
|
|
259
259
|
"title": title,
|
|
260
260
|
"color": color,
|
|
261
261
|
}
|
|
262
|
-
self._sig_cache[sid] = (sig, meta)
|
|
262
|
+
self._sig_cache[(pkey, sid)] = (sig, meta)
|
|
263
263
|
return True, meta
|
|
264
264
|
|
|
265
265
|
def _scan_folder(self, directory: Path, live: set[str], known: Optional[Folder], names: Optional[set[str]]) -> Folder:
|
|
@@ -314,12 +314,17 @@ class ChatListHub:
|
|
|
314
314
|
else:
|
|
315
315
|
folders[pkey] = self._scan_folder(directory, live, known, touched.get(pkey) if touched else None)
|
|
316
316
|
self._folders = folders
|
|
317
|
-
seen = {sid for _project, _listed, found in folders.
|
|
317
|
+
seen = {(pkey, sid) for pkey, (_project, _listed, found) in folders.items() for sid in found}
|
|
318
|
+
newest: dict[str, dict] = {}
|
|
318
319
|
for pkey, (project, listed, _found) in folders.items():
|
|
319
320
|
if project is not None:
|
|
320
321
|
projects[pkey] = dict(project)
|
|
321
322
|
for sid, meta in listed.items():
|
|
322
|
-
|
|
323
|
+
known = newest.get(sid)
|
|
324
|
+
if known is None or meta["last_active"] > known["last_active"]:
|
|
325
|
+
newest[sid] = meta
|
|
326
|
+
for sid, meta in newest.items():
|
|
327
|
+
sessions[sid] = self._with_activity(sid, sessions_service.with_pinned(sid, meta))
|
|
323
328
|
if len(self._sig_cache) > len(seen):
|
|
324
329
|
self._sig_cache = {k: v for k, v in self._sig_cache.items() if k in seen}
|
|
325
330
|
for key, meta in projects_service.snapshot().items():
|
|
@@ -5,11 +5,14 @@ from __future__ import annotations
|
|
|
5
5
|
import json
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Any, Optional
|
|
8
|
+
from typing import Any, Callable, Optional
|
|
9
9
|
|
|
10
10
|
from services import files
|
|
11
11
|
|
|
12
12
|
_SETTINGS_FILE = "settings.json"
|
|
13
|
+
_ATTRIBUTION = "attribution"
|
|
14
|
+
_ATTRIBUTION_PARTS = ("commit", "pr")
|
|
15
|
+
_LEGACY_ATTRIBUTION = "includeCoAuthoredBy"
|
|
13
16
|
|
|
14
17
|
MAX_SAFE_INTEGER = 9007199254740991
|
|
15
18
|
|
|
@@ -23,6 +26,31 @@ class CliSettingDef:
|
|
|
23
26
|
minimum: Optional[int] = None
|
|
24
27
|
maximum: Optional[int] = None
|
|
25
28
|
unset_by: Any = None
|
|
29
|
+
read: Optional[Callable[[dict], Any]] = None
|
|
30
|
+
write: Optional[Callable[[dict, Any], None]] = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _attributed(data: dict) -> Optional[bool]:
|
|
34
|
+
"""Whether commits carry the trailer: the CLI hides it with empty commit and pr texts."""
|
|
35
|
+
stored = data.get(_ATTRIBUTION)
|
|
36
|
+
if isinstance(stored, dict):
|
|
37
|
+
return any(stored.get(part) != "" for part in _ATTRIBUTION_PARTS)
|
|
38
|
+
if isinstance(stored, bool):
|
|
39
|
+
return stored
|
|
40
|
+
legacy = data.get(_LEGACY_ATTRIBUTION)
|
|
41
|
+
return legacy if isinstance(legacy, bool) else None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _attribute(data: dict, enabled: Optional[bool]) -> None:
|
|
45
|
+
stored = data.get(_ATTRIBUTION)
|
|
46
|
+
kept = {key: value for key, value in stored.items() if key not in _ATTRIBUTION_PARTS} if isinstance(stored, dict) else {}
|
|
47
|
+
data.pop(_LEGACY_ATTRIBUTION, None)
|
|
48
|
+
if enabled is False:
|
|
49
|
+
data[_ATTRIBUTION] = {**kept, **dict.fromkeys(_ATTRIBUTION_PARTS, "")}
|
|
50
|
+
elif kept:
|
|
51
|
+
data[_ATTRIBUTION] = kept
|
|
52
|
+
else:
|
|
53
|
+
data.pop(_ATTRIBUTION, None)
|
|
26
54
|
|
|
27
55
|
|
|
28
56
|
SETTINGS: dict[str, CliSettingDef] = {
|
|
@@ -67,11 +95,13 @@ SETTINGS: dict[str, CliSettingDef] = {
|
|
|
67
95
|
description="Let a session started here be taken over from claude.ai",
|
|
68
96
|
),
|
|
69
97
|
"co_authored": CliSettingDef(
|
|
70
|
-
json_key=
|
|
98
|
+
json_key=_ATTRIBUTION,
|
|
71
99
|
default=True,
|
|
72
100
|
type=bool,
|
|
73
101
|
description="Add the Co-Authored-By trailer to the commits and pull requests Claude writes",
|
|
74
102
|
unset_by=True,
|
|
103
|
+
read=_attributed,
|
|
104
|
+
write=_attribute,
|
|
75
105
|
),
|
|
76
106
|
"session_upload": CliSettingDef(
|
|
77
107
|
json_key="autoUploadSessions",
|
|
@@ -153,7 +183,7 @@ def _valid(value: Any, expected: type) -> bool:
|
|
|
153
183
|
|
|
154
184
|
def _stored(key: str) -> Any:
|
|
155
185
|
defn = SETTINGS[key]
|
|
156
|
-
value = lookup(_read(), defn.json_key)
|
|
186
|
+
value = defn.read(_read()) if defn.read else lookup(_read(), defn.json_key)
|
|
157
187
|
return value if _valid(value, defn.type) else None
|
|
158
188
|
|
|
159
189
|
|
|
@@ -217,7 +247,9 @@ def set(key: str, value: Any) -> None:
|
|
|
217
247
|
if defn.maximum is not None and value > defn.maximum:
|
|
218
248
|
raise ValueError(f"{key} must be at most {defn.maximum}")
|
|
219
249
|
data = _read()
|
|
220
|
-
if
|
|
250
|
+
if defn.write:
|
|
251
|
+
defn.write(data, None if blank else value)
|
|
252
|
+
elif not blank:
|
|
221
253
|
assign(data, defn.json_key, value)
|
|
222
254
|
elif value is None or _valid(lookup(data, defn.json_key), defn.type):
|
|
223
255
|
discard(data, defn.json_key)
|