# THIS YOU V2.1 — Factory API Runtime

Normal chapter production:

```text
Generate with API
→ async Factory job
→ package artifact download
→ automatic shared Teleport import
→ ChapterGeneration
→ READY
```

Normal API production does not require manual `/teleport/` file copying. Manual Teleport remains a fallback.

HERO-only flow:

```text
Generate new HERO
→ Factory reroll
→ candidate HERO + fidelity
→ Compare
→ Keep current / Use new HERO
```

A reroll never replaces the current HERO before explicit operator acceptance.

## Local development connection

Factory may remain bound to `127.0.0.1:8000` on its server. Laragon connects through an SSH tunnel, commonly exposed locally as `127.0.0.1:8787`.

Add `production_factory` config using `config/PRODUCTION_FACTORY_CONFIG_SNIPPET.txt`.

Run `/admin/migrate.php` after installing this patch.
