{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/orla-finance/json-schema/orla-finance-agent-card-intent-open-out-schema.json",
  "title": "AgentCardIntentOpenOut",
  "description": "`orla_card_intent_open`: `AgentWriteOut`, plus who a parked request waits for.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/orla-finance-openapi.json#/components/schemas/AgentCardIntentOpenOut",
  "properties": {
    "applied": {
      "title": "Applied",
      "type": "boolean"
    },
    "limit_usd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "With `lower_amount`: the most one payment may be, in USD. Named only for a ceiling that is the agent's own (its position, its wallet); absent otherwise.",
      "title": "Limit Usd"
    },
    "message": {
      "default": "",
      "title": "Message",
      "type": "string"
    },
    "next_step": {
      "anyOf": [
        {
          "enum": [
            "stop",
            "ask_owner",
            "wait",
            "retry_later",
            "lower_amount"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "What to do about it: `stop` do not repeat this request; `ask_owner` a person has to widen or restore something and nobody has been asked yet; `wait` a person or the clock decides, read the answer later; `retry_later` the same request may pass soon, unchanged; `lower_amount` the same request passes with a smaller amount.",
      "title": "Next Step"
    },
    "proposal_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Proposal Id"
    },
    "reasons": {
      "description": "Why this was not done on the agent's own authority, as codes from a closed list.",
      "items": {
        "enum": [
          "ask.throttled",
          "autonomy.halted",
          "autonomy.observation",
          "autonomy.over_per_day",
          "autonomy.over_per_payment",
          "card.over_daily_allowance",
          "card.over_threshold",
          "check.hit",
          "check.unavailable",
          "check.unpaid",
          "evidence.anomaly",
          "evidence.details_changed",
          "evidence.payee_new",
          "grant.cap",
          "grant.per_request",
          "mandate.changed",
          "mandate.limit_above",
          "mandate.not_covered",
          "mandate.over_budget",
          "mandate.over_per_payment",
          "mandate.paused",
          "policy.denied",
          "policy.destination_not_trusted",
          "rate.unknown",
          "review.rejected"
        ],
        "type": "string"
      },
      "title": "Reasons",
      "type": "array"
    },
    "result": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Result"
    },
    "waiting_for": {
      "anyOf": [
        {
          "$ref": "#/$defs/CardIntentWaitingFor"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "applied"
  ],
  "type": "object",
  "$defs": {
    "CardIntentWaitingFor": {
      "description": "Who a waiting purchase waits for, as the agent is told it.",
      "properties": {
        "detail": {
          "title": "Detail",
          "type": "string"
        },
        "next_step": {
          "anyOf": [
            {
              "enum": [
                "stop",
                "ask_owner",
                "wait",
                "retry_later",
                "lower_amount"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What to do about it: `stop` do not repeat this request; `ask_owner` a person has to widen or restore something and nobody has been asked yet; `wait` a person or the clock decides, read the answer later; `retry_later` the same request may pass soon, unchanged; `lower_amount` the same request passes with a smaller amount.",
          "title": "Next Step"
        },
        "reason": {
          "title": "Reason",
          "type": "string"
        },
        "reasons": {
          "description": "Why this was not done on the agent's own authority, as codes from a closed list.",
          "items": {
            "enum": [
              "ask.throttled",
              "autonomy.halted",
              "autonomy.observation",
              "autonomy.over_per_day",
              "autonomy.over_per_payment",
              "card.over_daily_allowance",
              "card.over_threshold",
              "check.hit",
              "check.unavailable",
              "check.unpaid",
              "evidence.anomaly",
              "evidence.details_changed",
              "evidence.payee_new",
              "grant.cap",
              "grant.per_request",
              "mandate.changed",
              "mandate.limit_above",
              "mandate.not_covered",
              "mandate.over_budget",
              "mandate.over_per_payment",
              "mandate.paused",
              "policy.denied",
              "policy.destination_not_trusted",
              "rate.unknown",
              "review.rejected"
            ],
            "type": "string"
          },
          "title": "Reasons",
          "type": "array"
        },
        "since": {
          "format": "date-time",
          "title": "Since",
          "type": "string"
        },
        "who": {
          "enum": [
            "owner",
            "budget_decider"
          ],
          "title": "Who",
          "type": "string"
        }
      },
      "required": [
        "who",
        "since",
        "reason",
        "detail"
      ],
      "title": "CardIntentWaitingFor",
      "type": "object"
    }
  }
}