{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://getzero.dev/contracts/zero.public_operator.v1.schema.json",
  "title": "ZERO Public Operator Profile",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "kind",
    "handle",
    "canonical_url",
    "raw_evidence_url",
    "visibility",
    "profile",
    "score",
    "growth",
    "capabilities",
    "agents",
    "evidence",
    "verification"
  ],
  "properties": {
    "schema_version": { "const": "zero.public_operator.v1" },
    "kind": { "const": "operator_profile" },
    "handle": { "type": "string", "minLength": 1 },
    "canonical_url": { "type": "string", "format": "uri" },
    "raw_evidence_url": { "type": "string", "format": "uri" },
    "visibility": { "const": "public" },
    "profile": {
      "type": "object",
      "additionalProperties": false,
      "required": ["display_name", "tier", "operator_since", "summary", "achievements"],
      "properties": {
        "display_name": { "type": "string", "minLength": 1 },
        "tier": { "type": "string", "minLength": 1 },
        "operator_since": { "type": "string", "format": "date-time" },
        "summary": { "type": "string", "minLength": 1 },
        "achievements": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 }
        }
      }
    },
    "score": {
      "type": "object",
      "additionalProperties": false,
      "required": ["label", "best_score", "arena_rank"],
      "properties": {
        "label": { "type": "string", "minLength": 1 },
        "best_score": { "type": ["number", "null"] },
        "arena_rank": { "type": ["integer", "null"], "minimum": 1 }
      }
    },
    "growth": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema_version",
        "public_profile_url",
        "share_image_url",
        "profile_api_url",
        "replay_index_url",
        "staged_actions",
        "disciple_default",
        "trade_receipt",
        "saturday_artifact",
        "persistence",
        "public_receipts"
      ],
      "properties": {
        "schema_version": { "const": "zero.operator_growth.v1" },
        "public_profile_url": { "type": "string", "format": "uri" },
        "share_image_url": { "type": "string", "format": "uri" },
        "profile_api_url": { "type": "string", "format": "uri" },
        "replay_index_url": { "type": "string", "format": "uri" },
        "staged_actions": {
          "type": "array",
          "minItems": 4,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["kind", "label", "href", "requires_auth", "execution_boundary"],
            "properties": {
              "kind": {
                "enum": ["watch_replay", "follow_operator", "become_disciple", "launch_zero"]
              },
              "label": { "type": "string", "minLength": 1 },
              "href": { "type": "string", "format": "uri" },
              "requires_auth": { "type": "boolean" },
              "execution_boundary": { "type": "string", "minLength": 1 }
            }
          }
        },
        "disciple_default": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "mode",
            "auto_execution_enabled",
            "eligibility_gate_required",
            "compensation_label_required"
          ],
          "properties": {
            "mode": { "const": "signal_only" },
            "auto_execution_enabled": { "const": false },
            "eligibility_gate_required": { "const": true },
            "compensation_label_required": { "const": true }
          }
        },
        "trade_receipt": {
          "type": "object",
          "additionalProperties": false,
          "required": ["public_index_url", "export_url", "share_image_template"],
          "properties": {
            "public_index_url": { "type": "string", "format": "uri" },
            "export_url": { "type": "string", "format": "uri" },
            "share_image_template": { "type": "string", "pattern": "\\{replayId\\}" }
          }
        },
        "saturday_artifact": {
          "type": "object",
          "additionalProperties": false,
          "required": ["cadence", "status", "public_numeric_operator_score_enabled"],
          "properties": {
            "cadence": { "const": "weekly" },
            "status": { "const": "planned" },
            "public_numeric_operator_score_enabled": { "const": false }
          }
        },
        "persistence": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "schema_version",
            "status",
            "intents_api_url",
            "public_receipt_state",
            "supported_intents",
            "default_execution_boundary",
            "auto_execution_enabled",
            "eligibility_gate_required",
            "compensation_label_required"
          ],
          "properties": {
            "schema_version": { "const": "zero.operator_growth_persistence.v1" },
            "status": { "const": "persistence_ready" },
            "intents_api_url": { "type": "string", "format": "uri" },
            "public_receipt_state": { "const": "aggregate_only_until_user_activity" },
            "supported_intents": {
              "type": "array",
              "items": { "enum": ["follow", "disciple_signal_only", "save_trade_receipt"] },
              "minItems": 3
            },
            "default_execution_boundary": { "const": "signal_only_no_auto_execution" },
            "auto_execution_enabled": { "const": false },
            "eligibility_gate_required": { "const": true },
            "compensation_label_required": { "const": true }
          }
        },
        "public_receipts": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "schema_version",
            "kind",
            "status",
            "target",
            "total_active_receipts",
            "latest_receipt_at",
            "by_intent",
            "privacy_boundary",
            "auto_execution_enabled",
            "eligibility_gate_required",
            "compensation_label_required"
          ],
          "properties": {
            "schema_version": { "const": "zero.operator_growth_public_receipts.v1" },
            "kind": { "const": "operator_growth_public_receipt_summary" },
            "status": { "enum": ["aggregate_ready", "aggregate_unavailable"] },
            "target": {
              "type": "object",
              "additionalProperties": false,
              "required": ["kind", "handle", "agent_short_id", "replay_id"],
              "properties": {
                "kind": { "enum": ["operator", "agent", "replay"] },
                "handle": { "type": ["string", "null"] },
                "agent_short_id": { "type": ["string", "null"] },
                "replay_id": { "type": ["string", "null"] }
              }
            },
            "total_active_receipts": { "type": "integer", "minimum": 0 },
            "latest_receipt_at": { "type": ["string", "null"], "format": "date-time" },
            "by_intent": {
              "type": "array",
              "minItems": 3,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": ["intent", "active_count", "latest_receipt_at"],
                "properties": {
                  "intent": { "enum": ["follow", "disciple_signal_only", "save_trade_receipt"] },
                  "active_count": { "type": "integer", "minimum": 0 },
                  "latest_receipt_at": { "type": ["string", "null"], "format": "date-time" }
                }
              }
            },
            "privacy_boundary": {
              "type": "object",
              "additionalProperties": false,
              "required": ["aggregate_only", "operator_ids_public", "metadata_public", "public_detail"],
              "properties": {
                "aggregate_only": { "const": true },
                "operator_ids_public": { "const": false },
                "metadata_public": { "const": false },
                "public_detail": { "const": "counts_by_intent_only" }
              }
            },
            "auto_execution_enabled": { "const": false },
            "eligibility_gate_required": { "const": true },
            "compensation_label_required": { "const": true }
          }
        }
      }
    },
    "capabilities": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "operating_system",
        "venue",
        "mode",
        "runtime_state",
        "custody_model",
        "signing_boundary",
        "allowed_actions"
      ],
      "properties": {
        "operating_system": { "const": "zero" },
        "venue": { "type": "string", "minLength": 1 },
        "mode": { "enum": ["paper", "live"] },
        "runtime_state": { "type": "string", "minLength": 1 },
        "custody_model": { "const": "self-custodial" },
        "signing_boundary": { "type": "string", "minLength": 1 },
        "allowed_actions": {
          "type": "array",
          "minItems": 1,
          "items": { "enum": ["order", "cancel", "scheduleCancel"] }
        }
      }
    },
    "agents": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "name", "short_id", "mode", "status", "total_trades", "config", "score"],
        "properties": {
          "id": { "type": "string", "minLength": 1 },
          "name": { "type": "string", "minLength": 1 },
          "short_id": { "type": "string", "minLength": 1 },
          "mode": { "enum": ["paper", "live"] },
          "status": { "type": "string", "minLength": 1 },
          "total_trades": { "type": "integer", "minimum": 0 },
          "config": {
            "type": "object",
            "additionalProperties": false,
            "required": ["preset"],
            "properties": {
              "preset": { "type": "string", "minLength": 1 }
            }
          },
          "score": { "type": ["number", "null"] }
        }
      }
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source",
        "deployment_id",
        "equity_usd",
        "equity_updated_at",
        "closed_pnl_usd",
        "signed_receipts",
        "total_receipts",
        "open_positions",
        "open_exposure_usd",
        "heartbeat_nonce",
        "last_heartbeat_at",
        "live_safety",
        "live_certification_readiness",
        "operator_control_readiness",
        "timeline"
      ],
      "properties": {
        "source": { "const": "foundation" },
        "deployment_id": { "type": "string", "minLength": 1 },
        "equity_usd": { "type": "number" },
        "equity_updated_at": { "type": "string", "format": "date-time" },
        "closed_pnl_usd": { "type": "number" },
        "signed_receipts": { "type": "integer", "minimum": 0 },
        "total_receipts": { "type": "integer", "minimum": 0 },
        "open_positions": { "type": "integer", "minimum": 0 },
        "open_exposure_usd": { "type": "number", "minimum": 0 },
        "heartbeat_nonce": { "type": ["integer", "string", "null"] },
        "last_heartbeat_at": { "type": ["string", "null"], "format": "date-time" },
        "live_safety": {
          "type": "object",
          "additionalProperties": false,
          "required": ["sentinel_drill"],
          "properties": {
            "sentinel_drill": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "status",
                "policy_version",
                "replay_id",
                "href",
                "occurred_at",
                "payload_hash",
                "missing",
                "required_evidence"
              ],
              "properties": {
                "status": { "enum": ["incomplete", "ready_to_publish", "passed"] },
                "policy_version": { "type": "string", "minLength": 1 },
                "replay_id": { "type": ["string", "null"], "minLength": 1 },
                "href": { "type": ["string", "null"], "minLength": 1 },
                "occurred_at": { "type": ["string", "null"], "format": "date-time" },
                "payload_hash": { "type": ["string", "null"], "minLength": 1 },
                "missing": {
                  "type": "array",
                  "items": { "type": "string", "minLength": 1 }
                },
                "required_evidence": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["live_certification", "operator_control", "signing_refusal"],
                  "properties": {
                    "live_certification": { "$ref": "#/$defs/replay_evidence_ref_or_null" },
                    "operator_control": { "$ref": "#/$defs/replay_evidence_ref_or_null" },
                    "signing_refusal": { "$ref": "#/$defs/replay_evidence_ref_or_null" }
                  }
                }
              }
            }
          }
        },
        "live_certification_readiness": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "status",
            "href",
            "blockers",
            "proof_blockers",
            "enhancement_blockers",
            "next_blocker",
            "next_action",
            "live_certification_replay",
            "testnet_drill",
            "drill_gate",
            "owner_action"
          ],
          "properties": {
            "status": { "enum": ["blocked", "ready_to_run", "certified"] },
            "href": { "type": "string", "format": "uri" },
            "blockers": {
              "type": "array",
              "items": { "type": "string", "minLength": 1 }
            },
            "proof_blockers": {
              "type": "array",
              "items": { "type": "string", "minLength": 1 }
            },
            "enhancement_blockers": {
              "type": "array",
              "items": { "type": "string", "minLength": 1 }
            },
            "next_blocker": { "type": ["string", "null"], "minLength": 1 },
            "next_action": { "type": "string", "minLength": 1 },
            "live_certification_replay": { "$ref": "#/$defs/replay_evidence_ref_or_null" },
            "testnet_drill": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "status",
                "replay_id",
                "submitted_to_hyperliquid",
                "testnet_order_cancel_submitted",
                "promotion_eligible",
                "promotion_blockers",
                "setup_required",
                "next_action"
              ],
              "properties": {
                "status": { "enum": ["missing", "signed_not_submitted", "submitted"] },
                "replay_id": { "type": ["string", "null"], "minLength": 1 },
                "submitted_to_hyperliquid": { "type": "boolean" },
                "testnet_order_cancel_submitted": { "type": "boolean" },
                "promotion_eligible": { "type": "boolean" },
                "promotion_blockers": {
                  "type": "array",
                  "items": { "type": "string", "minLength": 1 }
                },
                "setup_required": { "type": "boolean" },
                "next_action": { "type": "string", "minLength": 1 }
              }
            },
            "drill_gate": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "authenticated_operator_required",
                "explicit_operator_request_required",
                "server_submit_flag_required",
                "server_submit_enabled",
                "allowed_actions",
                "private_key_custody"
              ],
              "properties": {
                "authenticated_operator_required": { "const": true },
                "explicit_operator_request_required": { "const": true },
                "server_submit_flag_required": { "const": true },
                "server_submit_enabled": { "type": "boolean" },
                "allowed_actions": {
                  "type": "array",
                  "minItems": 1,
                  "items": { "enum": ["order", "cancel", "scheduleCancel"] }
                },
                "private_key_custody": { "const": false }
              }
            },
            "owner_action": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "type",
                "available",
                "blocked_reason",
                "requires_authenticated_operator",
                "requires_explicit_confirmation",
                "preferred_surface",
                "score_movement",
                "owner_handoff",
                "button_label",
                "selected_deployment_id",
                "submit_payload",
                "token_handling",
                "testnet_approval_packet",
                "safety_boundary",
                "expected_result"
              ],
              "properties": {
                "type": { "const": "testnet_submit_cancel_drill" },
                "available": { "type": "boolean" },
                "blocked_reason": {
                  "type": ["string", "null"],
                  "enum": [
                    "testnet_submit_cancel_already_recorded",
                    "readiness_blocked",
                    "server_submit_disabled",
                    "deployment_missing",
                    "hl_testnet_wallet_not_registered",
                    null
                  ]
                },
                "requires_authenticated_operator": { "const": true },
                "requires_explicit_confirmation": { "const": true },
                "preferred_surface": { "const": "founder_admin_control" },
                "score_movement": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "score_moving",
                    "public_proof_score_blocked",
                    "current_blocker",
                    "next_public_score_moving_evidence"
                  ],
                  "properties": {
                    "score_moving": { "type": "boolean" },
                    "public_proof_score_blocked": { "type": "boolean" },
                    "current_blocker": {
                      "type": ["string", "null"],
                      "enum": [
                        "testnet_submit_cancel_already_recorded",
                        "readiness_blocked",
                        "server_submit_disabled",
                        "deployment_missing",
                        "hl_testnet_wallet_not_registered",
                        null
                      ]
                    },
                    "next_public_score_moving_evidence": {
                      "type": "array",
                      "minItems": 1,
                      "items": { "type": "string", "minLength": 1 }
                    }
                  }
                },
                "owner_handoff": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "surface",
                    "recommended_surface_v95",
                    "control_path",
                    "recommended_surface",
                    "login_url",
                    "hyperliquid_testnet_api_url",
                    "cli_token_fallback",
                    "do_not_paste_tokens"
                  ],
                  "properties": {
                    "surface": { "const": "zero_control" },
                    "recommended_surface_v95": { "const": "browser_control" },
                    "control_path": { "const": "/admin/foundation?source=foundation-live-certification" },
                    "recommended_surface": { "const": "browser_control" },
                    "login_url": { "type": "string", "format": "uri" },
                    "hyperliquid_testnet_api_url": { "const": "https://app.hyperliquid-testnet.xyz/API" },
                    "cli_token_fallback": { "const": "owner_controlled_shell_only" },
                    "do_not_paste_tokens": { "const": true }
                  }
                },
                "button_label": { "const": "run testnet drill" },
                "selected_deployment_id": { "type": ["string", "null"] },
                "submit_payload": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["submit_testnet_drill"],
                  "properties": {
                    "submit_testnet_drill": { "const": true }
                  }
                },
                "checklist": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["step", "status", "owner_action_required", "evidence"],
                    "properties": {
                      "step": { "type": "string", "minLength": 1 },
                      "status": { "enum": ["complete", "pending", "blocked"] },
                      "owner_action_required": { "type": "boolean" },
                      "evidence": { "type": "string", "minLength": 1 }
                    }
                  }
                },
                "approval_handoff": {
                  "type": ["object", "null"],
                  "additionalProperties": false,
                  "required": ["method", "path", "body", "expected_result"],
                  "properties": {
                    "method": { "const": "POST" },
                    "path": { "type": "string", "pattern": "^/api/deployments/.+/approve-hl-agent$" },
                    "body": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["network"],
                      "properties": {
                        "network": { "const": "testnet" }
                      }
                    },
                    "expected_result": { "type": "string", "minLength": 1 }
                  }
                },
                "post_approval_retry": {
                  "type": ["object", "null"],
                  "additionalProperties": false,
                  "required": ["method", "path", "body", "expected_result"],
                  "properties": {
                    "method": { "const": "POST" },
                    "path": { "type": "string", "pattern": "^/api/deployments/.+/live-certification$" },
                    "body": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["submit_testnet_drill"],
                      "properties": {
                        "submit_testnet_drill": { "const": true }
                      }
                    },
                    "expected_result": { "type": "string", "minLength": 1 }
                  }
                },
                "testnet_approval_packet": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "schema_version",
                    "network",
                    "status",
                    "approval_url",
                    "info_endpoint",
                    "main_wallet",
                    "api_wallet",
                    "agent_name",
                    "manual_entry_required",
                    "do_not_use_generate",
                    "wrong_agent_warning",
                    "signature_expectation",
                    "approve_agent",
                    "approval_check",
                    "post_approval_retry",
                    "safety_boundary",
                    "next_action"
                  ],
                  "properties": {
                    "schema_version": { "const": "zero.hl_testnet_approval_packet.v1" },
                    "network": { "const": "testnet" },
                    "status": { "enum": ["approved", "setup_required", "pending_verification"] },
                    "approval_url": { "const": "https://app.hyperliquid-testnet.xyz/API" },
                    "info_endpoint": { "const": "https://api.hyperliquid-testnet.xyz/info" },
                    "main_wallet": { "type": ["string", "null"] },
                    "api_wallet": { "type": ["string", "null"] },
                    "agent_name": { "type": ["string", "null"] },
                    "manual_entry_required": { "const": true },
                    "do_not_use_generate": { "const": true },
                    "wrong_agent_warning": { "type": "string", "minLength": 1 },
                    "signature_expectation": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["primary_type", "hyperliquid_chain", "agent_address", "agent_name", "confirm_only_if"],
                      "properties": {
                        "primary_type": { "const": "HyperliquidTransaction:ApproveAgent" },
                        "hyperliquid_chain": { "const": "Testnet" },
                        "agent_address": { "type": ["string", "null"] },
                        "agent_name": { "type": ["string", "null"] },
                        "confirm_only_if": { "type": "string", "minLength": 1 }
                      }
                    },
                    "approve_agent": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["action", "network", "main_wallet", "agent_address", "agent_name", "hyperliquid_url", "manual_entry_required", "do_not_use_generate", "wrong_agent_warning", "expected_signature"],
                      "properties": {
                        "action": { "const": "approveAgent" },
                        "network": { "const": "testnet" },
                        "main_wallet": { "type": ["string", "null"] },
                        "agent_address": { "type": ["string", "null"] },
                        "agent_name": { "type": ["string", "null"] },
                        "hyperliquid_url": { "const": "https://app.hyperliquid-testnet.xyz/API" },
                        "manual_entry_required": { "const": true },
                        "do_not_use_generate": { "const": true },
                        "wrong_agent_warning": { "type": "string", "minLength": 1 },
                        "expected_signature": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": ["primary_type", "hyperliquid_chain", "agent_address", "agent_name"],
                          "properties": {
                            "primary_type": { "const": "HyperliquidTransaction:ApproveAgent" },
                            "hyperliquid_chain": { "const": "Testnet" },
                            "agent_address": { "type": ["string", "null"] },
                            "agent_name": { "type": ["string", "null"] }
                          }
                        }
                      }
                    },
                    "approval_check": {
                      "type": ["object", "null"],
                      "additionalProperties": false,
                      "required": ["method", "path", "body", "expected_result"],
                      "properties": {
                        "method": { "const": "POST" },
                        "path": { "type": "string", "pattern": "^/api/deployments/.+/approve-hl-agent$" },
                        "body": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": ["network"],
                          "properties": {
                            "network": { "const": "testnet" }
                          }
                        },
                        "expected_result": { "type": "string", "minLength": 1 }
                      }
                    },
                    "post_approval_retry": {
                      "type": ["object", "null"],
                      "additionalProperties": false,
                      "required": ["method", "path", "body", "expected_result"],
                      "properties": {
                        "method": { "const": "POST" },
                        "path": { "type": "string", "pattern": "^/api/deployments/.+/live-certification$" },
                        "body": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": ["submit_testnet_drill"],
                          "properties": {
                            "submit_testnet_drill": { "const": true }
                          }
                        },
                        "expected_result": { "type": "string", "minLength": 1 }
                      }
                    },
                    "safety_boundary": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["private_key_custody", "allowed_actions", "blocked_actions"],
                      "properties": {
                        "private_key_custody": { "const": false },
                        "allowed_actions": {
                          "type": "array",
                          "minItems": 3,
                          "items": { "enum": ["order", "cancel", "scheduleCancel"] }
                        },
                        "blocked_actions": {
                          "type": "array",
                          "minItems": 1,
                          "items": { "type": "string", "minLength": 1 }
                        }
                      }
                    },
                    "next_action": { "type": "string", "minLength": 1 }
                  }
                },
                "token_handling": { "type": "string", "pattern": "never paste Privy tokens" },
                "safety_boundary": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["private_key_custody", "allowed_actions", "blocked_actions"],
                  "properties": {
                    "private_key_custody": { "const": false },
                    "allowed_actions": {
                      "type": "array",
                      "minItems": 3,
                      "items": { "enum": ["order", "cancel", "scheduleCancel"] }
                    },
                    "blocked_actions": {
                      "type": "array",
                      "minItems": 1,
                      "items": { "type": "string", "minLength": 1 }
                    }
                  }
                },
                "expected_result": { "type": "string", "minLength": 1 }
              }
            }
          }
        },
        "operator_control_readiness": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "status",
            "href",
            "proof_blockers",
            "next_blocker",
            "next_action",
            "readiness",
            "owner_actions",
            "proof_chain",
            "journal_finality_ops"
          ],
          "properties": {
            "status": { "enum": ["blocked", "ready_for_take_over", "ready_to_publish", "passed"] },
            "href": { "type": "string", "format": "uri" },
            "proof_blockers": {
              "type": "array",
              "items": { "type": "string", "minLength": 1 }
            },
            "next_blocker": { "type": ["string", "null"], "minLength": 1 },
            "next_action": { "type": "string", "minLength": 1 },
            "readiness": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "deployment_live",
                "live_certification_replay",
                "operator_control_replay",
                "signing_refusal_replay",
                "sentinel_drill_transcript"
              ],
              "properties": {
                "deployment_live": { "type": "boolean" },
                "live_certification_replay": { "$ref": "#/$defs/replay_evidence_ref_or_null" },
                "operator_control_replay": { "$ref": "#/$defs/replay_evidence_ref_or_null" },
                "signing_refusal_replay": { "$ref": "#/$defs/replay_evidence_ref_or_null" },
                "sentinel_drill_transcript": { "$ref": "#/$defs/replay_evidence_ref_or_null" }
              }
            },
            "owner_actions": {
              "type": "object",
              "additionalProperties": false,
              "required": ["take_over", "publish_sentinel_transcript"],
              "properties": {
                "take_over": { "$ref": "#/$defs/operator_control_owner_action" },
                "publish_sentinel_transcript": { "$ref": "#/$defs/operator_control_owner_action" }
              }
            },
            "proof_chain": { "$ref": "#/$defs/operator_control_proof_chain" },
            "journal_finality_ops": { "$ref": "#/$defs/journal_finality_ops" }
          }
        },
        "timeline": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["ts", "kind", "title", "body"],
            "properties": {
              "ts": { "type": "string", "format": "date-time" },
              "kind": { "type": "string", "minLength": 1 },
              "title": { "type": "string", "minLength": 1 },
              "body": { "type": "string" },
              "tone": { "type": "string" },
              "nonce": { "type": ["integer", "string", "null"] },
              "coin": { "type": "string", "minLength": 1 },
              "direction": { "type": "string", "minLength": 1 },
              "pnl_usd": { "type": "number" },
              "evidence_hash": { "type": "string", "minLength": 1 },
              "replay_id": { "type": "string", "minLength": 1 },
              "href": { "type": "string", "minLength": 1 },
              "replay_href": { "type": "string", "minLength": 1 }
            }
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "additionalProperties": false,
      "required": ["private_keys_stored", "server_signing", "public_wallets", "live_lease_expires_at"],
      "properties": {
        "private_keys_stored": { "type": "boolean" },
        "server_signing": { "type": "string", "minLength": 1 },
        "public_wallets": {
          "type": "object",
          "additionalProperties": false,
          "required": ["main", "api"],
          "properties": {
            "main": { "type": ["string", "null"] },
            "api": { "type": ["string", "null"] }
          }
        },
        "live_lease_expires_at": { "type": ["string", "null"], "format": "date-time" }
      }
    }
  },
  "$defs": {
    "replay_evidence_ref": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "replay_id",
        "occurred_at",
        "source_type",
        "source_ref",
        "payload_hash",
        "policy_version",
        "href"
      ],
      "properties": {
        "replay_id": { "type": "string", "minLength": 1 },
        "occurred_at": { "type": ["string", "null"], "format": "date-time" },
        "source_type": { "type": ["string", "null"] },
        "source_ref": { "type": ["string", "null"] },
        "payload_hash": { "type": ["string", "null"] },
        "policy_version": { "type": ["string", "null"] },
        "href": { "type": "string", "minLength": 1 },
        "testnet_order_cancel_submitted": { "type": "boolean" },
        "submitted_to_hyperliquid": { "type": "boolean" }
      }
    },
    "replay_evidence_ref_or_null": {
      "anyOf": [
        { "$ref": "#/$defs/replay_evidence_ref" },
        { "type": "null" }
      ]
    },
    "operator_control_owner_action": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "available",
        "blocked_reason",
        "requires_authenticated_operator",
        "requires_explicit_confirmation",
        "preferred_surface",
        "button_label",
        "selected_deployment_id",
        "submit_payload",
        "expected_result"
      ],
      "properties": {
        "type": { "enum": ["operator_take_over_drill", "sentinel_transcript_drill"] },
        "available": { "type": "boolean" },
        "blocked_reason": {
          "type": ["string", "null"],
          "enum": [
            "operator_control_already_recorded",
            "live_certification_replay_required",
            "deployment_not_live",
            "sentinel_transcript_already_recorded",
            "evidence_incomplete",
            "unknown",
            null
          ]
        },
        "requires_authenticated_operator": { "const": true },
        "requires_explicit_confirmation": { "type": "boolean" },
        "preferred_surface": { "const": "founder_admin_control" },
        "button_label": { "type": "string", "minLength": 1 },
        "selected_deployment_id": { "type": ["string", "null"] },
        "submit_payload": { "type": "object" },
        "expected_result": { "type": "string", "minLength": 1 }
      }
    },
    "operator_control_proof_chain": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "current_step",
        "score_moving",
        "public_proof_score_blocked",
        "ordered_steps",
        "next_owner_action",
        "safety_boundary"
      ],
      "properties": {
        "status": { "enum": ["blocked", "ready_for_take_over", "ready_to_publish", "passed"] },
        "current_step": { "type": ["string", "null"], "minLength": 1 },
        "score_moving": { "type": "boolean" },
        "public_proof_score_blocked": { "type": "boolean" },
        "ordered_steps": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": { "$ref": "#/$defs/operator_control_proof_step" }
        },
        "next_owner_action": {
          "type": "object",
          "additionalProperties": false,
          "required": ["type", "label", "endpoint", "blocked_reason"],
          "properties": {
            "type": {
              "type": ["string", "null"],
              "enum": ["testnet_submit_cancel_drill", "operator_take_over_drill", "sentinel_transcript_drill", null]
            },
            "label": { "type": "string", "minLength": 1 },
            "endpoint": { "type": ["string", "null"], "format": "uri" },
            "blocked_reason": { "type": ["string", "null"], "minLength": 1 }
          }
        },
        "safety_boundary": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "private_key_custody",
            "requires_authenticated_operator",
            "requires_explicit_confirmation_for_takeover",
            "allowed_actions",
            "blocked_actions"
          ],
          "properties": {
            "private_key_custody": { "const": false },
            "requires_authenticated_operator": { "const": true },
            "requires_explicit_confirmation_for_takeover": { "const": true },
            "allowed_actions": {
              "type": "array",
              "items": { "type": "string", "minLength": 1 }
            },
            "blocked_actions": {
              "type": "array",
              "items": { "type": "string", "minLength": 1 }
            }
          }
        }
      }
    },
    "operator_control_proof_step": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "step",
        "label",
        "status",
        "owner_action_required",
        "evidence",
        "replay_id",
        "href",
        "unlocks"
      ],
      "properties": {
        "step": {
          "enum": [
            "live_certification_replay",
            "operator_control_replay",
            "signing_refusal_replay",
            "sentinel_drill_transcript"
          ]
        },
        "label": { "type": "string", "minLength": 1 },
        "status": { "enum": ["complete", "pending", "blocked"] },
        "owner_action_required": { "type": "boolean" },
        "evidence": { "type": "string", "minLength": 1 },
        "replay_id": { "type": ["string", "null"], "minLength": 1 },
        "href": { "type": ["string", "null"], "minLength": 1 },
        "unlocks": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 }
        }
      }
    },
    "journal_finality_ops": {
      "type": "object",
      "required": [
        "schema_version",
        "kind",
        "public",
        "health",
        "strict_public_proof_ready",
        "score_moving_blocker",
        "recommended_action",
        "finalizer_profile",
        "observed",
        "blockers",
        "links"
      ],
      "properties": {
        "schema_version": { "const": "zero.journal_finality_ops.v1" },
        "kind": { "const": "journal_finality_ops" },
        "public": { "const": true },
        "generated_at": { "type": "string", "format": "date-time" },
        "health": { "type": "string", "minLength": 1 },
        "strict_public_proof_ready": { "type": "boolean" },
        "score_moving_blocker": { "type": "boolean" },
        "recommended_action": { "type": "string", "minLength": 1 },
        "score_promotion_gate": { "type": "object" },
        "finalizer_profile": {
          "type": "object",
          "required": ["recommended_profile", "schedule", "local_receipt_limit", "control_plane_limit"],
          "properties": {
            "recommended_profile": { "const": "public-chain" },
            "schedule": { "const": "hourly" },
            "local_receipt_limit": { "const": 0 },
            "control_plane_limit": { "const": 2 }
          }
        },
        "observed": { "type": "object" },
        "blockers": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 }
        },
        "links": { "type": "object" }
      }
    }
  }
}
