feat: create manifest-driven plugin system for third-party extensions#509
Open
Musab1258 wants to merge 1 commit into
Open
feat: create manifest-driven plugin system for third-party extensions#509Musab1258 wants to merge 1 commit into
Musab1258 wants to merge 1 commit into
Conversation
|
@Musab1258 is attempting to deploy a commit to the nanle-code's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Musab1258 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Linked issue
Closes #411
What changed and why
This PR fully implements the third-party extension system (D-008), moving the dashboard from a lightweight internal module loader to a robust, manifest-driven plugin architecture.
Key additions include:
PluginManagerwith a new manifest-aware registry. It now supports both trustedmoduleplugins and sandboxediframeexecution environments.PluginRegistryView.tsx) within Settings. It allows users to browse a mocked marketplace, view extension details, and review required permissions before installation.dashboard:read,notifications:write) enforced at runtime. Users are prompted to approve permissions prior to installation, and grants are persisted locally alongside installed plugins viapluginStorage.js.src/plugins/sdk.ts) defining types and manifest builders. Added a developer CLI (scripts/create-plugin.mjs/npm run plugin:create) to instantly scaffold newmoduleoriframeplugins.docs/plugins/README.md.@tensorflow/tfjs-nodeversion to^4.22.0inpackage.jsonto resolve a legacy peer dependency conflict blockingnpm install.Test plan
PluginManagercore logic usingvitest(src/plugins/__tests__/PluginManager.test.js) to ensure it properly installs manifests, exposes widgets, hydrates fromlocalStorage, and uninstalls cleanly.window.matchMediamocks to the test setup to ensure store initializations work correctly in the testing environment.npm run plugin:create -- --name "Test Plugin" --id "org.test.plugin" --output ./test-pluginto verify the CLI script creates the correct boilerplate.npm run type-checkandnpx eslintto fix all warnings and verify strict typing.Breaking changes
Yes (describe below)
PluginManagerand plugin registration APIs have been completely rewritten to expect Manifests rather than simple React component exports. Any existing internal plugins (e.g.,runtimeStatusPlugin) have been updated to export properversion,permissions, andinitializeconfigurations.Notes for reviewers
src/plugins/pluginCatalog.js) currently relies on a hardcoded array of mocked plugins (MARKETPLACE_PLUGINS) for demonstration. In the future, this can be easily wired up to a real backend endpoint.package.jsonregarding@tensorflow/tfjs-node. The previous pin^5.0.0was causing anETARGETerror duringnpm install. I rolled it back to^4.22.0(the actual published tag) so the installation and test suites could run successfully.