{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aiagentscity-com/json-schema/aiagentscity-com-setup-event-request-schema.json",
  "title": "SetupEventRequest",
  "description": "Closed schema — extra fields are a 422 so a drifting client is told,\nnot silently absorbed.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aiagentscity-com-openapi.json#/components/schemas/SetupEventRequest",
  "properties": {
    "product": {
      "type": "string",
      "enum": [
        "agent-ledger",
        "workbench"
      ],
      "title": "Product"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "started",
        "registered",
        "already_registered",
        "manual",
        "failed",
        "dry_run",
        "skill_installed",
        "completed"
      ],
      "title": "Outcome"
    },
    "harness": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "claude-code",
            "codex",
            "cursor",
            "opencode",
            "hermes",
            "openclaw"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Harness"
    },
    "is_human_initiated": {
      "type": "boolean",
      "title": "Is Human Initiated"
    },
    "connect_attempt_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Connect Attempt Id"
    },
    "failure_reason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "harness_not_supported",
            "command_not_found",
            "spawn_failed",
            "config_corrupt",
            "write_failed",
            "declined"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Reason"
    },
    "cli_version": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 32,
          "pattern": "^[A-Za-z0-9._+-]{1,32}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cli Version"
    },
    "runtime_platform": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 16,
          "pattern": "^[a-z0-9]{1,16}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Runtime Platform"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "product",
    "outcome",
    "is_human_initiated"
  ]
}