dataflow.platformΒΆ

Platform Package - Unified Platform Architecture for Haive Ecosystem

This package provides the unified platform architecture for the entire Haive ecosystem, implementing the Pydantic-first design with intelligent inheritance patterns.

Package Structure:ΒΆ

models/ β”œβ”€β”€ base.py - BasePlatform foundation model β”œβ”€β”€ mcp.py - MCPPlatform and MCP-specific models β”œβ”€β”€ plugins.py - PluginPlatform for all plugin implementations └── servers.py - Server hierarchy (Base -> MCP -> Downloaded)

Architecture Philosophy:ΒΆ

  1. Pure Pydantic Models: - No __init__ methods anywhere in the platform - All configuration via Field definitions and validators - Clean inheritance patterns without method overrides

  2. Intelligent Inheritance: - BasePlatform provides core platform functionality - Specialized platforms inherit and extend capabilities - Server hierarchy supports multiple server types - Consistent patterns across all platform components

  3. Platform-Based Design: - Everything inherits from a platform base - Platform capabilities are inherited and extended - Plugin system built on platform inheritance - Server management through platform patterns

  4. Real Integration: - Works with our 63 downloaded MCP servers - Integrates with haive-dataflow registry - Supports haive-agp HAP system - Factory methods for real data sources

Key Components:ΒΆ

Platform Models: - BasePlatform: Foundation for all platforms - MCPPlatform: Specialized for MCP operations - PluginPlatform: Base for all plugin implementations

Server Models: - BaseServerInfo: Foundation for all servers - MCPServerInfo: MCP-specific server information - DownloadedServerInfo: Our 63 bulk-downloaded servers

Configuration Models: - PluginConfig: Plugin configuration and metadata - APIConfig: FastAPI application configuration - DiscoveryConfig: Service discovery configuration - ConnectionConfig: Server connection details

Usage Examples:ΒΆ

Platform Creation:
>>> from haive.dataflow.platform import MCPPlatform
>>> platform = MCPPlatform()  # Intelligent defaults
>>> platform.platform_name
'Haive MCP Platform'
>>> platform.supports_discovery
True
Plugin Configuration:
>>> from haive.dataflow.platform.models import PluginConfig
>>> plugin = PluginConfig(
...     name="mcp-browser",
...     entry_point="haive.mcp.plugins:MCPBrowserPlugin"
... )
>>> platform.add_plugin(plugin)
Server Management:
>>> from haive.dataflow.platform.models import DownloadedServerInfo
>>> server = DownloadedServerInfo.from_csv_and_install_report(
...     csv_data, install_report, "session-20250819"
... )
>>> server.get_mcp_capabilities_summary()
{'transport': 'stdio', 'source': 'downloaded', ...}
Inheritance Validation:
>>> from haive.dataflow.platform.models import validate_platform_inheritance
>>> result = validate_platform_inheritance(platform)
>>> result['is_base_platform']
True
>>> result['platform_type']
'MCPPlatform'

SubmodulesΒΆ