cconnect 2.0.9__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cconnect-2.0.9 → cconnect-2.1.1}/PKG-INFO +2 -2
- {cconnect-2.0.9 → cconnect-2.1.1}/cconnect.egg-info/PKG-INFO +2 -2
- {cconnect-2.0.9 → cconnect-2.1.1}/cconnect.egg-info/SOURCES.txt +4 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/cconnect.egg-info/requires.txt +1 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/core/app.py +1 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/cli.py +23 -9
- {cconnect-2.0.9 → cconnect-2.1.1}/core/cli_manager.py +1 -3
- {cconnect-2.0.9 → cconnect-2.1.1}/core/config.py +0 -15
- {cconnect-2.0.9 → cconnect-2.1.1}/core/db.py +1 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/core/models.py +9 -10
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/schema.json +2 -2
- {cconnect-2.0.9 → cconnect-2.1.1}/core/paths.py +9 -0
- cconnect-2.1.1/core/prompts/INSTALL.md +33 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/release.py +1 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/core/responses.py +13 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/core/ws.py +30 -4
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/check_progress.py +2 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/media.py +2 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/packs.py +4 -3
- {cconnect-2.0.9 → cconnect-2.1.1}/middleware/public_auth.py +3 -4
- {cconnect-2.0.9 → cconnect-2.1.1}/middleware/security.py +6 -2
- {cconnect-2.0.9 → cconnect-2.1.1}/pyproject.toml +1 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/browser.py +5 -12
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/chat.py +30 -34
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/claude.py +35 -4
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/list.py +2 -5
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/network.py +6 -16
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/packs.py +13 -1
- cconnect-2.1.1/routers/pages.py +46 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/projects.py +10 -13
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/sessions.py +1 -1
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/shared.py +5 -5
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/system.py +13 -7
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/terminal.py +5 -14
- {cconnect-2.0.9 → cconnect-2.1.1}/services/accounts.py +2 -12
- {cconnect-2.0.9 → cconnect-2.1.1}/services/agent_connections.py +28 -5
- {cconnect-2.0.9 → cconnect-2.1.1}/services/agent_sessions.py +1 -4
- {cconnect-2.0.9 → cconnect-2.1.1}/services/browser.py +49 -2
- {cconnect-2.0.9 → cconnect-2.1.1}/services/chat_list.py +21 -46
- {cconnect-2.0.9 → cconnect-2.1.1}/services/claude_manage.py +95 -16
- {cconnect-2.0.9 → cconnect-2.1.1}/services/claude_runtime.py +30 -18
- {cconnect-2.0.9 → cconnect-2.1.1}/services/delegate_runner.py +10 -13
- cconnect-2.1.1/services/directory_watch.py +100 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/live_sessions.py +5 -10
- {cconnect-2.0.9 → cconnect-2.1.1}/services/network.py +12 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/pack_format.py +1 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/packs.py +23 -0
- cconnect-2.1.1/services/pages.py +85 -0
- cconnect-2.1.1/services/processes.py +351 -0
- cconnect-2.1.1/services/project_watch.py +159 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/sessions.py +176 -132
- {cconnect-2.0.9 → cconnect-2.1.1}/services/settings_store.py +1 -2
- {cconnect-2.0.9 → cconnect-2.1.1}/services/shared.py +42 -29
- {cconnect-2.0.9 → cconnect-2.1.1}/services/system_monitor.py +4 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/system_watch.py +44 -18
- {cconnect-2.0.9 → cconnect-2.1.1}/services/terminal.py +4 -1
- cconnect-2.0.9/services/directory_watch.py +0 -121
- cconnect-2.0.9/services/project_watch.py +0 -184
- {cconnect-2.0.9 → cconnect-2.1.1}/cconnect.egg-info/dependency_links.txt +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/cconnect.egg-info/entry_points.txt +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/cconnect.egg-info/top_level.txt +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/__init__.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/access.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/data_migration.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/display.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packages.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/builtin.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect/accents.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect/pack.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect/terminal/black.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect/themes/cconnect-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect/themes/cconnect-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/pack.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/nord.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/claude-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/claude-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/dracula.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-dark-hc.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-dimmed.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-light-hc.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/github-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/nord.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/one-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/tokyo-night.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-hc-dark.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-hc-light.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-light-modern.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/process_job.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/prompts/BLOCKS.md +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/prompts/BROWSER.md +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/prompts/CCONNECT.md +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/prompts/COMMIT.md +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/prompts/MODS.md +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/prompts/SUGGESTIONS.md +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/rate_limit.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/scripts/browse.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/scripts/mcp_bridge.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/scripts/page_icon.js +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/sdk.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/settings_defs.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/core/slugs.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/__init__.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/browser.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/components.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/delegate.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/session.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/shared_files.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/mcps/terminal.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/middleware/__init__.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/middleware/error_handler.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/__init__.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/accounts.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/agents.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/capabilities.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/cli.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/git.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/health.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/routers/settings.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/schemas/__init__.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/schemas/accounts.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/schemas/chat.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/schemas/network.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/__init__.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/account_login.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/acp_events.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/acp_peer.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/agent_mcp.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/agent_registry.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/agents.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/api_errors.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/attachments.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/blocks.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/categories.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/claude_assets.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/claude_status.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/cli_info.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/cli_settings.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/control_requests.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/delegate_runs.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/delegates.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/diffs.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/directories.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/elicitation.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/event_rows.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/files.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/git.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/git_ops.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/mods.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/persistent_sessions.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/project_files.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/projects.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/prompt_cache.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/providers.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/questions.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/repo.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/rewind.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/shared_links.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/shared_watch.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/speedtest.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/todos.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/tool_calls.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/tool_props.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/trash.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/usage.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/services/visibility.py +0 -0
- {cconnect-2.0.9 → cconnect-2.1.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cconnect
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Remote bridge between the CConnect client and Claude Code
|
|
5
5
|
Author: jahirtrap
|
|
6
6
|
License-Expression: MIT
|
|
@@ -30,7 +30,7 @@ Requires-Dist: psutil>=5.9.0
|
|
|
30
30
|
Requires-Dist: nvidia-ml-py>=12.0.0
|
|
31
31
|
Requires-Dist: py7zr>=1.0.0
|
|
32
32
|
Requires-Dist: rarfile>=4.2
|
|
33
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: watchfiles>=1.2.0
|
|
34
34
|
Requires-Dist: pywinpty>=2.0.13; sys_platform == "win32"
|
|
35
35
|
Requires-Dist: ptyprocess>=0.7.0; sys_platform != "win32"
|
|
36
36
|
Provides-Extra: dev
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cconnect
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Remote bridge between the CConnect client and Claude Code
|
|
5
5
|
Author: jahirtrap
|
|
6
6
|
License-Expression: MIT
|
|
@@ -30,7 +30,7 @@ Requires-Dist: psutil>=5.9.0
|
|
|
30
30
|
Requires-Dist: nvidia-ml-py>=12.0.0
|
|
31
31
|
Requires-Dist: py7zr>=1.0.0
|
|
32
32
|
Requires-Dist: rarfile>=4.2
|
|
33
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: watchfiles>=1.2.0
|
|
34
34
|
Requires-Dist: pywinpty>=2.0.13; sys_platform == "win32"
|
|
35
35
|
Requires-Dist: ptyprocess>=0.7.0; sys_platform != "win32"
|
|
36
36
|
Provides-Extra: dev
|
|
@@ -92,6 +92,7 @@ core/prompts/BLOCKS.md
|
|
|
92
92
|
core/prompts/BROWSER.md
|
|
93
93
|
core/prompts/CCONNECT.md
|
|
94
94
|
core/prompts/COMMIT.md
|
|
95
|
+
core/prompts/INSTALL.md
|
|
95
96
|
core/prompts/MODS.md
|
|
96
97
|
core/prompts/SUGGESTIONS.md
|
|
97
98
|
core/scripts/browse.py
|
|
@@ -124,6 +125,7 @@ routers/health.py
|
|
|
124
125
|
routers/list.py
|
|
125
126
|
routers/network.py
|
|
126
127
|
routers/packs.py
|
|
128
|
+
routers/pages.py
|
|
127
129
|
routers/projects.py
|
|
128
130
|
routers/sessions.py
|
|
129
131
|
routers/settings.py
|
|
@@ -173,7 +175,9 @@ services/mods.py
|
|
|
173
175
|
services/network.py
|
|
174
176
|
services/pack_format.py
|
|
175
177
|
services/packs.py
|
|
178
|
+
services/pages.py
|
|
176
179
|
services/persistent_sessions.py
|
|
180
|
+
services/processes.py
|
|
177
181
|
services/project_files.py
|
|
178
182
|
services/project_watch.py
|
|
179
183
|
services/projects.py
|
|
@@ -13,6 +13,7 @@ import shutil
|
|
|
13
13
|
import socket
|
|
14
14
|
import subprocess
|
|
15
15
|
import sys
|
|
16
|
+
import threading
|
|
16
17
|
import time
|
|
17
18
|
from contextlib import suppress
|
|
18
19
|
from datetime import datetime
|
|
@@ -30,6 +31,7 @@ _ENV_PATH = paths.ENV_FILE
|
|
|
30
31
|
_TOKEN_VAR = "PUBLIC_ACCESS_TOKEN"
|
|
31
32
|
_SECURITY_KEY_VAR = "SECURITY_KEY"
|
|
32
33
|
_HOSTNAME_VAR = "PUBLIC_HOSTNAME"
|
|
34
|
+
_LIFELINE_VAR = "CCONNECT_LIFELINE"
|
|
33
35
|
_PROVIDERS = ("tailscale", "tailnet", "caddy")
|
|
34
36
|
_PRIVATE_PROVIDERS = ("tailnet",)
|
|
35
37
|
_STOP_TIMEOUT = 10
|
|
@@ -402,7 +404,7 @@ def _flag_parser() -> argparse.ArgumentParser:
|
|
|
402
404
|
"""The launcher's original flags, accepted alongside the subcommands."""
|
|
403
405
|
parser = argparse.ArgumentParser(description="CConnect backend launcher.")
|
|
404
406
|
parser.add_argument("--production", action="store_true",
|
|
405
|
-
help="No reload
|
|
407
|
+
help="No reload (Linux/macOS only).")
|
|
406
408
|
parser.add_argument("--expose", choices=list(_PROVIDERS), default="",
|
|
407
409
|
help="Serve the backend through the given provider: tailnet keeps it "
|
|
408
410
|
"inside your tailnet, tailscale and caddy publish it.")
|
|
@@ -433,7 +435,7 @@ def _command_parser() -> argparse.ArgumentParser:
|
|
|
433
435
|
|
|
434
436
|
run = commands.add_parser("run", help="Serve on this machine and its network. The default.")
|
|
435
437
|
run.add_argument("--production", action="store_true",
|
|
436
|
-
help="No reload
|
|
438
|
+
help="No reload (Linux/macOS only).")
|
|
437
439
|
run.add_argument("--detach", action="store_true",
|
|
438
440
|
help="Run in the background; the server outlives the terminal.")
|
|
439
441
|
run.add_argument("--port", type=int, default=None, help=f"Port to serve on instead of {PORT}.")
|
|
@@ -446,7 +448,7 @@ def _command_parser() -> argparse.ArgumentParser:
|
|
|
446
448
|
expose.add_argument("--detach", action="store_true",
|
|
447
449
|
help="Run in the background; the server outlives the terminal.")
|
|
448
450
|
expose.add_argument("--production", action="store_true",
|
|
449
|
-
help="No reload
|
|
451
|
+
help="No reload (Linux/macOS only).")
|
|
450
452
|
expose.add_argument("--port", type=int, default=None, help=f"Port to serve on instead of {PORT}.")
|
|
451
453
|
|
|
452
454
|
commands.add_parser("stop", help="Stop a backend started with --detach.")
|
|
@@ -548,6 +550,20 @@ def _restart() -> None:
|
|
|
548
550
|
print(f"Restarting the backend (pid {live['PID']}).")
|
|
549
551
|
|
|
550
552
|
|
|
553
|
+
def _watch_lifeline() -> None:
|
|
554
|
+
stream = sys.stdin.buffer if sys.stdin else None
|
|
555
|
+
if stream is None:
|
|
556
|
+
return
|
|
557
|
+
|
|
558
|
+
def wait() -> None:
|
|
559
|
+
with suppress(OSError, ValueError):
|
|
560
|
+
while stream.read(4096):
|
|
561
|
+
pass
|
|
562
|
+
paths.STOP_FLAG.touch()
|
|
563
|
+
|
|
564
|
+
threading.Thread(target=wait, name="lifeline", daemon=True).start()
|
|
565
|
+
|
|
566
|
+
|
|
551
567
|
def _port_state(port: int) -> str:
|
|
552
568
|
live = _runtime()
|
|
553
569
|
if live and int(live.get("PORT") or 0) == port:
|
|
@@ -691,18 +707,16 @@ def main():
|
|
|
691
707
|
_print_security_key(key_generated)
|
|
692
708
|
|
|
693
709
|
reload = not args.production and not is_windows
|
|
694
|
-
workers = int(os.environ.get("WEB_CONCURRENCY", "2")) if (args.production and not is_windows) else 1
|
|
695
710
|
|
|
696
711
|
cmd = [sys.executable, "-m", "uvicorn", _APP, "--host", "0.0.0.0", "--port", str(port)]
|
|
697
|
-
if reload
|
|
698
|
-
cmd += ["--reload", "--reload-exclude", str(paths.DATA_DIR)]
|
|
699
|
-
elif workers > 1:
|
|
700
|
-
cmd += ["--workers", str(workers)]
|
|
712
|
+
cmd += ["--reload", "--reload-exclude", str(paths.DATA_DIR)] if reload else ["--workers", "1"]
|
|
701
713
|
|
|
702
714
|
paths.RESTART_FLAG.unlink(missing_ok=True)
|
|
703
715
|
paths.STOP_FLAG.unlink(missing_ok=True)
|
|
716
|
+
if os.environ.pop(_LIFELINE_VAR, None):
|
|
717
|
+
_watch_lifeline()
|
|
704
718
|
while True:
|
|
705
|
-
process = subprocess.Popen(cmd, cwd=paths.BACKEND_DIR)
|
|
719
|
+
process = subprocess.Popen(cmd, cwd=paths.BACKEND_DIR, stdin=subprocess.DEVNULL)
|
|
706
720
|
asked = False
|
|
707
721
|
stopped = False
|
|
708
722
|
try:
|
|
@@ -15,8 +15,6 @@ from typing import Optional
|
|
|
15
15
|
from core.settings_defs import SETTINGS
|
|
16
16
|
from services import settings_store
|
|
17
17
|
|
|
18
|
-
# Same fallback locations the SDK's own _find_cli scans after PATH, using the
|
|
19
|
-
# platform-correct binary name (claude.exe on Windows, claude elsewhere).
|
|
20
18
|
_CLI_NAME = "claude.exe" if platform.system() == "Windows" else "claude"
|
|
21
19
|
_KNOWN_LOCATIONS = (
|
|
22
20
|
Path.home() / ".local/bin" / _CLI_NAME,
|
|
@@ -148,7 +146,7 @@ def update_cli(source: Optional[str] = None, custom_path: Optional[str] = None)
|
|
|
148
146
|
def set_source(source: str, custom_path: Optional[str] = None) -> None:
|
|
149
147
|
if source == "custom" and not (custom_path and Path(custom_path).exists()):
|
|
150
148
|
raise ValueError("custom source requires an existing path")
|
|
151
|
-
settings_store.set("cli_source", source)
|
|
149
|
+
settings_store.set("cli_source", source)
|
|
152
150
|
settings_store.set("cli_custom_path", custom_path)
|
|
153
151
|
invalidate_version_cache()
|
|
154
152
|
|
|
@@ -25,16 +25,12 @@ CLAUDE_PROJECTS_DIR = os.environ.get(
|
|
|
25
25
|
str(Path.home() / ".claude" / "projects"),
|
|
26
26
|
)
|
|
27
27
|
|
|
28
|
-
# Restart contract between run.py (supervisor) and POST /api/system/restart.
|
|
29
28
|
RESTART_EXIT_CODE = 42
|
|
30
29
|
|
|
31
|
-
# Fallback cwd when the mobile starts a chat without picking a directory and the
|
|
32
|
-
# active connection has none. The parent of a checkout, home when installed.
|
|
33
30
|
DEFAULT_CWD = os.environ.get(
|
|
34
31
|
"DEFAULT_CWD", str(Path.home() if paths.INSTALLED else paths.BACKEND_DIR.parent)
|
|
35
32
|
)
|
|
36
33
|
|
|
37
|
-
# Fallback used only if the SDK can't be introspected yet.
|
|
38
34
|
_FALLBACK_PERMISSION_MODES = ("default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "auto")
|
|
39
35
|
|
|
40
36
|
DEFAULT_PERMISSION_MODE = os.environ.get("DEFAULT_PERMISSION_MODE", "bypassPermissions")
|
|
@@ -43,14 +39,12 @@ FALLBACK_PERMISSION_MODE = "auto"
|
|
|
43
39
|
_RUNNING_AS_ROOT = getattr(os, "geteuid", lambda: -1)() == 0
|
|
44
40
|
DEFAULT_EFFORT = os.environ.get("DEFAULT_EFFORT", "xhigh")
|
|
45
41
|
|
|
46
|
-
# Pseudo-level surfaced in capabilities; run_prompt expands it to xhigh + the ultracode setting.
|
|
47
42
|
ULTRACODE_EFFORT = "ultracode"
|
|
48
43
|
|
|
49
44
|
DEFAULT_MODEL = os.environ.get("DEFAULT_MODEL", "opus[1m]")
|
|
50
45
|
|
|
51
46
|
REQUEST_LIMIT_BYTES = 32 * 1024 * 1024
|
|
52
47
|
|
|
53
|
-
# Display labels for permission modes (the SDK only exposes the raw ids).
|
|
54
48
|
PERMISSION_LABELS = {
|
|
55
49
|
"default": "Default",
|
|
56
50
|
"acceptEdits": "Accept edits",
|
|
@@ -60,13 +54,8 @@ PERMISSION_LABELS = {
|
|
|
60
54
|
"auto": "Auto",
|
|
61
55
|
}
|
|
62
56
|
|
|
63
|
-
# The named set Claude uses for agent colors; the app maps each to a swatch.
|
|
64
57
|
COLORS = ["red", "orange", "yellow", "green", "cyan", "blue", "purple", "pink"]
|
|
65
58
|
|
|
66
|
-
# Slash commands CConnect handles itself. kind="client" is handled in-app; kind="prompt"
|
|
67
|
-
# is forwarded to the CLI; kind="usage" fetches plan usage out-of-band. require_confirmation
|
|
68
|
-
# prompts first. own_description keeps ours when the CLI describes a behaviour we changed.
|
|
69
|
-
# Everything else the CLI reports is appended as kind="prompt" (see services/cli_info).
|
|
70
59
|
COMMANDS = [
|
|
71
60
|
{"name": "clear", "description": "Clear this conversation", "kind": "client",
|
|
72
61
|
"require_confirmation": True, "own_description": True},
|
|
@@ -103,16 +92,12 @@ def resolve_permission_mode(mode: str | None) -> str:
|
|
|
103
92
|
return mode if mode in permission_modes() else FALLBACK_PERMISSION_MODE
|
|
104
93
|
|
|
105
94
|
|
|
106
|
-
# Gated by CCONNECT_AUTH_ACTIVE so a token left in .env from a previous --expose run
|
|
107
|
-
# doesn't auth-gate plain `python run.py`.
|
|
108
95
|
PUBLIC_ACCESS_TOKEN: str | None = (
|
|
109
96
|
os.environ.get("PUBLIC_ACCESS_TOKEN") if os.environ.get("CCONNECT_AUTH_ACTIVE") == "1" else None
|
|
110
97
|
)
|
|
111
98
|
|
|
112
99
|
SECURITY_KEY: str | None = os.environ.get("SECURITY_KEY") or None
|
|
113
100
|
|
|
114
|
-
# Chromium driven over CDP for the browser pane. Its own profile, so it never touches
|
|
115
|
-
# the user's real one, and a debug port of its own so it can coexist with other tooling.
|
|
116
101
|
BROWSER_EXECUTABLE = os.environ.get("BROWSER_EXECUTABLE", "")
|
|
117
102
|
BROWSER_DEBUG_PORT = int(os.environ.get("BROWSER_DEBUG_PORT", "9333"))
|
|
118
103
|
BROWSER_HEADLESS = os.environ.get("BROWSER_HEADLESS", "1") not in ("0", "false", "False")
|
|
@@ -49,7 +49,7 @@ def _add_missing_columns() -> list[str]:
|
|
|
49
49
|
|
|
50
50
|
def init_db() -> None:
|
|
51
51
|
"""Create the missing tables and append the missing columns."""
|
|
52
|
-
from core import models # noqa: F401
|
|
52
|
+
from core import models # noqa: F401
|
|
53
53
|
db_existed = paths.DB_FILE.exists()
|
|
54
54
|
before = set(inspect(engine).get_table_names())
|
|
55
55
|
Base.metadata.create_all(engine)
|
|
@@ -34,23 +34,26 @@ class SessionCategory(Base):
|
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class
|
|
37
|
+
class _InCategory:
|
|
38
|
+
category_id: Mapped[Optional[str]] = mapped_column(
|
|
39
|
+
nullable=True,
|
|
40
|
+
comment="Category holding the chat; NULL keeps it in the uncategorised group",
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class SessionPlacement(_InCategory, Base):
|
|
38
45
|
__tablename__ = "session_placement"
|
|
39
46
|
|
|
40
47
|
session_id: Mapped[str] = mapped_column(
|
|
41
48
|
primary_key=True,
|
|
42
49
|
comment="Transcript id on disk; rows whose session is gone are pruned",
|
|
43
50
|
)
|
|
44
|
-
category_id: Mapped[Optional[str]] = mapped_column(
|
|
45
|
-
nullable=True,
|
|
46
|
-
comment="Category holding the chat; NULL keeps it in the uncategorised group",
|
|
47
|
-
)
|
|
48
51
|
position: Mapped[float] = mapped_column(
|
|
49
52
|
comment="Sort key inside the category, only read while the order is manual",
|
|
50
53
|
)
|
|
51
54
|
|
|
52
55
|
|
|
53
|
-
class AgentSessionPlacement(Base):
|
|
56
|
+
class AgentSessionPlacement(_InCategory, Base):
|
|
54
57
|
__tablename__ = "agent_session_placement"
|
|
55
58
|
|
|
56
59
|
agent: Mapped[str] = mapped_column(
|
|
@@ -61,10 +64,6 @@ class AgentSessionPlacement(Base):
|
|
|
61
64
|
primary_key=True,
|
|
62
65
|
comment="Session id the agent gave the chat; the row goes when the chat is deleted from the app or the agent is removed",
|
|
63
66
|
)
|
|
64
|
-
category_id: Mapped[Optional[str]] = mapped_column(
|
|
65
|
-
nullable=True,
|
|
66
|
-
comment="Category holding the chat; NULL keeps it in the uncategorised group",
|
|
67
|
-
)
|
|
68
67
|
position: Mapped[float] = mapped_column(
|
|
69
68
|
comment="Sort key inside the category among that agent's chats, only read while the order is manual",
|
|
70
69
|
)
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
"fontKinds": ["text", "mono", "symbols", "emoji"],
|
|
112
112
|
"fontFormats": ["woff2", "woff", "ttf", "otf"],
|
|
113
113
|
"imageFormats": ["png", "jpg", "jpeg", "webp", "gif", "avif", "svg"],
|
|
114
|
-
"maxFileBytes":
|
|
115
|
-
"maxPackBytes":
|
|
114
|
+
"maxFileBytes": 524288000,
|
|
115
|
+
"maxPackBytes": 524288000
|
|
116
116
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Every path the backend owns, grouped by what the data is."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
+
import shutil
|
|
4
5
|
import stat
|
|
5
6
|
import subprocess
|
|
6
7
|
import sys
|
|
@@ -87,6 +88,14 @@ def unlink_dir(target: Path) -> None:
|
|
|
87
88
|
target.unlink()
|
|
88
89
|
|
|
89
90
|
|
|
91
|
+
def remove_tree(target: Path) -> bool:
|
|
92
|
+
for item in target.rglob("*"):
|
|
93
|
+
if item.is_file() and not os.access(item, os.W_OK):
|
|
94
|
+
item.chmod(stat.S_IWRITE)
|
|
95
|
+
shutil.rmtree(target, ignore_errors=True)
|
|
96
|
+
return not target.exists()
|
|
97
|
+
|
|
98
|
+
|
|
90
99
|
OWNED_DIRS = (
|
|
91
100
|
CONFIG_DIR,
|
|
92
101
|
STATE_DIR,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Install cards
|
|
2
|
+
|
|
3
|
+
The user can install MCP servers, plugins, marketplaces, skills, ACP agents and this app's packs
|
|
4
|
+
(themes, fonts, chat backgrounds) from the chat. When you find one worth adding, offer it as a
|
|
5
|
+
block of cards instead of telling them how to set it up:
|
|
6
|
+
|
|
7
|
+
````
|
|
8
|
+
```cconnect
|
|
9
|
+
{ "type": "install", "items": [
|
|
10
|
+
{ "kind": "mcp", "name": "fetch", "command": "uvx", "args": ["mcp-server-fetch"] },
|
|
11
|
+
{ "kind": "mcp", "name": "linear", "url": "https://mcp.linear.app/mcp" },
|
|
12
|
+
{ "kind": "plugin", "name": "<plugin>@<marketplace>", "source": "<owner/repo>" },
|
|
13
|
+
{ "kind": "marketplace", "source": "<owner/repo or git url>" },
|
|
14
|
+
{ "kind": "skill", "source": "<owner/repo>", "path": "<folder holding SKILL.md>" },
|
|
15
|
+
{ "kind": "agent", "id": "<ACP registry id>" },
|
|
16
|
+
{ "kind": "pack", "url": "https://<host>/<name>.ccpack" }
|
|
17
|
+
] }
|
|
18
|
+
```
|
|
19
|
+
````
|
|
20
|
+
|
|
21
|
+
An `mcp` item is the entry `.mcp.json` holds: `command` with `args` and `env`, or `url` with
|
|
22
|
+
`headers` and `type` (`http` or `sse`). A `plugin` names its marketplace after the `@`, and
|
|
23
|
+
`source` is where that marketplace is added from when the user lacks it. A pack is served over
|
|
24
|
+
https.
|
|
25
|
+
|
|
26
|
+
A `skill` is a folder of a git repository that holds its `SKILL.md`. `source` is `owner/repo` on
|
|
27
|
+
GitHub or an https git URL, `path` the folder, left out for the root, and `ref` the branch when it
|
|
28
|
+
is not the default. The folder's address on GitHub, as the user copies it
|
|
29
|
+
(`https://github.com/<owner>/<repo>/tree/<branch>/<folder>`), also works as the `source` alone.
|
|
30
|
+
|
|
31
|
+
A card installs nothing by itself: it opens a dialog that shows exactly what runs and waits for
|
|
32
|
+
the user. The same request also works as a link, `cconnect://install/<kind>?…` with those fields
|
|
33
|
+
as query parameters, where `arg`, `env=KEY=value` and `header=Name: value` repeat.
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
"""Standardized API response helpers."""
|
|
2
2
|
|
|
3
|
+
import os
|
|
3
4
|
from http import HTTPStatus
|
|
4
5
|
from math import ceil
|
|
6
|
+
from pathlib import Path
|
|
5
7
|
from typing import Any, Iterable, Optional
|
|
6
8
|
|
|
7
9
|
import orjson
|
|
10
|
+
from fastapi import Request
|
|
8
11
|
from fastapi.encoders import jsonable_encoder
|
|
9
|
-
from fastapi.responses import JSONResponse
|
|
12
|
+
from fastapi.responses import FileResponse, JSONResponse, Response
|
|
13
|
+
from starlette.staticfiles import NotModifiedResponse
|
|
10
14
|
|
|
11
15
|
FILE_HEADERS = {"Content-Encoding": "identity", "Cache-Control": "no-cache"}
|
|
12
16
|
|
|
13
17
|
|
|
18
|
+
def file_response(request: Request, path: Path, **options: Any) -> Response:
|
|
19
|
+
response = FileResponse(path, stat_result=os.stat(path), headers=FILE_HEADERS, **options)
|
|
20
|
+
held = request.headers.get("if-none-match", "")
|
|
21
|
+
if response.headers["etag"] in [tag.strip(" W/") for tag in held.split(",")]:
|
|
22
|
+
return NotModifiedResponse(response.headers)
|
|
23
|
+
return response
|
|
24
|
+
|
|
25
|
+
|
|
14
26
|
class ORJSONResponse(JSONResponse):
|
|
15
27
|
"""orjson serializes plain payloads; jsonable_encoder covers the types it rejects."""
|
|
16
28
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""WebSocket frames: orjson instead of the stdlib encoder Starlette's send_json uses."""
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
|
+
import json
|
|
4
5
|
from typing import Any, Callable, Optional, Protocol
|
|
5
6
|
|
|
6
7
|
import orjson
|
|
7
|
-
from fastapi import WebSocket, WebSocketDisconnect
|
|
8
|
+
from fastapi import WebSocket, WebSocketDisconnect, status
|
|
8
9
|
from fastapi.encoders import jsonable_encoder
|
|
9
10
|
from loguru import logger
|
|
10
11
|
|
|
@@ -21,15 +22,40 @@ async def send_event(ws: WebSocket, payload: Any) -> None:
|
|
|
21
22
|
await ws.send_text(orjson.dumps(payload, default=jsonable_encoder).decode())
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
async def refuse(ws: WebSocket) -> None:
|
|
26
|
+
await ws.close(code=status.WS_1008_POLICY_VIOLATION)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
async def accept_authorized(ws: WebSocket) -> bool:
|
|
30
|
+
"""Accept the socket when it carries the bearer, and reject its handshake otherwise."""
|
|
31
|
+
if not ws_bearer_ok(ws):
|
|
32
|
+
await refuse(ws)
|
|
33
|
+
return False
|
|
34
|
+
await ws.accept()
|
|
35
|
+
return True
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
async def opening_message(ws: WebSocket) -> Optional[dict]:
|
|
39
|
+
"""The first message of an accepted socket, or None once the socket is closed."""
|
|
40
|
+
if not await accept_authorized(ws):
|
|
41
|
+
return None
|
|
42
|
+
try:
|
|
43
|
+
opening = await ws.receive_json()
|
|
44
|
+
except (WebSocketDisconnect, RuntimeError, json.JSONDecodeError):
|
|
45
|
+
return None
|
|
46
|
+
if not isinstance(opening, dict):
|
|
47
|
+
await refuse(ws)
|
|
48
|
+
return None
|
|
49
|
+
return opening
|
|
50
|
+
|
|
51
|
+
|
|
24
52
|
async def stream_watch(
|
|
25
53
|
ws: WebSocket,
|
|
26
54
|
hub: WatchHub,
|
|
27
55
|
on_message: Optional[Callable[[asyncio.Queue, dict], None]] = None,
|
|
28
56
|
) -> None:
|
|
29
|
-
if not
|
|
30
|
-
await ws.close(code=1008)
|
|
57
|
+
if not await accept_authorized(ws):
|
|
31
58
|
return
|
|
32
|
-
await ws.accept()
|
|
33
59
|
queue = hub.subscribe()
|
|
34
60
|
|
|
35
61
|
async def pump():
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Cross-chat progress query: summarize what's happening in another Claude Code project."""
|
|
2
2
|
|
|
3
|
+
import asyncio
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
from typing import Any, Optional
|
|
5
6
|
|
|
@@ -158,7 +159,7 @@ async def _summarize(project_key: str, session_id: Optional[str] = None, account
|
|
|
158
159
|
file = _session_file(project_key, session_id) if session_id else _latest_session_file(project_key)
|
|
159
160
|
if not file or not file.is_file():
|
|
160
161
|
return None
|
|
161
|
-
transcript, has_work = _transcript_for_progress
|
|
162
|
+
transcript, has_work = await asyncio.to_thread(_transcript_for_progress, file)
|
|
162
163
|
if not transcript:
|
|
163
164
|
return None
|
|
164
165
|
if not has_work:
|
|
@@ -29,7 +29,8 @@ MEDIA = (
|
|
|
29
29
|
"capability": "media.html",
|
|
30
30
|
"inline": "an html page",
|
|
31
31
|
"outside": "an html page",
|
|
32
|
-
"block": "`html` — takes `url` and `title
|
|
32
|
+
"block": "`html` — takes `url` and `title`; the page loads the files of its folder and its "
|
|
33
|
+
"subfolders by relative path, a reference by the name it shows",
|
|
33
34
|
},
|
|
34
35
|
)
|
|
35
36
|
|
|
@@ -41,9 +41,10 @@ GUIDE = "\n".join(
|
|
|
41
41
|
f"{MANIFEST}: " + '{"schema": ' + str(SCHEMA["schema"]) + ', "name", "version", "author"?, '
|
|
42
42
|
'"contributors"?: [names], "description"?, "id"?, "preview"?: path of an image in the pack, '
|
|
43
43
|
'"use"?: [ids of this pack]}.',
|
|
44
|
-
"preview is the pack's icon, drawn 44 px wide in the app's lists,
|
|
45
|
-
"
|
|
46
|
-
"
|
|
44
|
+
"preview is the pack's icon, drawn 44 px wide in the app's lists. Make it square, as an SVG or a raster no "
|
|
45
|
+
"bigger than 256x256, with a creative motif of the pack's own and no text: a screenshot or fine detail "
|
|
46
|
+
"turns to noise at that size. The app draws the pack's banner itself from its theme colors, so never "
|
|
47
|
+
"render screenshots, mockups or previews of a theme to show the user: they see it when they install it.",
|
|
47
48
|
"Every other file is optional and takes its id from its name.",
|
|
48
49
|
"use is what the app's Use button applies, and without it the button is not offered: the first light "
|
|
49
50
|
"theme, dark theme, terminal, accent and background listed, and the first font of each kind. For the "
|
|
@@ -7,11 +7,10 @@ from starlette.middleware.base import BaseHTTPMiddleware
|
|
|
7
7
|
|
|
8
8
|
from core.config import PUBLIC_ACCESS_TOKEN
|
|
9
9
|
from core.responses import api_response
|
|
10
|
-
from services import agent_mcp
|
|
10
|
+
from services import agent_mcp, pages
|
|
11
11
|
|
|
12
|
-
# Open so the mobile app can probe connectivity before it has a token.
|
|
13
12
|
_OPEN_PATHS = frozenset({"/api/health", "/api/agents/browse"})
|
|
14
|
-
|
|
13
|
+
_OPEN_PREFIXES = (f"{agent_mcp.PATH}/", f"{pages.PATH}/")
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
def _provided_token(authorization: str, query_token: str) -> str:
|
|
@@ -44,7 +43,7 @@ class PublicAuthMiddleware(BaseHTTPMiddleware):
|
|
|
44
43
|
async def dispatch(self, request: Request, call_next):
|
|
45
44
|
if PUBLIC_ACCESS_TOKEN is None:
|
|
46
45
|
return await call_next(request)
|
|
47
|
-
if request.url.path in _OPEN_PATHS or request.url.path.startswith(
|
|
46
|
+
if request.url.path in _OPEN_PATHS or request.url.path.startswith(_OPEN_PREFIXES):
|
|
48
47
|
return await call_next(request)
|
|
49
48
|
if not http_bearer_ok(request):
|
|
50
49
|
return api_response(status=401)
|
|
@@ -4,10 +4,12 @@ from fastapi import FastAPI, Request, Response
|
|
|
4
4
|
from starlette.middleware.base import BaseHTTPMiddleware
|
|
5
5
|
|
|
6
6
|
from core.responses import api_response
|
|
7
|
+
from services import pages
|
|
7
8
|
|
|
8
9
|
MAX_BODY_SIZE = 500 * 1_048_576
|
|
10
|
+
STREAMED_UPLOAD = ("PUT", "/api/shared/")
|
|
9
11
|
|
|
10
|
-
FRAMEABLE_PATHS = ("/api/shared/", "/api/shared-archive-file")
|
|
12
|
+
FRAMEABLE_PATHS = ("/api/shared/", "/api/shared-archive-file", f"{pages.PATH}/")
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class SecurityHeadersMiddleware(BaseHTTPMiddleware):
|
|
@@ -29,8 +31,10 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware):
|
|
|
29
31
|
|
|
30
32
|
class RequestSizeLimitMiddleware(BaseHTTPMiddleware):
|
|
31
33
|
async def dispatch(self, request: Request, call_next):
|
|
34
|
+
method, prefix = STREAMED_UPLOAD
|
|
35
|
+
streamed = request.method == method and request.url.path.startswith(prefix)
|
|
32
36
|
content_length = request.headers.get("content-length")
|
|
33
|
-
if content_length and int(content_length) > MAX_BODY_SIZE:
|
|
37
|
+
if not streamed and content_length and int(content_length) > MAX_BODY_SIZE:
|
|
34
38
|
return api_response(status=413)
|
|
35
39
|
return await call_next(request)
|
|
36
40
|
|
|
@@ -6,8 +6,7 @@ import json
|
|
|
6
6
|
from fastapi import APIRouter, WebSocket, WebSocketDisconnect
|
|
7
7
|
|
|
8
8
|
from core.responses import api_response
|
|
9
|
-
from core.ws import send_event
|
|
10
|
-
from middleware.public_auth import ws_bearer_ok
|
|
9
|
+
from core.ws import opening_message, send_event
|
|
11
10
|
from services import browser
|
|
12
11
|
from services.browser import BrowserSession
|
|
13
12
|
|
|
@@ -37,6 +36,8 @@ async def _dispatch(session: BrowserSession, payload: dict):
|
|
|
37
36
|
await session.insert(str(payload.get("value") or ""))
|
|
38
37
|
elif kind == "navigate":
|
|
39
38
|
await session.navigate(str(payload.get("url") or ""))
|
|
39
|
+
elif kind == "home":
|
|
40
|
+
await session.go_home()
|
|
40
41
|
elif kind == "reload":
|
|
41
42
|
await session.reload()
|
|
42
43
|
elif kind == "back":
|
|
@@ -65,16 +66,8 @@ async def _dispatch(session: BrowserSession, payload: dict):
|
|
|
65
66
|
|
|
66
67
|
@router.websocket("/browser/ws")
|
|
67
68
|
async def browser_ws(ws: WebSocket):
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return
|
|
71
|
-
await ws.accept()
|
|
72
|
-
try:
|
|
73
|
-
opening = await ws.receive_json()
|
|
74
|
-
except (WebSocketDisconnect, RuntimeError, json.JSONDecodeError):
|
|
75
|
-
return
|
|
76
|
-
if not isinstance(opening, dict):
|
|
77
|
-
await ws.close(code=1008)
|
|
69
|
+
opening = await opening_message(ws)
|
|
70
|
+
if opening is None:
|
|
78
71
|
return
|
|
79
72
|
|
|
80
73
|
session = browser.session
|