feat: add ImageHandler with EXIF extraction and comprehensive MIME detection (v5.2.0)
Implements Phase 1.5 (Comprehensive MIME Type Detection) and adds built-in image processing support to IntelligentImportAugmentation. **New Features:** - ImageHandler: Extracts image metadata (dimensions, format, color space) using sharp - EXIF extraction: Camera data, GPS, timestamps using exifr library - Support for JPEG, PNG, WebP, GIF, TIFF, BMP, SVG, HEIC, AVIF formats - MimeTypeDetector: Unified MIME type detection with magic byte support - FormatDetector: Enhanced with image format detection via MIME + magic bytes **Architecture Fixes:** - Fixed brain.import() augmentation pipeline integration (src/brainy.ts:3140-3154) - Added parameter spreading for ImportSource objects to enable augmentation access - Fixed metadata propagation through ImportCoordinator to final results - Added augmentation data check in ImportCoordinator.extract() **Integration:** - ImageHandler registered as built-in handler alongside CSV, Excel, PDF - Images import as 'media' entities with 'image' subtype - Full metadata preserved in knowledge graph entities - Configuration options: enableImage, extractEXIF, imageDefaults **Test Coverage:** - 15 integration tests (image-import.test.ts) - 100% passing - 27 unit tests (image-handler.test.ts) - 100% passing - Format detection tests for all supported image types - Error handling and resilience tests **Breaking Changes:** None - backward compatible Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
6345f87eb2
commit
1874b77896
26 changed files with 5079 additions and 434 deletions
|
|
@ -147,7 +147,9 @@
|
|||
"@rollup/plugin-replace": "^6.0.2",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@testcontainers/redis": "^11.5.1",
|
||||
"@types/mime": "^3.0.4",
|
||||
"@types/node": "^20.11.30",
|
||||
"@types/sharp": "^0.31.1",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
|
|
@ -175,13 +177,16 @@
|
|||
"cli-table3": "^0.6.5",
|
||||
"commander": "^11.1.0",
|
||||
"csv-parse": "^6.1.0",
|
||||
"exifr": "^7.1.3",
|
||||
"inquirer": "^12.9.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"mammoth": "^1.11.0",
|
||||
"mime": "^4.1.0",
|
||||
"ora": "^8.2.0",
|
||||
"pdfjs-dist": "^4.0.379",
|
||||
"prompts": "^2.4.2",
|
||||
"roaring-wasm": "^1.1.0",
|
||||
"sharp": "^0.33.5",
|
||||
"uuid": "^9.0.1",
|
||||
"ws": "^8.18.3",
|
||||
"xlsx": "^0.18.5"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue