# Genshin Artifact Assistant Local Windows-first Electron app for scanning Genshin Impact artifacts, triaging them, and suggesting simple character builds without depending on external scanner or optimizer tools as the main workflow. ## Current MVP - Electron + React + TypeScript app shell with a C# sidecar for fast read-only scan input/capture. - Artifact-first scanner scope. Weapons, materials, and character details are intentionally not active scanner features yet. - Smart Capture for the currently visible artifact detail view with focused OCR crops, parser confidence, and review notes. - Visible-inventory auto-scan baseline with read-only tile selection, detail verification, OCR, parse, store/review, scroll, and summary. - Native IK-style artifact capture path that writes card crops and run artifacts for post-capture processing. - Vendored Inventory Kamera `inventorylists` under `data/ik-inventorylists` as artifact reference data. - Scan result rail plus Inventory view for native results, stored artifacts, crop previews, IK/GOOD match state, explicit promotion, single-result review/edit/approve, and Artifact-only pipeline state. - GOOD import/export, review samples, OCR eval, diagnostics, local artifact store, demo triage/build views, and read-only overlay preview shell. ## Documentation This project uses the engineering template from `https://git.noveria.net/bao/template` adapted to this app: - [AGENTS.md](AGENTS.md) - [docs/CURRENT_STATUS.md](docs/CURRENT_STATUS.md) - [docs/PROJECT.md](docs/PROJECT.md) - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) - [docs/CONVENTIONS.md](docs/CONVENTIONS.md) - [docs/DECISIONS.md](docs/DECISIONS.md) - [docs/CHECKLISTS.md](docs/CHECKLISTS.md) - [docs/workflow.md](docs/workflow.md) ## Run ```powershell npm install npm run dev ``` Use the Electron app window for scanner work. The browser preview does not expose the local capture bridge. ### Input/Capture helper (C# sidecar) Input automation and screen capture run through a compiled C# sidecar (`native/input-helper`, see ADR-008). Build it once: ```powershell npm run helper:build # requires the .NET SDK; produces a self-contained exe ``` The app auto-detects the exe (`INPUT_HELPER_EXE` env override → packaged `resources/input-helper` → `native/input-helper/bin/publish`). If the exe is not present it falls back to the embedded PowerShell helper, so the app still runs without the .NET build - just slower and with the old per-frame temp-file capture. ### Automatischer Scan: als Administrator starten Genshin läuft erhöht (Administrator). Windows (UIPI) verwirft dann alle simulierten Maus-Eingaben aus einer nicht-erhöhten App - SendInput meldet dabei trotzdem Erfolg. Für den automatischen Scan muss die App deshalb ebenfalls erhöht laufen: - `npm run dev:admin` (oder Doppelklick auf `dev-admin.cmd`) - öffnet aus einem normalen Terminal heraus einen UAC-Prompt und startet danach `npm run dev` in einem neuen Administrator-Fenster. - Alternativ: Terminal per Rechtsklick "Als Administrator ausführen" öffnen und darin normal `npm run dev` starten. Der UAC-Prompt lässt sich nicht dauerhaft abschalten; das ist Windows-Design. Die gepackte App fordert Admin-Rechte über `requestedExecutionLevel: requireAdministrator` selbst an. Die App zeigt im Scanner-Header und in der Scanner-Diagnose nur an, ob sie gerade erhöht läuft - sie startet sich nicht selbst neu. ## Validate ```powershell npm run lint npm test npm run build ``` ## Safety Boundaries - No memory reads. - No hooks or process injection. - No game file modification. - No automatic delete, enhance, feeding, or resource-spending actions. - In-game lock/marking is a future opt-in module and remains disabled in this MVP.