fix: refactor path handling to use relative paths with optional cwd#625
Merged
Conversation
- Change module-level cwd assignments from loadConfig().cwd to empty string - Add optional cwd parameter to all functions that build paths, defaulting to module-level cwd - This allows tests to override cwd without modifying module state - Fixes test compatibility while maintaining relative path behavior
- Replace resolve() with join() in discoverSkills to keep paths relative - This ensures skills use virtual filesystem paths instead of absolute paths
avoidwork
force-pushed
the
fix/relative-paths
branch
from
July 25, 2026 21:00
62ba701 to
d22e938
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refactored all path-building functions across 28 files to use relative paths with an optional
cwdparameter instead of importingloadConfig().cwdat module scope. This enables proper virtual filesystem handling where/is the application root.Key changes:
loadConfig().cwdwith empty string default and optionalcwdParamparameter across memory, session, scheduler, skills, and tools modulescwdoption tosetupAutoSchedule(),createSkillImpl(), andrunScript()for explicit cwd injection/exitcommand to TUI Navigation tableType of Change
Testing
Tests updated to pass explicit
cwdparameter where needed (autoSchedule.test.js). No code behavior changes — all existing tests should pass.Coverage
Checklist
npm run lintpasses