Open
Conversation
- MCP server now sends structured JSON commands ({command, args}) instead
of Python code strings over the socket
- Plugin dispatches to an allowlist of ~77 cmd.* handler functions instead
of using exec() to run arbitrary code
- Removed dangerous commands: system (shell exec), cd, ls, pwd
- Added message-type validation and proper error propagation
- util.* commands use cmd.do() (PyMOL's safe command interpreter)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix duplicate 'spheres' in show/hide representation options - Fix analyze_pymol_output() lowercasing regex patterns, which converted \S (non-whitespace) to \s (whitespace), breaking OBJECT_NOT_FOUND detection. Now uses re.IGNORECASE instead. - Remove deprecated util.ss and nonexistent util.color_secondary from both server definitions and plugin dispatcher - Add composite color_ss command to replace util.ss (colors helices red, sheets yellow, loops green) - Add comprehensive test suite (175 tests) covering command definitions, pattern matching, error detection, and server/plugin sync Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds Option B (Claude Code CLI) alongside Claude Desktop for MCP server configuration, documents manual and auto-start methods for the PyMOL socket listener, and adds socket verification commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace raw dicts with validated Pydantic models throughout: - ParameterDef, CommandDef, ErrorCategory, SocketRequest, SocketResponse, and ParseResult models in new models.py - All 66 PYMOL_COMMANDS entries converted to CommandDef/ParameterDef - ERROR_PATTERNS validated at module load time via ErrorCategory - parse_pymol_input returns ParseResult (backward-compatible via __iter__) - SocketRequest used for outbound serialization in send_command - SocketResponse used for response parsing in parse_and_execute - Port validation (1-65535) added to PyMOLConnection.__init__ - 26 new model validation tests in TestPydanticModels class Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds testing, type-checking (with type-hints and pydantic) and configuration tools for claude code.