Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfe05b4324 | ||
|
|
dffa0e152f |
@@ -31,8 +31,6 @@ The codebase is split into two layers:
|
||||
|
||||
**`bcc_core.py`** — All logic with no GUI imports. Contains:
|
||||
- `Profile` / `ServerEntry` dataclasses (the data model)
|
||||
- `ClientSpec` (issue #5, cross-client) — one adapter object per MCP host capturing everything client-specific: the top-level `servers_key` (Claude uses `mcpServers`; VS Code will use `servers`), the parking `disabled_key`, config `config_filename`, the capability flags (`expands_env_refs`, `supports_restart`), and a per-server `entry_to_internal`/`entry_from_internal` translation pair (identity for Claude; the seam a differently-shaped client overrides). `CLAUDE_DESKTOP` and `CLAUDE_CODE` are the two shipped specs; `resolve_client(path)` picks one by filename, and each `Profile` carries its resolved `client`. The read/write/diff functions take an optional `spec` and default to Claude's layout, so a call with no spec is unchanged.
|
||||
|
||||
- `discover_profiles()` — scans the platform's app-support directory for `Claude*` folders (Claude Desktop) **and** always adds `~/.claude.json` (Claude Code user scope — what `claude mcp add` writes). `~/.claude/settings.json` is NOT a server config (it rejects `mcpServers` with a schema error) and is only surfaced, labelled legacy, if servers are found parked in it. Project-scope `.mcp.json` files can be opened via Add config…
|
||||
- `load_config` / `extract_servers` / `apply_servers` / `write_config` — the read/write pipeline; writes are atomic with rotating timestamped backups in `.bcc_backups/`
|
||||
- `parse_pasted_json()` / `parse_pasted_json_verbose()` — accepts three JSON shapes (full config, inner map, or bare server object). Input does not have to be valid JSON: `repair_json_text()` auto-fixes markdown fences, surrounding prose, `//` `/* */` `#` comments, trailing/missing commas, smart quotes, single quotes, unquoted keys, Python/JS literals, and unclosed braces. The verbose variant also returns human-readable notes describing every repair applied (shown live in the paste dialog)
|
||||
@@ -45,7 +43,7 @@ The codebase is split into two layers:
|
||||
- `KeyValueTable` — reusable widget for env vars and headers
|
||||
- `ConnTester(QThread)` — background thread for remote reachability tests
|
||||
|
||||
**The cardinal rule**: `apply_servers()` only ever writes the two keys the target client's servers live under — by default `mcpServers` and `_disabledMcpServers`, or whatever the profile's `ClientSpec` declares (`servers_key` + `disabled_key`). All other keys in the user's config are preserved verbatim and in their original order. The rule generalises across clients precisely because it is parameterised by the spec rather than hard-coded.
|
||||
**The cardinal rule**: `apply_servers()` only ever writes to `mcpServers` and `_disabledMcpServers`. All other keys in the user's config are preserved verbatim and in their original order.
|
||||
|
||||
Disabled servers are parked under `_disabledMcpServers` (which Claude Desktop ignores) so they can be re-enabled without losing their definition.
|
||||
|
||||
|
||||
@@ -31,7 +31,11 @@ a = Analysis(
|
||||
["bcc.py"],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[("icons", "icons"), ("data/catalog.json", "data")],
|
||||
datas=[
|
||||
("icons", "icons"),
|
||||
("data/catalog.json", "data"),
|
||||
("data/catalog.json.sig", "data"),
|
||||
],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
|
||||
+242
-839
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
# Runtime (also in requirements.txt)
|
||||
PySide6>=6.6
|
||||
cryptography>=42.0 # catalog signature verification (bcc_core) + release checksum signing
|
||||
|
||||
# Build / packaging
|
||||
pyinstaller>=6.0
|
||||
@@ -9,3 +8,4 @@ pillow>=10.0 # generates icons/app.ico during CI (Windows build)
|
||||
# Test / lint
|
||||
pytest>=8.0
|
||||
ruff>=0.6
|
||||
cryptography>=42.0 # release checksum signing (scripts/sign_checksums.py)
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
PySide6>=6.6
|
||||
cryptography>=42.0 # bcc_core imports it at load (catalog signature verification)
|
||||
|
||||
+267
-701
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user