core/inventory_service library

Classes

InventoryLine
One {itemId, quantity} request line inside a InventoryService.grant/ InventoryService.consume call — several lines under one call apply atomically (see those methods' doc).
InventoryService
Generic slot-based inventory (consumables + equipment) — item stack rules and rarity live in the caller-supplied itemCatalog; this service only knows about slots/quantities/equipped flags and the invariants around them. grant/consume follow the same idempotent-ledger pattern as EconomyWallet (FEAT-31)/RewardTransactionPipeline (FEAT-42): a transactionId repeated (even across a restart) is a no-op, and every mutating call runs under AsyncActionGuard.runExclusive so concurrent calls serialize instead of racing.
InventorySlot
One stack inside an inventory. slotId is a stable identity assigned once at creation — it's what InventoryService.setEquipped/moveSlot target, so it survives a grant/consume elsewhere in the inventory changing the list's indices.
InventorySnapshot
Immutable view of one inventory — display order is slots' list order.
ItemDefinition
Static catalog entry for one item id — InventoryService is generic over whatever catalog a consumer app supplies; it has no concrete item list of its own.

Enums

ItemRarity