{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/finance-agent-robinhood-live-read-beta-receipt-summary.v1.json",
  "title": "Finance Agent Robinhood Live-Read Beta Receipt Summary V1",
  "description": "Redacted owner/admin Robinhood live-read beta receipt summary. This schema permits only allowlisted read metadata, refs, hashes, coarse result shape counts, explicit redaction markers, and forced-false action/settlement/publication flags. It does not store raw Robinhood payloads, OAuth tokens, account/card/order/payment values, provider required_next_action payloads, order actions, card credential fetches, purchases, options execution, wallet/x402 mutation, public execute/invoke mutation, marketplace publication, or capability publication.",
  "type": "object",
  "required": [
    "schema",
    "connector_type",
    "connector_id",
    "mcp_server_name",
    "tool_name",
    "tool_family",
    "read_scope",
    "policy_decision",
    "result_summary",
    "raw_provider_payload_excluded",
    "provider_required_next_action_followed",
    "provider_required_next_action_ignored",
    "redaction_summary",
    "agoragentic_execution_performed",
    "external_provider_dispatch_performed",
    "provider_dispatch_performed",
    "live_action_performed",
    "live_order_placement_performed",
    "order_placement_performed",
    "order_cancellation_performed",
    "card_detail_fetch_performed",
    "card_purchase_performed",
    "purchase_performed",
    "options_order_schema_allowed",
    "options_execution_performed",
    "wallet_spend_performed",
    "wallet_mutation_performed",
    "x402_settlement_performed",
    "public_execute_enabled",
    "public_invoke_enabled",
    "global_execute_mutation_enabled",
    "global_invoke_mutation_enabled",
    "marketplace_publication_enabled",
    "capability_publication_enabled"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "agoragentic.agent-os.finance-agent-robinhood-live-read-beta-receipt-summary.v1"
    },
    "connector_type": {
      "type": "string",
      "enum": ["robinhood_trading", "robinhood_banking"]
    },
    "connector_id": { "$ref": "#/$defs/safe_text" },
    "mcp_server_name": {
      "type": "string",
      "enum": ["robinhood-trading", "robinhood-banking"]
    },
    "tool_name": {
      "type": "string",
      "enum": [
        "get_accounts",
        "get_portfolio",
        "banking_get_agent_card_status",
        "banking_get_agent_card_policy",
        "banking_get_agent_card_balance",
        "banking_get_agent_card_transactions",
        "read_agentic_virtual_card_policy",
        "read_agentic_virtual_card_settings",
        "read_agentic_virtual_card_transaction_history"
      ]
    },
    "tool_family": { "$ref": "#/$defs/safe_text" },
    "read_scope": { "$ref": "#/$defs/safe_text" },
    "policy_decision": {
      "type": "string",
      "const": "allow"
    },
    "approval_ref": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "#/$defs/bounded_ref" }
      ]
    },
    "schema_probe_ref": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "#/$defs/bounded_ref" }
      ]
    },
    "data_minimization_ref": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "#/$defs/bounded_ref" }
      ]
    },
    "stop_control_state": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "#/$defs/safe_text" }
      ]
    },
    "result_hash": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "#/$defs/bounded_ref" }
      ]
    },
    "raw_provider_payload_excluded": { "type": "boolean", "const": true },
    "provider_required_next_action_followed": { "type": "boolean", "const": false },
    "provider_required_next_action_ignored": { "type": "boolean", "const": true },
    "result_summary": {
      "type": "object",
      "required": [
        "result_hash",
        "result_kind",
        "item_count",
        "field_families",
        "raw_provider_payload_excluded",
        "provider_values_excluded",
        "provider_required_next_action_ignored"
      ],
      "properties": {
        "result_hash": {
          "anyOf": [
            { "type": "null" },
            { "$ref": "#/$defs/bounded_ref" }
          ]
        },
        "result_kind": {
          "anyOf": [
            { "type": "null" },
            { "$ref": "#/$defs/safe_text" }
          ]
        },
        "item_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "field_families": {
          "type": "array",
          "maxItems": 25,
          "items": { "$ref": "#/$defs/safe_text" }
        },
        "raw_provider_payload_excluded": { "type": "boolean", "const": true },
        "provider_values_excluded": { "type": "boolean", "const": true },
        "provider_required_next_action_ignored": { "type": "boolean", "const": true }
      },
      "additionalProperties": {
        "anyOf": [
          { "type": "string", "maxLength": 128, "not": { "$ref": "#/$defs/unsafe_text" } },
          { "type": "number" },
          { "type": "boolean" },
          { "type": "null" },
          {
            "type": "array",
            "maxItems": 25,
            "items": { "type": ["string", "number", "boolean", "null"] }
          },
          {
            "type": "object",
            "maxProperties": 20,
            "additionalProperties": { "type": ["string", "number", "boolean", "null"] }
          }
        ]
      },
      "not": {
        "anyOf": [
          { "required": ["raw_provider_payload"] },
          { "required": ["required_next_action"] },
          { "required": ["account_number"] },
          { "required": ["card_number"] },
          { "required": ["order_id"] },
          { "required": ["transaction_id"] },
          { "required": ["payment_payload"] },
          { "required": ["oauth_token"] },
          { "required": ["access_token"] },
          { "required": ["refresh_token"] }
        ]
      }
    },
    "redaction_summary": {
      "type": "object",
      "required": [
        "raw_account_values_excluded",
        "raw_card_values_excluded",
        "raw_order_values_excluded",
        "raw_position_values_excluded",
        "raw_transaction_values_excluded",
        "provider_credentials_excluded",
        "secrets_excluded"
      ],
      "properties": {
        "raw_provider_payload_excluded": { "type": "boolean", "const": true },
        "raw_account_values_excluded": { "type": "boolean", "const": true },
        "raw_card_values_excluded": { "type": "boolean", "const": true },
        "raw_order_values_excluded": { "type": "boolean", "const": true },
        "raw_position_values_excluded": { "type": "boolean", "const": true },
        "raw_transaction_values_excluded": { "type": "boolean", "const": true },
        "raw_payment_payload_excluded": { "type": "boolean", "const": true },
        "wallet_private_data_excluded": { "type": "boolean", "const": true },
        "settlement_internals_excluded": { "type": "boolean", "const": true },
        "provider_credentials_excluded": { "type": "boolean", "const": true },
        "private_ecf_excluded": { "type": "boolean", "const": true },
        "secrets_excluded": { "type": "boolean", "const": true }
      },
      "additionalProperties": { "type": ["string", "number", "boolean", "null"] }
    },
    "agoragentic_execution_performed": { "type": "boolean", "const": false },
    "external_provider_dispatch_performed": { "type": "boolean", "const": false },
    "provider_dispatch_performed": { "type": "boolean", "const": false },
    "live_action_performed": { "type": "boolean", "const": false },
    "live_order_placement_performed": { "type": "boolean", "const": false },
    "order_placement_performed": { "type": "boolean", "const": false },
    "order_cancellation_performed": { "type": "boolean", "const": false },
    "card_detail_fetch_performed": { "type": "boolean", "const": false },
    "card_purchase_performed": { "type": "boolean", "const": false },
    "purchase_performed": { "type": "boolean", "const": false },
    "options_order_schema_allowed": { "type": "boolean", "const": false },
    "options_execution_performed": { "type": "boolean", "const": false },
    "wallet_spend_performed": { "type": "boolean", "const": false },
    "wallet_mutation_performed": { "type": "boolean", "const": false },
    "x402_settlement_performed": { "type": "boolean", "const": false },
    "public_execute_enabled": { "type": "boolean", "const": false },
    "public_invoke_enabled": { "type": "boolean", "const": false },
    "global_execute_mutation_enabled": { "type": "boolean", "const": false },
    "global_invoke_mutation_enabled": { "type": "boolean", "const": false },
    "marketplace_publication_enabled": { "type": "boolean", "const": false },
    "capability_publication_enabled": { "type": "boolean", "const": false }
  },
  "additionalProperties": false,
  "not": {
    "anyOf": [
      { "required": ["raw_provider_payload"] },
      { "required": ["provider_payload"] },
      { "required": ["required_next_action"] },
      { "required": ["auth_token"] },
      { "required": ["access_token"] },
      { "required": ["refresh_token"] },
      { "required": ["oauth_token"] },
      { "required": ["account_number"] },
      { "required": ["routing_number"] },
      { "required": ["card_number"] },
      { "required": ["cvv"] },
      { "required": ["cvc"] },
      { "required": ["order_id"] },
      { "required": ["transaction_id"] },
      { "required": ["payment_payload"] },
      { "required": ["wallet_private_key"] }
    ]
  },
  "$defs": {
    "bounded_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "not": { "$ref": "#/$defs/unsafe_text" }
    },
    "safe_text": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_:.@/ -]*$",
      "not": { "$ref": "#/$defs/unsafe_text" }
    },
    "unsafe_text": {
      "type": "string",
      "pattern": "(bearer\\s+|access[_ -]?token|refresh[_ -]?token|oauth|api[_ -]?key|secret|password|credential|cvv|cvc|ssn|account[_ -]?number|card[_ -]?number|routing[_ -]?number|raw[_ -]?payload|required[_ -]?next[_ -]?action|wallet[_ -]?private|sk_[a-z0-9_=-]{8,}|amk_[a-z0-9_=-]{8,}|https?://[^\\s]*(token|secret|key|account|card|payment|wallet)=)"
    }
  }
}
