HostProfile
The architectural shape an application expects — deliberately NOT the same thing as `composer.json`. It names the contracts the host requires, the surfaces it enables, the capabilities it depends on, the legacy contracts it tolerates, and the risks it has explicitly accepted (a warning the host has acknowledged stays visible in the report but does not degrade the status). A pure value object: {@see fromArray()} validates, {@see toArray()} serializes deterministically.
HostProfile::__construct()
public function __construct(string $name, string $version, array $requiredContracts = [], array $enabledSurfaces = [], array $requiredCapabilities = [], array $allowedLegacyContracts = [], array $acceptedRisks = [], array $metadata = []):Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $version | string | |
| $requiredContracts | list<string> | |
| $enabledSurfaces | list<string> | |
| $requiredCapabilities | list<string> | |
| $allowedLegacyContracts | list<string> | |
| $acceptedRisks | list<AcceptedRisk> | |
| $metadata | array<string, mixed> |
HostProfile::fromArray()
public static function fromArray(array $data): selfBuild a host profile from a decoded array, validating `name` (non-empty) and `version` (a valid — possibly calendar — version).
Parameters
| Name | Type | Description |
|---|---|---|
| $data | array<string, mixed> |
Throws
InvalidManifestException On a missing/empty required field or an invalid version.
HostProfile::toArray()
public function toArray(): arraySerialize to an array with a fixed, deterministic key order.