Skip to content

refactor(gemini): PathResolver::new takes a required home argument - #206

Draft
ecalifornica wants to merge 1 commit into
robert/config-cleanupfrom
robert/config-gemini
Draft

refactor(gemini): PathResolver::new takes a required home argument#206
ecalifornica wants to merge 1 commit into
robert/config-cleanupfrom
robert/config-gemini

Conversation

@ecalifornica

@ecalifornica ecalifornica commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Part of #185. It sets the pattern for the remaining provider crates.

toolpath-gemini reads no environment variable. The caller supplies the
home directory. The crate keeps the layout below it: Gemini data is in
<home>/.gemini.

toolpath-gemini, breaking, 0.7.0

  • PathResolver::new(home) takes the home directory as a required
    argument.
  • GeminiConvo::new(home) and ConvoIO::new(home) take the same
    argument.
  • Deleted: the Default impls on PathResolver, ConvoIO, and
    GeminiConvo; PathResolver::with_home; the private dirs::home_dir
    helper; the NoHomeDirectory error variant.
  • with_gemini_dir stays as the full override.
  • The home directory is always present, so these accessors return a path
    instead of a Result: home_dir, gemini_dir, projects_file,
    tmp_dir, ConvoIO::gemini_dir_path, GeminiConvo::gemini_dir_path.
  • project_dir and everything below it keep their Result. Their error
    is a failed read of projects.json, not a missing home.

path-cli

  • providers::gemini_resolver returns Option<PathResolver>. None
    means Config carries no home directory, so the Gemini harness is out
    of reach.
  • harness_bundle omits the Gemini manager when the resolver is None.
  • providers::require_gemini_resolver turns None into an error. The 5
    commands that target Gemini use it: p list gemini, p import gemini,
    p export gemini --project, show gemini, and the single-session
    derive.

@ecalifornica ecalifornica changed the title robert/config gemini refactor(gemini): PathResolver::new(home), a required home argument Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

🔍 Preview deployed: https://77f02e1d.toolpath.pages.dev

)

toolpath-gemini reads no environment variable. The caller supplies the
home directory; the crate keeps the layout below it (`<home>/.gemini`).

Library (breaking, 0.7.0):

- `PathResolver::new(home)` takes the home directory as a required
  argument. `GeminiConvo::new(home)` and `ConvoIO::new(home)` take the
  same argument.
- Delete the `Default` impls on the three types, `with_home`, the
  private `dirs::home_dir` helper, and the `NoHomeDirectory` error
  variant.
- Keep `with_gemini_dir` as the full override.
- The home directory is always present, so `home_dir()`,
  `gemini_dir()`, `projects_file()`, `tmp_dir()`, and
  `ConvoIO::gemini_dir_path()` return a path, not a `Result`. Callers
  inside the crate drop the dead error arms.

path-cli:

- `providers::gemini_resolver` returns `Option<PathResolver>`. `None`
  means `Config` carries no home directory, so Gemini is out of reach.
- `harness_bundle` omits the Gemini manager in that case.
- `providers::require_gemini_resolver` reports "cannot determine the
  home directory" for the 5 commands that target Gemini.

Version bump per the release checklist: crate manifest, workspace
dependency, site/_data/crates.json, CHANGELOG.md.
@ecalifornica ecalifornica changed the title refactor(gemini): PathResolver::new(home), a required home argument refactor(gemini): PathResolver::new takes a required home argument Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant