Skip to content

fix: improve path resolution for npx and non-standard entry points#147

Merged
QuantGeekDev merged 1 commit into
mainfrom
fix/82-npx-path-resolution
Apr 1, 2026
Merged

fix: improve path resolution for npx and non-standard entry points#147
QuantGeekDev merged 1 commit into
mainfrom
fix/82-npx-path-resolution

Conversation

@QuantGeekDev
Copy link
Copy Markdown
Owner

Summary

  • Updates BaseLoader.resolveDirectory() to walk up from process.argv[1] looking for tool/prompt/resource directories, handling npx's temp directory structure
  • Adds null guard for process.argv[1] in the fallback path
  • Preserves backward compatibility: explicit basePath and CWD dist/ checks still take priority

Test plan

  • 3 new tests pass in tests/loaders/BaseLoader-path-resolution.test.ts
  • Publish a test package and run via npx to verify tools are discovered
  • Verify existing npm start workflows still work

Closes #82

🤖 Generated with Claude Code

Closes #82

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

When running using npx, framework tries to use CWD as the directory

1 participant