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>
21 lines
522 B
Python
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")
|
|
|