Metadata-Version: 2.4
Name: hvbattle
Version: 0.1.0
Summary: Reusable battle-domain APIs for HentaiVerse.
Project-URL: Homepage, https://github.com/Kuan-Lun/hvbattle
Project-URL: Tracker, https://github.com/Kuan-Lun/hvbattle/issues
Author: Kuan-Lun Wang
License: GNU Affero General Public License v3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <3.15,>=3.14
Requires-Dist: hv-bie>=0.7.0
Requires-Dist: hvbrowser<0.2,>=0.1.0
Requires-Dist: ponychart-classifier>=0.7.0
Requires-Dist: zendriver<0.16,>=0.15.5
Provides-Extra: dev
Requires-Dist: black>=26.5.1; extra == 'dev'
Requires-Dist: mypy>=2.1.0; extra == 'dev'
Requires-Dist: pymarkdownlnt>=0.9.38; extra == 'dev'
Requires-Dist: pytest>=9.1.1; extra == 'dev'
Requires-Dist: ruff>=0.15.20; extra == 'dev'
Description-Content-Type: text/markdown

# HVBattle

HVBattle provides reusable HentaiVerse battle-domain APIs. It builds on
`hvbrowser` for the authenticated Hentaiverse browser session and keeps the
private command-line runner in a separate application workspace.

The first release preserves the historical `BattleDriver` API while adding a
safe `run_current()` boundary. That method only runs an already active battle;
it never repairs equipment, recovers stamina, or starts Arena/GrindFest.
Automatic next-battle toggles default to off and require explicit opt-in.
`BattleDriver` preloads the PonyChart classifier and ONNX model before opening
the browser, so a timed challenge never pays the first-load cost.

```python
import asyncio

from hvbattle import BattleDriver


async def main() -> None:
    async with BattleDriver(headless=True) as driver:
        await driver.run_current()


asyncio.run(main())
```

The legacy `battle()` loop remains available for the private runner. It can
repair equipment and recover stamina; starting another Arena or GrindFest also
requires explicitly enabling the corresponding auto-next option.

## Development

Build a clean environment backed by PyPI releases:

```bash
bash scripts/rebuild-env.sh
```

For coordinated local development before all dependent releases are on PyPI,
overlay editable checkouts in dependency order:

```bash
uv pip install --python .venv/bin/python --reinstall --no-deps --editable \
  /Users/kuanlun_wang/Desktop/git-repo/hbrowser.clone
uv pip install --python .venv/bin/python --reinstall --no-deps --editable \
  /Users/kuanlun_wang/Desktop/git-repo/hvbrowser.clone
```

Commands that must preserve these editable overlays use `uv run --no-sync`.
