Releases: sim2kid/ScryfallMatrix
Releases · sim2kid/ScryfallMatrix
Release list
v0.2.1 - Testing, Image Changes, and AI Policy
Release Notes for Version 0.2.1
Version 0.2.1 introduces significant improvements to the bot's reliability through an expanded test suite, enhanced image handling for double-faced cards, and the formalization of our AI usage policy.
🚀 Features & Enhancements
- Improved Image Handling & Matrix Uploads:
- Refactored
uploadCardImageToMatrixto better handle image parameters and caching. - Added explicit support for using existing Matrix Content URIs (MXC) when sending card images, reducing redundant uploads.
- Improved handling for double-faced cards (DFCs) to ensure both faces can be correctly processed and uploaded.
- Refined the logic for replacing Scryfall image URLs with Matrix MXC URIs in formatted HTML responses.
- Refactored
- Documentation & Policy:
- AI Policy Implementation: Added
AI_POLICY.mdwhich outlines guidelines for AI-assisted development, emphasizing human oversight, vetting, and accountability. - Updated
README.mdwith an AI disclosure badge and a specific note regarding the project's development process.
- AI Policy Implementation: Added
🛠️ Testing & Quality Assurance
This release focused heavily on increasing test coverage to ensure long-term stability:
- Query Parsing & Utilities: Added over 600 lines of comprehensive tests for
query-parsing,utilities, and core regex logic.- Expanded regex testing to cover edge cases such as multiple prefixes, Unicode card names, and special characters.
- Verified robust parsing of card names, set codes, collector numbers, and search filters.
- Image Handling Tests: Introduced specialized tests for image handling, including:
- Scryfall URL detection and MXC replacement logic.
- Double-faced card image logic.
- Cache integrity and parameter handling during Matrix uploads.
🐛 Internal Changes
src/index.js: Refactored internal image upload and replacement functions for better modularity and reliability.package.json: Bumped version to0.2.1.- Cleaned up various utility functions and improved error logging for image fetch failures.
v0.2.0 - Initial Release
Release Notes - Version 0.2.0
Version 0.2.0 of the Scryfall Matrix Bot introduces significant enhancements to card rendering, search capabilities, and bot administration. This update focuses on providing a richer, more interactive experience within Matrix rooms while improving the bot's resilience and management features.
🚀 New Features
Advanced Card Search and Parsing
- Command Parsing: Added a robust command parser supporting advanced Scryfall syntax within the
[[ ]]brackets. - Filters and Selectors: Users can now filter searches by set code, collector number, and language using the
|pipe syntax (e.g.,[[Card Name|SET|CN|LANG]]) or keyword selectors (e.g.,set:lea,cn:1,lang:ja). - Advanced Scryfall Queries: Support for complex filters such as
oracle:,type:,rarity:,coloridentity:,cmc:,power:, andtoughness:.
Enhanced Card Rendering (Formatter)
- Symbology Integration: Full support for Scryfall mana symbols. Symbols are now automatically downloaded, cached, and rendered as inline images (emoticons) in Matrix messages.
- Double-Faced Card Support: Improved handling for double-faced and transforming cards. The bot now renders information and images for both the front and back faces.
- Comprehensive Card Info: Added rendering for Power/Toughness, Type Lines, and Flavor Text.
- Accessibility: Added
titleandaltattributes to all images (cards and symbols) for better tooltips and screen reader support.
Improved Image Handling and Caching
- Persistent Image Storage: Card images and symbols are now cached locally and their Matrix Content URIs (MXC) are stored in persistent JSON files (
data/card-images.jsonanddata/symbols.json) to minimize redundant uploads. - Optimized HTML Layout: Refined the HTML structure for card responses, ensuring images and text are ordered correctly for the best viewing experience across various Matrix clients.
- Automatic Resizing: Images are now handled with appropriate metadata to ensure they display at a reasonable size in room timelines.
Bot Management and Resilience
- User Ignoring: Added the ability to ignore specific users or patterns (using wildcards) via the
IGNORED_USERSenvironment variable. - Automatic Join: Replaced the standard mixin with a custom, more robust implementation for joining rooms from historic invitations upon startup.
- Homeserver Validation: The bot now validates homeserver connectivity and supported Matrix versions during the initialization sequence.
- Improved Error Handling: Enhanced resilience for Scryfall API lookups and Matrix synchronization, including better logging and fallback mechanisms for homeserver errors.
DevOps and Documentation
- Docker Integration: Streamlined the Docker workflow with a new
dev-deploy.jsscript for building and pushing development images. - Automated Workflows: Added GitHub Actions for both development and release Docker builds.
- Comprehensive Documentation: Added
AGENTS.mdand updated theREADME.mdwith detailed setup instructions, bot modes (Simple vs. AppService), and API documentation.
🛠 Technical Improvements
- Custom Caching Layer: Replaced
NodeCachewith a more tailored caching solution inscryfall.jsthat supports manual Garbage Collection (GC) and memory management. - Throttling: Implemented mandatory request throttling (100ms) to ensure compliance with Scryfall's API usage guidelines.
- Standardized User-Agent: The bot now identifies itself to Scryfall with a version-specific User-Agent string.
📝 Configuration Changes
- New Env Variables:
IGNORED_USERS: Comma-separated list of user IDs or wildcard patterns to ignore.CACHE_TTL/CACHE_MAX_MEMORY/CACHE_GC_INTERVAL: Fine-grained control over the internal API cache.DEBUG_MODE: Toggle detailed logging for troubleshooting.