feat: Implement Sideline plugin system with consistent terminology
This commit implements the Sideline/Mainline split with a clean plugin architecture: ## Core Changes ### Sideline Framework (New Directory) - Created directory containing the reusable pipeline framework - Moved pipeline core, controllers, adapters, and registry to - Moved display system to - Moved effects system to - Created plugin system with security and compatibility management in - Created preset pack system with ASCII art encoding in - Added default font (Corptic) to - Added terminal ANSI constants to ### Mainline Application (Updated) - Created for Mainline stage component registration - Updated to register Mainline stages at startup - Updated as a compatibility shim re-exporting from sideline ### Terminology Consistency - : Base class for all pipeline components (sources, effects, displays, cameras) - : Base class for distributable plugin packages (was ) - : Base class for visual effects (was ) - Backward compatibility aliases maintained for existing code ## Key Features - Plugin discovery via entry points and explicit registration - Security permissions system for plugins - Compatibility management with semantic version constraints - Preset pack system for distributable configurations - Default font bundled with Sideline (Corptic.otf) ## Testing - Updated tests to register Mainline stages before discovery - All StageRegistry tests passing Note: This is a major refactoring that separates the framework (Sideline) from the application (Mainline), enabling Sideline to be used by other applications.
This commit is contained in:
85
sideline/__init__.py
Normal file
85
sideline/__init__.py
Normal file
@@ -0,0 +1,85 @@
|
||||
"""
|
||||
Sideline - A modular pipeline framework for real-time terminal visualization.
|
||||
|
||||
Sideline provides a Stage-based pipeline architecture with capability-based
|
||||
dependency resolution for building real-time visualization applications.
|
||||
|
||||
Features:
|
||||
- Stage-based pipeline execution with DAG dependency resolution
|
||||
- Capability-based dependency injection
|
||||
- Display backends (Terminal, WebSocket, Null, etc.)
|
||||
- Effect plugin system with param bindings
|
||||
- Sensor framework for real-time input
|
||||
- Canvas and Camera for 2D rendering
|
||||
|
||||
Example:
|
||||
from sideline.pipeline import Pipeline, PipelineConfig, StageRegistry
|
||||
|
||||
pipeline = Pipeline(PipelineConfig(source="custom", display="terminal"))
|
||||
pipeline.add_stage("source", MyDataSourceStage())
|
||||
pipeline.add_stage("display", StageRegistry.create("display", "terminal"))
|
||||
pipeline.build().initialize()
|
||||
|
||||
result = pipeline.execute(initial_data)
|
||||
"""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
|
||||
# Re-export core components for convenience
|
||||
from sideline.pipeline import (
|
||||
Pipeline,
|
||||
PipelineConfig,
|
||||
PipelineContext,
|
||||
Stage,
|
||||
StageRegistry,
|
||||
)
|
||||
|
||||
from sideline.display import Display, DisplayRegistry
|
||||
|
||||
from sideline.effects import Effect, EffectPlugin, EffectRegistry
|
||||
|
||||
from sideline.plugins import (
|
||||
StagePlugin,
|
||||
Plugin, # Backward compatibility
|
||||
PluginMetadata,
|
||||
SecurityCapability,
|
||||
SecurityManager,
|
||||
VersionConstraint,
|
||||
CompatibilityManager,
|
||||
)
|
||||
|
||||
from sideline.preset_packs import (
|
||||
PresetPack,
|
||||
PresetPackMetadata,
|
||||
PresetPackManager,
|
||||
PresetPackEncoder,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# Pipeline
|
||||
"Pipeline",
|
||||
"PipelineConfig",
|
||||
"PipelineContext",
|
||||
"Stage",
|
||||
"StageRegistry",
|
||||
# Display
|
||||
"Display",
|
||||
"DisplayRegistry",
|
||||
# Effects
|
||||
"Effect", # Primary class name
|
||||
"EffectPlugin", # Backward compatibility alias
|
||||
"EffectRegistry",
|
||||
# Plugins
|
||||
"StagePlugin",
|
||||
"Plugin", # Backward compatibility alias
|
||||
"PluginMetadata",
|
||||
"SecurityCapability",
|
||||
"SecurityManager",
|
||||
"VersionConstraint",
|
||||
"CompatibilityManager",
|
||||
# Preset Packs
|
||||
"PresetPack",
|
||||
"PresetPackMetadata",
|
||||
"PresetPackManager",
|
||||
"PresetPackEncoder",
|
||||
]
|
||||
Reference in New Issue
Block a user