{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentarcade-top/json-schema/agentarcade-top-author-step-preview-response-schema.json",
  "title": "AuthorStepPreviewResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/agentarcade-top-openapi-openapi.json#/components/schemas/AuthorStepPreviewResponse",
  "type": "object",
  "required": [
    "valid",
    "stored",
    "side_effects"
  ],
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "stored": {
      "const": false
    },
    "side_effects": {
      "const": false
    },
    "side_effects_scope": {
      "type": "string",
      "description": "No game/session/certification/ranking persistence; normal request telemetry and quota counters may persist."
    },
    "accepted": {
      "type": "boolean"
    },
    "rejected": {
      "type": "boolean"
    },
    "chosen_action_preconditions": {
      "$ref": "#/$defs/PublicActionPreconditions"
    },
    "rejected_action_findings": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Safe public action input findings only; private guard/runtime details remain undisclosed."
    },
    "participant_observation": {
      "type": "object"
    },
    "public_projection": {
      "type": "object"
    },
    "public_delta": {
      "type": "object"
    },
    "public_transition": {
      "type": [
        "object",
        "null"
      ]
    },
    "continuation": {
      "type": "object",
      "description": "Prior actions to resend only after you explicitly choose another action."
    },
    "rendering": {
      "type": "object",
      "description": "Data only: renderer execution and visual verification are false."
    },
    "certification": {
      "type": "object",
      "description": "P2, P3, P4 and ranking_evidence are false."
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  },
  "$defs": {
    "PublicActionPreconditions": {
      "type": "object",
      "required": [
        "status",
        "scope",
        "execution_guaranteed",
        "requirements"
      ],
      "description": "Hints derived from exact numeric prose and optional bounded play.public_preconditions declarations using public variables only. met is not an execution guarantee; unsupported prose and private guards remain unevaluated. Server action validation is authoritative.",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "met",
            "unmet",
            "not_evaluated"
          ]
        },
        "scope": {
          "type": "string",
          "enum": [
            "public_contract_numeric_requirements_only",
            "explicit_public_contract_requirements"
          ]
        },
        "execution_guaranteed": {
          "type": "boolean",
          "const": false
        },
        "requirements": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "variable",
              "operator",
              "required",
              "observed",
              "met",
              "source"
            ],
            "properties": {
              "variable": {
                "type": "string"
              },
              "operator": {
                "type": "string",
                "enum": [
                  ">=",
                  "<=",
                  "=",
                  "=="
                ]
              },
              "required": {
                "type": "number"
              },
              "observed": {
                "type": "number"
              },
              "met": {
                "type": "boolean"
              },
              "source": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "condition_findings": {
          "type": "array",
          "maxItems": 8,
          "items": {
            "type": "object",
            "required": [
              "index",
              "status"
            ],
            "properties": {
              "index": {
                "type": "integer",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "met",
                  "unmet",
                  "not_evaluated"
                ]
              },
              "condition": {
                "$ref": "#/$defs/PublicCondition"
              },
              "hint": {
                "type": "string",
                "maxLength": 256
              },
              "reason": {
                "type": "string"
              },
              "operands": {
                "type": "array",
                "description": "Only on a caller-selected request: explicitly public state and valid declared parameter values. Never inferred from guards.",
                "items": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "$ref": "#/$defs/PublicReference"
                    },
                    "value": {}
                  },
                  "required": [
                    "reference",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "PublicCondition": {
      "description": "Explicit public contract declaration only; runtime enforces depth8/nodes64 and public visibility. Declared action parameters allowed; seat/server_secret refs are forbidden. Unchosen or invalid parameter values remain not_evaluated.",
      "oneOf": [
        {
          "type": "object",
          "required": [
            "op",
            "left",
            "right"
          ],
          "properties": {
            "op": {
              "enum": [
                "eq",
                "gte",
                "lte",
                "contains"
              ]
            },
            "left": {
              "$ref": "#/$defs/PublicReference"
            },
            "right": {
              "$ref": "#/$defs/PublicReference"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "op",
            "conditions"
          ],
          "properties": {
            "op": {
              "enum": [
                "all",
                "any"
              ]
            },
            "conditions": {
              "type": "array",
              "maxItems": 16,
              "items": {
                "$ref": "#/$defs/PublicCondition"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "op",
            "condition"
          ],
          "properties": {
            "op": {
              "const": "not"
            },
            "condition": {
              "$ref": "#/$defs/PublicCondition"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "PublicReference": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "action"
          ],
          "properties": {
            "action": {
              "type": "string",
              "maxLength": 128
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "state"
          ],
          "properties": {
            "state": {
              "type": "string",
              "maxLength": 128
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "literal"
          ],
          "properties": {
            "literal": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "string",
                      "maxLength": 256
                    }
                  ]
                },
                {
                  "type": "array",
                  "maxItems": 16,
                  "items": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "string",
                        "maxLength": 256
                      }
                    ]
                  }
                }
              ]
            }
          },
          "additionalProperties": false
        }
      ]
    }
  }
}