__init__.py 1009 B

1234567891011121314151617
  1. """Petdex pet engine — shared core for the CLI, TUI, and desktop surfaces.
  2. Petdex (https://github.com/crafter-station/petdex) is a public gallery of
  3. animated sprite "pets": a ``pet.json`` plus a ``spritesheet.{webp,png}`` of
  4. 192×208 px cells (8-col × 9-row Codex atlas, or the older 8-row atlas). This
  5. package is the single source of truth for the feature so the CLI (Python) and
  6. TUI (Ink, via ``tui_gateway``) never duplicate the hard parts: ``constants``
  7. (geometry + :class:`PetState`), ``state`` (activity → state), ``manifest``,
  8. ``store`` (on-disk pets), ``render`` (kitty / iTerm2 / sixel / half-blocks).
  9. A pure display concern: no model tool, no prompt/toolset mutation, so zero
  10. effect on prompt caching.
  11. """
  12. from agent.pet.constants import DEFAULT_SCALE, FRAME_H, FRAME_W, FRAMES_PER_STATE, LOOP_MS, STATE_ROWS, PetState
  13. from agent.pet.state import derive_pet_state
  14. __all__ = ["DEFAULT_SCALE", "FRAMES_PER_STATE", "FRAME_H", "FRAME_W", "LOOP_MS", "STATE_ROWS", "PetState", "derive_pet_state"]