NEXT PUSH:
TASK: Multi-instance support — channel naming + registry + list_instances
FILES CHANGING:
- Source/Shared/Constants.h (add kRegistryPath)
- Source/Plugin/InstanceRegistry.h (NEW — header-only)
- Source/Plugin/McpServer.h (remove port param, add channelNameCallback)
- Source/Plugin/McpServer.cpp (bind_to_any_port, list_instances, channel prefix)
- Source/Plugin/PluginBridgeProcessor.h (add channelName + setChannelName)
- Source/Plugin/PluginBridgeProcessor.cpp (registry integration + state save/restore)
- Source/Plugin/PluginBridgeEditor.h (add channelDropdown)
- Source/Plugin/PluginBridgeEditor.mm (dropdown UI + onChange) — AUTHORIZED this sprint
FILES NOT TOUCHING:
- PluginPickerComponent.mm ✅
- HelperPluginHost.mm ✅
- HelperConnection.cpp ✅
- CMakeLists.txt ✅ (no new .cpp files)
APIS USED (all verified by Claude Code):
- httplib bind_to_any_port ✅
- httplib listen_after_bind ✅
- juce::ComboBox ✅
- juce…
fix: replace CARemoteLayerServer with CAContext+CALayerHost for cross-process GUI
Sitar118
0548359
Three bugs killed the GUI:
1. CARemoteLayerServer does not capture a hidden NSWindow's content cross-process.
Replaced with CAContext (server) + CALayerHost (client) — the correct private-but-stable
macOS API for cross-process layer embedding, stable from 10.10 through Sequoia.
2. NSWindow was never orderFront: — WindowServer never composited its content.
Fixed: window positioned at (-32000,-32000) and orderFront: called.
3. NSMachBootstrapServer (deprecated on 13+) no longer needed.
contextId (uint32_t) is sent directly over the existing IPC socket.
New file: Source/Shared/PrivateCA.h — declares CAContext, CALayerHost, CGSMainConnectionID.
COMPLETE REWRITE to proper solution:
- Plugin runs in Helper process (crash-safe, like v0.2)
- GUI renders in Helper via CARemoteLayerServer
- PluginBridge.vst3 displays it via CARemoteLayerClient (CALayer inside its own editor)
- Mach port transferred via NSMachBootstrapServer (named port per PID)
- Mouse/keyboard events forwarded from host → helper via Unix socket IPC
- Audio routes via shared memory (same as v0.2)
This gives BOTH crash safety AND GUI inside Ableton's window (including fullscreen).
Based on: Apple's CARemoteLayerServer/Client public API (macOS 10.7+)
Reference: krevis/RemoteLayerDemo on GitHub"