Skip to content

📦 Internal

Internal runtime helpers used by the Inventory system implementation.

This folder contains non-public support code for the concrete runtime. These types exist to keep services and containers focused and maintainable.


🎯 Purpose

Provide internal helpers for search, sorting, placement, delta tracking, and value operations used by the runtime.


🧩 What Lives Here

  • DefaultInventorySearch → default search strategy implementation
  • DefaultInventorySorter → default sort strategy implementation
  • InventoryDeltaTracker → computes container deltas from snapshots
  • InventoryInternals → normalization and comparison helpers
  • InventoryPlacementHelper → placement workflows with rollback support
  • InventorySortHelpers → safe value extraction for sorting
  • ItemStackExt → fast-copy helpers for stacks
  • ItemStackUtil → stack comparison and compatibility helpers

⚠️ Important Notes

  • This is not a supported public API surface
  • Types may change between versions
  • Intended for use by runtime systems only

🧠 Usage Guidance

Default strategies

Default search and sort implementations back the public strategy interfaces.

Behaviour may evolve independently of the public contracts.


Delta tracking

Delta computation is performed by an internal tracker that compares container state over time.

Public delta types are produced by services, not by containers directly.


Placement and rollback

Placement helpers support multi-step operations with rollback when later steps fail.

Used by transfer, split, and similar workflows.


Value helpers

Internal utilities centralize stack comparison and copying behaviour.

Some helpers prioritize performance and may share references.


Key normalization

Internal helpers ensure consistent key handling across dictionaries and lookups.

External code should use public identifier types instead.


🚫 Not for Production Use

This folder does not:

  • Provide stable extension points
  • Guarantee backwards compatibility for direct use
  • Define user-facing APIs
  • Replace public service or abstraction layers