{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blackwalltier-com/json-schema/blackwalltier-com-forecast-request-schema.json",
  "title": "ForecastRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blackwalltier-com-openapi.yaml#/components/schemas/ForecastRequest",
  "type": "object",
  "required": [
    "action",
    "inputs"
  ],
  "properties": {
    "action": {
      "type": "string",
      "description": "What the agent intends to do. Free-form, but consistent values help\nus build per-action accuracy stats. Common values:\nsend_email, send_sms, slack_post, run_sql, file_write, file_delete,\napi_call, make_payment, refund, transfer, issue_invoice,\ngrant_permission, rotate_key, create_share_link,\npurchase, accept_contract, publish_content.\n"
    },
    "inputs": {
      "type": "object",
      "description": "The concrete payload of the action.",
      "additionalProperties": true
    },
    "context": {
      "type": "object",
      "properties": {
        "agent_role": {
          "type": "string"
        },
        "user_intent": {
          "type": "string"
        },
        "prior_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prior_findings": {
          "type": "array",
          "description": "Optional risk signals from analysis tools that ran BEFORE this call\n(e.g. a multi-agent test harness that flagged a risky agent, tool, or\ninteraction edge offline). The gate treats these as PRIORS, not verdicts:\na finding that matches this action raises the risk and can justify\nCONFIRM/STOP, but the runtime forecast still decides from the concrete\naction + inputs + reversibility. Findings contradicted by the actual\ninputs are down-weighted.\n",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "description": "What produced the finding."
              },
              "agent_role": {
                "type": "string"
              },
              "tool_name": {
                "type": "string"
              },
              "edge": {
                "type": "string",
                "description": "Interaction edge, source_role → target_role."
              },
              "risk_type": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "blast_radius": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "recommendation": {
                "type": "string",
                "description": "The upstream tool's suggested verdict (advisory only)."
              },
              "note": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "options": {
      "type": "object",
      "properties": {
        "depth": {
          "type": "string",
          "enum": [
            "standard",
            "deep"
          ],
          "default": "standard",
          "description": "deep mode costs ~1.5-2x more tokens (and runs ~10-13s vs 4-8s) but returns reasoning trace + counterfactuals + mitigations"
        }
      }
    }
  }
}