@camera.ui/sdk / manager / CoreManager
Interface: CoreManager ​
Defined in: manager/index.ts:100
Core manager interface for system-level operations.
Provides access to cross-cutting services like the FFmpeg binary path, server addresses, the cloud server id, inter-plugin lookup, and a stream of core system events.
Accessed via api.coreManager in plugins.
Example ​
const ffmpeg = await api.coreManager.getFFmpegPath();
const addresses = await api.coreManager.getServerAddresses();
api.coreManager.onEvent.subscribe(({ type, data }) => {
if (type === 'cloudAccountChanged') {
console.log('Cloud account state:', data);
}
});Properties ​
onEvent ​
readonlyonEvent:Observable<CoreManagerEvent>
Defined in: manager/index.ts:225
Observable for core manager events (e.g. cloud account changes, assistantModelChanged with { pluginId, configured }).
Example ​
api.coreManager.onEvent.subscribe(({ type, data }) => {
if (type === 'cloudAccountChanged') {
console.log('Cloud account changed:', data.connected);
}
});Methods ​
assistantAccess() ​
assistantAccess():
Promise<AssistantAccess>
Defined in: manager/index.ts:211
Check whether this plugin may use the assistant model and what the assigned entry can do. Subscribe to the assistantModelChanged event to learn about changes while running.
Returns ​
Promise<AssistantAccess>
Access flag, model id and picture support
assistantAsk() ​
assistantAsk(
request):Promise<AssistantAskResult>
Defined in: manager/index.ts:203
Ask the assistant model for one completion. The admin decides under Settings, Assistant which plugins may use the model and which entry they get; the key never reaches the plugin.
Parameters ​
request ​
Prompt, optional system text, pictures and output schema
Returns ​
Promise<AssistantAskResult>
The answer, or ok: false with the reason when the plugin is not allowed or the call failed
Example ​
const answer = await api.coreManager.assistantAsk({
system: 'Answer with one word.',
prompt: 'Is there a person in this picture?',
images: [{ data: jpeg, mimeType: 'image/jpeg' }],
});
if (answer.ok) console.log(answer.text);connectToPlugin() ​
connectToPlugin(
pluginName,options?):Promise<BasePlugin<Record<string,any>> &Partial<MotionDetectionInterface&ObjectDetectionInterface&AudioDetectionInterface&FaceDetectionInterface&FaceEmbeddingInterface&PersonEmbeddingInterface&SegmentationInterface&LicensePlateDetectionInterface&ClassifierDetectionInterface&ClipDetectionInterface&DiscoveryProvider&SensorDiscoveryProvider&NotifierInterface&AssistantToolProvider> |undefined>
Defined in: manager/index.ts:120
Connect to another plugin by name. Proxies are cached per plugin and options and share one connection per plugin.
Parameters ​
pluginName ​
string
Name of the plugin to connect to
options? ​
Timeout and retry for the calls of the returned proxy
Returns ​
Promise<BasePlugin<Record<string, any>> & Partial<MotionDetectionInterface & ObjectDetectionInterface & AudioDetectionInterface & FaceDetectionInterface & FaceEmbeddingInterface & PersonEmbeddingInterface & SegmentationInterface & LicensePlateDetectionInterface & ClassifierDetectionInterface & ClipDetectionInterface & DiscoveryProvider & SensorDiscoveryProvider & NotifierInterface & AssistantToolProvider> | undefined>
Plugin proxy or undefined if not found
Example ​
const clip = await api.coreManager.connectToPlugin('CLIP Plugin', { noRetry: true });
try {
const embeddings = await clip?.getTextEmbeddings?.('a red car');
} catch {
// stopped, or no getTextEmbeddings
}getCloudServerId() ​
getCloudServerId():
Promise<string>
Defined in: manager/index.ts:145
Get the cloud server identity this server is registered as.
Returns the cloud server_id from the active cloud pairing, or an empty string when the server is not connected to the cloud.
Returns ​
Promise<string>
Cloud server id, or an empty string if not paired
getFFmpegPath() ​
getFFmpegPath():
Promise<string>
Defined in: manager/index.ts:127
Get the FFmpeg executable path.
Returns ​
Promise<string>
Path to FFmpeg binary
getInstanceId() ​
getInstanceId():
Promise<string>
Defined in: manager/index.ts:171
Get the id of this camera.ui installation.
A copy of the server made from a backup gets a new id, while a move or an undone restore keeps it. A plugin that announces itself on the network under a fixed identity compares it with the id it saw before: a different one means it now runs on a copy and must not reuse that identity.
Servers older than 2.4.0 do not know the call and reject it.
Returns ​
Promise<string>
Installation id
getPluginsByInterface() ​
getPluginsByInterface(
interfaceName):Promise<PluginInfo[]>
Defined in: manager/index.ts:182
Get all installed, enabled plugins that implement a specific interface. Plugins the admin disabled are excluded. A returned plugin may still be starting up or may have crashed, so a call into one can fail.
Parameters ​
interfaceName ​
Name of the plugin interface (e.g., 'ClipDetection')
Returns ​
Promise<PluginInfo[]>
Array of plugin info objects
getRestoreGeneration() ​
getRestoreGeneration():
Promise<string>
Defined in: manager/index.ts:157
Get the id of the last restore on this server.
It changes every time a backup is restored or a restore is undone and is empty before the first one. A plugin that keeps credentials for an outside service compares it with the id it saw when storing them: a different one means they came back with a backup and may be outdated.
Returns ​
Promise<string>
Restore id, or an empty string before the first restore
getServerAddresses() ​
getServerAddresses():
Promise<string[]>
Defined in: manager/index.ts:135
Get server addresses (IP addresses the server is listening on). A plugin running on a worker gets the addresses selected for that worker, empty when none are selected.
Returns ​
Promise<string[]>
Array of server addresses