Every plugin implements similar interfaces for equivalent work and follows the same lifecycle. The plugin maintainer decides how much of the provided contract they want to implement.
Plugin Boundary
A plugin that provides a service registers it with core. Other plugins can consume these services through ServiceRegistry without knowing which plugin implemented the .proto.
No direct plugin-to-plugin calls.
Plugin Model
All plugins are standalone binaries loaded at runtime via gRPC (Plugin gRPC API):
Plugins implement DomainPlugin interface inside their own binaries
ExternalDomainProxy proxies gRPC calls to plugin processes
PluginServer wrapper exposes the plugin's implementation via gRPC
From the Registry's perspective, all plugins are identical:
registry.Register(externalProxy)
Plugin characteristics:
Standalone binaries in ./qntx-plugins/ (first-party) or external repositories
Communicates to QNTX via gRPC only
Added, configured and enabled via Signa
Run in separate processes for isolation
Hot-swappable — enable/disable at runtime without server restart
Interface Contract
The base interface every plugin implements:
type DomainPlugin interface {
Metadata() Metadata // Plugin info, version
Initialize(ctx context.Context, services ServiceRegistry) error // Lifecycle
Shutdown(ctx context.Context) error
RegisterHTTP(mux *http.ServeMux) error // HTTP API
RegisterWebSocket() (map[string]WebSocketHandler, error) // Real-time features
Health(ctx context.Context) HealthStatus // Monitoring
}
Optional interfaces extend the base — a plugin opts in by implementing them:
PausablePlugin — pause/resume without full restart
ConfigurablePlugin — exposes a config schema for UI-rendered settings
gRPC sandbox: Plugins run in separate processes with limited access
Service Registry: Plugins access QNTX via controlled ServiceRegistry interface
No direct access: Plugins cannot access QNTX internals, only exposed services
Failure Handling
Optional by default: QNTX runs in minimal core mode without any plugins
Warning on failure: If enabled plugin fails to load, log warning and continue without it
Runtime error notification: Plugin errors broadcast to UI for user awareness
Rationale: Minimal core philosophy - plugins are optional enhancements, not essential features
Versioning
Strict semver: Plugins declare required QNTX version using semver constraints
Validation at registration: Registry checks compatibility before loading plugin
Breaking changes in QNTX API trigger major version bump
HTTP Routing
"any plugin to be its own signum without the plugin having to define it"
"the plugin should just be able to declare routes"
Route prefix: All plugin routes are mounted at /api/<plugin-name>/*
No conflicts by design: The per-plugin prefix prevents routing collisions
Roles: Plugins declare roles on their routes (e.g., llm-provider). The UI discovers capabilities via /api/plugins/routes without hardcoding plugin names.
Consequences
Positive
Isolation: Plugin failures don't cascade to core or other plugins
Scalability: Each plugin can be developed/deployed independently
Third-party: External developers can build private plugins
Process isolation: Plugin crashes don't crash QNTX server
Language agnostic: gRPC enables plugins in any language (Go, Python, TypeScript, Rust)