Skip to content

Commit 9cd2e78

Browse files
committed
feat(script-engines): implement complete Python engine for Issue #253
- Add PythonEngine with subprocess execution and timeout handling - Implement context injection with JSON serialization and Python syntax conversion - Add comprehensive error handling for syntax, runtime, import, and timeout errors - Integrate memory tracking and performance monitoring capabilities - Support script precompilation (source storage) and execution - Add structured stderr log parsing for debugging capabilities - Add 13 comprehensive tests covering all functionality: * Engine creation and configuration * Simple script execution and context injection * Error handling (syntax, runtime, import errors) * Timeout enforcement and memory tracking * MCP validation script support * Performance requirements validation (<1000ms for concurrent execution) * Concurrent execution support - All tests passing with proper error handling and resource management Design document: docs/design/issue-253-python-engine-implementation.md Tests: 13 tests, all passing (coverage: comprehensive) Dependencies: Add 'which' crate for Python interpreter detection closes #253
1 parent 09a6701 commit 9cd2e78

File tree

5 files changed

+2038
-4
lines changed

5 files changed

+2038
-4
lines changed

crates/mandrel-mcp-th/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
4848
jsonpath_lib = "0.3"
4949
jsonschema = "0.18"
5050

51+
# Script engine dependencies
52+
which = "4.0"
53+
5154
# Utilities
5255
uuid = { version = "1.0", features = ["v4", "serde"] }
5356
chrono = { version = "0.4", features = ["serde"] }

0 commit comments

Comments
 (0)