pub struct PythonPlugin;Expand description
Python language plugin (uses ty via uvx)
Trait Implementations§
Source§impl LanguagePlugin for PythonPlugin
impl LanguagePlugin for PythonPlugin
Source§fn run_command_for_dir(&self, path: &Path) -> String
fn run_command_for_dir(&self, path: &Path) -> String
Detect the package name from pyproject.toml or src layout and return an appropriate run command.
Source§fn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
File extensions this plugin handles
Source§fn key_files(&self) -> &[&str]
fn key_files(&self) -> &[&str]
Key files that identify this language (e.g., Cargo.toml, pyproject.toml)
Source§fn required_binaries(&self) -> Vec<(&str, &str, &str)>
fn required_binaries(&self) -> Vec<(&str, &str, &str)>
Required host binaries for this plugin, grouped by role. Read more
Source§fn get_lsp_config(&self) -> LspConfig
fn get_lsp_config(&self) -> LspConfig
Get the LSP configuration for this language
Source§fn get_init_action(&self, opts: &InitOptions) -> ProjectAction
fn get_init_action(&self, opts: &InitOptions) -> ProjectAction
Get the action to initialize a new project (greenfield)
Source§fn check_tooling_action(&self, path: &Path) -> ProjectAction
fn check_tooling_action(&self, path: &Path) -> ProjectAction
Check if an existing project needs tooling sync (e.g., uv sync, cargo fetch)
Source§fn init_command(&self, opts: &InitOptions) -> String
fn init_command(&self, opts: &InitOptions) -> String
Get the command to initialize a new project
DEPRECATED: Use get_init_action instead
Source§fn test_command(&self) -> String
fn test_command(&self) -> String
Get the command to run tests
Source§fn test_command_with_filter(&self, filter: Option<&str>) -> String
fn test_command_with_filter(&self, filter: Option<&str>) -> String
The test command narrowed to an already-sanitized name filter. The
default ignores the filter; plugins with a native filter form
override it. Acceptance gates always use the unfiltered
test_command — only interactive run_test
calls narrow.Source§fn run_command(&self) -> String
fn run_command(&self) -> String
Get the command to run the project (for verification)
Source§fn syntax_check_command(&self) -> Option<String>
fn syntax_check_command(&self) -> Option<String>
Source§fn lint_command(&self) -> Option<String>
fn lint_command(&self) -> Option<String>
Get the lint command (e.g.,
cargo clippy -- -D warnings) Read moreSource§fn file_ownership_patterns(&self) -> &[&str]
fn file_ownership_patterns(&self) -> &[&str]
File glob patterns this plugin owns (e.g.,
["*.rs", "Cargo.toml"]) Read moreSource§fn is_test_file(&self, path: &str) -> bool
fn is_test_file(&self, path: &str) -> bool
Whether an existing file contributes executable test-oracle semantics.
The governed candidate runs a second verifier pass with source
pre-images restored whenever one of these files is modified.
Source§fn host_tool_available(&self) -> bool
fn host_tool_available(&self) -> bool
Check if the host has the required build tools available Read more
Source§fn format_command(&self) -> Option<String>
fn format_command(&self) -> Option<String>
The governed formatter command (
run_formatter; e.g. cargo fmt).Source§fn format_check_command(&self) -> Option<String>
fn format_check_command(&self) -> Option<String>
The formatter’s non-mutating check form (e.g.
cargo fmt --check),
declared as the format verifier stage when present.Source§fn lsp_fallback(&self) -> Option<LspConfig>
fn lsp_fallback(&self) -> Option<LspConfig>
Get fallback LSP config when primary is unavailable
Source§fn verifier_profile(&self) -> VerifierProfile
fn verifier_profile(&self) -> VerifierProfile
Build a complete verifier profile by probing each capability. Read more
Source§fn legal_support_files(&self) -> &[&str]
fn legal_support_files(&self) -> &[&str]
Legal support files that the LLM is allowed to create beyond declared
output_files (e.g., Cargo.toml for Rust, __init__.py for Python). Read moreSource§fn dependency_commands(
&self,
action: DependencyAction,
packages: &[String],
dev: bool,
) -> Vec<String>
fn dependency_commands( &self, action: DependencyAction, packages: &[String], dev: bool, ) -> Vec<String>
The command sequence realizing a governed dependency action, or
empty when this plugin does not support dependency mutation. Every
returned command must itself satisfy
dependency_command_policy,
and the handler re-checks it (fail closed).Source§fn dependency_files(&self) -> Vec<String>
fn dependency_files(&self) -> Vec<String>
Workspace-relative manifest and lockfile paths a dependency command
may mutate — the promotable footprint of
mutate_dependencies.Source§fn dependency_command_policy(&self, command: &str) -> CommandPolicyDecision
fn dependency_command_policy(&self, command: &str) -> CommandPolicyDecision
Policy for dependency-management commands emitted by the LLM. Read more
Source§fn test_file_patterns(&self) -> &[&str]
fn test_file_patterns(&self) -> &[&str]
Glob patterns that identify test files for this language. Read more
Source§fn detect(&self, path: &Path) -> bool
fn detect(&self, path: &Path) -> bool
Detect if this plugin should handle the given project directory
Source§fn build_command(&self) -> Option<String>
fn build_command(&self) -> Option<String>
Source§fn owns_file(&self, path: &str) -> bool
fn owns_file(&self, path: &str) -> bool
PSP-5 Phase 2: Check if a file path belongs to this plugin’s ownership domain Read more
Source§fn manifest_mutation_policy(
&self,
_manifest_path: &str,
) -> ManifestMutationPolicy
fn manifest_mutation_policy( &self, _manifest_path: &str, ) -> ManifestMutationPolicy
Policy for manifest file mutations produced by the LLM. Read more
Auto Trait Implementations§
impl Freeze for PythonPlugin
impl RefUnwindSafe for PythonPlugin
impl Send for PythonPlugin
impl Sync for PythonPlugin
impl Unpin for PythonPlugin
impl UnsafeUnpin for PythonPlugin
impl UnwindSafe for PythonPlugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.