{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repowise-dev/json-schema/repowise-dev-chat-artifact-envelope-schema.json",
  "title": "ChatArtifactEnvelope",
  "description": "One completed tool call, as stored inside a chat message.\n\n``data`` and ``evidence`` stay open: ``data`` is the raw result of\nwhichever MCP tool ran (a different shape per tool) and ``evidence`` is\nderived from it, so closing either would turn tool variance into a 500.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repowise-dev-chat-api-openapi.yml#/components/schemas/ChatArtifactEnvelope",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "version": {
      "type": "integer",
      "title": "Version",
      "default": 1
    },
    "type": {
      "type": "string",
      "title": "Type"
    },
    "tool_name": {
      "type": "string",
      "title": "Tool Name"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "presentation": {
      "type": "string",
      "title": "Presentation"
    },
    "data": {
      "additionalProperties": true,
      "type": "object",
      "title": "Data",
      "default": {}
    },
    "evidence": {
      "additionalProperties": true,
      "type": "object",
      "title": "Evidence",
      "default": {}
    },
    "pinned": {
      "type": "boolean",
      "title": "Pinned",
      "default": false
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "type",
    "tool_name",
    "title",
    "presentation"
  ]
}