cconnect 2.0.5__tar.gz → 2.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cconnect-2.0.5 → cconnect-2.0.7}/PKG-INFO +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/cconnect.egg-info/PKG-INFO +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/cconnect.egg-info/SOURCES.txt +2 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/catppuccin-mocha.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/claude-dark.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/claude-light.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/dracula.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/github-dark-hc.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/github-dark.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/github-dimmed.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/github-light-hc.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/nord.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/one-dark.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/tokyo-night.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/vscode-dark-plus.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/vscode-light-modern.json +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/schema.json +3 -3
- {cconnect-2.0.5 → cconnect-2.0.7}/core/paths.py +1 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/release.py +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/session.py +4 -6
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/agents.py +16 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/capabilities.py +1 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/chat.py +12 -3
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/claude.py +2 -2
- {cconnect-2.0.5 → cconnect-2.0.7}/schemas/chat.py +1 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/accounts.py +12 -5
- {cconnect-2.0.5 → cconnect-2.0.7}/services/acp_events.py +0 -108
- {cconnect-2.0.5 → cconnect-2.0.7}/services/agent_connections.py +2 -2
- {cconnect-2.0.5 → cconnect-2.0.7}/services/agent_sessions.py +69 -9
- {cconnect-2.0.5 → cconnect-2.0.7}/services/claude_runtime.py +9 -2
- {cconnect-2.0.5 → cconnect-2.0.7}/services/cli_info.py +12 -4
- {cconnect-2.0.5 → cconnect-2.0.7}/services/cli_settings.py +56 -8
- cconnect-2.0.7/services/control_requests.py +70 -0
- cconnect-2.0.7/services/elicitation.py +157 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/mods.py +13 -22
- {cconnect-2.0.5 → cconnect-2.0.7}/services/persistent_sessions.py +2 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/services/sessions.py +1 -1
- {cconnect-2.0.5 → cconnect-2.0.7}/services/usage.py +59 -35
- {cconnect-2.0.5 → cconnect-2.0.7}/cconnect.egg-info/dependency_links.txt +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/cconnect.egg-info/entry_points.txt +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/cconnect.egg-info/requires.txt +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/cconnect.egg-info/top_level.txt +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/__init__.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/access.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/app.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/cli.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/cli_manager.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/config.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/data_migration.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/db.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/display.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/models.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packages.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/builtin.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect/accents.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect/pack.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect/terminal/black.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect/themes/cconnect-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect/themes/cconnect-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/backgrounds/cyberpunk.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/backgrounds/darkwave.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/pack.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/campbell.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/catppuccin-latte.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/catppuccin-mocha.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/claude-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/claude-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/dark-plus.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/dracula.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/github-dark-hc.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/github-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/github-dimmed.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/github-light-hc.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/github-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/gruvbox-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/light-plus.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/monokai.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/nord.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/one-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/one-half-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/one-half-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/rose-pine.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/solarized-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/solarized-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/tango-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/tango-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/tokyo-night.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/ubuntu.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/vscode-dark-modern.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/vscode-hc-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/vscode-hc-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/terminal/vscode-light-modern.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/catppuccin-latte.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/github-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/gruvbox-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/rose-pine.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/solarized-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/solarized-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/vscode-dark-modern.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/vscode-hc-dark.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/vscode-hc-light.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/packs/cconnect-extras/themes/vscode-light-plus.json +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/process_job.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/prompts/BLOCKS.md +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/prompts/BROWSER.md +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/prompts/CCONNECT.md +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/prompts/COMMIT.md +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/prompts/MODS.md +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/prompts/SUGGESTIONS.md +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/rate_limit.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/responses.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/scripts/page_icon.js +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/sdk.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/settings_defs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/slugs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/core/ws.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/__init__.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/browser.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/check_progress.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/components.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/delegate.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/media.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/packs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/shared_files.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/mcps/terminal.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/middleware/__init__.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/middleware/error_handler.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/middleware/public_auth.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/middleware/security.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/pyproject.toml +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/__init__.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/accounts.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/browser.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/cli.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/git.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/health.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/list.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/network.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/packs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/projects.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/sessions.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/settings.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/shared.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/system.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/routers/terminal.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/schemas/__init__.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/schemas/accounts.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/schemas/network.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/__init__.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/account_login.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/acp_peer.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/agent_registry.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/agents.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/api_errors.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/attachments.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/blocks.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/browser.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/categories.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/chat_list.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/claude_assets.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/claude_manage.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/claude_status.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/delegate_runner.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/delegate_runs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/delegates.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/diffs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/directories.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/directory_watch.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/event_rows.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/files.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/git.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/git_ops.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/live_sessions.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/network.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/pack_format.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/packs.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/project_files.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/project_watch.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/projects.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/prompt_cache.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/providers.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/questions.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/repo.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/rewind.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/settings_store.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/shared.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/shared_links.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/shared_watch.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/speedtest.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/system_monitor.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/system_watch.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/terminal.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/todos.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/tool_calls.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/tool_props.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/trash.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/services/visibility.py +0 -0
- {cconnect-2.0.5 → cconnect-2.0.7}/setup.cfg +0 -0
|
@@ -153,12 +153,14 @@ services/claude_runtime.py
|
|
|
153
153
|
services/claude_status.py
|
|
154
154
|
services/cli_info.py
|
|
155
155
|
services/cli_settings.py
|
|
156
|
+
services/control_requests.py
|
|
156
157
|
services/delegate_runner.py
|
|
157
158
|
services/delegate_runs.py
|
|
158
159
|
services/delegates.py
|
|
159
160
|
services/diffs.py
|
|
160
161
|
services/directories.py
|
|
161
162
|
services/directory_watch.py
|
|
163
|
+
services/elicitation.py
|
|
162
164
|
services/event_rows.py
|
|
163
165
|
services/files.py
|
|
164
166
|
services/git.py
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"colorRoles": {
|
|
41
41
|
"background": "the window behind everything: the chat, the panels and the browser's start page",
|
|
42
42
|
"on-background": "main text and icons",
|
|
43
|
-
"surface": "panels, dialogs and cards on the background: the chat list, blocks in the chat
|
|
44
|
-
"surface-variant": "raised controls
|
|
45
|
-
"surface-nested": "a block inside another block,
|
|
43
|
+
"surface": "panels, dialogs and cards on the background: the chat list, the composer, and Thinking and the other blocks in the chat",
|
|
44
|
+
"surface-variant": "raised controls and your own messages: fields, chips, buttons, the date separator and the selected row of a list",
|
|
45
|
+
"surface-nested": "code and command output in the chat and a block inside another block, a tone between surface and surface-variant",
|
|
46
46
|
"float": "menus, popovers and floating cards",
|
|
47
47
|
"on-surface-variant": "secondary text and icons: summaries, captions, inactive icons",
|
|
48
48
|
"faint": "the faintest text and marks: placeholders, timestamps and hints",
|
|
@@ -52,6 +52,7 @@ TODOS_FILE = STATE_DIR / "session_todos.json"
|
|
|
52
52
|
DELEGATE_RUNS_DIR = STATE_DIR / "delegate_runs"
|
|
53
53
|
AGENT_SESSIONS_FILE = STATE_DIR / "agent_sessions.json"
|
|
54
54
|
AGENT_DEFAULTS_FILE = STATE_DIR / "agent_defaults.json"
|
|
55
|
+
AGENT_TITLES_FILE = STATE_DIR / "agent_titles.json"
|
|
55
56
|
AI_WORKDIR = Path(os.environ.get("AI_WORKDIR") or STATE_DIR / "internal_task")
|
|
56
57
|
|
|
57
58
|
NETWORK_STATE_FILE = CACHE_DIR / "network_state.json"
|
|
@@ -184,6 +184,7 @@ def make_tools(context: dict) -> list:
|
|
|
184
184
|
account = context.get("account")
|
|
185
185
|
info = context.get("session_info")
|
|
186
186
|
capabilities = context.get("capabilities") or ()
|
|
187
|
+
locale = context.get("locale")
|
|
187
188
|
on_provider = bool(accounts.provider_for(account))
|
|
188
189
|
|
|
189
190
|
if info is not None:
|
|
@@ -246,9 +247,9 @@ def make_tools(context: dict) -> list:
|
|
|
246
247
|
|
|
247
248
|
@tool("usage", USAGE, {})
|
|
248
249
|
async def usage(args):
|
|
249
|
-
from services.usage import CAPABILITY as USAGE, usage_blocks, usage_data,
|
|
250
|
+
from services.usage import CAPABILITY as USAGE, usage_blocks, usage_data, window_line
|
|
250
251
|
|
|
251
|
-
data = await usage_data(account)
|
|
252
|
+
data = await usage_data(account, language=locale)
|
|
252
253
|
if "error" in data:
|
|
253
254
|
return {"content": [{"type": "text", "text": data["error"]}]}
|
|
254
255
|
windows = data.get("windows") or []
|
|
@@ -257,10 +258,7 @@ def make_tools(context: dict) -> list:
|
|
|
257
258
|
elif emit is not None and COMPONENTS in capabilities and windows:
|
|
258
259
|
await emit({"type": "component", "blocks": await usage_blocks(account)})
|
|
259
260
|
lines = [f"Plan: {data['plan']}"] if data.get("plan") else []
|
|
260
|
-
lines += [
|
|
261
|
-
f"{window_label(win['id'])}: {round(win['percent'])}%" + (" (not used yet)" if win["unused"] else "")
|
|
262
|
-
for win in windows
|
|
263
|
-
]
|
|
261
|
+
lines += [window_line(win) for win in windows]
|
|
264
262
|
return {"content": [{"type": "text", "text": "\n".join(lines) or "No usage data available."}]}
|
|
265
263
|
|
|
266
264
|
tools.append(usage)
|
|
@@ -52,6 +52,12 @@ class TerminalLogin(BaseModel):
|
|
|
52
52
|
cwd: str
|
|
53
53
|
|
|
54
54
|
|
|
55
|
+
class SessionRename(BaseModel):
|
|
56
|
+
cwd: str
|
|
57
|
+
session: str = Field(min_length=1)
|
|
58
|
+
title: str = Field("", max_length=200)
|
|
59
|
+
|
|
60
|
+
|
|
55
61
|
def _failed(exc: Exception) -> Response:
|
|
56
62
|
if isinstance(exc, agents.AgentError):
|
|
57
63
|
return api_response(status=422, data={"reason": exc.reason, "detail": exc.detail})
|
|
@@ -205,10 +211,20 @@ async def agent_session_delete(agent_id: str, cwd: str, session: str):
|
|
|
205
211
|
return api_response()
|
|
206
212
|
|
|
207
213
|
|
|
214
|
+
@router.post("/agents/{agent_id}/sessions/rename")
|
|
215
|
+
async def agent_session_rename(agent_id: str, body: SessionRename):
|
|
216
|
+
try:
|
|
217
|
+
await agent_sessions.rename(agent_id, body.cwd, body.session, body.title)
|
|
218
|
+
except OSError as exc:
|
|
219
|
+
return _failed(exc)
|
|
220
|
+
return api_response()
|
|
221
|
+
|
|
222
|
+
|
|
208
223
|
async def _signed_in(agent_id: str, held: terminal.Terminal) -> None:
|
|
209
224
|
await held.exited.wait()
|
|
210
225
|
if held.exit_status in (None, 0):
|
|
211
226
|
await pool.restart(agent_id)
|
|
227
|
+
agent_sessions.watch.refresh(agent_id)
|
|
212
228
|
|
|
213
229
|
|
|
214
230
|
async def _login_command(agent_id: str, method: str, cwd: str) -> tuple[str, list[str], dict[str, str]]:
|
|
@@ -41,6 +41,7 @@ async def get_capabilities(capabilities: str = Query(""), account: str = Query("
|
|
|
41
41
|
"supported_cli": SUPPORTED_CLI,
|
|
42
42
|
"permission_modes": [{"id": m, "label": PERMISSION_LABELS.get(m, m)} for m in permission_modes()],
|
|
43
43
|
"models": listed,
|
|
44
|
+
"subagent_efforts": cli_info.subagent_efforts(info),
|
|
44
45
|
"request_limit": REQUEST_LIMIT_BYTES,
|
|
45
46
|
"shared_scheme": SHARED_SCHEME,
|
|
46
47
|
"pack_schema": PACK_SCHEMA["schema"],
|
|
@@ -81,6 +81,7 @@ class _Session:
|
|
|
81
81
|
self.effort: str = "max"
|
|
82
82
|
self.partial: bool = False
|
|
83
83
|
self.agent: str | None = None
|
|
84
|
+
self.locale: str | None = None
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
def _build_turn_runner(session, text: str, attachments: list[str] | None = None, seed_id: str | None = None, wanted=None, capabilities=None, on_transport=None, adopt=False, shown=None):
|
|
@@ -137,6 +138,7 @@ def _build_turn_runner(session, text: str, attachments: list[str] | None = None,
|
|
|
137
138
|
request_compact=request_compact,
|
|
138
139
|
reload=lambda kind: session.reload(f"reload-{kind}"),
|
|
139
140
|
capabilities=capabilities,
|
|
141
|
+
locale=state.locale,
|
|
140
142
|
on_transport=on_transport,
|
|
141
143
|
adopt=adopted,
|
|
142
144
|
read_from=shown if adopted else None,
|
|
@@ -311,6 +313,7 @@ def _build_side_runner(main_state: _Session, side_state: _Session, question: str
|
|
|
311
313
|
model=_side_model(main_state),
|
|
312
314
|
emit=emit,
|
|
313
315
|
capabilities=capabilities,
|
|
316
|
+
locale=main_state.locale,
|
|
314
317
|
session_info=lambda: {
|
|
315
318
|
"session_id": side_state.session_id,
|
|
316
319
|
"cwd": str(paths.AI_WORKDIR),
|
|
@@ -325,14 +328,14 @@ def _build_side_runner(main_state: _Session, side_state: _Session, question: str
|
|
|
325
328
|
return factory
|
|
326
329
|
|
|
327
330
|
|
|
328
|
-
async def _run_usage(send, account: str | None = None, capabilities=None):
|
|
331
|
+
async def _run_usage(send, account: str | None = None, capabilities=None, locale: str | None = None):
|
|
329
332
|
"""Send the plan-usage report as a one-off markdown message."""
|
|
330
333
|
from mcps.components import CAPABILITY as COMPONENTS
|
|
331
334
|
from services.usage import CAPABILITY as USAGE, usage_blocks, usage_data, usage_markdown
|
|
332
335
|
|
|
333
336
|
try:
|
|
334
337
|
if USAGE in (capabilities or ()):
|
|
335
|
-
await send({"type": "usage", **await usage_data(account), "local": True})
|
|
338
|
+
await send({"type": "usage", **await usage_data(account, language=locale), "local": True})
|
|
336
339
|
elif COMPONENTS in (capabilities or ()):
|
|
337
340
|
await send({"type": "component", "blocks": await usage_blocks(account), "local": True})
|
|
338
341
|
else:
|
|
@@ -437,6 +440,7 @@ async def chat_ws(ws: WebSocket):
|
|
|
437
440
|
state.effort = msg.effort or settings_store.get("effort")
|
|
438
441
|
state.partial = msg.partial if msg.partial is not None else settings_store.get("streaming")
|
|
439
442
|
session = registry.create(state)
|
|
443
|
+
session.state.locale = msg.locale or session.state.locale
|
|
440
444
|
if previous is not None and previous is not session:
|
|
441
445
|
await previous.detach(sink)
|
|
442
446
|
await send({
|
|
@@ -635,7 +639,12 @@ async def chat_ws(ws: WebSocket):
|
|
|
635
639
|
await send({"type": "error", "message": "busy: a side question is already running", "channel": side_session.channel})
|
|
636
640
|
|
|
637
641
|
elif mtype == "usage":
|
|
638
|
-
spawn(_run_usage(
|
|
642
|
+
spawn(_run_usage(
|
|
643
|
+
send,
|
|
644
|
+
accounts.resolve(session.state.account if session else None),
|
|
645
|
+
seen["capabilities"],
|
|
646
|
+
session.state.locale if session else None,
|
|
647
|
+
))
|
|
639
648
|
|
|
640
649
|
elif mtype == "reload":
|
|
641
650
|
if session is not None:
|
|
@@ -16,8 +16,8 @@ router = APIRouter(tags=["Claude"])
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@router.get("/claude/usage")
|
|
19
|
-
async def get_usage(account: str | None = None, force: bool = False):
|
|
20
|
-
return api_response(data=await usage_service.usage_data(account, force))
|
|
19
|
+
async def get_usage(account: str | None = None, force: bool = False, lang: str | None = None):
|
|
20
|
+
return api_response(data=await usage_service.usage_data(account, force, lang))
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@router.get("/claude/status")
|
|
@@ -407,6 +407,12 @@ def _identity(account_id: Optional[str]) -> dict:
|
|
|
407
407
|
return {key: data[key] for key in _IDENTITY_KEYS if key in data}
|
|
408
408
|
|
|
409
409
|
|
|
410
|
+
def plan_name(account_id: Optional[str]) -> Optional[str]:
|
|
411
|
+
account =_identity(account_id).get("oauthAccount")
|
|
412
|
+
name = account.get("planDisplayName") if isinstance(account, dict) else None
|
|
413
|
+
return name if isinstance(name, str) and name.strip() else None
|
|
414
|
+
|
|
415
|
+
|
|
410
416
|
def export_bundle(account_id: str) -> Optional[bytes]:
|
|
411
417
|
"""Zip the credentials and the account's own config. History, caches, the
|
|
412
418
|
machine id and the linked projects/plugins/skills are all left out."""
|
|
@@ -520,13 +526,14 @@ def _merge_shared(source: Path, target: Path, keys: tuple[str, ...]) -> None:
|
|
|
520
526
|
current = json.loads(target.read_text(encoding="utf-8"))
|
|
521
527
|
except (OSError, json.JSONDecodeError):
|
|
522
528
|
current = {}
|
|
523
|
-
before = {key:
|
|
529
|
+
before = {key: cli_settings.lookup(current, key) for key in keys}
|
|
524
530
|
for key in keys:
|
|
525
|
-
|
|
526
|
-
|
|
531
|
+
value = cli_settings.lookup(primary, key)
|
|
532
|
+
if value is None:
|
|
533
|
+
cli_settings.discard(current, key)
|
|
527
534
|
else:
|
|
528
|
-
|
|
529
|
-
if target.is_file() and before == {key:
|
|
535
|
+
cli_settings.assign(current, key, value)
|
|
536
|
+
if target.is_file() and before == {key: cli_settings.lookup(current, key) for key in keys}:
|
|
530
537
|
return
|
|
531
538
|
target.parent.mkdir(parents=True, exist_ok=True)
|
|
532
539
|
target.write_text(json.dumps(current, indent=2), encoding="utf-8")
|
|
@@ -23,14 +23,6 @@ FINISHED = ("completed", "failed")
|
|
|
23
23
|
COMPACTION_DONE = "completed"
|
|
24
24
|
COMPACTION_RUNNING = "in_progress"
|
|
25
25
|
PERMISSION_IDS = {"allow_once": "allow", "allow_always": "allow_always", "reject_once": "deny", "reject_always": "deny"}
|
|
26
|
-
ACCEPT = "accept"
|
|
27
|
-
DECLINE = "decline"
|
|
28
|
-
URL_MODE = "url"
|
|
29
|
-
URL_ACTION = "action"
|
|
30
|
-
INTEGER = "integer"
|
|
31
|
-
NUMBER = "number"
|
|
32
|
-
BOOLEAN = "boolean"
|
|
33
|
-
ARRAY = "array"
|
|
34
26
|
|
|
35
27
|
Share = Callable[[bytes, str, str], Awaitable[Optional[dict]]]
|
|
36
28
|
Watch = Callable[[str, str], None]
|
|
@@ -248,103 +240,3 @@ def permission_outcome(answer: dict, params: dict) -> dict:
|
|
|
248
240
|
def resolved_id(option_id: Optional[str], options: list) -> Optional[str]:
|
|
249
241
|
kind = next((option.get("kind") for option in options if isinstance(option, dict) and option.get("id") == option_id), None)
|
|
250
242
|
return PERMISSION_IDS.get(kind or "", option_id)
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
def _field(name: str, spec: dict, required: bool) -> list[dict]:
|
|
254
|
-
kind = spec.get("type")
|
|
255
|
-
label = str(spec.get("title") or name)
|
|
256
|
-
base: dict = {"id": name, "label": label, **({"required": True} if required else {})}
|
|
257
|
-
about = [{"type": "text", "text": str(spec["description"])}] if spec.get("description") else []
|
|
258
|
-
if kind == BOOLEAN:
|
|
259
|
-
return [*about, {**base, "type": "toggle", "value": bool(spec.get("default"))}]
|
|
260
|
-
if kind in (NUMBER, INTEGER):
|
|
261
|
-
bounds = {key: spec[key] for key in ("minimum", "maximum") if isinstance(spec.get(key), (int, float))}
|
|
262
|
-
return [*about, {
|
|
263
|
-
**base,
|
|
264
|
-
"type": "input",
|
|
265
|
-
"format": "number",
|
|
266
|
-
**({"min": bounds["minimum"]} if "minimum" in bounds else {}),
|
|
267
|
-
**({"max": bounds["maximum"]} if "maximum" in bounds else {}),
|
|
268
|
-
**({"step": 1} if kind == INTEGER else {}),
|
|
269
|
-
**({"value": str(spec["default"])} if spec.get("default") is not None else {}),
|
|
270
|
-
}]
|
|
271
|
-
if kind == ARRAY:
|
|
272
|
-
items = spec.get("items") or {}
|
|
273
|
-
return [*about, {**base, "type": "select", "multiple": True, "options": _choices(items)}]
|
|
274
|
-
choices = _choices(spec)
|
|
275
|
-
if choices:
|
|
276
|
-
return [*about, {**base, "type": "select", "display": "dropdown", "options": choices}]
|
|
277
|
-
return [*about, {
|
|
278
|
-
**base,
|
|
279
|
-
"type": "input",
|
|
280
|
-
**{key: spec[key] for key in ("pattern",) if isinstance(spec.get(key), str)},
|
|
281
|
-
**({"min_length": spec["minLength"]} if isinstance(spec.get("minLength"), int) else {}),
|
|
282
|
-
**({"max_length": spec["maxLength"]} if isinstance(spec.get("maxLength"), int) else {}),
|
|
283
|
-
**({"value": str(spec["default"])} if spec.get("default") is not None else {}),
|
|
284
|
-
}]
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
def _choices(spec: dict) -> list[dict]:
|
|
288
|
-
listed = spec.get("oneOf") or spec.get("anyOf")
|
|
289
|
-
if isinstance(listed, list):
|
|
290
|
-
return [
|
|
291
|
-
{"value": str(item.get("const")), "label": str(item.get("title") or item.get("const")), **({"description": str(item["description"])} if item.get("description") else {})}
|
|
292
|
-
for item in listed
|
|
293
|
-
if isinstance(item, dict) and item.get("const") is not None
|
|
294
|
-
]
|
|
295
|
-
if isinstance(spec.get("enum"), list):
|
|
296
|
-
return [{"value": str(value), "label": str(value)} for value in spec["enum"]]
|
|
297
|
-
return []
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
def _typed(value: Any, spec: dict) -> Any:
|
|
301
|
-
kind = spec.get("type")
|
|
302
|
-
if kind == BOOLEAN:
|
|
303
|
-
return value if isinstance(value, bool) else str(value).lower() == "true"
|
|
304
|
-
if kind in (NUMBER, INTEGER):
|
|
305
|
-
try:
|
|
306
|
-
number = float(value)
|
|
307
|
-
except (TypeError, ValueError):
|
|
308
|
-
return value
|
|
309
|
-
return int(number) if kind == INTEGER or number.is_integer() else number
|
|
310
|
-
if kind == ARRAY:
|
|
311
|
-
return value if isinstance(value, list) else [value] if value else []
|
|
312
|
-
return value
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
def elicitation(params: dict) -> dict:
|
|
316
|
-
"""The form the user answers for an agent's request."""
|
|
317
|
-
message = str(params.get("message") or "")
|
|
318
|
-
if params.get("mode") == URL_MODE:
|
|
319
|
-
url = str(params.get("url") or "")
|
|
320
|
-
return {
|
|
321
|
-
"kind": "component",
|
|
322
|
-
"title": message,
|
|
323
|
-
"blocks": [
|
|
324
|
-
{"type": "text", "text": f"[{url}]({url})"},
|
|
325
|
-
{"type": "buttons", "id": URL_ACTION, "options": [
|
|
326
|
-
{"value": ACCEPT, "label": "", "label_key": "link_done", "style": "primary", "icon": "check"},
|
|
327
|
-
{"value": DECLINE, "label": "", "label_key": "cancel", "style": "plain", "icon": "x"},
|
|
328
|
-
]},
|
|
329
|
-
],
|
|
330
|
-
}
|
|
331
|
-
schema = params.get("requestedSchema") or {}
|
|
332
|
-
required = set(schema.get("required") or [])
|
|
333
|
-
blocks = [
|
|
334
|
-
element
|
|
335
|
-
for name, spec in (schema.get("properties") or {}).items()
|
|
336
|
-
if isinstance(spec, dict)
|
|
337
|
-
for element in _field(str(name), spec, name in required)
|
|
338
|
-
]
|
|
339
|
-
return {"kind": "component", "title": message, "blocks": blocks}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
def elicitation_answer(answer: dict, params: dict) -> dict:
|
|
343
|
-
if answer.get("chat"):
|
|
344
|
-
return {"action": DECLINE}
|
|
345
|
-
values = answer.get("values") or {}
|
|
346
|
-
if params.get("mode") == URL_MODE:
|
|
347
|
-
return {"action": ACCEPT if values.get(URL_ACTION) == ACCEPT else DECLINE}
|
|
348
|
-
properties = (params.get("requestedSchema") or {}).get("properties") or {}
|
|
349
|
-
content = {name: _typed(values[name], spec) for name, spec in properties.items() if name in values and isinstance(spec, dict)}
|
|
350
|
-
return {"action": ACCEPT, "content": content}
|
|
@@ -10,7 +10,7 @@ from typing import Any, Awaitable, Callable, Optional, Protocol
|
|
|
10
10
|
import psutil
|
|
11
11
|
|
|
12
12
|
from core import packages, process_job, release
|
|
13
|
-
from services import
|
|
13
|
+
from services import agents, elicitation, persistent_sessions
|
|
14
14
|
from services.acp_peer import AUTH_REQUIRED, INTERNAL_ERROR, RESOURCE_NOT_FOUND, STREAM_LIMIT, AcpError, AcpPeer
|
|
15
15
|
|
|
16
16
|
PROTOCOL_VERSION = 1
|
|
@@ -146,7 +146,7 @@ class AgentConnection:
|
|
|
146
146
|
if receiver is not None:
|
|
147
147
|
return await receiver.requested(method, params)
|
|
148
148
|
if method == ELICIT and self._login_ask is not None:
|
|
149
|
-
return
|
|
149
|
+
return elicitation.answer(await self._login_ask(elicitation.form(params)), params)
|
|
150
150
|
raise AcpError(RESOURCE_NOT_FOUND, f"no session for {method}")
|
|
151
151
|
|
|
152
152
|
async def _notified(self, method: str, params: dict) -> None:
|