Repository navigation
Packvium 1.4.0
Replanning a job that has already started, and container ids that match the other engines.
A request the schema never allowed is now refused instead of packed (see Fixed).
Added
fixed_placementsin a request. Each entry pins an item type to a container type and
instance, at the origin a result reports, in one orientation. Fixed items keep their place,
count toward weight, support and top load, and come back markedfixed: true. A fixed set
that is not a valid packing on its own throwsFixedPlacementErrorbefore any search.@packvium/engine/revisions.js—rootRevision,deriveRevision,applyEvents,
verifyRevisionChain,documentDigestandcanonicalRevisionJson, with TypeScript
declarations. Apackvium-plan-revision/v1chain records what happened on the dock —
item_missing,container_substituted,placement_locked,placement_verified— against
the artifact it changed, linked by SHA-256 fromnode:crypto, and carries the request the
next plan solves. Every Packvium engine computes the same bytes from the same inputs.InvalidRequestError, exported from the package root. A malformed request names what is
wrong:codeisinvalid_request,reasonone of a closed set (missing_field,
wrong_type,below_minimum,above_maximum,negative_measure,invalid_unit,
duplicate_id,not_allowed,invalid_value),fieldthe JSON Pointer of the bad value, and
the message readsinvalid_request: /items/0/quantity: must be at least 1. It extends
RangeError, so existing handlers still catch it;FixedPlacementErrorextends it. The native
and JavaScript backends raise the same error.examples/revisions.mjs.
Changed
- Container ids number each type from 1. Searches over more than one container type counted
containers across types, so a crate opened after a box wascrate#2where the other engines
saidcrate#1. Only answers with more than one container type change, and only their ids.
Fixed
- Numbers below their floor are refused. The JavaScript engine packed requests with
negative lengths, weights, payloads, clearances and obstacle positions, and with quantities,
limits and ratios below their minimum, and raised amax_candidate_pointsbelow 16 to 16
without saying so. Each now throws aRangeErrornaming what is wrong. - A
fixed_placementsthat is not the schema's shape throwsFixedPlacementError. An
object in place of the list was ignored, so the items it named were repacked elsewhere; a
bad instance or orientation threw a bareRangeError. - A request key named
__proto__survives a revision as an ordinary key, instead of
making the canonical writer refuse the document.