Files
skill-template/tools/ui_inspector/storage/capture_reader.py
chendelian 633ecff4e2 chore: archive tools/ui_inspector snapshot before migration removal.
Keep the last in-template copy on main so history can restore it; product continues in jiangchang-ui-recorder.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 11:19:14 +08:00

21 lines
522 B
Python

"""Stable capture reader used by diagnostics and downstream AI tooling."""
from __future__ import annotations
import json
from pathlib import Path
from typing import Any
def read_json(path: Path) -> dict[str, Any]:
return json.loads(Path(path).read_text(encoding="utf-8"))
def read_action_flow(flow_dir: Path) -> dict[str, Any]:
return read_json(Path(flow_dir) / "action_flow.json")
def read_element_catalog(flow_dir: Path) -> dict[str, Any]:
return read_json(Path(flow_dir) / "element_catalog.json")