{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ishlabs-io/json-schema/ishlabs-io-environment-version-response-schema.json",
  "title": "EnvironmentVersionResponse",
  "description": "A declared variant as the caller sees it.",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ishlabs-io-openapi.json#/components/schemas/EnvironmentVersionResponse",
  "properties": {
    "archived_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Set when the variant is archived. An archived version stays readable and comparable so its stored runs keep resolving, is hidden from the default list, refuses new sessions, and frees its label for reuse.",
      "title": "Archived At"
    },
    "config": {
      "anyOf": [
        {
          "$ref": "#/$defs/StoredEnvironmentConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "This variant's own config, or null when it inherits the environment's. Replaces (never merges with) the environment's."
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "effective_config": {
      "$ref": "#/$defs/StoredEnvironmentConfig",
      "description": "The config a run pinned to this version operates under: this version's `config` when set, otherwise the environment's. Provided so callers never re-implement the replace rule."
    },
    "environment_id": {
      "format": "uuid",
      "title": "Environment Id",
      "type": "string"
    },
    "example_actions": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Example Actions"
    },
    "id": {
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "is_default": {
      "description": "Whether a session that names this environment WITHOUT pinning a version resolves here. At most one live default per environment; an environment with no default resolves unversioned.",
      "title": "Is Default",
      "type": "boolean"
    },
    "label": {
      "title": "Label",
      "type": "string"
    },
    "updated_at": {
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "version": {
      "description": "Monotonic per environment, server-assigned, and never reused, even after the variant is archived.",
      "title": "Version",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "environment_id",
    "version",
    "label",
    "description",
    "config",
    "effective_config",
    "example_actions",
    "is_default",
    "archived_at",
    "created_at",
    "updated_at"
  ],
  "type": "object",
  "$defs": {
    "StoredEnvironmentConfig": {
      "description": "The configuration of an environment as stored, tolerant of unknown keys.\n\nSame fields as the write shape, but a key this client does not know is IGNORED rather than rejected: reads must keep working across server versions, and because a list response parses the whole page, one unfamiliar key would otherwise fail an entire workspace listing rather than its own row. Closed on write, open on read.",
      "properties": {
        "app_artifact": {
          "anyOf": [
            {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "App Artifact"
        },
        "origins": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "maxItems": 50,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Origins"
        },
        "url": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        }
      },
      "title": "StoredEnvironmentConfig",
      "type": "object"
    }
  }
}