{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/everyn-ai/json-schema/everyn-ai-job-spec-detail-response-schema.json",
  "title": "JobSpecDetailResponse",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/everyn-ai-openapi.json#/components/schemas/JobSpecDetailResponse",
  "additionalProperties": false,
  "properties": {
    "canEdit": {
      "title": "Canedit",
      "type": "boolean"
    },
    "canFork": {
      "title": "Canfork",
      "type": "boolean"
    },
    "canRun": {
      "title": "Canrun",
      "type": "boolean"
    },
    "connectionRequirements": {
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/InertConnectionRequirementResponse"
          },
          {
            "$ref": "#/$defs/InertServerRequirementResponse"
          }
        ]
      },
      "title": "Connectionrequirements",
      "type": "array"
    },
    "createdAt": {
      "description": "UTC RFC 3339 timestamp string.",
      "title": "Createdat",
      "type": "string"
    },
    "currentVersionId": {
      "minLength": 1,
      "title": "Currentversionid",
      "type": "string"
    },
    "forkedFromJobSpecVersionId": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Forkedfromjobspecversionid"
    },
    "id": {
      "minLength": 1,
      "title": "Id",
      "type": "string"
    },
    "lastRunAt": {
      "anyOf": [
        {
          "description": "UTC RFC 3339 timestamp string.",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lastrunat"
    },
    "lastRunState": {
      "anyOf": [
        {
          "enum": [
            "draft",
            "queued",
            "running",
            "paused",
            "succeeded",
            "completed_with_flags",
            "failed",
            "canceled"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lastrunstate"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "orgId": {
      "minLength": 1,
      "title": "Orgid",
      "type": "string"
    },
    "owner": {
      "anyOf": [
        {
          "$ref": "#/$defs/JobOwnerResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "runCount": {
      "minimum": 0.0,
      "title": "Runcount",
      "type": "integer"
    },
    "updatedAt": {
      "anyOf": [
        {
          "description": "UTC RFC 3339 timestamp string.",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updatedat"
    },
    "version": {
      "$ref": "#/$defs/JobSpecVersionResponse"
    }
  },
  "required": [
    "id",
    "orgId",
    "name",
    "owner",
    "forkedFromJobSpecVersionId",
    "canEdit",
    "canFork",
    "canRun",
    "connectionRequirements",
    "currentVersionId",
    "version",
    "createdAt",
    "updatedAt",
    "lastRunAt",
    "lastRunState",
    "runCount"
  ],
  "type": "object",
  "$defs": {
    "InertConnectionRequirementResponse": {
      "additionalProperties": false,
      "properties": {
        "requirementKey": {
          "title": "Requirementkey",
          "type": "string"
        },
        "serverLabel": {
          "title": "Serverlabel",
          "type": "string"
        },
        "tools": {
          "items": {
            "$ref": "#/$defs/InertConnectionToolResponse"
          },
          "title": "Tools",
          "type": "array"
        }
      },
      "required": [
        "requirementKey",
        "serverLabel",
        "tools"
      ],
      "title": "InertConnectionRequirementResponse",
      "type": "object"
    },
    "InertConnectionToolResponse": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "schemaFingerprint": {
          "title": "Schemafingerprint",
          "type": "string"
        }
      },
      "required": [
        "name",
        "schemaFingerprint"
      ],
      "title": "InertConnectionToolResponse",
      "type": "object"
    },
    "InertServerRequirementResponse": {
      "additionalProperties": false,
      "properties": {
        "requirementKey": {
          "title": "Requirementkey",
          "type": "string"
        },
        "serverLabel": {
          "title": "Serverlabel",
          "type": "string"
        },
        "toolPolicy": {
          "const": "all_permitted",
          "title": "Toolpolicy",
          "type": "string"
        }
      },
      "required": [
        "requirementKey",
        "serverLabel",
        "toolPolicy"
      ],
      "title": "InertServerRequirementResponse",
      "type": "object"
    },
    "JobOwnerResponse": {
      "additionalProperties": false,
      "properties": {
        "userId": {
          "minLength": 1,
          "title": "Userid",
          "type": "string"
        }
      },
      "required": [
        "userId"
      ],
      "title": "JobOwnerResponse",
      "type": "object"
    },
    "JobSpecVersionResponse": {
      "additionalProperties": false,
      "properties": {
        "createdAt": {
          "description": "UTC RFC 3339 timestamp string.",
          "title": "Createdat",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "type": "string"
        },
        "id": {
          "minLength": 1,
          "title": "Id",
          "type": "string"
        },
        "jobSpecId": {
          "minLength": 1,
          "title": "Jobspecid",
          "type": "string"
        },
        "mcpCreation": {
          "anyOf": [
            {
              "$ref": "#/$defs/McpCreationResponse"
            },
            {
              "type": "null"
            }
          ]
        },
        "mode": {
          "title": "Mode",
          "type": "string"
        },
        "model": {
          "title": "Model",
          "type": "string"
        },
        "modelVersionId": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Modelversionid"
        },
        "outputSchema": {
          "additionalProperties": true,
          "title": "Outputschema",
          "type": "object"
        },
        "prompt": {
          "title": "Prompt",
          "type": "string"
        },
        "toolsets": {
          "items": {
            "type": "string"
          },
          "title": "Toolsets",
          "type": "array"
        },
        "version": {
          "title": "Version",
          "type": "integer"
        }
      },
      "required": [
        "id",
        "jobSpecId",
        "version",
        "description",
        "mode",
        "prompt",
        "model",
        "modelVersionId",
        "outputSchema",
        "toolsets",
        "createdAt"
      ],
      "title": "JobSpecVersionResponse",
      "type": "object"
    },
    "McpCreationResponse": {
      "additionalProperties": false,
      "description": "Smallest safe MCP attribution for product reads.\n\nServer-derived only. Omits grant id, actor id, organization id, role,\nscopes, tokens, and raw OAuth identifiers.",
      "properties": {
        "channel": {
          "const": "mcp",
          "title": "Channel",
          "type": "string"
        },
        "clientId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Clientid"
        },
        "principalType": {
          "enum": [
            "workos_jwt",
            "api_key"
          ],
          "title": "Principaltype",
          "type": "string"
        }
      },
      "required": [
        "channel",
        "principalType"
      ],
      "title": "McpCreationResponse",
      "type": "object"
    }
  }
}