InteractionRequest
A client-originated action against a mounted component, as dispatched to {@see \Milpa\Live\Contracts\Component\ComponentDefinitionInterface::handle()}. `$state` is the component's state as the caller currently trusts it — for the HTTP live loop specifically, that trust comes from the state envelope's signature having already been verified before this request is constructed, not from anything in this value object itself.
InteractionRequest::__construct()
public function __construct(string $componentId, string $componentName, string $action, Milpa\Live\ValueObjects\StateSnapshot $state, array $payload = [], array $meta = []):Parameters
| Name | Type | Description |
|---|---|---|
| $componentId | string | The component instance's id; MUST match `$state->componentId`. |
| $componentName | string | The component's registered name; MUST match `$state->componentName`. |
| $action | string | The action name, as declared in the component's {@see ComponentContract::$actions}. |
| $state | StateSnapshot | The component's state immediately before this action is applied. |
| $payload | array<string, mixed> | Action-specific input data (e.g. a form field's new value). |
| $meta | array<string, mixed> | Caller-defined extra context beyond the fields above. |