Skip to content
docsv0.1.0

SurfaceProjector

The contract a surface projector implements — the seam that stabilizes the wave's later surfaces (web SchemaForm, TUI, pluggable channels). A projector materializes an {@see Operation} into one surface's native shape; the projection method itself is surface-specific (a CLI projector derives flags, an MCP projector registers a tool, an HTTP projector synthesizes routes), so this contract only fixes the surface tag and the per-operation opt-out check.

SurfaceProjector::surface()

abstract public function surface(): string

The surface this projector targets, e.g. `cli`, `mcp`, `http`.

SurfaceProjector::supports()

abstract public function supports(Milpa\Command\Operation $op): bool

Whether the operation opts into this projector's surface.

Parameters

Parameters of supports()
NameTypeDescription
$opMilpa\Command\Operation