{
  "$id": "https://genesiscode.dev/schemas/genesisbench-open-agent-campaign-v0.1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "attemptPolicy": {"$ref": "#/$defs/attemptPolicy"},
    "authorities": {"$ref": "#/$defs/authorities"},
    "campaignId": {"$ref": "#/$defs/id"},
    "capabilities": {"$ref": "#/$defs/capabilities"},
    "cases": {"items": {"$ref": "#/$defs/case"}, "minItems": 9, "maxItems": 27, "type": "array", "uniqueItems": true},
    "contentIdentitySha256": {"$ref": "#/$defs/hash"},
    "custody": {"$ref": "#/$defs/custody"},
    "disclosure": {"$ref": "#/$defs/disclosure"},
    "host": {"$ref": "#/$defs/host"},
    "kind": {"const": "genesis/genesisbench-open-agent-campaign-v0.1"},
    "limits": {"$ref": "#/$defs/limits"},
    "model": {"$ref": "#/$defs/model"},
    "phase": {"enum": ["reality-gate", "full-public"]},
    "publication": {"$ref": "#/$defs/publication"},
    "runner": {"$ref": "#/$defs/runner"},
    "secrets": {"$ref": "#/$defs/secrets"},
    "stopPolicy": {"$ref": "#/$defs/stopPolicy"},
    "track": {"$ref": "#/$defs/track"},
    "tools": {"$ref": "#/$defs/tools"},
    "version": {"const": "0.1.0"}
  },
  "required": ["kind", "version", "campaignId", "phase", "cases", "authorities", "track", "runner", "model", "attemptPolicy", "capabilities", "limits", "disclosure", "stopPolicy", "host", "secrets", "publication", "contentIdentitySha256"],
  "title": "GenesisBench Open Agent campaign v0.1",
  "type": "object",
  "$defs": {
    "attemptPolicy": {
      "additionalProperties": false,
      "properties": {"attempts": {"const": 1}, "hiddenRetriesAllowed": {"const": false}, "resumeAllowed": {"const": false}},
      "required": ["attempts", "hiddenRetriesAllowed", "resumeAllowed"],
      "type": "object"
    },
    "authorities": {
      "additionalProperties": false,
      "properties": {"harnessIdentitySha256": {"$ref": "#/$defs/hash"}, "protocolIdentitySha256": {"$ref": "#/$defs/hash"}, "sourceSnapshotManifestIdentitySha256": {"$ref": "#/$defs/hash"}, "suiteIdentitySha256": {"$ref": "#/$defs/hash"}},
      "required": ["harnessIdentitySha256", "protocolIdentitySha256", "suiteIdentitySha256", "sourceSnapshotManifestIdentitySha256"],
      "type": "object"
    },
    "capabilities": {
      "additionalProperties": false,
      "properties": {"additionalWritableRoots": {"items": false, "maxItems": 0, "type": "array"}, "approvalPolicy": {"const": "never"}, "network": {"enum": ["provider-only", "loopback-provider-only"]}, "repository": {"const": "frozen-read-only"}, "workspace": {"const": "case-input-write-only"}},
      "required": ["workspace", "repository", "network", "approvalPolicy", "additionalWritableRoots"],
      "type": "object"
    },
    "case": {
      "additionalProperties": false,
      "properties": {"conditionId": {"$ref": "#/$defs/id"}, "conditionIdentitySha256": {"$ref": "#/$defs/hash"}, "editablePaths": {"items": {"$ref": "#/$defs/path"}, "minItems": 1, "type": "array", "uniqueItems": true}, "id": {"$ref": "#/$defs/id"}, "lineageId": {"$ref": "#/$defs/id"}, "lineageIdentitySha256": {"$ref": "#/$defs/hash"}},
      "required": ["id", "lineageId", "lineageIdentitySha256", "conditionId", "conditionIdentitySha256", "editablePaths"],
      "type": "object"
    },
    "disclosure": {
      "additionalProperties": false,
      "properties": {"contaminationLabel": {"const": "unknown"}, "environmentNames": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "environmentValuesRecorded": {"const": false}, "genesisSpecificTraining": {"const": "unknown"}},
      "required": ["environmentNames", "environmentValuesRecorded", "genesisSpecificTraining", "contaminationLabel"],
      "type": "object"
    },
    "custody": {
      "additionalProperties": false,
      "properties": {"adapterIdentitySha256": {"$ref": "#/$defs/hash"}, "inventoryIdentitySha256": {"$ref": "#/$defs/hash"}, "manifestIdentitySha256": {"$ref": "#/$defs/hash"}, "preselectionIdentitySha256": {"$ref": "#/$defs/hash"}, "runtimeIdentitySha256": {"$ref": "#/$defs/hash"}},
      "required": ["adapterIdentitySha256", "inventoryIdentitySha256", "manifestIdentitySha256", "preselectionIdentitySha256", "runtimeIdentitySha256"],
      "type": "object"
    },
    "hash": {"pattern": "^[0-9a-f]{64}$", "type": "string"},
    "host": {
      "additionalProperties": false,
      "properties": {"architecture": {"$ref": "#/$defs/id"}, "hardwareClass": {"$ref": "#/$defs/id"}, "operatingSystem": {"$ref": "#/$defs/id"}},
      "required": ["hardwareClass", "architecture", "operatingSystem"],
      "type": "object"
    },
    "id": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,191}$", "type": "string"},
    "limits": {
      "additionalProperties": false,
      "properties": {"maxStderrBytes": {"minimum": 1, "type": "integer"}, "maxStdoutBytes": {"minimum": 1, "type": "integer"}, "maxWorkspaceBytes": {"minimum": 1, "type": "integer"}, "maxWorkspaceFiles": {"minimum": 1, "type": "integer"}, "timeoutMs": {"maximum": 3600000, "minimum": 1000, "type": "integer"}},
      "required": ["timeoutMs", "maxStdoutBytes", "maxStderrBytes", "maxWorkspaceFiles", "maxWorkspaceBytes"],
      "type": "object"
    },
    "model": {
      "additionalProperties": false,
      "properties": {"artifactSha256": {"anyOf": [{"$ref": "#/$defs/hash"}, {"type": "null"}]}, "immutableRevision": {"type": "boolean"}, "reasoningEffort": {"enum": ["low", "medium", "high", "xhigh"]}, "requestedId": {"$ref": "#/$defs/id"}, "revision": {"$ref": "#/$defs/id"}},
      "required": ["requestedId", "revision", "immutableRevision", "reasoningEffort", "artifactSha256"],
      "type": "object"
    },
    "path": {"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))[A-Za-z0-9._/-]{1,512}$", "type": "string"},
    "publication": {
      "additionalProperties": false,
      "properties": {"class": {"const": "authentic-unranked-open-agent"}, "expectedAttemptCount": {"enum": [9, 27]}, "missingImmutableModelIdentityForcesUnranked": {"const": true}},
      "required": ["class", "missingImmutableModelIdentityForcesUnranked", "expectedAttemptCount"],
      "type": "object"
    },
    "runner": {
      "additionalProperties": false,
      "properties": {"class": {"enum": ["codex-cli-hosted", "codex-cli-local"]}, "executableSha256": {"$ref": "#/$defs/hash"}, "executableVersion": {"maxLength": 512, "minLength": 1, "type": "string"}, "invocationProfile": {"enum": ["codex-cli-hosted-v0.1", "codex-cli-local-v0.1", "codex-cli-hosted-v0.2", "codex-cli-local-v0.2", "codex-cli-hosted-v0.3", "codex-cli-local-v0.3", "codex-cli-hosted-v0.4", "codex-cli-local-v0.4", "codex-cli-hosted-v0.5", "codex-cli-local-v0.5"]}, "localProvider": {"enum": [null, "lmstudio", "ollama", "mlx-responses"]}},
      "required": ["class", "executableSha256", "executableVersion", "invocationProfile", "localProvider"],
      "type": "object"
    },
    "secrets": {
      "additionalProperties": false,
      "properties": {"forwardedToWorkspace": {"const": false}, "source": {"enum": ["codex-auth-store", "none-auth-free-homes"]}, "valuesRecorded": {"const": false}},
      "required": ["source", "valuesRecorded", "forwardedToWorkspace"],
      "type": "object"
    },
    "stopPolicy": {
      "additionalProperties": false,
      "properties": {"executeEveryPredeclaredCase": {"const": true}, "expansionRequiresCompleteValidationAndReplay": {"const": true}, "stopOnInvalidAttempt": {"const": false}, "stopOnModelFailure": {"const": false}},
      "required": ["executeEveryPredeclaredCase", "stopOnModelFailure", "stopOnInvalidAttempt", "expansionRequiresCompleteValidationAndReplay"],
      "type": "object"
    },
    "track": {
      "additionalProperties": false,
      "properties": {"id": {"const": "open-agent"}, "rankEligible": {"const": false}, "scaffoldClass": {"const": "codex-cli"}, "scaffoldIdentitySha256": {"$ref": "#/$defs/hash"}},
      "required": ["id", "scaffoldClass", "scaffoldIdentitySha256", "rankEligible"],
      "type": "object"
    },
    "tools": {
      "additionalProperties": false,
      "properties": {"genesisExecutableSha256": {"$ref": "#/$defs/hash"}, "selfhostArtifactSha256": {"$ref": "#/$defs/hash"}},
      "required": ["genesisExecutableSha256", "selfhostArtifactSha256"],
      "type": "object"
    }
  }
}
