feat(memory-islands): rewrite plugin with modular mixin architecture and OWUI compatibility fixes - #13
Open
skorphil wants to merge 3 commits into
Open
feat(memory-islands): rewrite plugin with modular mixin architecture and OWUI compatibility fixes#13skorphil wants to merge 3 commits into
skorphil wants to merge 3 commits into
Conversation
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.
Summary
Complete rewrite of the Memory Islands plugin following the repo's modular mixin architecture and fixing OWUI compatibility blockers from the previous incomplete attempt.
Changes
src/— Modular mixin layout (built bybuild.py)meta.py— metadata frontmatter; requirements updated topydantic, httpx_valves.py— admin Valves reduced to the four real settings (ISOLATE_BY_DEFAULT,AUTO_LEARN_MEMORIES,ENABLE_UPDATE_NOTIFICATIONS,CHECK_PREVIEW_RELEASES); removed deadPRIORITYandINHERIT_FROM_PARENT_database.py(new) —DatabaseMixinwith all SQLite helpers, now persisted under a stableDATA_DIR(defaults to~/.openwebui/memory-islands/) instead of the plugin directory_filters.py(new) —FilterMixinwithinlet/outlet, payload-first folder resolution withChatsmodel fallback, memory learning and injection_commands.py(new) —CommandsMixinslash-command handler (/island-*)_updates.py— background update check mixin withmemory-islands/release tag prefixmain.py—Filterentry point inheriting all mixinsOWUI compatibility fixes
folder_idfrom the filter payload first (modern OWUI), falling back to theChatsmodel instead of directly scrapingwebui.db(which broke under the new OWUI DB layout)DATA_DIR(respected by OWUI deployments) rather than the read-only plugin install path_MAX_FACTSTests
tests/test_memory_islands.py— module-levelpytestmark = pytest.mark.unit;DATA_DIRpointed attmp_pathin fixtures so the real home dir is never touched;TestFolderResolutionrewritten for the new async payload/Chats-fallback API; async_resolve_folderpatched withAsyncMock; valve references updated to UPPER_SNAKE namestests/test_integration.py— valve spec/update assertions updated to the four real UPPER_SNAKE valve namesVerification
uv run python build.py— passes (ruff check, format, unit tests, merge, integration skip)uv run pytest plugins/memory-islands/tests/ -m unit -v— 28 passed, 1 skippeduv run pytest plugins/memory-islands/tests/ -v— 28 passed, 1 skipped (integration module-skips without container)