Skip to main content

objectiveai_cli/command/plugins/install/
filesystem.rs

1//! `plugins install filesystem` — return the static
2//! INSTRUCTIONS.md asset describing how to install a plugin from a
3//! local path.
4
5use objectiveai_sdk::cli::command::plugins::install::filesystem::{Request, Response};
6
7use crate::context::Context;
8use crate::error::Error;
9
10pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
11    Ok(Response {
12        instructions: include_str!(
13            "../../../../assets/plugins/install/filesystem/INSTRUCTIONS.md"
14        )
15        .to_string(),
16    })
17}
18
19pub mod request_schema {
20    use objectiveai_sdk::cli::command::plugins::install::filesystem as sdk;
21    use objectiveai_sdk::cli::command::plugins::install::filesystem::request_schema::{Request, Response};
22
23    use crate::context::Context;
24    use crate::error::Error;
25
26    pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
27        Ok(objectiveai_sdk::cli::command::ResponseSchema(schemars::schema_for!(sdk::Request)))
28    }
29}
30
31pub mod response_schema {
32    use objectiveai_sdk::cli::command::plugins::install::filesystem as sdk;
33    use objectiveai_sdk::cli::command::plugins::install::filesystem::response_schema::{Request, Response};
34
35    use crate::context::Context;
36    use crate::error::Error;
37
38    pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
39        Ok(objectiveai_sdk::cli::command::ResponseSchema(schemars::schema_for!(sdk::Response)))
40    }
41}