Skip to main content

objectiveai_cli/command/agents/
get.rs

1//! `agents get` — read an agent definition by remote path.
2
3use objectiveai_sdk::cli::command::agents::get::{Request, Response};
4
5use crate::context::Context;
6use crate::error::Error;
7
8pub async fn execute(ctx: &Context, request: Request) -> Result<Response, Error> {
9    crate::retrieve::get_agent(ctx, request.path).await
10}
11
12pub mod request_schema {
13    use objectiveai_sdk::cli::command::agents::get as sdk;
14    use objectiveai_sdk::cli::command::agents::get::request_schema::{Request, Response};
15
16    use crate::context::Context;
17    use crate::error::Error;
18
19    pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
20        Ok(objectiveai_sdk::cli::command::ResponseSchema(schemars::schema_for!(sdk::Request)))
21    }
22}
23
24pub mod response_schema {
25    use objectiveai_sdk::cli::command::agents::get as sdk;
26    use objectiveai_sdk::cli::command::agents::get::response_schema::{Request, Response};
27
28    use crate::context::Context;
29    use crate::error::Error;
30
31    pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
32        Ok(objectiveai_sdk::cli::command::ResponseSchema(schemars::schema_for!(sdk::Response)))
33    }
34}