agnes-the-ai-analyst/cli
ZdenekSrotyr ee83cebbda fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172)
Ports Minas's PR #172 (against pre-rename `da` CLI on main) and applies
the principle to the post-rename `agnes` CLI. Two distinct failure modes
on Windows consoles whose default codepage is cp1250 (cs-CZ) / cp1252
(en-US):

1. `agnes pull` and other Rich-progress codepaths
   UnicodeEncodeError on Braille spinner glyphs. Fix: `cli/main.py`
   reconfigures stdout/stderr to UTF-8 with errors='replace' at import
   time on `sys.platform == 'win32'` so Rich's legacy-Windows render
   path emits decodable bytes. Wrapped in try/except so pytest's
   captured streams (which aren't TextIOWrapper) don't break.

2. `agnes skills list` and `agnes skills show`
   UnicodeDecodeError when reading skill markdown containing em-dashes /
   accented chars. Default `Path.read_text()` uses
   locale.getpreferredencoding(False), which is the broken codepage on
   Windows. Fix: every call site passes encoding='utf-8' explicitly.

Broader scope than #172 because:
- The bootstrap rewrite renamed/removed several files Minas's PR
  patched (`cli/commands/analyst.py` -> rolled into init.py;
  `cli/commands/sync.py` -> split into pull/push). Those targets no
  longer exist; the equivalent code lives in init.py.
- Other call sites Minas didn't touch (still bare in his branch) are
  patched here too — config.py / update_check.py / snapshot_meta.py /
  setup.py / skills.py — so the codebase has zero locale-default text
  I/O in cli/.

Side cleanup: stale `Run `da`` reference in snapshot_meta.py:88 fixed
to `agnes` while touching the file.
2026-05-04 20:45:29 +02:00
..
commands fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
lib fix(push): read sessions from ~/.claude/projects/<encoded-cwd>/ 2026-05-04 20:29:59 +02:00
skills fix: address Devin Review findings — incomplete renames + estimate guard 2026-05-04 20:05:06 +02:00
__init__.py feat: add Docker, CLI tool, scheduler, and agent skills 2026-03-27 15:30:03 +01:00
client.py refactor(cli): hard-cutover env vars + config dir to AGNES_* 2026-05-04 16:35:44 +02:00
config.py fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
error_render.py refactor(cli): hard-cutover env vars + config dir to AGNES_* 2026-05-04 16:35:44 +02:00
main.py fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
snapshot_meta.py fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
update_check.py fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
v2_client.py feat(cli): #160 shared structured error renderer for BQ-typed responses 2026-05-04 10:31:35 +02:00