Improve data directory resolution for development environments#30
Open
luojiyin1987 wants to merge 3 commits intosecond-state:mainfrom
Open
Improve data directory resolution for development environments#30luojiyin1987 wants to merge 3 commits intosecond-state:mainfrom
luojiyin1987 wants to merge 3 commits intosecond-state:mainfrom
Conversation
Remove x402curl/ and update skill paths to claude/ and openclaw/
- Update data directory resolution order (env var, scripts/, cwd) - Update license section to reference Cargo.toml MIT declaration
- Add PAYMENT_SKILL_DATA_DIR environment variable support - Add resolve_data_dir_from_exe() helper for better layout detection - Distinguish between installed skill layout and local cargo run - Fall back to cwd for local development
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
This PR improves the data directory resolution logic to better support development workflows while maintaining backward compatibility with installed skill layouts.
Key Changes
1. Environment Variable Support
PAYMENT_SKILL_DATA_DIRenvironment variable for explicit directory override2. Smarter Layout Detection
Added
resolve_data_dir_from_exe()helper function that distinguishes between:\u003cskill-root\u003e/scripts/\u003cbinary\u003e\u003cskill-root\u003e/\u003cworkspace\u003e/target/debug/\u003cbinary\u003e\u003cworkspace\u003e/target/release/\u003cbinary\u003e3. Updated Documentation
README.md: Clarified data directory resolution orderCLAUDE.md: Updated directory structure to remove obsolete entriesTesting
cargo testpassescargo build --releasesucceedscargo clippy --allshows no warningsBackward Compatibility
This change is fully backward compatible:
Closes #29