Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion loopx/capabilities/connector_registry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def load_connector_registry(path: Path | None = None) -> dict[str, Any]:
def save_connector_registry(state: Mapping[str, Any], path: Path | None = None) -> Path:
state_path = path or default_registry_path()
state_path.parent.mkdir(parents=True, exist_ok=True)
state_path.write_text(json.dumps(dict(state), ensure_ascii=False, indent=2))
state_path.write_text(json.dumps(dict(state), ensure_ascii=False, indent=2), encoding="utf-8")
return state_path


Expand Down
2 changes: 1 addition & 1 deletion loopx/cli_commands/automation_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def run(args: argparse.Namespace, registry: Path) -> dict:
return snapshot(registry=registry, home=home, runtime_root=args.runtime_root, cli_bin=args.cli_bin)
if not args.plan_file:
raise ValueError("sync-installed --execute requires the private pre-update --plan-file")
before = json.loads(args.plan_file.read_text())
before = json.loads(args.plan_file.read_text(encoding="utf-8"))
if args.automation_id:
before["entries"] = [entry for entry in before.get("entries", [])
if entry["automation_id"] in args.automation_id]
Expand Down
8 changes: 4 additions & 4 deletions loopx/codex_cli_runtime_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def classify_codex_cli_session_surface(


def load_codex_cli_probe_fixture(path: Path) -> dict[str, str]:
data = json.loads(path.read_text())
data = json.loads(path.read_text(encoding="utf-8"))
if "command_outputs" in data:
outputs = data["command_outputs"]
else:
Expand All @@ -180,21 +180,21 @@ def load_codex_cli_probe_fixture(path: Path) -> dict[str, str]:


def load_codex_cli_visible_session_proof_fixture(path: Path) -> dict[str, Any]:
data = json.loads(path.read_text())
data = json.loads(path.read_text(encoding="utf-8"))
if not isinstance(data, dict):
raise ValueError("Codex CLI visible session proof fixture must be a JSON object")
return data


def load_codex_cli_runtime_idle_fixture(path: Path) -> dict[str, Any]:
data = json.loads(path.read_text())
data = json.loads(path.read_text(encoding="utf-8"))
if not isinstance(data, dict):
raise ValueError("Codex CLI runtime idle fixture must be a JSON object")
return data


def load_codex_cli_first_response_fixture(path: Path) -> dict[str, Any]:
data = json.loads(path.read_text())
data = json.loads(path.read_text(encoding="utf-8"))
if not isinstance(data, dict):
raise ValueError("Codex CLI first-response fixture must be a JSON object")
return data
Expand Down
2 changes: 1 addition & 1 deletion loopx/control_plane/collaboration/inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _write(path: Path, value: dict) -> None:
def _read(path: Path) -> dict:
if path.stat().st_size > 128_000:
raise ValueError("manager context record too large")
value = json.loads(path.read_text())
value = json.loads(path.read_text(encoding="utf-8"))
if not isinstance(value, dict):
raise ValueError("invalid manager context record")
return value
Expand Down
2 changes: 1 addition & 1 deletion loopx/control_plane/heartbeat/installed_prompt_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def reconcile(*, before: dict, registry: Path, home: Path,
# complete prompt-only request, plus a precondition to re-view.
import tomllib
try:
manifest = tomllib.loads((home / "automations" / identifier / "automation.toml").read_text())
manifest = tomllib.loads((home / "automations" / identifier / "automation.toml").read_text(encoding="utf-8"))
except (OSError, ValueError):
manifest = {}
required = {"name", "status", "rrule", "target_thread_id"}
Expand Down
2 changes: 1 addition & 1 deletion loopx/desktop_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def desktop_installation_status(
try:
info = plistlib.loads((app / "Contents/Info.plist").read_bytes())
identity = json.loads(
(app / "Contents/Resources/runtime/identity.json").read_text()
(app / "Contents/Resources/runtime/identity.json").read_text(encoding="utf-8")
)
if isinstance(info, dict):
value = info.get("CFBundleShortVersionString")
Expand Down