{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ishlabs-io/json-schema/ishlabs-io-environment-response-schema.json",
  "title": "EnvironmentResponse",
  "description": "A registered environment 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/EnvironmentResponse",
  "properties": {
    "address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Normalized target identity derived from `config` (scheme, host and path only). A duplicate-registration guard, NOT the environment's identity, since sessions always reference the id.",
      "title": "Address"
    },
    "archived_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Set when the environment is archived (DELETE). An archived environment stays readable by id so existing sessions keep resolving, is hidden from the default list, and frees its name for reuse.",
      "title": "Archived At"
    },
    "config": {
      "$ref": "#/$defs/StoredEnvironmentConfig"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "example_actions": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Example Actions",
      "type": "array"
    },
    "hosting": {
      "description": "Who computes the next observation for this environment. Derived from kind and config, never client-set. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.",
      "title": "Hosting",
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "kind": {
      "description": "What kind of surface this is. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.",
      "title": "Kind",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "observation_retention": {
      "description": "How long sessions on this environment keep their observation frames: `none`, `30d`, `90d`, or `indefinite`. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.",
      "title": "Observation Retention",
      "type": "string"
    },
    "operating_notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Operating Notes"
    },
    "revision": {
      "description": "Increments on every write to this environment's identity or configuration. Usage is aggregated by (id, revision), so a run reports against the configuration it actually ran on. Archiving does not change it.",
      "title": "Revision",
      "type": "integer"
    },
    "slug": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Slug"
    },
    "updated_at": {
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "workspace_id": {
      "format": "uuid",
      "title": "Workspace Id",
      "type": "string"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "name",
    "kind",
    "slug",
    "config",
    "operating_notes",
    "observation_retention",
    "example_actions",
    "hosting",
    "address",
    "revision",
    "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"
    }
  }
}