fix(stage-tamagotchi,stage-ui): mismatched state

This commit is contained in:
Neko Ayaka
2026-03-02 01:50:10 +08:00
parent a79528c438
commit 9ca2eefb3f
3 changed files with 10 additions and 5 deletions
@@ -39,13 +39,13 @@ interface CapabilityAwarePluginHost extends PluginHost {
setProvidersListResolver: (resolver: () => Promise<Array<{ name: string }>> | Array<{ name: string }>) => void
announceCapability: (key: string, metadata?: Record<string, unknown>) => {
key: string
state: 'announced' | 'ready'
state: 'announced' | 'ready' | 'degraded' | 'withdrawn'
metadata?: Record<string, unknown>
updatedAt: number
}
markCapabilityReady: (key: string, metadata?: Record<string, unknown>) => {
key: string
state: 'announced' | 'ready'
state: 'announced' | 'ready' | 'degraded' | 'withdrawn'
metadata?: Record<string, unknown>
updatedAt: number
}
+5 -2
View File
@@ -96,15 +96,18 @@ export interface PluginRegistrySnapshot {
plugins: PluginManifestSummary[]
}
// TODO: Replace these manually duplicated IPC types with re-exports from
// @proj-airi/plugin-sdk (CapabilityDescriptor) once stage-ui and the shared
// eventa layer can depend on the SDK without introducing unwanted coupling.
export interface PluginCapabilityPayload {
key: string
state: 'announced' | 'ready'
state: 'announced' | 'ready' | 'degraded' | 'withdrawn'
metadata?: Record<string, unknown>
}
export interface PluginCapabilityState {
key: string
state: 'announced' | 'ready'
state: 'announced' | 'ready' | 'degraded' | 'withdrawn'
metadata?: Record<string, unknown>
updatedAt: number
}