Add auto-discovery of local assets from filesystem import#386
Merged
pedramamini merged 2 commits intoRunMaestro:mainfrom Feb 16, 2026
Merged
Add auto-discovery of local assets from filesystem import#386pedramamini merged 2 commits intoRunMaestro:mainfrom
pedramamini merged 2 commits intoRunMaestro:mainfrom
Conversation
…ook import - Add local asset auto-discovery from `assets/` directory for local playbooks - Merge discovered filesystem assets with manifest-declared assets without duplicates - Use `Set` to deduplicate combined manifest and discovered asset lists - Silently skip `ENOENT` errors when `assets/` directory does not exist - Log warning on `stat` failures for individual asset candidates - Log effective asset count after local discovery and merge - Replace hardcoded `marketplacePlaybook.assets` with computed `effectiveAssets` - Add tests for auto-discovery when manifest assets are absent - Add tests for merging discovered and manifest assets without duplicates - Mock `fs.readdir` and `fs.stat` in marketplace test setup
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.
Add auto-discovery of local assets from filesystem import
Summary
assets/folder, with deduplication.Screenshots
Before fix, after importing a playbook with a local assets/ directory:
After fix:
Files Changed
src/main/ipc/handlers/marketplace.ts: Added logic to discover local asset files and merge them with manifest assets before import.src/__tests__/main/ipc/handlers/marketplace.test.ts: Added mocks forfs.readdir/fs.statand new test cases covering local asset discovery and merging.Code Changes
effectiveAssetsduring import:Reason for Changes
assets/are still imported without requiring manifest updates.Impact of Changes
assets/directories or unreadable entries.Test Plan
marketplace.test.tscover:Additional Notes
assets/are ignored (bystat.isFile()).assets/exists but is unreadable, assets may be partially imported; warnings are logged.