cconnect 2.0.0__tar.gz → 2.0.2__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.0 → cconnect-2.0.2}/PKG-INFO +1 -1
- {cconnect-2.0.0 → cconnect-2.0.2}/cconnect.egg-info/PKG-INFO +1 -1
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/schema.json +1 -1
- {cconnect-2.0.0 → cconnect-2.0.2}/core/release.py +1 -1
- {cconnect-2.0.0 → cconnect-2.0.2}/core/responses.py +2 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/packs.py +6 -3
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/claude.py +1 -1
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/packs.py +2 -1
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/projects.py +2 -2
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/shared.py +2 -2
- {cconnect-2.0.0 → cconnect-2.0.2}/services/claude_manage.py +11 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/live_sessions.py +20 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/mods.py +15 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/pack_format.py +32 -18
- {cconnect-2.0.0 → cconnect-2.0.2}/cconnect.egg-info/SOURCES.txt +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/cconnect.egg-info/dependency_links.txt +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/cconnect.egg-info/entry_points.txt +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/cconnect.egg-info/requires.txt +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/cconnect.egg-info/top_level.txt +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/__init__.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/access.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/app.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/cli.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/cli_manager.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/config.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/data_migration.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/db.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/display.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/models.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packages.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/builtin.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect/accents.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect/pack.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect/terminal/black.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect/themes/cconnect-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect/themes/cconnect-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/pack.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/nord.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/claude-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/claude-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/dracula.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/github-dark-hc.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/github-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/github-dimmed.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/github-light-hc.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/github-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/nord.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/one-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/tokyo-night.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-hc-dark.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-hc-light.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-light-modern.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/paths.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/prompts/BLOCKS.md +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/prompts/BROWSER.md +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/prompts/CCONNECT.md +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/prompts/COMMIT.md +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/prompts/MODS.md +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/prompts/SUGGESTIONS.md +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/rate_limit.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/scripts/page_icon.js +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/sdk.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/settings_defs.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/core/ws.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/__init__.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/browser.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/check_progress.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/components.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/delegate.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/media.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/session.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/shared_files.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/mcps/terminal.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/middleware/__init__.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/middleware/error_handler.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/middleware/public_auth.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/middleware/security.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/pyproject.toml +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/__init__.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/accounts.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/browser.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/capabilities.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/chat.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/cli.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/delegates.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/git.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/health.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/list.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/network.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/sessions.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/settings.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/system.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/routers/terminal.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/schemas/__init__.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/schemas/accounts.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/schemas/chat.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/schemas/network.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/__init__.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/account_login.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/accounts.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/api_errors.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/attachments.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/blocks.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/browser.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/categories.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/chat_list.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/claude_assets.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/claude_runtime.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/claude_status.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/cli_info.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/cli_settings.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/delegate_runner.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/delegate_runs.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/delegates.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/diffs.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/directories.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/directory_watch.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/files.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/git.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/git_ops.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/network.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/packs.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/persistent_sessions.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/project_files.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/project_watch.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/projects.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/prompt_cache.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/providers.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/questions.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/repo.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/rewind.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/sessions.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/settings_store.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/shared.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/shared_links.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/shared_watch.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/speedtest.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/system_monitor.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/system_watch.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/terminal.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/todos.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/tool_calls.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/tool_props.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/trash.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/usage.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/services/visibility.py +0 -0
- {cconnect-2.0.0 → cconnect-2.0.2}/setup.cfg +0 -0
|
@@ -8,6 +8,8 @@ import orjson
|
|
|
8
8
|
from fastapi.encoders import jsonable_encoder
|
|
9
9
|
from fastapi.responses import JSONResponse
|
|
10
10
|
|
|
11
|
+
FILE_HEADERS = {"Content-Encoding": "identity", "Cache-Control": "no-cache"}
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
class ORJSONResponse(JSONResponse):
|
|
13
15
|
"""orjson serializes plain payloads; jsonable_encoder covers the types it rejects."""
|
|
@@ -23,7 +23,7 @@ DESCRIPTION = (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
_EXAMPLE = {
|
|
26
|
-
MANIFEST: {"schema": SCHEMA["schema"], "name": "Rose", "version": "1.0.0", "author": "Jane"},
|
|
26
|
+
MANIFEST: {"schema": SCHEMA["schema"], "name": "Rose", "version": "1.0.0", "author": "Jane", "use": ["rose-dark", "rose"]},
|
|
27
27
|
"themes/rose-dark.json": {
|
|
28
28
|
"name": "Rose Dark",
|
|
29
29
|
"kind": "dark",
|
|
@@ -39,8 +39,11 @@ GUIDE = "\n".join(
|
|
|
39
39
|
f"A pack is a folder with {MANIFEST} at its root, written anywhere, then stored with save and its "
|
|
40
40
|
"absolute path; the app offers it from there, and export hands the user the .ccpack.",
|
|
41
41
|
f"{MANIFEST}: " + '{"schema": ' + str(SCHEMA["schema"]) + ', "name", "version", "author"?, '
|
|
42
|
-
'"contributors"?: [names], "description"?, "id"?, "preview"?: path of an image in the pack
|
|
42
|
+
'"contributors"?: [names], "description"?, "id"?, "preview"?: path of an image in the pack, '
|
|
43
|
+
'"use"?: [ids of this pack]}.',
|
|
43
44
|
"Every other file is optional and takes its id from its name.",
|
|
45
|
+
"use is what the app's Use button applies, and without it the button is not offered: the first light "
|
|
46
|
+
"theme, dark theme, terminal, accent and background listed, and the first font of each kind.",
|
|
44
47
|
f"themes/<id>.json: {{name, kind: {' or '.join(SCHEMA['themeKinds'])}, extends?: theme id, accent?, "
|
|
45
48
|
"syntax?: syntax id, colors: {token: color}}. A token left out comes from extends, or from the default "
|
|
46
49
|
"theme of its kind, and the -bg, hover and scrollbar tokens derive from their base color.",
|
|
@@ -55,7 +58,7 @@ GUIDE = "\n".join(
|
|
|
55
58
|
"Colors are #rgb, #rgba, #rrggbb or #rrggbbaa.",
|
|
56
59
|
f"Built-in themes to extend: {', '.join(sorted(KNOWN_THEMES))}.",
|
|
57
60
|
f"Built-in syntax: {', '.join(sorted(KNOWN_SYNTAX))}.",
|
|
58
|
-
"Example, one dark theme with its accent:",
|
|
61
|
+
"Example, one dark theme with its accent, both applied by Use:",
|
|
59
62
|
*(f"{path}: {json.dumps(content)}" for path, content in _EXAMPLE.items()),
|
|
60
63
|
]
|
|
61
64
|
)
|
|
@@ -122,7 +122,7 @@ async def get_plugins():
|
|
|
122
122
|
@router.post("/claude/plugins/action")
|
|
123
123
|
async def plugin_action(body: PluginActionBody):
|
|
124
124
|
result = await asyncio.to_thread(claude_manage.plugin_action, body.action, body.plugin)
|
|
125
|
-
return api_response(data=await claude_manage.
|
|
125
|
+
return api_response(data=await claude_manage.after_plugin_action(body.action, body.plugin, result))
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
@router.post("/claude/plugins/reload")
|
|
@@ -3,6 +3,7 @@ import mimetypes
|
|
|
3
3
|
from fastapi import APIRouter, HTTPException, WebSocket
|
|
4
4
|
from fastapi.responses import FileResponse, Response
|
|
5
5
|
|
|
6
|
+
from core.responses import FILE_HEADERS
|
|
6
7
|
from core.ws import stream_watch
|
|
7
8
|
from services import packs
|
|
8
9
|
from services.pack_format import MIME
|
|
@@ -20,7 +21,7 @@ async def download_pack(name: str):
|
|
|
20
21
|
target = packs.file_of(name)
|
|
21
22
|
if target is None:
|
|
22
23
|
raise HTTPException(status_code=404, detail="not found")
|
|
23
|
-
return FileResponse(target, media_type=MIME, filename=name)
|
|
24
|
+
return FileResponse(target, media_type=MIME, filename=name, headers=FILE_HEADERS)
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
@router.get("/packs/{name}/preview")
|
|
@@ -9,7 +9,7 @@ from fastapi.responses import FileResponse, StreamingResponse
|
|
|
9
9
|
from loguru import logger
|
|
10
10
|
|
|
11
11
|
from core.access import key_matches
|
|
12
|
-
from core.responses import api_response
|
|
12
|
+
from core.responses import FILE_HEADERS, api_response
|
|
13
13
|
from core.ws import send_event
|
|
14
14
|
from middleware.public_auth import ws_bearer_ok
|
|
15
15
|
from services import project_files, project_watch
|
|
@@ -118,5 +118,5 @@ def project_file(project_key: str, path: str, x_security_key: str = Header("")):
|
|
|
118
118
|
resolved,
|
|
119
119
|
filename=resolved.name,
|
|
120
120
|
content_disposition_type="inline",
|
|
121
|
-
headers=
|
|
121
|
+
headers=FILE_HEADERS,
|
|
122
122
|
)
|
|
@@ -10,7 +10,7 @@ from starlette.requests import ClientDisconnect
|
|
|
10
10
|
from pydantic import BaseModel
|
|
11
11
|
|
|
12
12
|
from core.access import key_matches
|
|
13
|
-
from core.responses import api_response
|
|
13
|
+
from core.responses import FILE_HEADERS, api_response
|
|
14
14
|
from core.ws import stream_watch
|
|
15
15
|
from services import shared as shared_service
|
|
16
16
|
from services.shared_watch import hub as watch_hub
|
|
@@ -223,7 +223,7 @@ def download_shared(path: str):
|
|
|
223
223
|
resolved,
|
|
224
224
|
filename=shared_service.visible_of(path),
|
|
225
225
|
content_disposition_type="inline",
|
|
226
|
-
headers=
|
|
226
|
+
headers=FILE_HEADERS,
|
|
227
227
|
)
|
|
228
228
|
|
|
229
229
|
|
|
@@ -11,6 +11,7 @@ from core import cli_manager, paths
|
|
|
11
11
|
from services import accounts, claude_assets, cli_settings, files
|
|
12
12
|
|
|
13
13
|
_PLUGIN_ACTIONS = frozenset({"install", "uninstall", "enable", "disable", "update"})
|
|
14
|
+
_PLUGIN_REMOVALS = frozenset({"uninstall", "disable"})
|
|
14
15
|
_MARKETPLACE_ACTIONS = frozenset({"add", "remove", "update"})
|
|
15
16
|
|
|
16
17
|
OFFICIAL_MARKETPLACE = "anthropics/claude-plugins-official"
|
|
@@ -92,6 +93,16 @@ async def reload_after(result: dict) -> dict:
|
|
|
92
93
|
return {**result, **await reload_plugins(force=False)} if result.get("ok") else result
|
|
93
94
|
|
|
94
95
|
|
|
96
|
+
async def after_plugin_action(action: str, plugin: str, result: dict) -> dict:
|
|
97
|
+
from services.live_sessions import registry
|
|
98
|
+
|
|
99
|
+
if result.get("ok") and action in _PLUGIN_REMOVALS:
|
|
100
|
+
name = plugin.partition("@")[0]
|
|
101
|
+
for live in registry.live():
|
|
102
|
+
await live.forget_plugin(name)
|
|
103
|
+
return await reload_after(result)
|
|
104
|
+
|
|
105
|
+
|
|
95
106
|
def plugin_action(action: str, plugin: str) -> dict:
|
|
96
107
|
if action not in _PLUGIN_ACTIONS:
|
|
97
108
|
return {"ok": False, "message": f"invalid action: {action}"}
|
|
@@ -55,6 +55,7 @@ class LiveSession:
|
|
|
55
55
|
self._health = None
|
|
56
56
|
self._background = {}
|
|
57
57
|
self._owned = {}
|
|
58
|
+
self._unplugged = set()
|
|
58
59
|
self._runs = {}
|
|
59
60
|
self._announced = object()
|
|
60
61
|
self._published_id = None
|
|
@@ -378,6 +379,19 @@ class LiveSession:
|
|
|
378
379
|
def _mods_snapshot(self):
|
|
379
380
|
return {**self._mods.snapshot(), "channel": self.channel}
|
|
380
381
|
|
|
382
|
+
async def forget_plugin(self, name):
|
|
383
|
+
"""Take a removed plugin off this chat, once the turn that still loads it is over."""
|
|
384
|
+
if self.resident_alive:
|
|
385
|
+
return
|
|
386
|
+
if self.running:
|
|
387
|
+
self._unplugged.add(name)
|
|
388
|
+
return
|
|
389
|
+
await self._drop_mods({name})
|
|
390
|
+
|
|
391
|
+
async def _drop_mods(self, plugins):
|
|
392
|
+
if self._mods.drop(plugins):
|
|
393
|
+
await self._send(self._mods_snapshot())
|
|
394
|
+
|
|
381
395
|
def _loose_notice(self, event):
|
|
382
396
|
"""A notice after the turn: a line the transcript keeps travels as a tail item, a log line unstamped."""
|
|
383
397
|
if not event.get("uuid"):
|
|
@@ -479,6 +493,9 @@ class LiveSession:
|
|
|
479
493
|
return
|
|
480
494
|
if kind in ("done", "interrupted") and not self.resident_alive:
|
|
481
495
|
self._end_background()
|
|
496
|
+
if self._unplugged:
|
|
497
|
+
unplugged, self._unplugged = self._unplugged, set()
|
|
498
|
+
asyncio.get_running_loop().create_task(self._drop_mods(unplugged))
|
|
482
499
|
return
|
|
483
500
|
if kind in ("session_started", "result"):
|
|
484
501
|
self._publish_activity(self.activity)
|
|
@@ -949,6 +966,9 @@ class SessionRegistry:
|
|
|
949
966
|
def residents(self):
|
|
950
967
|
return [session for session in self._sessions.values() if session.resident_alive]
|
|
951
968
|
|
|
969
|
+
def live(self):
|
|
970
|
+
return list(self._sessions.values())
|
|
971
|
+
|
|
952
972
|
def live_session_ids(self):
|
|
953
973
|
"""Ids of the chats alive in this process, transcript on disk or not yet."""
|
|
954
974
|
return {s.state.session_id for s in self._sessions.values() if s.state.session_id}
|
|
@@ -224,6 +224,21 @@ class Surface:
|
|
|
224
224
|
else:
|
|
225
225
|
self.status.pop(plugin, None)
|
|
226
226
|
|
|
227
|
+
def drop(self, plugins: set[str]) -> bool:
|
|
228
|
+
"""Forget what the given plugins left on screen; whether anything went."""
|
|
229
|
+
panes = [pane for pane in self.panes if pane.get("plugin") not in plugins]
|
|
230
|
+
commands = [command for command in self.commands if command.get("plugin") not in plugins]
|
|
231
|
+
status = {plugin: text for plugin, text in self.status.items() if plugin not in plugins}
|
|
232
|
+
if (panes, commands, status) == (self.panes, self.commands, self.status):
|
|
233
|
+
return False
|
|
234
|
+
kept = {pane.get("id") for pane in panes}
|
|
235
|
+
self.panes, self.commands, self.status = panes, commands, status
|
|
236
|
+
self.shown_id, self.focused_id, self.focus_requested_id = (
|
|
237
|
+
pane_id if pane_id in kept else None
|
|
238
|
+
for pane_id in (self.shown_id, self.focused_id, self.focus_requested_id)
|
|
239
|
+
)
|
|
240
|
+
return True
|
|
241
|
+
|
|
227
242
|
def snapshot(self) -> dict:
|
|
228
243
|
shown = self if enabled() else Surface()
|
|
229
244
|
return {
|
|
@@ -17,7 +17,7 @@ MIME: str = SCHEMA["mime"]
|
|
|
17
17
|
_COLOR = re.compile(r"^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$", re.IGNORECASE)
|
|
18
18
|
_LOCAL_ID = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*$")
|
|
19
19
|
_FONT_STYLE = re.compile(r"^[a-z ]*$", re.IGNORECASE)
|
|
20
|
-
_MANIFEST_FIELDS = {"schema", "id", "name", "version", "author", "contributors", "description", "preview"}
|
|
20
|
+
_MANIFEST_FIELDS = {"schema", "id", "name", "version", "author", "contributors", "description", "preview", "use"}
|
|
21
21
|
_THEME_FIELDS = {"name", "kind", "extends", "accent", "syntax", "colors"}
|
|
22
22
|
_TERMINAL_FIELDS = {"name", "colors"}
|
|
23
23
|
_ACCENT_FIELDS = {"id", "name", "color"}
|
|
@@ -192,6 +192,9 @@ def _manifest(archive: _Archive) -> dict:
|
|
|
192
192
|
raise PackFormatError("reference", MANIFEST, "preview", preview)
|
|
193
193
|
if preview is not None and _extension(preview) not in SCHEMA["imageFormats"]:
|
|
194
194
|
raise PackFormatError("format", preview)
|
|
195
|
+
use = fields.get("use", [])
|
|
196
|
+
if not isinstance(use, list) or any(not isinstance(item, str) or not item.strip() for item in use):
|
|
197
|
+
raise PackFormatError("field", MANIFEST, "use")
|
|
195
198
|
return {
|
|
196
199
|
"id": pack_id,
|
|
197
200
|
"name": name,
|
|
@@ -200,10 +203,11 @@ def _manifest(archive: _Archive) -> dict:
|
|
|
200
203
|
"contributors": [item.strip() for item in contributors],
|
|
201
204
|
"description": _text(fields, "description", MANIFEST),
|
|
202
205
|
"preview": preview,
|
|
206
|
+
"use": [item.strip() for item in use],
|
|
203
207
|
}
|
|
204
208
|
|
|
205
209
|
|
|
206
|
-
def _themes(archive: _Archive) ->
|
|
210
|
+
def _themes(archive: _Archive) -> set[str]:
|
|
207
211
|
entries = _entries(archive, "themes")
|
|
208
212
|
own_themes = {local for _, local in entries}
|
|
209
213
|
own_syntax = {local for _, local in _entries(archive, "syntax")}
|
|
@@ -232,17 +236,17 @@ def _themes(archive: _Archive) -> int:
|
|
|
232
236
|
raise PackFormatError("cycle", path)
|
|
233
237
|
trail.add(current)
|
|
234
238
|
current = parents.get(current)
|
|
235
|
-
return
|
|
239
|
+
return own_themes
|
|
236
240
|
|
|
237
241
|
|
|
238
|
-
def _terminals(archive: _Archive) ->
|
|
242
|
+
def _terminals(archive: _Archive) -> set[str]:
|
|
239
243
|
entries = _entries(archive, "terminal")
|
|
240
244
|
for path, _local in entries:
|
|
241
245
|
fields = _fields(archive, path)
|
|
242
246
|
_only(fields, _TERMINAL_FIELDS, path)
|
|
243
247
|
_text(fields, "name", path, required=True)
|
|
244
248
|
_colors(fields, SCHEMA["terminal"], path)
|
|
245
|
-
return
|
|
249
|
+
return {local for _, local in entries}
|
|
246
250
|
|
|
247
251
|
|
|
248
252
|
def _syntax_colors(value, path: str, key: str):
|
|
@@ -270,9 +274,9 @@ def _syntax(archive: _Archive) -> int:
|
|
|
270
274
|
return len(entries)
|
|
271
275
|
|
|
272
276
|
|
|
273
|
-
def _accents(archive: _Archive) ->
|
|
277
|
+
def _accents(archive: _Archive) -> set[str]:
|
|
274
278
|
if _ACCENTS_FILE not in archive.paths:
|
|
275
|
-
return
|
|
279
|
+
return set()
|
|
276
280
|
entries = archive.json(_ACCENTS_FILE)
|
|
277
281
|
if not isinstance(entries, list):
|
|
278
282
|
raise PackFormatError("json", _ACCENTS_FILE)
|
|
@@ -290,10 +294,10 @@ def _accents(archive: _Archive) -> int:
|
|
|
290
294
|
raise PackFormatError("duplicate", path)
|
|
291
295
|
seen.add(local)
|
|
292
296
|
_color(entry.get("color"), path, "color")
|
|
293
|
-
return
|
|
297
|
+
return seen
|
|
294
298
|
|
|
295
299
|
|
|
296
|
-
def _fonts(archive: _Archive) ->
|
|
300
|
+
def _fonts(archive: _Archive) -> dict[str, str]:
|
|
297
301
|
families: dict[str, str] = {}
|
|
298
302
|
for path in archive.paths:
|
|
299
303
|
if not path.startswith("fonts/"):
|
|
@@ -307,10 +311,10 @@ def _fonts(archive: _Archive) -> int:
|
|
|
307
311
|
if families.get(key, parts[2]) != parts[2]:
|
|
308
312
|
raise PackFormatError("duplicate", path)
|
|
309
313
|
families[key] = parts[2]
|
|
310
|
-
return
|
|
314
|
+
return families
|
|
311
315
|
|
|
312
316
|
|
|
313
|
-
def _backgrounds(archive: _Archive) ->
|
|
317
|
+
def _backgrounds(archive: _Archive) -> set[str]:
|
|
314
318
|
images, settings = {}, {}
|
|
315
319
|
for path in archive.paths:
|
|
316
320
|
if not path.startswith("backgrounds/"):
|
|
@@ -339,22 +343,32 @@ def _backgrounds(archive: _Archive) -> int:
|
|
|
339
343
|
raise PackFormatError("field", path, key)
|
|
340
344
|
if "fit" in fields and fields["fit"] not in SCHEMA["backgroundFits"]:
|
|
341
345
|
raise PackFormatError("field", path, "fit")
|
|
342
|
-
return
|
|
346
|
+
return set(images)
|
|
343
347
|
|
|
344
348
|
|
|
345
349
|
def read_pack(data: bytes) -> dict:
|
|
346
350
|
archive = _Archive(data)
|
|
347
351
|
info = _manifest(archive)
|
|
352
|
+
themes = _themes(archive)
|
|
353
|
+
terminals = _terminals(archive)
|
|
354
|
+
syntax = _syntax(archive)
|
|
355
|
+
accents = _accents(archive)
|
|
356
|
+
fonts = _fonts(archive)
|
|
357
|
+
backgrounds = _backgrounds(archive)
|
|
348
358
|
contents = {
|
|
349
|
-
"themes":
|
|
350
|
-
"terminals":
|
|
351
|
-
"syntax":
|
|
352
|
-
"accents":
|
|
353
|
-
"fonts":
|
|
354
|
-
"backgrounds":
|
|
359
|
+
"themes": len(themes),
|
|
360
|
+
"terminals": len(terminals),
|
|
361
|
+
"syntax": syntax,
|
|
362
|
+
"accents": len(accents),
|
|
363
|
+
"fonts": len(fonts),
|
|
364
|
+
"backgrounds": len(backgrounds),
|
|
355
365
|
}
|
|
356
366
|
if not any(contents.values()):
|
|
357
367
|
raise PackFormatError("empty")
|
|
368
|
+
usable = themes | terminals | accents | {key.partition("/")[2] for key in fonts} | backgrounds
|
|
369
|
+
for local in info["use"]:
|
|
370
|
+
if local not in usable:
|
|
371
|
+
raise PackFormatError("reference", MANIFEST, "use", local)
|
|
358
372
|
return {**info, "contents": contents}
|
|
359
373
|
|
|
360
374
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/terminal/vscode-light-modern.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cconnect-2.0.0 → cconnect-2.0.2}/core/packs/cconnect-extras/themes/vscode-light-modern.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|