AzuTear dcac155887 feat(store): GOOD interop, rescan-merge, data staleness, lock detection
Task #5 building blocks, each a pure + unit-tested module:

- goodInterop.ts: GOOD (Genshin Optimizer / Inventory Kamera / Akasha) import and
  export for scanned StoredArtifactRecords - slot/stat/set key maps both ways,
  substat string <-> { key, value }, main-value reconstruction on import
  (ADR-003). Export is lossless; import is best-effort (GOOD lacks piece names).
- artifactMerge.ts: rescan-merge (ADR-006 follow-up). Level-independent identity
  (set + slot + main + substat NAME set) collapses leveled re-scan duplicates,
  keeping the higher-level/stronger record and summing timesSeen. Conservative:
  differing substat lineups never merge.
- dataPackageStatus.ts: warns when the genshin-db package is older than ~45 days
  (a patch cycle) so new sets/characters aren't silently missed; surfaced in the
  Scanner Diagnose data-package line. Adds dataGeneratedAt to genshinData.
- lockDetection.ts: EXPERIMENTAL read-only lock-status heuristic (gold-pixel
  ratio in a top-right icon crop). Pure + tested but not wired into capture; crop
  position and threshold need calibration against a reference 16:9 screenshot.

120 tests + build green. Remaining wiring (needs UI / live calibration): GOOD
import/export buttons and live lock detection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 21:55:20 +02:00

Genshin Artifact Assistant

Local Windows-first Electron app for scanning Genshin Impact artifacts, triaging them, and suggesting simple character builds without depending on Inventory Kamera or Genshin Optimizer as the main workflow.

Current MVP

  • Electron + React + TypeScript app shell.
  • Dark purple fintech/glassmorphism UI direction.
  • Genshin capture source discovery.
  • Smart Capture that focuses Genshin, hides the app, captures the primary screen, and restores the app.
  • Artifact detail-panel crop detection with focused OCR regions.
  • OCR parser for artifact name, slot, main stat, substats, set, equipped character, confidence, and review notes.
  • Demo triage and build suggestion views.
  • Read-only overlay preview shell.

Documentation

This project uses the engineering template from https://git.noveria.net/bao/template adapted to this app:

Run

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:

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-helpernative/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

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.
S
Description
No description provided
Readme 5 MiB
Languages
TypeScript 76.8%
CSS 8.7%
JavaScript 5.8%
C# 5%
PowerShell 3.7%