{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/neruva-io/json-schema/neruva-io-rung-in-schema.json",
  "title": "RungIn",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/neruva-io-openapi.json#/components/schemas/RungIn",
  "properties": {
    "task": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task"
    },
    "name": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1,
      "title": "Name"
    },
    "skill": {
      "type": "string",
      "title": "Skill",
      "description": "Skill or domain this serves, e.g. docx, pptx, alfworld"
    },
    "language": {
      "type": "string",
      "title": "Language",
      "description": "python | javascript | ...",
      "default": "python"
    },
    "description": {
      "type": "string",
      "maxLength": 2000,
      "minLength": 1,
      "title": "Description"
    },
    "code": {
      "type": "string",
      "maxLength": 400000,
      "minLength": 1,
      "title": "Code"
    },
    "doc": {
      "type": "string",
      "maxLength": 40000,
      "title": "Doc",
      "description": "Usage guide for the executor",
      "default": ""
    },
    "evidence": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Evidence",
      "description": "Measured rows, corpus named"
    },
    "deps": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Deps"
    },
    "entry_points": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Entry Points"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags"
    },
    "purpose": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 400
        },
        {
          "type": "null"
        }
      ],
      "title": "Purpose",
      "description": "One plain sentence saying what this is for, in the words someone would use when they need it. No formats, standards or function names."
    },
    "onecall": {
      "anyOf": [
        {
          "$ref": "#/$defs/OneCall"
        },
        {
          "type": "null"
        }
      ]
    },
    "checker": {
      "anyOf": [
        {
          "$ref": "#/$defs/Checker"
        },
        {
          "type": "null"
        }
      ]
    },
    "cert": {
      "anyOf": [
        {
          "$ref": "#/$defs/Certificate"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "name",
    "skill",
    "description",
    "code"
  ],
  "$defs": {
    "Certificate": {
      "properties": {
        "code_sha256": {
          "type": "string",
          "title": "Code Sha256"
        },
        "verdict": {
          "type": "string",
          "title": "Verdict",
          "default": "tested"
        },
        "origin": {
          "type": "string",
          "title": "Origin",
          "default": "ratchet"
        },
        "ts": {
          "type": "integer",
          "title": "Ts",
          "default": 0
        },
        "tests_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tests Sha256"
        },
        "checker_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Checker Sha256"
        },
        "evidence_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Evidence Sha256"
        },
        "onecall_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Onecall Sha256"
        },
        "purpose_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Purpose Sha256"
        },
        "signature": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Signature"
        },
        "pubkey": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pubkey"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        }
      },
      "type": "object",
      "required": [
        "code_sha256"
      ],
      "title": "Certificate"
    },
    "Checker": {
      "properties": {
        "code": {
          "type": "string",
          "maxLength": 200000,
          "minLength": 1,
          "title": "Code",
          "description": "The checker source. It must expose check(path, spec) -> (ok, why)."
        },
        "language": {
          "type": "string",
          "title": "Language",
          "description": "What runs the checker, not the skill",
          "default": "python"
        },
        "spoilers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Spoilers",
          "description": "Names of the near-misses it was shown to reject, e.g. total_written_as_a_value"
        },
        "gate": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gate",
          "description": "What the mutation gate found: reference_passes, spoilers_rejected, empty_rejected"
        }
      },
      "type": "object",
      "required": [
        "code"
      ],
      "title": "Checker",
      "description": "The exact program that proved the skill, and the evidence it is not vacuous.\n\n`spoilers` are deliberate near-misses that the checker MUST reject. They are the\ndifference between a checker and a formality: a checker that accepts a broken file\nproves nothing, and one that demands something the task never asked for invents a\nfailure that is not there. Both were observed while building this."
    },
    "OneCall": {
      "properties": {
        "wrapper": {
          "type": "string",
          "maxLength": 100000,
          "minLength": 1,
          "title": "Wrapper",
          "description": "Source of build(**kwargs), defined below the helpers"
        },
        "schema": {
          "additionalProperties": true,
          "type": "object",
          "title": "Schema",
          "description": "JSON schema for the kwargs"
        }
      },
      "type": "object",
      "required": [
        "wrapper",
        "schema"
      ],
      "title": "OneCall",
      "description": "One entry point plus an argument schema, so an executor emits JSON, not code.\n\nA skill is correct helper code, but a model calling it cold still has to get the\nsignatures right from the usage guide, and that is where it fails. With this, the\nonly thing it has to produce is an object matching `schema`."
    }
  }
}