feat(maimu): move Maimu out of core into an installable plugin - #137
Merged
Conversation
One lab's stimulator does not belong in every install. The device and node are unchanged; what changes is that they now ship as glider-maimu alongside glider-harp rather than being bundled. Moving it made it the first real consumer of the plugin node extension points, which is the only way to find out whether they were good enough. They were not, in two ways, both fixed here because both are general: A plugin node could not declare its canvas ports. setup_node_ports fell back to one generic exec input and one generic exec output for any type not in its hand-written table, which silently drew the wrong shape for anything else -- the same fallback that left Behavior Input's On Enter unreachable. Ports now come from the node's own NodeDefinition, which every node already declares. The table stays for the built-ins whose port labels differ from their port names. A plugin node could not be bound to a device. The properties panel offered a device selector by matching a hardcoded list of type names, which no plugin can join. A node now says so with REQUIRES_DEVICE, set on HardwareNode, so any node that needs hardware gets the selector. The device's address field becomes the ble_address schema type, so the Scan button survives the move -- as a plugin it cannot be special-cased by name in the hardware panel, which was the only way a device got Scan before. The node's Mode / Period / Duration move from a hardcoded editor branch to a declared PROPERTIES_SCHEMA. One deliberate loss: the schema form has no notion of one field depending on another, so Period and Duration no longer grey out outside Pulse mode. That cue is in their help text instead. Four core tests used Maimu as a convenient BLE device; they now use the core BLE types, since what they test -- driver rebuilding on open, the `name` settings collision, serialization round-trips -- was never about Maimu. The closed-loop integration test moves to the plugin, which is where it belongs: core supplies the behavior trigger, the plugin supplies the stimulus.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Last of three. Stacked on #136 (
ble_addressfield), which is stacked on #135 (node extension points). Retarget tomainas those land.One lab's stimulator does not belong in every install. The device and node are unchanged; what changes is that they ship as
glider-maimualongsideglider-harprather than being bundled.Moving it was the point
#135 shipped the plugin node extension points with zero consumers. Making Maimu the first one is the only way to find out whether they were good enough — and they weren't, in two ways. Both gaps are general, and both are fixed here:
A plugin node could not declare its canvas ports.
setup_node_portsfell back to one generic exec-in/exec-out for any type not in its hand-written table, silently drawing the wrong shape for anything else. That is the same fallback that left Behavior Input'sOn Enterunreachable in #132. Ports now come from the node's ownNodeDefinition, which every node already declares — so this also fixes every built-in node missing from that table,Device Actionincluded.A plugin node could not be bound to a device. The properties panel offered a device selector by matching a hardcoded list of type names, which no plugin can join. A node now declares
REQUIRES_DEVICE, set onHardwareNode, so anything needing hardware gets the selector.What survives the move
ble_addressschema type from feat(gui): a ble_address schema field, so any BLE device can offer Scan #136. As a plugin it cannot be special-cased by name in the hardware panel, which was the only way a device got Scan before.test_behavior_triggers_stimulus.pymoves to the plugin and still drives all four hops, asserting on the bytes reaching the peripheral. That is where it belongs: core supplies the behavior trigger, the plugin supplies the stimulus.off-before-disconnect, pulse validation, name-vs-address portability, noreadaction.What does not
The node's Mode / Period / Duration move from a hardcoded editor branch to a declared
PROPERTIES_SCHEMA. Period and Duration no longer grey out outside Pulse mode — the schema form has no notion of one field depending on another. The cue moved into their help text. Adding conditional fields to the schema form would be its own change.Core tests that mentioned Maimu
Four used it as a convenient BLE device. They now use the core BLE types, because what they test — driver rebuilding on open, the
namesettings collision, serialization round-trips — was never about Maimu. One is strengthened in passing: the port test now usesDevice Action, which has a genuinely interesting shape (3 in, 2 out) rather than Maimu's 1-and-1.Wiring
CI installs the plugin editable and runs
plugins/glider-maimu/tests/with coverage, matching howglider-harpis handled. Docs point at the plugin instead of listing a built-in.Verification
src/,tests/andplugins/