{
  "components": {
    "schemas": {
      "ActionDescriptor": {
        "additionalProperties": false,
        "properties": {
          "audit_required": {
            "title": "Audit Required",
            "type": "boolean"
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked Reason"
          },
          "confirm_required": {
            "title": "Confirm Required",
            "type": "boolean"
          },
          "href": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Href"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/ActionMode"
          },
          "preview_required": {
            "title": "Preview Required",
            "type": "boolean"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          }
        },
        "required": [
          "label",
          "href",
          "mode",
          "sensitivity",
          "preview_required",
          "confirm_required",
          "audit_required"
        ],
        "title": "ActionDescriptor",
        "type": "object"
      },
      "ActionMode": {
        "enum": [
          "link_only",
          "read_only",
          "preview_required",
          "confirm_required",
          "blocked_in_mvp"
        ],
        "title": "ActionMode",
        "type": "string"
      },
      "ActivityEvent": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "module_id": {
            "$ref": "#/components/schemas/ModuleId"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "redacted": {
            "title": "Redacted",
            "type": "boolean"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "source_type": {
            "$ref": "#/components/schemas/SourceType"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "module_id",
          "title",
          "message",
          "severity",
          "sensitivity",
          "occurred_at",
          "source_type",
          "redacted"
        ],
        "title": "ActivityEvent",
        "type": "object"
      },
      "ApprovalItem": {
        "additionalProperties": false,
        "properties": {
          "confirm_action": {
            "$ref": "#/components/schemas/ActionDescriptor"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "module_id": {
            "$ref": "#/components/schemas/ModuleId"
          },
          "preview_action": {
            "$ref": "#/components/schemas/ActionDescriptor"
          },
          "requested_at": {
            "format": "date-time",
            "title": "Requested At",
            "type": "string"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "module_id",
          "title",
          "status",
          "severity",
          "sensitivity",
          "requested_at",
          "preview_action",
          "confirm_action"
        ],
        "title": "ApprovalItem",
        "type": "object"
      },
      "ApprovalStatus": {
        "enum": [
          "pending",
          "blocked",
          "approved",
          "rejected"
        ],
        "title": "ApprovalStatus",
        "type": "string"
      },
      "AttentionItem": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionDescriptor"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dedupe_key": {
            "title": "Dedupe Key",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "module_id": {
            "$ref": "#/components/schemas/ModuleId"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "module_id",
          "title",
          "message",
          "severity",
          "sensitivity",
          "created_at",
          "dedupe_key"
        ],
        "title": "AttentionItem",
        "type": "object"
      },
      "DemoInfo": {
        "additionalProperties": false,
        "properties": {
          "actions_enabled": {
            "default": false,
            "title": "Actions Enabled",
            "type": "boolean"
          },
          "legacy_links": {
            "additionalProperties": {
              "enum": [
                "configured",
                "configured_protected",
                "not_configured",
                "blocked",
                "locked_by_policy"
              ],
              "type": "string"
            },
            "propertyNames": {
              "enum": [
                "finance",
                "health",
                "autoshorts",
                "family"
              ]
            },
            "title": "Legacy Links",
            "type": "object"
          },
          "mode": {
            "enum": [
              "demo_mock",
              "demo_mixed_readonly",
              "mixed_readonly_handoff"
            ],
            "title": "Mode",
            "type": "string"
          },
          "modules": {
            "items": {
              "enum": [
                "finance",
                "health",
                "autoshorts",
                "family",
                "system"
              ],
              "type": "string"
            },
            "title": "Modules",
            "type": "array"
          },
          "runtime_access": {
            "enum": [
              "disabled",
              "optional_readonly"
            ],
            "title": "Runtime Access",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "modules",
          "runtime_access",
          "legacy_links"
        ],
        "title": "DemoInfo",
        "type": "object"
      },
      "DisplayPolicy": {
        "enum": [
          "hidden",
          "summary",
          "exact"
        ],
        "title": "DisplayPolicy",
        "type": "string"
      },
      "ErrorEnvelope": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "details_redacted": {
            "title": "Details Redacted",
            "type": "boolean"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "module_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModuleId"
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "retryable": {
            "title": "Retryable",
            "type": "boolean"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          }
        },
        "required": [
          "code",
          "message",
          "severity",
          "retryable",
          "details_redacted",
          "occurred_at"
        ],
        "title": "ErrorEnvelope",
        "type": "object"
      },
      "KpiItem": {
        "additionalProperties": false,
        "properties": {
          "display_policy": {
            "$ref": "#/components/schemas/DisplayPolicy"
          },
          "help_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Help Text"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "key",
          "label",
          "value",
          "severity",
          "sensitivity",
          "display_policy"
        ],
        "title": "KpiItem",
        "type": "object"
      },
      "ModuleId": {
        "enum": [
          "finance",
          "health",
          "autoshorts",
          "family",
          "system"
        ],
        "title": "ModuleId",
        "type": "string"
      },
      "ModuleRegistryEntry": {
        "additionalProperties": false,
        "properties": {
          "actions_enabled": {
            "title": "Actions Enabled",
            "type": "boolean"
          },
          "base_url_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url Env"
          },
          "contract_version": {
            "title": "Contract Version",
            "type": "string"
          },
          "default_display_policy": {
            "$ref": "#/components/schemas/DisplayPolicy"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "legacy_url_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legacy Url Env"
          },
          "module_id": {
            "$ref": "#/components/schemas/ModuleId"
          },
          "notes": {
            "items": {
              "type": "string"
            },
            "title": "Notes",
            "type": "array"
          },
          "runtime_base_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime Base Env"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "source_type": {
            "$ref": "#/components/schemas/SourceType"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "module_id",
          "title",
          "enabled",
          "sensitivity",
          "source_type",
          "contract_version",
          "default_display_policy",
          "actions_enabled"
        ],
        "title": "ModuleRegistryEntry",
        "type": "object"
      },
      "ModuleSnapshot": {
        "additionalProperties": false,
        "properties": {
          "approval_items": {
            "items": {
              "$ref": "#/components/schemas/ApprovalItem"
            },
            "title": "Approval Items",
            "type": "array"
          },
          "attention_items": {
            "items": {
              "$ref": "#/components/schemas/AttentionItem"
            },
            "title": "Attention Items",
            "type": "array"
          },
          "contract_version": {
            "title": "Contract Version",
            "type": "string"
          },
          "degraded_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Degraded Reason"
          },
          "display_policy": {
            "$ref": "#/components/schemas/DisplayPolicy"
          },
          "kpis": {
            "items": {
              "$ref": "#/components/schemas/KpiItem"
            },
            "maxItems": 3,
            "title": "Kpis",
            "type": "array"
          },
          "last_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Attempt At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/ActionDescriptor"
            },
            "title": "Links",
            "type": "array"
          },
          "module_id": {
            "$ref": "#/components/schemas/ModuleId"
          },
          "primary_action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionDescriptor"
              },
              {
                "type": "null"
              }
            ]
          },
          "reports": {
            "items": {
              "$ref": "#/components/schemas/ReportLink"
            },
            "title": "Reports",
            "type": "array"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "source_health": {
            "$ref": "#/components/schemas/SourceHealth"
          },
          "stale_after_seconds": {
            "minimum": 0.0,
            "title": "Stale After Seconds",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ModuleStatus"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "module_id",
          "title",
          "status",
          "sensitivity",
          "display_policy",
          "last_success_at",
          "last_attempt_at",
          "stale_after_seconds",
          "source_health",
          "contract_version"
        ],
        "title": "ModuleSnapshot",
        "type": "object"
      },
      "ModuleStatus": {
        "enum": [
          "ok",
          "attention",
          "degraded",
          "offline"
        ],
        "title": "ModuleStatus",
        "type": "string"
      },
      "OverviewResponse": {
        "additionalProperties": false,
        "properties": {
          "activity": {
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            },
            "title": "Activity",
            "type": "array"
          },
          "approvals": {
            "items": {
              "$ref": "#/components/schemas/ApprovalItem"
            },
            "title": "Approvals",
            "type": "array"
          },
          "attention_items": {
            "items": {
              "$ref": "#/components/schemas/AttentionItem"
            },
            "maxItems": 5,
            "title": "Attention Items",
            "type": "array"
          },
          "contract_version": {
            "title": "Contract Version",
            "type": "string"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "title": "Errors",
            "type": "array"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "modules": {
            "items": {
              "$ref": "#/components/schemas/ModuleSnapshot"
            },
            "maxItems": 5,
            "title": "Modules",
            "type": "array"
          },
          "redaction_policy": {
            "$ref": "#/components/schemas/RedactionPolicy"
          },
          "reports": {
            "items": {
              "$ref": "#/components/schemas/ReportLink"
            },
            "title": "Reports",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/ModuleStatus"
          }
        },
        "required": [
          "contract_version",
          "generated_at",
          "status",
          "redaction_policy"
        ],
        "title": "OverviewResponse",
        "type": "object"
      },
      "RedactionPolicy": {
        "additionalProperties": false,
        "properties": {
          "allow_exact_finance_values": {
            "default": false,
            "title": "Allow Exact Finance Values",
            "type": "boolean"
          },
          "allow_health_detail_links": {
            "default": false,
            "title": "Allow Health Detail Links",
            "type": "boolean"
          },
          "default_display_policy": {
            "$ref": "#/components/schemas/DisplayPolicy"
          },
          "demo_mode": {
            "default": true,
            "title": "Demo Mode",
            "type": "boolean"
          },
          "forbidden_fields": {
            "items": {
              "type": "string"
            },
            "title": "Forbidden Fields",
            "type": "array"
          },
          "log_forbidden_fields": {
            "items": {
              "type": "string"
            },
            "title": "Log Forbidden Fields",
            "type": "array"
          }
        },
        "required": [
          "default_display_policy",
          "forbidden_fields",
          "log_forbidden_fields"
        ],
        "title": "RedactionPolicy",
        "type": "object"
      },
      "ReportKind": {
        "enum": [
          "html",
          "pdf",
          "markdown",
          "json",
          "external"
        ],
        "title": "ReportKind",
        "type": "string"
      },
      "ReportLink": {
        "additionalProperties": false,
        "properties": {
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked Reason"
          },
          "display_policy": {
            "$ref": "#/components/schemas/DisplayPolicy"
          },
          "generated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "href": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Href"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "module_id": {
            "$ref": "#/components/schemas/ModuleId"
          },
          "sensitivity": {
            "$ref": "#/components/schemas/Sensitivity"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "module_id",
          "title",
          "kind",
          "href",
          "sensitivity",
          "display_policy"
        ],
        "title": "ReportLink",
        "type": "object"
      },
      "Sensitivity": {
        "enum": [
          "public",
          "internal",
          "sensitive",
          "critical"
        ],
        "title": "Sensitivity",
        "type": "string"
      },
      "Severity": {
        "enum": [
          "info",
          "success",
          "warning",
          "error",
          "critical"
        ],
        "title": "Severity",
        "type": "string"
      },
      "SourceHealth": {
        "additionalProperties": false,
        "properties": {
          "contract_version": {
            "title": "Contract Version",
            "type": "string"
          },
          "last_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Attempt At"
          },
          "last_error_redacted": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error Redacted"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "latency_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "reachable": {
            "title": "Reachable",
            "type": "boolean"
          },
          "source_type": {
            "$ref": "#/components/schemas/SourceType"
          },
          "stale": {
            "title": "Stale",
            "type": "boolean"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "reachable",
          "source_type",
          "contract_version",
          "stale"
        ],
        "title": "SourceHealth",
        "type": "object"
      },
      "SourceType": {
        "enum": [
          "api",
          "http_api",
          "local_probe",
          "sqlite_summary",
          "filesystem_metadata",
          "static_config",
          "mock",
          "safe_marker"
        ],
        "title": "SourceType",
        "type": "string"
      }
    }
  },
  "info": {
    "description": "Mock-only API Gateway skeleton for JARVIS Command Dashboard.",
    "title": "JARVIS API Gateway",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/activity": {
      "get": {
        "operationId": "activity_api_activity_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ActivityEvent"
                  },
                  "title": "Response Activity Api Activity Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Activity"
      }
    },
    "/api/approvals": {
      "get": {
        "operationId": "approvals_api_approvals_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApprovalItem"
                  },
                  "title": "Response Approvals Api Approvals Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Approvals"
      }
    },
    "/api/demo-info": {
      "get": {
        "operationId": "demo_info_api_demo_info_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoInfo"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Demo Info"
      }
    },
    "/api/finance/trader-desk": {
      "get": {
        "operationId": "finance_trader_desk_api_finance_trader_desk_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Finance Trader Desk Api Finance Trader Desk Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Finance Trader Desk"
      }
    },
    "/api/finance/trader-desk/preflight": {
      "get": {
        "operationId": "finance_trader_desk_preflight_api_finance_trader_desk_preflight_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Finance Trader Desk Preflight Api Finance Trader Desk Preflight Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Finance Trader Desk Preflight"
      }
    },
    "/api/finance/trader-desk/scorecard": {
      "get": {
        "operationId": "finance_trader_desk_scorecard_api_finance_trader_desk_scorecard_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Finance Trader Desk Scorecard Api Finance Trader Desk Scorecard Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Finance Trader Desk Scorecard"
      }
    },
    "/api/healthz": {
      "get": {
        "operationId": "healthz_api_healthz_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Healthz Api Healthz Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Healthz"
      }
    },
    "/api/modules": {
      "get": {
        "operationId": "modules_api_modules_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ModuleRegistryEntry"
                  },
                  "title": "Response Modules Api Modules Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Modules"
      }
    },
    "/api/overview": {
      "get": {
        "operationId": "overview_api_overview_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverviewResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Overview"
      }
    },
    "/api/redaction-policy": {
      "get": {
        "operationId": "redaction_policy_api_redaction_policy_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedactionPolicy"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Redaction Policy"
      }
    },
    "/api/reports": {
      "get": {
        "operationId": "reports_api_reports_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReportLink"
                  },
                  "title": "Response Reports Api Reports Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Reports"
      }
    }
  }
}
