pilotphp/core

Composition kernel for PilotPHP: trusted discovery, activation, resolution, registration, and declaration replay.

Maintainers

Package info

gitlab.com/pilotphp/core

Issues

pkg:composer/pilotphp/core

Transparency log

Statistics

Installs: 17

Dependents: 2

Suggesters: 0

Stars: 0

0.1.4 2026-08-02 19:19 UTC

This package is auto-updated.

Last update: 2026-08-02 16:21:55 UTC


README

Composition kernel for the PilotPHP Agent-First framework.

Core owns the package composition lifecycle:

trusted discovery
→ candidate catalog
→ explicit activation
→ dependency/capability closure
→ graph/version validation
→ deferred entrypoint loading
→ single instantiation
→ transactional registration
→ immutable declaration replay

It is an infrastructure-only Composer library (not a Pilot extension). It does not boot applications, dispatch operations, compile build stages, or depend on domain packages. Production dependencies are PHP 8.5, pilotphp/contracts, and composer/semver.

Quick start

use PilotPHP\Core\Composition\CompositionKernel;
use PilotPHP\Core\Composition\CompositionRequest;

$request = new CompositionRequest(
    projectRoot: $projectRoot,
    rootPackages: [
        'acme/application',
        'pilotphp/config',
        'pilotphp/container',
    ],
    capabilityBindings: [
        'pilotphp.service-container' => 'pilotphp/container',
    ],
);

$resolved = (new CompositionKernel())->resolve($request);
$declarations = $resolved->declarations(); // DeclarationReplay

Root package order is not an ordering instruction. Registration order is the deterministic topological order of the resolved Pilot dependency/capability graph (lexical package ID for independent nodes).

Architectural invariant

Adding, removing, or replacing a Pilot extension must not require changes to pilotphp/core.

Application code supplies package IDs and capability bindings. Core discovers candidates from trusted Composer install paths and <project-root>/pilot/package.json, then activates only the requested closure.

Documentation

Development

composer test
composer analyse
composer cs-check
composer check
composer benchmark