fix(mcp): harden subsystem interface contracts

This commit is contained in:
Virgil 2026-04-02 17:35:43 +00:00
parent 4732e31b74
commit c42e7ad050
4 changed files with 24 additions and 0 deletions

View file

@ -36,6 +36,12 @@ type PrepSubsystem struct {
notifier coremcp.Notifier
}
var (
_ coremcp.Subsystem = (*PrepSubsystem)(nil)
_ coremcp.SubsystemWithShutdown = (*PrepSubsystem)(nil)
_ coremcp.SubsystemWithNotifier = (*PrepSubsystem)(nil)
)
// NewPrep creates an agentic subsystem.
//
// prep := NewPrep()

View file

@ -23,6 +23,12 @@ type Subsystem struct {
notifier coremcp.Notifier
}
var (
_ coremcp.Subsystem = (*Subsystem)(nil)
_ coremcp.SubsystemWithShutdown = (*Subsystem)(nil)
_ coremcp.SubsystemWithNotifier = (*Subsystem)(nil)
)
// New creates a brain subsystem that uses the given IDE bridge for Laravel communication.
//
// brain := New(ideBridge)

View file

@ -35,6 +35,12 @@ type DirectSubsystem struct {
onChannel channelSender
}
var (
_ coremcp.Subsystem = (*DirectSubsystem)(nil)
_ coremcp.SubsystemWithShutdown = (*DirectSubsystem)(nil)
_ coremcp.SubsystemWithChannelCallback = (*DirectSubsystem)(nil)
)
// OnChannel sets a callback for channel event broadcasting.
// Called by the MCP service after creation to wire up notifications.
//

View file

@ -35,6 +35,12 @@ type Subsystem struct {
activity []ActivityEvent
}
var (
_ coremcp.Subsystem = (*Subsystem)(nil)
_ coremcp.SubsystemWithShutdown = (*Subsystem)(nil)
_ coremcp.SubsystemWithNotifier = (*Subsystem)(nil)
)
// New creates an IDE subsystem from a Config DTO.
//
// cfg := DefaultConfig()