{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nerdit-ai/json-schema/nerdit-ai-git-hub-deploy-view-schema.json",
  "title": "GitHubDeployView",
  "description": "What \"Deploy from GitHub\" did, step by step, and what the daemon said next.\n\n``picked`` is whether the repository was *added* to the node's picker by\nthis request (``False`` when it was already picked); ``token`` is the\npush outcome for the repository's installation (``applied`` or\n``unchanged`` — anything else is an error, not a view);\n``auto_deploy_applied`` is whether the ``[deploy] auto_deploy`` write\nlanded — the deploy itself is already registered when it fails, so the\nview says so rather than failing. ``summary``/``hints``/``next_step`` are\nthe daemon's own, passed through the way its CLI and MCP clients show\nthem. ``project_id`` is the daemon's own project id (``prj_…``), read off\nits 201; None from a daemon that predates the project noun.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nerdit-ai-openapi.json#/components/schemas/GitHubDeployView",
  "properties": {
    "operation": {
      "anyOf": [
        {
          "$ref": "#/$defs/ServiceOperationView"
        },
        {
          "type": "null"
        }
      ]
    },
    "node_id": {
      "type": "string",
      "format": "uuid",
      "title": "Node Id"
    },
    "service_name": {
      "type": "string",
      "title": "Service Name"
    },
    "project_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Id"
    },
    "installation_id": {
      "type": "integer",
      "title": "Installation Id"
    },
    "repo_full_name": {
      "type": "string",
      "title": "Repo Full Name"
    },
    "ref": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ref"
    },
    "auto_deploy": {
      "type": "boolean",
      "title": "Auto Deploy"
    },
    "auto_deploy_applied": {
      "type": "boolean",
      "title": "Auto Deploy Applied"
    },
    "picked": {
      "type": "boolean",
      "title": "Picked"
    },
    "token": {
      "type": "string",
      "enum": [
        "applied",
        "unchanged"
      ],
      "title": "Token"
    },
    "summary": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Summary"
    },
    "hints": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Hints"
    },
    "next_step": {
      "anyOf": [
        {
          "$ref": "#/$defs/GitHubDeployNextStep"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "node_id",
    "service_name",
    "installation_id",
    "repo_full_name",
    "ref",
    "auto_deploy",
    "auto_deploy_applied",
    "picked",
    "token",
    "summary",
    "hints",
    "next_step"
  ],
  "$defs": {
    "GitHubDeployNextStep": {
      "properties": {
        "tool": {
          "type": "string",
          "title": "Tool"
        },
        "args": {
          "additionalProperties": true,
          "type": "object",
          "title": "Args"
        },
        "why": {
          "type": "string",
          "title": "Why"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "tool",
        "args",
        "why"
      ],
      "title": "GitHubDeployNextStep",
      "description": "The daemon's machine-shaped \"what now\" (``{tool, args, why}``)."
    },
    "ServiceOperationView": {
      "properties": {
        "identity": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Identity"
        },
        "phase": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phase"
        },
        "action": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Action"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Started At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updated At"
        },
        "failure": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Failure"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "ServiceOperationView",
      "description": "Dated operation metadata; arbitrary errors and output never enter this view."
    }
  }
}