LifecycleAPI
Defined in: namespaces.ts:1093
Methods
Section titled “Methods”onDependencyAvailable()
Section titled “onDependencyAvailable()”onDependencyAvailable(
depId,handler):void
Defined in: namespaces.ts:1095
Registers a handler called when a dependency becomes available.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”() => void
Returns
Section titled “Returns”void
onDependencyUnavailable()
Section titled “onDependencyUnavailable()”onDependencyUnavailable(
depId,handler):void
Defined in: namespaces.ts:1097
Registers a handler called when a dependency becomes unavailable.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”() => void
Returns
Section titled “Returns”void
getDependencyStatus()
Section titled “getDependencyStatus()”getDependencyStatus():
Promise<DependencyStatus[]>
Defined in: namespaces.ts:1108
Returns the current status of all declared dependencies (system + plugin).
Each entry includes installation state, version info, and satisfaction status.
System dependencies are probed via check.command; plugin dependencies are
resolved from the host’s plugin registry.
Returns
Section titled “Returns”Promise<DependencyStatus[]>
Promise resolving to an array of dependency status objects.
recheckDependencies()
Section titled “recheckDependencies()”recheckDependencies():
Promise<DependencyStatus[]>
Defined in: namespaces.ts:1119
Re-runs both system and plugin dependency checks and updates state.
Call after the user installs a missing system dependency (e.g., brew install yt-dlp).
If all required deps become satisfied, the plugin transitions from degraded to active.
Fires onDependencyStatusChanged handlers if any status changed.
Returns
Section titled “Returns”Promise<DependencyStatus[]>
Promise resolving to the updated dependency status array.
onDependencyStatusChanged()
Section titled “onDependencyStatusChanged()”onDependencyStatusChanged(
handler):string
Defined in: namespaces.ts:1132
Registers a handler called when any dependency status changes.
Fires on:
- Host-side
recheckDependencies()(manual or SwiftUI-triggered) - Plugin-side
recheckDependencies()(JS bridge call) - Dependency plugin lifecycle changes (activate, deactivate, degraded)
Parameters
Section titled “Parameters”handler
Section titled “handler”(statuses) => void
Callback receiving the full updated status array.
Returns
Section titled “Returns”string
A token string that can be used to identify the registration.