Driver SDK Reference
Build device drivers for Muxit as standalone .NET class libraries (Tier 3), Python modules (Tier 2), or JavaScript modules (Tier 1). C# drivers implement IConnectorDriver from the shared SDK. JS drivers export a default object with meta, init, get, set, execute, and shutdown methods. Python drivers subclass muxit_driver.Driver and call run(...).
Driver Tiers
| Tier | Type | Location | Status | Docs |
|---|---|---|---|---|
| 0 | Built-in (C#) | Compiled into MuxitServer | Always available | Built-in Drivers |
| 1 | JavaScript | workspace/drivers/*.muxdriver (or loose *.driver.js) | Active (sandboxed V8) | JS Driver SDK |
| 2 | Python | workspace/drivers/*.muxdriver (or loose *.driver.py) | Active (subprocess + JSON-RPC) | Python Driver SDK |
| 3 | DLL Extension (C#) | workspace/drivers/*.muxdriver | Active | C# Driver SDK |
Choose your SDK based on what you're building:
- JS Driver SDK — quick to write, sandboxed V8, good for serial/TCP instruments
- Python Driver SDK — for Python-only ecosystems (numpy, torch, transformers, instrument SDKs); subprocess-isolated
- C# Driver SDK — full .NET power, NuGet packages, good for complex hardware with native libraries
Documenting properties and actions
Every property and action accepts two doc fields regardless of tier:
description— one-line summary. Always visible (AI system prompt, IntelliSense, driver doc page).details— short markdown with parameter enums, side effects, failure modes, non-obvious invariants. Surfaced on-demand in the driver doc page (collapsible panel), in the script editor's hover popup, and in the full schema that the AI fetches viaget_connector_schema/get_driver_schema. Never included in the upfront AI system prompt — usedetailsfreely for anything that would otherwise cost the user or an AI agent a round-trip of trial and error.
See the per-tier docs for syntax: JS Driver SDK, C# Driver SDK.
Manifest & validation
Every driver ships a manifest.json. See:
- Driver Manifest Schema — required and optional fields, premium integrity rules, complete examples
- Driver Tags — controlled tag vocabulary
- Driver Validation — rules enforced by
node drivers.js validate, severities, JSON output
Packaging & Distribution
Drivers can be packaged as .muxdriver files (ZIP archives with a manifest.json) for sharing through the Driver Marketplace.
node drivers.js # Interactive Driver Manager
node drivers.js create # Scaffold a new driver
node drivers.js package # Build a .muxdriver package
node drivers.js inspect # View package contentsSee the Driver Marketplace guide for the full packaging and publishing workflow.