Part of #183. Breaking change. One minor version bump and one PR per crate.
Work, per resolver
- Replace
PathResolver::new() with new(home): a required home-directory argument. Delete the Default impl.
- Stale callers fail to compile. That is the intended signal.
- Each crate keeps the knowledge of its harness's data location (for example: claude data is in
<home>/.claude). Only "what is home" moves to the caller.
- With home always present, the path accessors become infallible. Delete the
NoHomeDirectory error variants.
- Where a crate builds a resolver from an override directory alone, add a
from_<dir> constructor (for example from_claude_dir).
- Keep the per-crate
with_* overrides, for example:
let resolver = PathResolver::new(home).with_claude_dir("/custom/.claude");
- Add setters that take the env value, so harness layout knowledge stays in the crate:
- opencode:
with_xdg_data_home(xdg); the resolver appends opencode.
- cursor:
with_appdata(appdata); the resolver appends Cursor. Only the Windows default consults it.
with_data_dir and with_user_data_dir stay as full overrides.
- copilot needs no setter:
$COPILOT_HOME replaces the whole root, so the injected value carries no layout knowledge.
- pi: delete the
./.pi/agent/sessions cwd fallback.
- Delete the six duplicate
home_dir() helpers.
- Delete the
XDG_DATA_HOME, COPILOT_HOME, and APPDATA reads.
Work, reader flags
- Convert
CODEX_ROLLOUT_STRICT, CLAUDE_CLI_DEBUG, and COPILOT_EVENTS_STRICT to parameters.
- path-cli reads each variable into
Config. A bool flows inward as a builder setter on the reader type, default false.
- copilot's private
read_lines_impl(path, strict) is the target shape. Delete the env read in the public read_lines.
Note
Part of #183. Breaking change. One minor version bump and one PR per crate.
Work, per resolver
PathResolver::new()withnew(home): a required home-directory argument. Delete theDefaultimpl.<home>/.claude). Only "what is home" moves to the caller.NoHomeDirectoryerror variants.from_<dir>constructor (for examplefrom_claude_dir).with_*overrides, for example:with_xdg_data_home(xdg); the resolver appendsopencode.with_appdata(appdata); the resolver appendsCursor. Only the Windows default consults it.with_data_dirandwith_user_data_dirstay as full overrides.$COPILOT_HOMEreplaces the whole root, so the injected value carries no layout knowledge../.pi/agent/sessionscwd fallback.home_dir()helpers.XDG_DATA_HOME,COPILOT_HOME, andAPPDATAreads.XDG_DATA_HOMEbefore the injected home, and copilot's env-seeded directory wins againstwith_home.Work, reader flags
CODEX_ROLLOUT_STRICT,CLAUDE_CLI_DEBUG, andCOPILOT_EVENTS_STRICTto parameters.Config. Aboolflows inward as a builder setter on the reader type, default false.read_lines_impl(path, strict)is the target shape. Delete the env read in the publicread_lines.Note