Skip to content

feat(cli): thread Config through the export path - #199

Open
ecalifornica wants to merge 2 commits into
mainfrom
robert/config-export
Open

feat(cli): thread Config through the export path#199
ecalifornica wants to merge 2 commits into
mainfrom
robert/config-export

Conversation

@ecalifornica

@ecalifornica ecalifornica commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

cmd_export::run (along with its forwarders in cmd_project and cmd_incept) takes &Config. cmd_resume::project_into_harness takes &ProjectionConfig.

ProjectionConfig is the subset of Config that builds a provider manager: the harness store roots ($HOME with the $USERPROFILE fallback, $XDG_DATA_HOME, $COPILOT_HOME, $APPDATA). Config::projection builds it. The providers::*_convo factories take &ProjectionConfig; the other command modules call them with config.projection().

Each of the 9 export helpers that writes into a harness's on-disk layout takes &ProjectionConfig and builds its PathResolver from providers::<harness>_convo(config).

cmd_resume::run_with_strategy loads a Config at its call site because resume is threaded by its own PR.

The cmd_export unit tests inject a Config instead of setting $HOME, and drop the TEST_ENV_LOCK guard.

Behavior change: on Windows with $HOME unset, the pi export paths resolve %USERPROFILE%\.pi\agent\sessions, matching the import and sync paths.

Part of #184.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

🔍 Preview deployed: https://8e66b458.toolpath.pages.dev

@ecalifornica
ecalifornica marked this pull request as ready for review August 14, 2026 20:41
@ecalifornica
ecalifornica requested a review from akesling August 14, 2026 20:41
@ecalifornica ecalifornica assigned akesling and unassigned akesling Aug 14, 2026
Base automatically changed from robert/config-import to main August 25, 2026 15:43
Comment thread crates/path-cli/src/cmd_resume.rs Outdated
path: &TPath,
harness: Harness,
cwd: &std::path::Path,
config: &Config,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have some projection config type that we build from our general config so we aren't passing all the config info everywhere? This would make clear what is needed by the lower layer.

@akesling akesling assigned ecalifornica and unassigned akesling Aug 27, 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.

2 participants