Skip to main content

objectiveai_cli_sdk/output/notification/
plugins.rs

1use objectiveai_sdk::filesystem::plugins::ManifestWithNameAndSource;
2use serde::{Deserialize, Serialize};
3
4/// Wire shape: `{"type":"notification","value":{"plugins":[...]}}`.
5/// Emitted by `objectiveai plugins list`. One entry per `.json`
6/// manifest discovered in `<base_dir>/plugins/`; failures during
7/// discovery are silently dropped (see `Client::list_plugins`).
8#[derive(Serialize, Deserialize, Debug, Clone)]
9pub struct Plugins {
10    pub plugins: Vec<ManifestWithNameAndSource>,
11}
12
13/// Wire shape: `{"type":"notification","value":{"plugin": <manifest> | null}}`.
14/// Emitted by `objectiveai plugins get <name>`. The value is the
15/// resolved `ManifestWithNameAndSource` when the manifest file exists
16/// and parses, or JSON `null` when it doesn't (same silent-skip policy
17/// as `list`).
18#[derive(Serialize, Deserialize, Debug, Clone)]
19pub struct Plugin {
20    pub plugin: Option<ManifestWithNameAndSource>,
21}
22
23/// Wire shape: `{"type":"notification","value":{"installed": true|false}}`.
24/// Emitted by `objectiveai plugins install`. `true` means the binary
25/// landed at `<base_dir>/plugins/<repository>/plugin[.exe]`; `false`
26/// means the manifest fetched OK but this platform isn't in its
27/// `binaries` map (nothing to install, not an error).
28#[derive(Serialize, Deserialize, Debug, Clone)]
29pub struct Installed {
30    pub installed: bool,
31}