feat(canvas): Custom extractor components, migrator, and MCP spec tools

Canvas Components:
- CustomExtractorNode.tsx: Node for custom Python extractors
- CustomExtractorPanel.tsx: Configuration panel for custom extractors
- ConnectionStatusIndicator.tsx: WebSocket status display
- atomizer-spec.ts: TypeScript types for AtomizerSpec v2.0

Config:
- migrator.py: Legacy config to AtomizerSpec v2.0 migration
- Updated __init__.py exports for config and extractors

MCP Tools:
- spec.ts: MCP tools for spec manipulation
- index.ts: Tool registration updates
This commit is contained in:
2026-01-20 13:11:42 -05:00
parent cb6b130908
commit 27e78d3d56
9 changed files with 3128 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ Available extractors:
- SPC Forces: extract_spc_forces, extract_total_reaction_force
- Zernike: extract_zernike_from_op2, ZernikeExtractor (telescope mirrors)
- Part Introspection: introspect_part (comprehensive NX .prt analysis)
- Custom: CustomExtractorLoader for user-defined Python extractors
Phase 2 Extractors (2025-12-06):
- Principal stress extraction (sigma1, sigma2, sigma3)
@@ -25,6 +26,10 @@ Phase 3 Extractors (2025-12-06):
Phase 4 Extractors (2025-12-19):
- Part Introspection (E12): Comprehensive .prt analysis (expressions, mass, materials, attributes, groups, features)
Phase 5 Extractors (2026-01-17):
- Custom Extractor Loader: Dynamic loading and execution of user-defined Python extractors
from AtomizerSpec v2.0 (sandboxed execution with security validation)
"""
# Zernike extractor for telescope mirror optimization (standard Z-only method)
@@ -119,6 +124,26 @@ from optimization_engine.extractors.introspect_part import (
print_introspection_summary,
)
# Custom extractor loader (Phase 5) - dynamic Python extractors from AtomizerSpec v2.0
from optimization_engine.extractors.custom_extractor_loader import (
CustomExtractor,
CustomExtractorLoader,
CustomExtractorContext,
ExtractorSecurityError,
ExtractorValidationError,
load_custom_extractors,
execute_custom_extractor,
validate_custom_extractor,
)
# Spec extractor builder - builds extractors from AtomizerSpec
from optimization_engine.extractors.spec_extractor_builder import (
SpecExtractorBuilder,
build_extractors_from_spec,
get_extractor_outputs,
list_available_builtin_extractors,
)
__all__ = [
# Part mass & material (from .prt)
'extract_part_mass_material',
@@ -174,4 +199,18 @@ __all__ = [
'get_expressions_dict',
'get_expression_value',
'print_introspection_summary',
# Custom extractor loader (Phase 5)
'CustomExtractor',
'CustomExtractorLoader',
'CustomExtractorContext',
'ExtractorSecurityError',
'ExtractorValidationError',
'load_custom_extractors',
'execute_custom_extractor',
'validate_custom_extractor',
# Spec extractor builder
'SpecExtractorBuilder',
'build_extractors_from_spec',
'get_extractor_outputs',
'list_available_builtin_extractors',
]