{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/finance-agent-options-paper-simulation.v1.json",
  "title": "Finance Agent Options Paper Simulation V1",
  "description": "Standalone C1 paper-mode options simulation artifact for Triptych OS (Agent OS). It consumes a C0 options signal intelligence artifact plus fixture, delayed public quote, or manual owner observation marks and emits simulated fills, paper receipts, and performance summaries without brokerage execution, Robinhood MCP/provider dispatch, live-read routes, wallet/x402 mutation, execute/invoke behavior, marketplace publication, or capability publication.",
  "type": "object",
  "required": [
    "schema",
    "schema_ref",
    "artifact",
    "paper_simulation_id",
    "source_signal_id",
    "source_signal_schema_ref",
    "created_at",
    "status",
    "data_mode",
    "underlying_symbol",
    "strategy_type",
    "simulated_position",
    "simulated_fills",
    "performance_summary",
    "source_observations",
    "lifecycle",
    "receipt",
    "non_personalized",
    "paper_mode_only",
    "delayed_or_fixture_data_only",
    "executable_directly",
    "can_execute_orders",
    "live_fills_recorded",
    "broker_order_recorded",
    "options_execution_enabled",
    "option_order_schema_allowed",
    "provider_dispatch_enabled",
    "route_can_create_live_read_route",
    "route_can_execute",
    "route_can_dispatch_provider",
    "route_can_approve_options_execution",
    "wallet_mutation_enabled",
    "x402_settlement_enabled",
    "marketplace_publication_enabled",
    "capability_publication_enabled"
  ],
  "additionalProperties": false,
  "properties": {
    "schema": {
      "type": "string",
      "const": "agoragentic.agent-os.finance-agent-options-paper-simulation.v1"
    },
    "schema_ref": {
      "type": "string",
      "const": "/schema/finance-agent-options-paper-simulation.v1.json"
    },
    "artifact": {
      "type": "string",
      "const": "options_paper_simulation"
    },
    "paper_simulation_id": {
      "type": "string",
      "pattern": "^optsim_[a-zA-Z0-9_-]{8,64}$"
    },
    "source_signal_id": {
      "type": "string",
      "pattern": "^optsig_[a-zA-Z0-9_-]{8,64}$"
    },
    "source_signal_schema_ref": {
      "type": "string",
      "const": "/schema/finance-agent-options-signal-intelligence.v1.json"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "type": "string",
      "const": "paper_receipt_created"
    },
    "data_mode": {
      "type": "string",
      "const": "fixture_or_delayed_public_data_only"
    },
    "underlying_symbol": { "$ref": "#/$defs/public_safe_symbol" },
    "strategy_type": { "$ref": "#/$defs/strategy_type" },
    "simulated_position": {
      "type": "object",
      "required": [
        "contract_multiplier",
        "leg_count",
        "position_direction",
        "lot_quantity_ratio",
        "pricing_model",
        "opened_at",
        "latest_observed_at",
        "entry_strategy_mark_usd",
        "latest_strategy_mark_usd",
        "simulated_cost_basis_usd",
        "simulated_latest_value_usd",
        "simulated_total_pl_usd",
        "simulated_return_pct",
        "max_risk_usd"
      ],
      "additionalProperties": false,
      "properties": {
        "contract_multiplier": {
          "type": "integer",
          "const": 100
        },
        "leg_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4
        },
        "position_direction": {
          "type": "string",
          "enum": ["net_long", "net_long_debit", "net_short", "net_short_credit"]
        },
        "lot_quantity_ratio": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10
        },
        "pricing_model": {
          "type": "string",
          "const": "one_lot_strategy_mark_from_fixture_or_delayed_public_data"
        },
        "opened_at": {
          "type": "string",
          "format": "date-time"
        },
        "latest_observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "entry_strategy_mark_usd": {
          "type": "number",
          "minimum": 0
        },
        "latest_strategy_mark_usd": {
          "type": "number",
          "minimum": 0
        },
        "simulated_cost_basis_usd": {
          "type": "number",
          "minimum": 0
        },
        "simulated_latest_value_usd": {
          "type": "number",
          "minimum": 0
        },
        "simulated_total_pl_usd": { "type": "number" },
        "simulated_return_pct": { "type": ["number", "null"] },
        "max_risk_usd": {
          "type": ["number", "null"],
          "minimum": 0
        }
      }
    },
    "simulated_fills": {
      "type": "array",
      "minItems": 1,
      "maxItems": 25,
      "items": { "$ref": "#/$defs/simulated_fill" }
    },
    "performance_summary": {
      "type": "object",
      "required": [
        "position_state",
        "latest_observed_at",
        "simulated_realized_pl_usd",
        "simulated_unrealized_pl_usd",
        "simulated_total_pl_usd",
        "simulated_return_pct",
        "max_observed_gain_usd",
        "max_observed_loss_usd",
        "observation_count",
        "paper_receipt_count",
        "live_fills_recorded",
        "broker_order_recorded"
      ],
      "additionalProperties": false,
      "properties": {
        "position_state": {
          "type": "string",
          "enum": ["paper_open", "paper_closed"]
        },
        "latest_observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "simulated_realized_pl_usd": { "type": ["number", "null"] },
        "simulated_unrealized_pl_usd": { "type": ["number", "null"] },
        "simulated_total_pl_usd": { "type": "number" },
        "simulated_return_pct": { "type": ["number", "null"] },
        "max_observed_gain_usd": { "type": "number" },
        "max_observed_loss_usd": { "type": "number" },
        "observation_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 25
        },
        "paper_receipt_count": {
          "type": "integer",
          "const": 1
        },
        "live_fills_recorded": {
          "type": "boolean",
          "const": false
        },
        "broker_order_recorded": {
          "type": "boolean",
          "const": false
        }
      }
    },
    "source_observations": {
      "type": "array",
      "minItems": 1,
      "maxItems": 25,
      "items": { "$ref": "#/$defs/source_observation" }
    },
    "lifecycle": {
      "type": "object",
      "required": ["current_state", "states", "live_execution_state", "broker_reconciliation_state"],
      "additionalProperties": false,
      "properties": {
        "current_state": {
          "type": "string",
          "const": "paper_receipt_created"
        },
        "states": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "type": "string",
            "enum": [
              "source_signal_received",
              "fixture_or_delayed_prices_loaded",
              "simulated_marks_calculated",
              "paper_receipt_created"
            ]
          }
        },
        "live_execution_state": {
          "type": "string",
          "const": "blocked_not_supported"
        },
        "broker_reconciliation_state": {
          "type": "string",
          "const": "not_applicable"
        }
      }
    },
    "receipt": {
      "type": "object",
      "required": [
        "receipt_type",
        "receipt_id",
        "paper_simulation_id",
        "source_signal_id",
        "input_hash",
        "created_at",
        "redaction_summary",
        "no_live_action_assertion",
        "no_brokerage_execution_assertion"
      ],
      "additionalProperties": false,
      "properties": {
        "receipt_type": {
          "type": "string",
          "const": "options_paper_simulation_receipt"
        },
        "receipt_id": {
          "type": "string",
          "pattern": "^rcpt_[a-f0-9]{24}$"
        },
        "paper_simulation_id": {
          "type": "string",
          "pattern": "^optsim_[a-zA-Z0-9_-]{8,64}$"
        },
        "source_signal_id": {
          "type": "string",
          "pattern": "^optsig_[a-zA-Z0-9_-]{8,64}$"
        },
        "input_hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "redaction_summary": {
          "type": "object",
          "required": [
            "raw_provider_payload_excluded",
            "private_account_values_excluded",
            "order_payload_excluded",
            "wallet_values_excluded",
            "live_brokerage_payload_excluded"
          ],
          "additionalProperties": false,
          "properties": {
            "raw_provider_payload_excluded": { "type": "boolean", "const": true },
            "private_account_values_excluded": { "type": "boolean", "const": true },
            "order_payload_excluded": { "type": "boolean", "const": true },
            "wallet_values_excluded": { "type": "boolean", "const": true },
            "live_brokerage_payload_excluded": { "type": "boolean", "const": true }
          }
        },
        "no_live_action_assertion": { "type": "boolean", "const": true },
        "no_brokerage_execution_assertion": { "type": "boolean", "const": true }
      }
    },
    "non_personalized": { "type": "boolean", "const": true },
    "paper_mode_only": { "type": "boolean", "const": true },
    "delayed_or_fixture_data_only": { "type": "boolean", "const": true },
    "executable_directly": { "type": "boolean", "const": false },
    "can_execute_orders": { "type": "boolean", "const": false },
    "live_fills_recorded": { "type": "boolean", "const": false },
    "broker_order_recorded": { "type": "boolean", "const": false },
    "options_execution_enabled": { "type": "boolean", "const": false },
    "option_order_schema_allowed": { "type": "boolean", "const": false },
    "provider_dispatch_enabled": { "type": "boolean", "const": false },
    "route_can_create_live_read_route": { "type": "boolean", "const": false },
    "route_can_execute": { "type": "boolean", "const": false },
    "route_can_dispatch_provider": { "type": "boolean", "const": false },
    "route_can_approve_options_execution": { "type": "boolean", "const": false },
    "wallet_mutation_enabled": { "type": "boolean", "const": false },
    "x402_settlement_enabled": { "type": "boolean", "const": false },
    "marketplace_publication_enabled": { "type": "boolean", "const": false },
    "capability_publication_enabled": { "type": "boolean", "const": false }
  },
  "$defs": {
    "strategy_type": {
      "type": "string",
      "enum": ["long_call", "long_put", "debit_spread", "credit_spread", "spread_template"]
    },
    "source_observation": {
      "type": "object",
      "required": [
        "observation_id",
        "phase",
        "observed_at",
        "underlying_price_usd",
        "strategy_mark_usd",
        "source_type",
        "source_ref",
        "note",
        "delayed_or_fixture_data_only",
        "live_brokerage_data"
      ],
      "additionalProperties": false,
      "properties": {
        "observation_id": {
          "type": "string",
          "pattern": "^obs_[0-9]{2}$"
        },
        "phase": {
          "type": "string",
          "enum": ["paper_entry", "paper_mark", "paper_exit", "paper_expiry_mark"]
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "underlying_price_usd": {
          "type": ["number", "null"],
          "minimum": 0
        },
        "strategy_mark_usd": {
          "type": "number",
          "minimum": 0
        },
        "source_type": {
          "type": "string",
          "enum": ["fixture", "delayed_public_quote", "manual_owner_observation"]
        },
        "source_ref": { "$ref": "#/$defs/public_safe_id_128" },
        "note": {
          "anyOf": [
            { "$ref": "#/$defs/public_safe_text_256" },
            { "type": "null" }
          ]
        },
        "delayed_or_fixture_data_only": {
          "type": "boolean",
          "const": true
        },
        "live_brokerage_data": {
          "type": "boolean",
          "const": false
        }
      }
    },
    "simulated_fill": {
      "type": "object",
      "required": [
        "fill_id",
        "fill_type",
        "observed_at",
        "strategy_mark_usd",
        "simulated_gross_value_usd",
        "source_observation_id",
        "source_type",
        "source_ref",
        "is_broker_fill",
        "broker_fill_recorded"
      ],
      "additionalProperties": false,
      "properties": {
        "fill_id": {
          "type": "string",
          "pattern": "^paperfill_[a-f0-9]{16}$"
        },
        "fill_type": {
          "type": "string",
          "enum": ["paper_entry", "paper_mark", "paper_exit_or_expiry_mark"]
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "strategy_mark_usd": {
          "type": "number",
          "minimum": 0
        },
        "simulated_gross_value_usd": {
          "type": "number",
          "minimum": 0
        },
        "source_observation_id": {
          "type": "string",
          "pattern": "^obs_[0-9]{2}$"
        },
        "source_type": {
          "type": "string",
          "enum": ["fixture", "delayed_public_quote", "manual_owner_observation"]
        },
        "source_ref": { "$ref": "#/$defs/public_safe_id_128" },
        "is_broker_fill": {
          "type": "boolean",
          "const": false
        },
        "broker_fill_recorded": {
          "type": "boolean",
          "const": false
        }
      }
    },
    "public_safe_symbol": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "pattern": "^[A-Z][A-Z0-9.]{0,9}$"
    },
    "public_safe_id_128": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_.:-]+$"
    },
    "public_safe_text_256": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "not": { "$ref": "#/$defs/private_or_token_text" }
    },
    "private_or_token_text": {
      "anyOf": [
        { "pattern": "[?&](token|access_token|refresh_token|api_key|key|secret|authorization)=" },
        { "pattern": "([Aa][Pp][Ii][_-]?[Kk][Ee][Yy]|[Aa]ccess[_-]?[Tt]oken|[Rr]efresh[_-]?[Tt]oken|[Oo][Aa]uth|[Pp]assword|[Ss]ecret|[Mm][Ff][Aa]|[Cc][Vv][Vv])" },
        { "pattern": "([Aa]ccount|[Cc]ard|[Pp]ayment|[Ww]allet|[Rr]outing)[\\s_-]?([Nn]umber|[Pp]ayload|[Rr]aw|[Vv]alue|[Vv]alues)" }
      ]
    }
  }
}
