5 Commits

Author SHA1 Message Date
kevinwatt
0e5a30d10c fix: prevent server hang and output corruption in spawn handling (#23)
- Add process 'error' event handler to catch spawn failures (e.g., yt-dlp not installed)
- Separate stdout/stderr to prevent yt-dlp warnings from corrupting parsed output
- Add try-catch for RegExp construction from YTDLP_SANITIZE_ILLEGAL_CHARS env var
- Add NaN validation for YTDLP_MAX_FILENAME_LENGTH env var
- Sync VERSION constant with package.json (0.8.4)
- Update tests for new output format and null handling
- Add version sync guidance to CLAUDE.md
2026-01-05 01:47:59 +08:00
kevinwatt
87ba2f8494 feat(cookies): add cookie support for authenticated access
- Add YTDLP_COOKIES_FILE and YTDLP_COOKIES_FROM_BROWSER env vars
- Support all yt-dlp cookie methods (file, browser extraction)
- Validate browser names (brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale)
- Cookie file takes precedence over browser extraction
- Add getCookieArgs() helper function
- Integrate cookie args into all modules (video, audio, subtitle, search, metadata)
- Add comprehensive cookie documentation (docs/cookies.md)
- Add 12 unit tests for cookie configuration
- Fix search.test.ts function signature issue

Closes #19
2025-12-06 18:42:25 +08:00
kevinwatt
26b2137751 chore: release v0.7.0 - MCP Best Practices & Quality Improvements
Major release with comprehensive MCP best practices implementation:

 Added:
- Tool name prefixes (ytdlp_) for all 8 tools to avoid naming conflicts
- Zod schema validation with runtime input validation
- Tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)
- Response format options (JSON/Markdown) for search tools
- Pagination support with offset parameter
- Character limits (25K standard, 50K for transcripts) with smart truncation
- Actionable error messages with platform-specific guidance

🔧 Improved:
- Comprehensive tool descriptions with usage examples
- Enhanced configuration system with limits
- Better TypeScript type safety
- Professional README with badges and tables

🐛 Fixed:
- JSON parsing issue in metadata truncation
- Maintained valid JSON structure when truncated

🧪 Tested:
-  YouTube platform (Rick Astley video)
-  Bilibili platform (Chinese content)
-  Multi-language support verified
-  All 8 tools tested with real API calls

📖 Documentation:
- Created comprehensive CHANGELOG.md
- Redesigned README.md with professional formatting
- Added migration guide for v0.6.x users

🌍 Platform Support:
- Verified: YouTube, Bilibili
- Theory: 1000+ platforms via yt-dlp
2025-10-19 01:52:22 +08:00
kevinwatt
5aecaa3b20 feat: add video search functionality
- Add new search_videos tool for YouTube video search
- Support configurable search result count (1-50)
- Return formatted results with title, channel, duration, and URL
- Add comprehensive test coverage with real yt-dlp integration
- Update documentation with search examples
- Fix dependency security vulnerabilities
- Bump version to 0.6.27

Resolves: kevinwatt/yt-dlp-mcp#14
2025-07-28 04:45:37 +08:00
kevinwatt
e9a0e55762 feat: major improvements and version bump to 0.6.24 - Remove prompts functionality (prompts.ts and tests) - Improve error handling with VideoDownloadError class - Move configuration to dedicated file - Add URL validation and security checks - Reorganize code into modules - Add comprehensive unit tests - Enhance documentation with JSDoc and examples 2025-02-22 00:43:15 +08:00