agent_client_protocol/
plan.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
5#[serde(rename_all = "camelCase")]
6pub struct Plan {
7    pub entries: Vec<PlanEntry>,
8}
9
10/// A single entry in the execution plan.
11///
12/// Represents a task or goal that the assistant intends to accomplish
13/// as part of fulfilling the user's request.
14#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
15#[serde(rename_all = "camelCase")]
16pub struct PlanEntry {
17    /// Description of what this task aims to accomplish
18    pub content: String,
19    /// Relative importance of this task
20    pub priority: PlanEntryPriority,
21    /// Current progress of this task
22    pub status: PlanEntryStatus,
23}
24
25/// Priority levels for plan entries.
26///
27/// Used to indicate the relative importance or urgency of different
28/// tasks in the execution plan.
29#[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)]
30#[serde(rename_all = "snake_case")]
31pub enum PlanEntryPriority {
32    High,
33    Medium,
34    Low,
35}
36
37/// Status of a plan entry in the execution flow.
38///
39/// Tracks the lifecycle of each task from planning through completion.
40#[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)]
41#[serde(rename_all = "snake_case")]
42pub enum PlanEntryStatus {
43    Pending,
44    InProgress,
45    Completed,
46}