-
Notifications
You must be signed in to change notification settings - Fork 46
feat: generic plugin runtime SPI, web admin manager, and desktop extension host #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BillyOutlast
wants to merge
14
commits into
Drop-OSS:develop
Choose a base branch
from
Heretek-Games:upstream-pr/generic-plugin-spi
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
40eb430
feat: generic plugin runtime SPI and desktop extension host
7bd4707
fix(desktop): consume plugin events through the Tauri event bridge
60183f0
refactor(desktop): expose a generic findFiles host primitive
0624294
fix(desktop): resolve typecheck errors blocking the desktop analysis job
bb840a4
Merge remote-tracking branch 'upstream/develop' into upstream-pr/gene…
d7421a5
chore(plugins): sync generic plugin runtime from develop
8eac9d0
refactor(plugins): split server runtime into focused modules
8c1e55c
refactor(desktop): move plugin host into its own crate with DB-backed…
f443d08
refactor(plugins): share contracts via @drop/plugin-api and split cli…
987326e
docs(plugins): point at Drop-OSS SDK, scope, and trust model
58766bb
docs(plugins): reference the @drop-oss CLI scope in signature comments
f394655
feat(plugins): consume the MetadataProvider SPI in the metadata flow
c88d446
feat(plugins): align upstream generic SPI with plugin-sdk v0.7.0 cont…
809901e
feat(plugins): implement plugin-sdk 0.7.0 runtime parity
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <template> | ||
| <template v-for="item in slotComponents" :key="item.id"> | ||
| <PluginErrorBoundary :plugin-id="item.pluginId"> | ||
| <component :is="item.component" v-bind="context" /> | ||
| </PluginErrorBoundary> | ||
| </template> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { computed } from "vue"; | ||
| import type { UISlotName } from "~/internal/plugins/types"; | ||
| import { clientPluginManager } from "~/internal/plugins/ClientPluginManager"; | ||
| import PluginErrorBoundary from "~/internal/plugins/PluginErrorBoundary.vue"; | ||
|
|
||
| const props = defineProps<{ | ||
| name: UISlotName; | ||
| context?: Record<string, unknown>; | ||
| }>(); | ||
|
|
||
| const slotComponents = computed(() => { | ||
| return clientPluginManager.slots[props.name] || []; | ||
| }); | ||
| </script> |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import { ref, computed, watch, onMounted } from "vue"; | ||
| import type { UISlotName, PlayAction } from "~/internal/plugins/types"; | ||
| import { clientPluginManager } from "~/internal/plugins/ClientPluginManager"; | ||
|
|
||
| export function usePluginManager() { | ||
| return clientPluginManager; | ||
| } | ||
|
|
||
| export function usePluginSlots(name: UISlotName) { | ||
| return computed(() => clientPluginManager.slots[name] || []); | ||
| } | ||
|
|
||
| export function usePlayActions(gameId: string | (() => string)) { | ||
| const actions = ref<PlayAction[]>([]); | ||
| const isLoading = ref(false); | ||
|
|
||
| const resolveId = () => (typeof gameId === "function" ? gameId() : gameId); | ||
|
|
||
| const refreshActions = async () => { | ||
| const id = resolveId(); | ||
| if (!id) { | ||
| actions.value = []; | ||
| return; | ||
| } | ||
| isLoading.value = true; | ||
| try { | ||
| actions.value = await clientPluginManager.getPlayActions(id); | ||
| } catch (err) { | ||
| console.error(`Failed to load play actions for game ${id}:`, err); | ||
| actions.value = []; | ||
| } finally { | ||
| isLoading.value = false; | ||
| } | ||
| }; | ||
|
|
||
| onMounted(() => { | ||
| refreshActions(); | ||
| }); | ||
|
|
||
| if (typeof gameId === "function") { | ||
| watch(gameId, () => { | ||
| refreshActions(); | ||
| }); | ||
| } | ||
|
|
||
| return { | ||
| actions, | ||
| isLoading, | ||
| refreshActions, | ||
| }; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.