objectiveai_sdk/cli/command/agents/logs/mod.rs
1//! `agents logs` — persisted log tier. Currently one sub-tier:
2//! `read`, which exposes `all`, `id`, `pending`, `subscribe`. The
3//! `Request` / `ResponseItem` types alias straight through to
4//! `read::*` — wrapping them in a single-variant enum would only
5//! add noise.
6
7pub mod read;
8
9#[derive(clap::Subcommand)]
10pub enum Command {
11 /// Read logged completion chunks. Sub-leaves: `all` (stream
12 /// every row), `id` (look up a single row), `pending` (one-shot
13 /// list of unfinalized rows), `subscribe` (long-lived stream of
14 /// new rows).
15 Read {
16 #[command(subcommand)]
17 command: read::Command,
18 },
19}
20
21pub type Request = read::Request;
22pub type ResponseItem = read::ResponseItem;
23
24impl TryFrom<Command> for Request {
25 type Error = crate::cli::command::FromArgsError;
26 fn try_from(command: Command) -> Result<Self, Self::Error> {
27 match command {
28 Command::Read { command } => read::Request::try_from(command),
29 }
30 }
31}
32
33#[cfg(feature = "cli-executor")]
34pub use read::{execute, execute_transform};