Skip to content
docsv0.2.0

ResolutionInput

Everything the engine needs to resolve an architecture, fully materialized and side-effect-free: the {@see HostProfile}, the installed {@see VersionManifest}s and {@see ContractManifest}s, the versioned capability provisions and requirements (the canonical records from milpa/core, reused here rather than redefined), and the surfaces currently active plus the resolution environment. The engine receives one of these and returns a report; it never reads the filesystem itself. The optional `evaluatedAt` (an ISO-8601 datetime) is the clock the CALLER owns: the engine evaluates accepted-risk expiry against it and never defaults it to `now()`, so resolution stays pure and deterministic. When it is absent, expiries go unevaluated and the engine flags the oversight (a visible warning) instead of silently trusting an expiry it could not check.

ResolutionInput::__construct()

public function __construct(Milpa\Resolver\Manifest\HostProfile $hostProfile, array $versionManifests, array $contractManifests, array $capabilityProvisions, array $capabilityRequirements, array $activeSurfaces = [], array $environment = [], ?string $evaluatedAt = null):

Parameters

Parameters of __construct()
NameTypeDescription
$hostProfileMilpa\Resolver\Manifest\HostProfile
$versionManifestslist<VersionManifest>
$contractManifestslist<ContractManifest>
$capabilityProvisionslist<CapabilityProvision>
$capabilityRequirementslist<CapabilityRequirement>
$activeSurfaceslist<string>
$environmentarray<string, mixed>
$evaluatedAt?stringThe caller's ISO-8601 clock; see the class summary.

Throws

InvalidManifestException When `evaluatedAt` is present but not a valid ISO-8601 datetime (validated on EVERY construction path — a relative expression like "now" reaching the engine would read the wall clock and break purity).

ResolutionInput::fromArray()

public static function fromArray(array $data): self

Build a resolution input from a decoded array, delegating each nested record to its own value object's `fromArray()` — the capability provisions/requirements to the canonical milpa/core records.

Parameters

Parameters of fromArray()
NameTypeDescription
$dataarray<string, mixed>

Throws

InvalidManifestException When the host profile or any nested manifest is invalid.

ResolutionInput::toArray()

public function toArray(): array

Serialize to an array with a fixed, deterministic key order. The capability records — which milpa/core does not serialize itself — are flattened back to their canonical 012 shapes here.