{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/call2me-app/json-schema/call2me-app-src-routers-v1-copilot-session-with-messages-schema.json",
  "title": "SessionWithMessages",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/call2me-app-copilot-api-openapi.yml#/components/schemas/src__routers__v1__copilot__SessionWithMessages",
  "properties": {
    "session_id": {
      "type": "string",
      "title": "Session Id"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "message_count": {
      "type": "integer",
      "title": "Message Count"
    },
    "total_cost_usd": {
      "type": "number",
      "title": "Total Cost Usd"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At"
    },
    "messages": {
      "items": {
        "$ref": "#/$defs/CopilotMessage"
      },
      "type": "array",
      "title": "Messages"
    }
  },
  "type": "object",
  "required": [
    "session_id",
    "title",
    "status",
    "message_count",
    "total_cost_usd",
    "created_at",
    "updated_at",
    "messages"
  ],
  "$defs": {
    "ActionCard": {
      "properties": {
        "action_id": {
          "type": "string",
          "title": "Action Id"
        },
        "tool_name": {
          "type": "string",
          "title": "Tool Name"
        },
        "summary": {
          "type": "string",
          "title": "Summary"
        },
        "risk": {
          "type": "string",
          "title": "Risk"
        }
      },
      "type": "object",
      "required": [
        "action_id",
        "tool_name",
        "summary",
        "risk"
      ],
      "title": "ActionCard"
    },
    "CopilotMessage": {
      "properties": {
        "message_id": {
          "type": "string",
          "title": "Message Id"
        },
        "role": {
          "type": "string",
          "title": "Role"
        },
        "content": {
          "type": "string",
          "title": "Content"
        },
        "action_cards": {
          "items": {
            "$ref": "#/$defs/ActionCard"
          },
          "type": "array",
          "title": "Action Cards",
          "default": []
        },
        "ui_blocks": {
          "items": {},
          "type": "array",
          "title": "Ui Blocks",
          "default": []
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "message_id",
        "role",
        "content",
        "created_at"
      ],
      "title": "CopilotMessage"
    }
  }
}