Skip to main content

Plugin Architecture

The SmartHopper solution is organized into layered modules with a clear rule: shared logic lives at the highest layer that owns the concern.

Modules​

ProjectResponsibility
SmartHopper.CoreComponent base classes (AIStatefulAsyncComponentBase, async/stateful/selecting bases, provider selection), chat UI host (WebChat), context providers, canvas button, data-tree processing, IO persistence, custom parameter/types.
SmartHopper.Core.GrasshopperGrasshopper-specific utilities, converters, canvas helpers, GhJSON integration, and the AITool implementations the assistant and MCP server expose.
SmartHopper.ComponentsThe 90+ production Grasshopper components, grouped by canvas subcategory (Input, Output, Grasshopper, JSON, Knowledge, Script, Img, Audio, Text, List, AI, MCP, Misc).
SmartHopper.Components.TestTest-only components (never built in Release) for validation that requires Rhino/Grasshopper.
SmartHopper.InfrastructureProvider manager, model/capability registry, AI context manager, AI tool manager, AICall pipeline, consent & mutation review, MCP server, settings & secure storage, dialogs, local diagnostics, initialization.
SmartHopper.MenuGrasshopper menu bar (SmartHopper menu) and the settings dialog (Eto.Forms, cross-platform).
SmartHopper.ProviderSdkContracts providers implement: IAIProvider, AIProvider base, settings descriptors, hosting, logging.
SmartHopper.Providers.*One project per AI provider — API-specific request/response adaptation. Discovered and cryptographically verified at runtime.

Test projects​

SmartHopper.Infrastructure.Tests, SmartHopper.Core.Tests, SmartHopper.Core.Grasshopper.Tests, SmartHopper.ProviderSdk.Tests — xUnit, no Rhino runtime required. macOS CI runs only the Infrastructure tests.

Placement rule​

  • Core UI/component behavior → SmartHopper.Core
  • Grasshopper canvas, data tree, GhJSON → SmartHopper.Core.Grasshopper
  • End-user component wiring → SmartHopper.Components
  • Provider/model/context/tool orchestration, settings → SmartHopper.Infrastructure
  • API-specific quirks → the matching SmartHopper.Providers.<Name>