ACPex.Schema.Types.SessionUpdate.Plan (ACPex v0.1.1)

Copy Markdown View Source

Plan update.

Agent's execution plan for complex tasks, broken down into entries.

Required Fields

  • type - Always "plan" for this variant
  • session_update - Update identifier
  • entries - List of plan entries (list of maps)

Optional Fields

  • meta - Additional metadata (map)

Plan Entry Structure

Each entry in the entries list typically contains:

  • id - Unique identifier for the plan entry
  • description - Description of the task
  • status - Current status (pending, in_progress, completed, failed)
  • Other fields specific to the plan entry type

Example

%ACPex.Schema.Types.SessionUpdate.Plan{
  type: "plan",
  session_update: "update-789",
  entries: [
    %{
      "id" => "step-1",
      "description" => "Read configuration file",
      "status" => "completed"
    },
    %{
      "id" => "step-2",
      "description" => "Parse configuration",
      "status" => "in_progress"
    }
  ]
}

JSON Representation

{
  "type": "plan",
  "sessionUpdate": "update-789",
  "entries": [
    {
      "id": "step-1",
      "description": "Read configuration file",
      "status": "completed"
    },
    {
      "id": "step-2",
      "description": "Parse configuration",
      "status": "in_progress"
    }
  ]
}

Summary

Functions

Creates a changeset for validation.

Types

t()

@type t() :: %ACPex.Schema.Types.SessionUpdate.Plan{
  entries: [map()],
  meta: map() | nil,
  session_update: String.t(),
  type: String.t()
}

Functions

changeset(struct \\ %__MODULE__{}, params)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for validation.

Required Fields

  • session_update - Must be present
  • entries - Must be present

The type field defaults to "plan".