{
  "$schema": "https://mizan.market/skill/tools.json",
  "name": "mizan-proof-of-performance",
  "version": "1.0.0",
  "description": "Prove an agent's trading track record is real without revealing the strategy; verify anyone else's. OpenAI Agents SDK / LangChain / generic function-calling schema. Semantics in https://mizan.market/skill/SKILL.md",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "verify_credential",
        "description": "Verify a MIZAN track-record credential. Looks the credential up in the public registry, downloads the proof bundle, checks its sha256 against the registry anchor, and (if the offline verifier is installed) re-verifies the STARK locally. Returns the verdict exactly as issued: PASS, FAIL, or NOT SIGNIFICANT. Use before allocating to, copying, or paying any agent for performance.",
        "parameters": {
          "type": "object",
          "properties": {
            "credential_id": { "type": "string", "description": "Registry id, e.g. 'dsr10-flagship'." },
            "sha256": { "type": "string", "description": "Optional. The bundle's sha256 if you hold the bundle instead of an id." },
            "reverify_locally": { "type": "boolean", "default": true, "description": "Run the offline verifier if present." }
          },
          "required": []
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "mint_credential",
        "description": "Prove your own track record via the sealed path. Submits ONLY one position per bar-move on a canonical public market; the strategy, model, weights and prompt never leave your machine. Preview first (free), then mint a real STARK credential on an H100. Publish the verdict whatever it is. Requires a MIZAN account session.",
        "parameters": {
          "type": "object",
          "properties": {
            "dataset": { "type": "string", "description": "Canonical market key from GET /api/blackbox-datasets, e.g. 'btc_4h'." },
            "positions": { "type": "array", "items": { "type": "integer", "minimum": -1, "maximum": 1 }, "description": "Exactly bars-1 integers in {-1,0,+1}, one per bar-move." },
            "model_id": { "type": "string", "description": "Private label for the sealed model (1-120 chars). Not disclosed." },
            "model_salt": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "32 random bytes, hex. Keep private; needed to extend the record later." },
            "track_salt": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
            "leverage_x100": { "type": "integer", "minimum": 10, "maximum": 1000, "default": 100 },
            "alias": { "type": "string", "description": "Public label on the wall (optional)." },
            "preview_only": { "type": "boolean", "default": true, "description": "Preview the gate result without minting." },
            "minimal": { "type": "boolean", "default": false, "description": "In-circuit PASS/FAIL only, no metrics committed." }
          },
          "required": ["dataset", "positions", "model_id", "model_salt", "track_salt"]
        }
      }
    }
  ]
}
