DOCS / HOW-TO

Extending an engine

Five in-process extension points, and the rule that decides when a rule belongs in the request instead of a private application scorer.

Docs for Packvium 1.11.x · contract stable since 1.0

01What you can replace#

Placement constraints, item ordering, candidate scoring, container selection and a complete single-container solver are registered through the extension registry, without global mutable configuration. A solution scorer replaces the default ranking of finished solutions the same way, but is passed straight to the packer's constructor rather than through the registry, since ranking a finished solution is a different concern from shaping one.

02Extensions are not cross-language features#

An engine driven over JSON as a subprocess has no wire representation for a registered scorer, so no harness can check that four engines agree about it. Use extensions to specialise one application in one language.

03When it belongs in the request#

A rule that must hold for every caller of every binding belongs in the request as versioned data: a policy document rather than a plugin. It is then auditable, portable and enforced during the search by every engine.