{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antfly/json-schema/antfly-resolver-summary-schema.json",
  "title": "ResolverSummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antfly-resolver-curation-api-openapi.yml#/components/schemas/ResolverSummary",
  "type": "object",
  "required": [
    "name",
    "source_table",
    "entity_table",
    "declaring_indexes",
    "retired",
    "revision",
    "redirects",
    "curation"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "source_table": {
      "type": "string"
    },
    "entity_table": {
      "type": "string"
    },
    "key_template": {
      "type": "string"
    },
    "declaring_indexes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "retired": {
      "type": "boolean"
    },
    "config": {
      "allOf": [
        {
          "$ref": "#/$defs/GraphResolverConfig"
        }
      ]
    },
    "revision": {
      "type": "integer",
      "format": "uint64"
    },
    "namespace_generation": {
      "type": "integer",
      "format": "uint64"
    },
    "redirects": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResolverRedirect"
      }
    },
    "curation": {
      "$ref": "#/$defs/ResolverCurationState"
    },
    "progress": {
      "$ref": "#/$defs/ResolverReplayProgress"
    }
  },
  "$defs": {
    "AntflyGeneratorConfig": {
      "type": "object",
      "description": "Configuration for the Antfly inference generative AI provider.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "antfly"
          ]
        },
        "model": {
          "type": "string",
          "description": "The name of the generator model."
        },
        "api_url": {
          "type": "string",
          "format": "uri",
          "description": "The URL of the Inference API endpoint. Can also be set via ANTFLY_INFERENCE_URL environment variable."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-2.0).",
          "minimum": 0.0,
          "maximum": 2.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter.",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "top_k": {
          "type": "integer",
          "description": "Top-k sampling parameter."
        },
        "timeout": {
          "type": "integer",
          "description": "HTTP response timeout in seconds for Inference API calls.",
          "minimum": 1
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "AnthropicGeneratorConfig": {
      "type": "object",
      "description": "Configuration for the Anthropic generative AI provider.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "anthropic"
          ]
        },
        "workspace_id": {
          "type": "string",
          "description": "Anthropic workspace for keys not scoped to a workspace. Defaults to ANTHROPIC_WORKSPACE_ID."
        },
        "model": {
          "type": "string",
          "description": "The full model ID of the Anthropic model to use.",
          "default": "claude-sonnet-4-5-20250929"
        },
        "api_key": {
          "type": "string",
          "writeOnly": true,
          "description": "Anthropic API key or secret reference. Defaults to ANTHROPIC_API_KEY."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Messages API base URL. Defaults to https://api.anthropic.com/v1."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-1.0).",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate in the response."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter (0.0-1.0).",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "top_k": {
          "type": "integer",
          "description": "Top-k sampling parameter."
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "AppleGeneratorConfig": {
      "type": "object",
      "description": "On-device Apple Foundation Models generation. Requires a macOS Apple provider build, Apple Intelligence enabled, and its system model ready. Supports text conversations; tool calling and media attachments are not supported.",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "apple"
          ]
        },
        "max_tokens": {
          "type": "integer",
          "minimum": 1,
          "default": 256
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        }
      }
    },
    "BedrockGeneratorConfig": {
      "type": "object",
      "description": "AWS Bedrock Converse generation, including image inputs and tools for\nmodels that support them. Uses the AWS default credential chain unless\nan explicit Bedrock API key is configured. Image capability is declared\nper target through inference_capabilities; model IDs are not allowlisted.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "bedrock"
          ]
        },
        "url": {
          "type": "string",
          "description": "Optional Bedrock Runtime endpoint override. Defaults to the regional AWS endpoint."
        },
        "api_key": {
          "type": "string",
          "description": "Optional Bedrock bearer API key or secret reference. Omit to use signed AWS requests and the default credential chain."
        },
        "model": {
          "type": "string",
          "description": "The Bedrock model ID to use."
        },
        "region": {
          "type": "string",
          "description": "AWS region. Defaults to AWS_REGION, then AWS_DEFAULT_REGION, then us-east-1."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-1.0).",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter.",
          "minimum": 0.0,
          "maximum": 1.0
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "ChatGPTGeneratorConfig": {
      "type": "object",
      "description": "Personal ChatGPT plan for interactive generation. Credentials stay in the local runtime.",
      "required": [
        "provider",
        "model",
        "connection_id"
      ],
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "chatgpt"
          ]
        },
        "reasoning_effort": {
          "$ref": "#/$defs/OpenAIReasoningEffort"
        },
        "model": {
          "type": "string"
        },
        "connection_id": {
          "type": "string",
          "description": "Opaque personal registration owned by the authenticated caller."
        }
      }
    },
    "ChoiceDecisionQuestion": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "instructions",
        "choices"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "choice"
          ]
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "instructions": {
          "type": "string",
          "minLength": 1
        },
        "choices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DecisionChoice"
          },
          "minItems": 2,
          "maxItems": 64
        },
        "embedding_options": {
          "$ref": "#/$defs/EmbeddingDecisionAcceptance"
        }
      }
    },
    "CloudflareGeneratorConfig": {
      "type": "object",
      "description": "Cloudflare Workers AI generation. Uses CLOUDFLARE_API_TOKEN or an Antfly secret reference.",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "cloudflare"
          ]
        },
        "account_id": {
          "type": "string",
          "minLength": 1
        },
        "gateway_id": {
          "type": "string",
          "minLength": 1,
          "description": "Optional AI Gateway ID, sent through cf-aig-gateway-id."
        },
        "model": {
          "type": "string",
          "default": "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
        },
        "api_key": {
          "type": "string",
          "writeOnly": true
        },
        "url": {
          "type": "string",
          "description": "Optional deployment-owned endpoint override."
        },
        "max_tokens": {
          "type": "integer",
          "minimum": 1
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "minimum": 0,
          "maximum": 2
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "minimum": 0,
          "maximum": 1
        },
        "frequency_penalty": {
          "type": "number",
          "format": "float",
          "minimum": -2,
          "maximum": 2
        },
        "presence_penalty": {
          "type": "number",
          "format": "float",
          "minimum": -2,
          "maximum": 2
        }
      },
      "required": [
        "provider",
        "account_id",
        "model"
      ]
    },
    "ConstrainedGenerationBatch": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "max_items_per_call": {
          "type": "integer",
          "minimum": 1,
          "maximum": 256,
          "default": 8
        },
        "max_input_bytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4194304,
          "default": 65536
        }
      }
    },
    "ConstrainedOutput": {
      "type": "string",
      "enum": [
        "auto",
        "tool_call",
        "json_schema",
        "grammar"
      ],
      "default": "auto",
      "description": "Provider and model admission selects a supported constrained mechanism. Auto prefers forced tools, then provider JSON schema, then native grammar. Free-text parsing is not a mode."
    },
    "ConstrainedProbabilities": {
      "type": "string",
      "enum": [
        "token_logprobs",
        "verdict_only"
      ],
      "default": "token_logprobs",
      "description": "Token probabilities require complete decoder evidence for the allowed values. Verdict-only is explicit opt-in; model-reported confidence is never used."
    },
    "CurationOrigin": {
      "type": "object",
      "description": "Server-owned provenance. Clients supply actor and reason on writes. Zero time/revision denote legacy records whose creation is unknown.",
      "properties": {
        "origin": {
          "type": "string",
          "enum": [
            "manual",
            "adjudicator",
            "review",
            "cascade",
            "config"
          ]
        },
        "actor": {
          "type": "string",
          "maxLength": 256,
          "description": "UTF-8 client attribution, limited to 256 bytes."
        },
        "reason": {
          "type": "string",
          "maxLength": 4096,
          "description": "UTF-8 explanation, limited to 4096 bytes."
        },
        "created_at_ms": {
          "type": "integer",
          "format": "uint64"
        },
        "revision": {
          "type": "integer",
          "format": "uint64"
        },
        "proposal_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "cascade_from": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "CurationSuppressionEntry": {
      "type": "object",
      "required": [
        "key",
        "origin"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "origin": {
          "$ref": "#/$defs/CurationOrigin"
        }
      }
    },
    "DeciderConfig": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "antfly",
            "jev",
            "openai",
            "cloudflare"
          ]
        },
        "decision_method": {
          "type": "string",
          "enum": [
            "typed",
            "embedding_similarity",
            "generated"
          ],
          "default": "typed",
          "description": "Explicit result contract. embedding_similarity is available with Antfly EmbeddingGemma 2 choice and multi_choice questions; rejects score and predicate requests and returns raw cosine similarities."
        },
        "generator": {
          "$ref": "#/$defs/GeneratorConfig",
          "description": "Required with decision_method=generated. Provider configuration belongs here rather than in the outer typed-decider fields."
        },
        "instructions": {
          "type": "string",
          "maxLength": 65536
        },
        "output": {
          "$ref": "#/$defs/ConstrainedOutput"
        },
        "probabilities": {
          "$ref": "#/$defs/ConstrainedProbabilities"
        },
        "batch": {
          "$ref": "#/$defs/ConstrainedGenerationBatch"
        },
        "model": {
          "type": "string",
          "description": "Required for Antfly, OpenAI, and Cloudflare; Jev defaults to jev-latest. Cloudflare uses @cf/cloudflare/clef or @cf/cloudflare/clef-flash."
        },
        "account_id": {
          "type": "string",
          "description": "Required with the cloudflare provider; Workers AI account identifier."
        },
        "gateway_id": {
          "type": "string",
          "description": "Optional Cloudflare AI Gateway identifier."
        },
        "model_identity": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "description": "Pin the exact EmbeddingGemma 2 assets and recipe. Requires embedding_similarity."
        },
        "embedder": {
          "type": "string",
          "minLength": 1,
          "description": "Named dense embedder for provider-neutral embedding_similarity routing. Specify matching embedding_options.dimensions. Native fitted calibrations require the original Antfly model path; hosted routes use explicit thresholds and estimated token admission."
        },
        "embedding_options": {
          "type": "object",
          "additionalProperties": false,
          "description": "Geometry and acceptance defaults for embedding_similarity decisions. Named embedders require dimensions matching their configured dense output. Direct Antfly model routes support EmbeddingGemma 2 dimensions and fitted calibrations. Acceptance is serialized onto each question and can be overridden per question. Raw cosine similarities never represent probabilities.",
          "properties": {
            "calibration_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "description": "Qualified fitted raw thresholds in model/calibrations/{id}.json. Bound to the exact asset identity, task, renderer, dimensions and category prototypes; mutually exclusive with manual thresholds. Does not produce probabilities."
            },
            "task_type": {
              "type": "string",
              "enum": [
                "CLUSTERING",
                "CLASSIFICATION"
              ],
              "default": "CLUSTERING"
            },
            "dimensions": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535,
              "default": 768,
              "description": "Must match the named embedder's configured dimensions. Without embedder, the direct EmbeddingGemma 2 route accepts only 768, 512, 256 or 128."
            },
            "min_similarity": {
              "type": "number",
              "minimum": -1,
              "maximum": 1
            },
            "min_margin": {
              "type": "number",
              "minimum": 0,
              "maximum": 2
            }
          }
        },
        "url": {
          "type": "string",
          "description": "Provider base URL; endpoint path is selected by provider. OpenAI defaults to https://api.openai.com/v1 and appends /decisions."
        },
        "api_key": {
          "type": "string",
          "description": "API key or secret reference. Defaults to the provider environment variable."
        },
        "max_rows": {
          "type": "integer",
          "minimum": 1,
          "default": 10000
        },
        "max_input_tokens": {
          "type": "integer",
          "minimum": 1,
          "default": 1000000
        },
        "max_image_input_tokens": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "description": "Provider/model upper bound on the input-token contribution of one image. Required when sending images through typed hosted or generated deciders, including native generators and image URLs. The runtime reserves this allowance per image in addition to serialized non-image request bytes; actual usage can add shared quota debt. Generated deciders apply the allowance to the selected generator's shared quota. Omit for text-only deciders."
        },
        "rate_limit": {
          "$ref": "#/$defs/RateLimitConfig"
        },
        "batch_size": {
          "type": "integer",
          "minimum": 1,
          "maximum": 256,
          "default": 32
        }
      }
    },
    "DecisionChoice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string",
          "minLength": 1
        }
      },
      "description": "Local decision models use string choice identifiers. Embedding category examples replace the description with their normalized centroid; trained models reject examples."
    },
    "EmbeddingDecisionAcceptance": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "calibration_id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,64}$",
          "description": "Public API identifier for a server-side fitted threshold artifact at model/calibrations/{id}.json. The server verifies qualification and the exact asset identity, prompt profile, dimensions, renderer and this question's label/prototype set. Mutually exclusive with manual thresholds; never produces probabilities."
        },
        "min_similarity": {
          "type": "number",
          "minimum": -1,
          "maximum": 1,
          "description": "For a single choice, abstain when the highest cosine similarity is below this value. It is a similarity threshold, not an accuracy or probability estimate."
        },
        "min_margin": {
          "type": "number",
          "minimum": 0,
          "maximum": 2,
          "description": "For a single choice, require this gap between the highest and second-highest cosine similarities. For multi_choice, require every score to be at least this distance from its own selection threshold; otherwise abstain."
        }
      },
      "description": "Question-specific acceptance policy for embedding similarity. Trained decision models reject it."
    },
    "GeneratorConfig": {
      "description": "A unified configuration for a generative AI provider.\n",
      "allOf": [
        {
          "oneOf": [
            {
              "$ref": "#/$defs/CloudflareGeneratorConfig"
            },
            {
              "$ref": "#/$defs/GoogleGeneratorConfig"
            },
            {
              "$ref": "#/$defs/VertexGeneratorConfig"
            },
            {
              "$ref": "#/$defs/BedrockGeneratorConfig"
            },
            {
              "$ref": "#/$defs/AnthropicGeneratorConfig"
            },
            {
              "$ref": "#/$defs/OllamaGeneratorConfig"
            },
            {
              "$ref": "#/$defs/AntflyGeneratorConfig"
            },
            {
              "$ref": "#/$defs/ChatGPTGeneratorConfig"
            },
            {
              "$ref": "#/$defs/OpenAIGeneratorConfig"
            },
            {
              "$ref": "#/$defs/OpenRouterGeneratorConfig"
            },
            {
              "$ref": "#/$defs/AppleGeneratorConfig"
            }
          ]
        },
        {
          "properties": {
            "max_image_input_tokens": {
              "x-go-type-skip-optional-pointer": false,
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "description": "Conservative input-token ceiling per image. Required for image calls when tokens_per_minute is configured; choose a bound valid for the model and image policy."
            },
            "rate_limit": {
              "x-go-type-skip-optional-pointer": false,
              "$ref": "#/$defs/RateLimitConfig"
            },
            "provider": {
              "$ref": "#/$defs/GeneratorProvider"
            }
          },
          "required": [
            "provider"
          ]
        }
      ]
    },
    "GeneratorProvider": {
      "type": "string",
      "enum": [
        "cloudflare",
        "gemini",
        "vertex",
        "bedrock",
        "anthropic",
        "ollama",
        "openai",
        "chatgpt",
        "openrouter",
        "antfly",
        "apple"
      ],
      "description": "Generator providers implemented by Antfly's generation runtime."
    },
    "GoogleGeneratorConfig": {
      "type": "object",
      "description": "Configuration for the Google generative AI provider (Gemini).\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "gemini"
          ]
        },
        "project_id": {
          "type": "string",
          "description": "The Google Cloud project ID."
        },
        "location": {
          "type": "string",
          "description": "The Google Cloud location (e.g., 'us-central1')."
        },
        "model": {
          "type": "string",
          "description": "The name of the generative model to use.",
          "default": "gemini-2.5-flash"
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-2.0).",
          "minimum": 0.0,
          "maximum": 2.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter.",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "top_k": {
          "type": "integer",
          "description": "Top-k sampling parameter."
        },
        "api_key": {
          "type": "string",
          "writeOnly": true,
          "description": "The Google API key."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL of the Google API endpoint."
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "GraphResolverAdjudicationAcceptance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "choice",
        "min_probability"
      ],
      "properties": {
        "choice": {
          "type": "string",
          "minLength": 1,
          "description": "A choice identifier in the configured question. Accept and reject must differ."
        },
        "min_probability": {
          "type": "number",
          "minimum": 0.5,
          "maximum": 1,
          "description": "Require this typed probability and a strict majority. Raw cosine is not a probability."
        }
      }
    },
    "GraphResolverAdjudicationConfig": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "decider",
        "template",
        "question",
        "accept"
      ],
      "description": "Adjudicate the best deterministic REVIEW candidate with a typed decision. MATCH and NO_MATCH bypass the model. Evidence is authoritative resolution data, retained independently of work caches and reused on recovery. Changes trigger versioned re-resolution. This resolves mentions, not global key merges.",
      "properties": {
        "decider": {
          "$ref": "#/$defs/DeciderConfig",
          "description": "Frozen typed or generated decider configuration. Generated verdict-only thresholds must be zero or one."
        },
        "template": {
          "type": "string",
          "minLength": 1,
          "maxLength": 65536,
          "description": "Bounded interpolation of m.text, m.surface_form, m.canonical_text, m.label, m.description, c.canonical_name, c.label and c.description. Missing descriptions render empty text, allowing name-only decisions."
        },
        "question": {
          "$ref": "#/$defs/ChoiceDecisionQuestion"
        },
        "accept": {
          "$ref": "#/$defs/GraphResolverAdjudicationAcceptance"
        },
        "reject": {
          "$ref": "#/$defs/GraphResolverAdjudicationAcceptance",
          "description": "Optional confident negative choice. Without it, non-acceptance stays REVIEW."
        },
        "on_failure": {
          "type": "string",
          "enum": [
            "review",
            "mint"
          ],
          "default": "review",
          "description": "Failure or budget fallback. REVIEW remains unpromoted; mint explicitly permits a new identity."
        },
        "description_inputs": {
          "type": "object",
          "additionalProperties": false,
          "description": "Optional asset bindings. Resolution reads available data without waiting for promotion or producers.",
          "properties": {
            "mention_artifact": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Source-document asset containing a JSON object mapping local mention ids to description strings. Publication re-drives asset-scoped resolution."
            },
            "candidate_artifact": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Candidate-document text asset, such as a generated summary. Changes affect future decisions; explicitly re-resolve to revisit committed evidence."
            }
          }
        },
        "budget_ms": {
          "type": "integer",
          "minimum": 1,
          "maximum": 300000,
          "default": 10000,
          "description": "Total model-time budget per source artifact. Each call also obeys timeout_ms."
        },
        "max_pairs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 256,
          "default": 32
        },
        "max_input_bytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1048576,
          "default": 16384
        },
        "timeout_ms": {
          "type": "integer",
          "minimum": 1,
          "maximum": 300000,
          "default": 10000
        }
      }
    },
    "GraphResolverConfig": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "table",
        "source_artifact",
        "resolution_artifact",
        "key_template"
      ],
      "description": "Versioned entity resolver attached to an artifact-backed graph index.",
      "properties": {
        "name": {
          "type": "string"
        },
        "table": {
          "type": "string"
        },
        "source_artifact": {
          "type": "string"
        },
        "source_artifact_kind": {
          "type": "string",
          "enum": [
            "asset",
            "chunk",
            "any"
          ],
          "default": "asset"
        },
        "resolution_artifact": {
          "type": "string"
        },
        "key_template": {
          "type": "string"
        },
        "promote": {
          "type": "boolean",
          "default": true,
          "x-go-type-skip-optional-pointer": false,
          "description": "Materialize canonical entity documents. False resolves graph keys without promotion."
        },
        "aliases": {
          "type": "array",
          "description": "Explicit redirects between fully rendered keys in this resolver's table; no entity documents required. Changes trigger corpus re-resolution.",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "key",
              "target"
            ],
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1
              },
              "target": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Mention labels this resolver consumes; empty consumes every label (catch-all). Labeled resolvers sharing a source artifact must claim disjoint label sets, and every catch-all on that artifact skips the labels claimed by labeled siblings, so extraction labels stay open-vocabulary while each mention routes to exactly one labeled resolver (label-routed tables, e.g. event mentions to an events table)."
        },
        "type_must_match": {
          "type": "boolean",
          "default": true
        },
        "scorer": {
          "$ref": "#/$defs/GraphResolverScorerConfig",
          "description": "Typed matcher scorer. Cannot be combined with scorer_json."
        },
        "adjudicate": {
          "$ref": "#/$defs/GraphResolverAdjudicationConfig"
        },
        "suppress": {
          "$ref": "#/$defs/GraphResolverSuppressionConfig"
        },
        "scorer_json": {
          "type": "string",
          "deprecated": true,
          "x-deprecated-reason": "Use the scorer field."
        },
        "candidate_search": {
          "type": "string",
          "enum": [
            "",
            "exact_key",
            "prefix",
            "ann"
          ]
        },
        "candidate_ann_index": {
          "type": "string"
        },
        "candidate_limit": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "name_embedding": {
          "type": "string"
        },
        "name_embedding_dims": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "fusion_combine": {
          "type": "string",
          "enum": [
            "",
            "noisy_or",
            "max",
            "mean"
          ]
        },
        "fusion_trust": {
          "type": "number",
          "format": "double",
          "minimum": 0,
          "maximum": 1
        },
        "fusion_prior": {
          "type": "number",
          "format": "double",
          "minimum": 0,
          "maximum": 1
        },
        "fusion_prior_weight": {
          "type": "number",
          "format": "double",
          "minimum": 0
        },
        "min_confidence": {
          "x-go-type-skip-optional-pointer": false,
          "type": "number",
          "format": "double",
          "minimum": 0,
          "maximum": 1,
          "description": "Mention admission floor: mentions whose extractor-asserted confidence is below this are never resolved — no canonical entity key, no mention edge, and relation endpoints referencing them are withheld. The cheap post-extraction junk filter for score-carrying extractors; omission defaults to 0 for trained extractors. Resolvers consuming verdict-only generated extraction must set this field explicitly, including when the chosen floor is zero."
        },
        "config_generation": {
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        }
      }
    },
    "GraphResolverScorerComparison": {
      "type": "object",
      "required": [
        "name",
        "left",
        "right",
        "levels"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string"
        },
        "left": {
          "type": "string"
        },
        "right": {
          "type": "string"
        },
        "levels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GraphResolverScorerLevel"
          }
        }
      }
    },
    "GraphResolverScorerConfig": {
      "type": "object",
      "required": [
        "comparisons"
      ],
      "additionalProperties": false,
      "properties": {
        "comparisons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GraphResolverScorerComparison"
          }
        },
        "combine": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "bias": {
              "type": "number",
              "format": "double"
            }
          }
        },
        "decision": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "match": {
              "type": "number",
              "format": "double"
            },
            "review": {
              "type": "number",
              "format": "double"
            }
          }
        }
      }
    },
    "GraphResolverScorerLevel": {
      "type": "object",
      "required": [
        "weight"
      ],
      "additionalProperties": false,
      "properties": {
        "when": {
          "type": "string",
          "description": "Matcher condition, such as 'exact' or 'jaro_winkler >= 0.9'."
        },
        "else": {
          "type": "boolean",
          "description": "Catch-all level when no previous condition matched."
        },
        "weight": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "GraphResolverSuppressionConfig": {
      "type": "object",
      "additionalProperties": false,
      "description": "Suppress mentions before candidate search, embedding, adjudication and promotion. Suppressed mentions remain explainable in resolution artifacts and contribute no canonical graph edges. Changes use the normal resolver generation and bounded backfill lifecycle. Redirects to suppressed keys are rejected. Runtime suppressions are additive and outlive index versions.",
      "properties": {
        "keys": {
          "type": "array",
          "maxItems": 100000,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "description": "Exact rendered canonical keys in this resolver namespace."
        },
        "texts": {
          "type": "array",
          "maxItems": 100000,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "description": "Mention texts normalized with the resolver Unicode slug rules."
        },
        "min_text_chars": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "default": 0,
          "description": "Minimum Unicode scalar count after trimming surrounding ASCII whitespace."
        }
      }
    },
    "OllamaGeneratorConfig": {
      "type": "object",
      "description": "Configuration for the Ollama generative AI provider.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "ollama"
          ]
        },
        "model": {
          "type": "string",
          "description": "The name of the Ollama model to use."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL of the Ollama API endpoint."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-2.0).",
          "minimum": 0.0,
          "maximum": 2.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter.",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "top_k": {
          "type": "integer",
          "description": "Top-k sampling parameter."
        },
        "timeout": {
          "type": "integer",
          "description": "HTTP response timeout in seconds for Ollama API calls.",
          "minimum": 1
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "OpenAIGeneratorConfig": {
      "type": "object",
      "description": "Configuration for the OpenAI generative AI provider.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "openai"
          ]
        },
        "model": {
          "type": "string",
          "description": "The name of the OpenAI model to use.",
          "default": "gpt-4.1"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL of the OpenAI API endpoint."
        },
        "api_key": {
          "type": "string",
          "writeOnly": true,
          "description": "The OpenAI API key."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-2.0).",
          "minimum": 0.0,
          "maximum": 2.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate."
        },
        "max_completion_tokens": {
          "type": "integer",
          "minimum": 1,
          "description": "OpenAI completion budget, including visible output and reasoning tokens.\nUse for reasoning models instead of max_tokens; the two are mutually exclusive.\n"
        },
        "reasoning_effort": {
          "$ref": "#/$defs/OpenAIReasoningEffort",
          "description": "Optional reasoning effort. Supported values depend on the selected OpenAI model."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter.",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "frequency_penalty": {
          "type": "number",
          "format": "float",
          "description": "Penalty for token frequency (-2.0 to 2.0).",
          "minimum": -2.0,
          "maximum": 2.0
        },
        "presence_penalty": {
          "type": "number",
          "format": "float",
          "description": "Penalty for token presence (-2.0 to 2.0).",
          "minimum": -2.0,
          "maximum": 2.0
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "OpenAIReasoningEffort": {
      "type": "string",
      "enum": [
        "none",
        "minimal",
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ],
      "description": "OpenAI reasoning effort; model support varies. Omit to use the model default."
    },
    "OpenRouterGeneratorConfig": {
      "type": "object",
      "description": "Configuration for the OpenRouter generative AI provider.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "openrouter"
          ]
        },
        "model": {
          "type": "string",
          "description": "The OpenRouter model identifier to use."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL of the OpenRouter API endpoint.",
          "default": "https://openrouter.ai/api/v1"
        },
        "api_key": {
          "type": "string",
          "writeOnly": true,
          "description": "The OpenRouter API key."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-2.0).",
          "minimum": 0.0,
          "maximum": 2.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate in the response."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter (0.0-1.0).",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "frequency_penalty": {
          "type": "number",
          "format": "float",
          "description": "Penalty for token frequency (-2.0 to 2.0).",
          "minimum": -2.0,
          "maximum": 2.0
        },
        "presence_penalty": {
          "type": "number",
          "format": "float",
          "description": "Penalty for token presence (-2.0 to 2.0).",
          "minimum": -2.0,
          "maximum": 2.0
        }
      },
      "required": [
        "provider",
        "model"
      ]
    },
    "RateLimitConfig": {
      "type": "object",
      "x-go-type-skip-optional-pointer": false,
      "additionalProperties": false,
      "description": "Outbound provider limits shared within one Antfly process by effective\nendpoint, operation, model, credential source, project and region/location.\nConflicting policies for an active scope are rejected. These limits do\nnot coordinate across replicas or infer the provider's account quota.\n",
      "properties": {
        "pacing": {
          "$ref": "#/$defs/RequestPacing",
          "description": "Request pacing mode. Defaults to token_bucket. Legacy flat embedder RPM with burst=1 uses completion pacing."
        },
        "requests_per_minute": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "maximum": 4294967295
        },
        "burst": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "maximum": 4294967295,
          "default": 1
        },
        "tokens_per_minute": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "description": "Conservative text budget: each HTTP attempt reserves its serialized\nUTF-8 body byte count plus the configured generation output cap.\nReservations are not refunded. A request larger than this budget\nis rejected. This is not provider billing token accounting; media\nrequests are not supported with this limit.\n"
        },
        "max_concurrency": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "maximum": 4294967295,
          "description": "Maximum in-flight HTTP attempts, held through response completion."
        }
      }
    },
    "RequestPacing": {
      "type": "string",
      "enum": [
        "token_bucket",
        "completion"
      ],
      "description": "token_bucket limits admission rate while allowing overlapping attempts.\ncompletion serializes attempts and waits one RPM interval after each\nattempt finishes, including streamed writes and transport failures.\nThis prevents delayed connection setup from compressing successful\nrequest spacing, at the cost of response latency plus one interval per\nrequest. Requires requests_per_minute and burst=1. Neither mode can\nguarantee zero upstream 429s or coordinate other processes.\n"
    },
    "ResolverCurationState": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "enum": [
            1
          ]
        },
        "suppress": {
          "$ref": "#/$defs/RuntimeResolverSuppression"
        },
        "distinct": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResolverDistinctPair"
          }
        },
        "removed_aliases": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Explicitly restored identities; declarative aliases and promotion tombstones cannot recreate the removed redirect."
        }
      }
    },
    "ResolverDistinctPair": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "origin": {
          "$ref": "#/$defs/CurationOrigin"
        }
      }
    },
    "ResolverGroupProgress": {
      "type": "object",
      "required": [
        "group_id",
        "available",
        "fresh",
        "curation_revision",
        "config_generation",
        "effective_generation",
        "backfill_pending",
        "resolution",
        "promotion"
      ],
      "properties": {
        "group_id": {
          "type": "integer",
          "format": "uint64"
        },
        "available": {
          "type": "boolean"
        },
        "fresh": {
          "type": "boolean"
        },
        "curation_revision": {
          "type": "integer",
          "format": "uint64"
        },
        "config_generation": {
          "type": "integer",
          "format": "uint64"
        },
        "effective_generation": {
          "type": "integer",
          "format": "uint64"
        },
        "backfill_pending": {
          "type": "boolean"
        },
        "resolution": {
          "$ref": "#/$defs/ResolverReplayStage"
        },
        "promotion": {
          "$ref": "#/$defs/ResolverReplayStage"
        }
      }
    },
    "ResolverRedirect": {
      "type": "object",
      "required": [
        "key",
        "target"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "origin": {
          "$ref": "#/$defs/CurationOrigin"
        }
      }
    },
    "ResolverReplayProgress": {
      "type": "object",
      "required": [
        "applied",
        "shards"
      ],
      "properties": {
        "applied": {
          "type": "boolean"
        },
        "shards": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResolverGroupProgress"
          }
        },
        "observation_error": {
          "type": "string",
          "description": "Progress observation failure after acceptance; the metadata commit remains valid and applied is false."
        }
      }
    },
    "ResolverReplayStage": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "target_sequence": {
          "type": "integer",
          "format": "uint64"
        },
        "applied_sequence": {
          "type": "integer",
          "format": "uint64"
        },
        "catch_up_required": {
          "type": "boolean"
        },
        "blocked": {
          "type": "boolean"
        },
        "blocked_reason": {
          "type": "string"
        },
        "error_count": {
          "type": "integer",
          "format": "uint64"
        }
      }
    },
    "RuntimeResolverSuppression": {
      "type": "object",
      "properties": {
        "keys": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "texts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "min_text_chars": {
          "type": "integer",
          "format": "uint32"
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CurationSuppressionEntry"
          }
        },
        "text_entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CurationSuppressionEntry"
          }
        }
      }
    },
    "VertexGeneratorConfig": {
      "type": "object",
      "description": "Configuration for Google Cloud Vertex AI generative models.\n",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "vertex"
          ]
        },
        "model": {
          "type": "string",
          "description": "The name of the Vertex AI model to use.",
          "default": "gemini-2.5-flash"
        },
        "project_id": {
          "type": "string",
          "description": "Google Cloud project ID."
        },
        "location": {
          "type": "string",
          "description": "Google Cloud region for Vertex AI API.",
          "default": "us-central1"
        },
        "credentials_path": {
          "type": "string",
          "writeOnly": true,
          "description": "Path to service account JSON key file."
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls randomness in generation (0.0-2.0).",
          "minimum": 0.0,
          "maximum": 2.0
        },
        "max_tokens": {
          "type": "integer",
          "description": "Maximum number of tokens to generate in the response."
        },
        "top_p": {
          "type": "number",
          "format": "float",
          "description": "Nucleus sampling parameter (0.0-1.0).",
          "minimum": 0.0,
          "maximum": 1.0
        },
        "top_k": {
          "type": "integer",
          "description": "Top-k sampling parameter."
        }
      },
      "required": [
        "provider",
        "model"
      ]
    }
  }
}