{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nerdit-ai/json-schema/nerdit-ai-node-service-view-schema.json",
  "title": "NodeServiceView",
  "description": "One service as the node describes it, with nothing added and nothing kept.\n\nEvery field is the daemon's own, read defensively off its\n``ServiceResponse``. What is deliberately *absent* is as load-bearing as\nwhat is here: no logs and no resource numbers (plan §1 defers both, with\nreasons), and no owner token — ``manageable`` is a boolean precisely so the\nconsole never learns *whose* a service is (D-NC5).",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nerdit-ai-openapi.json#/components/schemas/NodeServiceView",
  "properties": {
    "operation": {
      "anyOf": [
        {
          "$ref": "#/$defs/ServiceOperationView"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "service": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Service"
    },
    "project_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Id"
    },
    "kind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kind"
    },
    "status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    },
    "image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Url"
    },
    "last_deploy_phase": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Deploy Phase"
    },
    "last_deploy_action": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Deploy Action"
    },
    "source_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Type"
    },
    "source_repo": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Repo"
    },
    "source_ref": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Ref"
    },
    "manageable": {
      "type": "boolean",
      "title": "Manageable"
    },
    "rollback_available": {
      "type": "boolean",
      "title": "Rollback Available"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "name",
    "kind",
    "status",
    "image",
    "url",
    "last_deploy_phase",
    "last_deploy_action",
    "source_type",
    "source_repo",
    "source_ref",
    "manageable",
    "rollback_available"
  ],
  "$defs": {
    "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."
    }
  }
}