# This file is generated by scripts/generate_schemas.py
components:
  schemas:
    AlertNotification:
      description: "User-facing alert message.\n\n    Attributes:\n        title:\
        \ Alert title.\n        description: Alert body (may contain HTML).\n    \
        \    variant: Visual variant (e.g., \"danger\")."
      properties:
        description:
          type: string
        op:
          enum:
          - alert
        title:
          type: string
        variant:
          anyOf:
          - enum:
            - danger
          - type: 'null'
          default: null
      required:
      - op
      - title
      - description
      title: AlertNotification
      type: object
    BannerNotification:
      description: "Persistent banner message at top of notebook.\n\n    Attributes:\n\
        \        title: Banner title.\n        description: Banner body (may contain\
        \ HTML).\n        variant: Visual variant (e.g., \"danger\").\n        action:\
        \ Optional user action (e.g., \"restart\")."
      properties:
        action:
          anyOf:
          - enum:
            - restart
          - type: 'null'
          default: null
        description:
          type: string
        op:
          enum:
          - banner
        title:
          type: string
        variant:
          anyOf:
          - enum:
            - danger
          - type: 'null'
          default: null
      required:
      - op
      - title
      - description
      title: BannerNotification
      type: object
    CacheClearedNotification:
      description: "Execution cache cleared result.\n\n    Attributes:\n        bytes_freed:\
        \ Bytes freed by clearing cache."
      properties:
        bytes_freed:
          type: integer
        op:
          enum:
          - cache-cleared
      required:
      - op
      - bytes_freed
      title: CacheClearedNotification
      type: object
    CacheInfoNotification:
      description: "Execution cache statistics.\n\n    Attributes:\n        hits:\
        \ Cache hits.\n        misses: Cache misses.\n        time: Time spent on\
        \ cache operations (seconds).\n        disk_to_free: Disk space that could\
        \ be freed (bytes).\n        disk_total: Total disk space used (bytes)."
      properties:
        disk_to_free:
          type: integer
        disk_total:
          type: integer
        hits:
          type: integer
        misses:
          type: integer
        op:
          enum:
          - cache-info
        time:
          type: number
      required:
      - op
      - hits
      - misses
      - time
      - disk_to_free
      - disk_total
      title: CacheInfoNotification
      type: object
    CellChannel:
      description: The channel of a cell's output.
      enum:
      - marimo-error
      - media
      - output
      - pdb
      - stderr
      - stdin
      - stdout
      title: CellChannel
    CellConfig:
      description: 'Internal representation of a cell''s configuration.

        This is not part of the public API.'
      properties:
        column:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        disabled:
          default: false
          type: boolean
        hide_code:
          default: false
          type: boolean
      required: []
      title: CellConfig
      type: object
    CellNotification:
      description: "Updates a cell's state in the frontend.\n\n    Only fields that\
        \ are set (not None) will update the cell state.\n    Omitting a field leaves\
        \ that aspect unchanged.\n\n    Attributes:\n        cell_id: Unique identifier\
        \ of the cell being updated.\n        output: Cell's output. Use CellOutput.empty()\
        \ to clear.\n        console: Console messages. Single/list appends, [] clears,\
        \ None unchanged.\n        status: Execution status (idle/running/stale/queued/disabled-transitively).\n\
        \        stale_inputs: Whether cell has stale inputs from changed dependencies.\n\
        \        run_id: Execution run ID for tracing. Auto-set from context.\n  \
        \      serialization: Serialization status (TopLevelHints).\n        timestamp:\
        \ Creation timestamp, auto-set."
      properties:
        cell_id:
          type: string
        console:
          anyOf:
          - items:
              $ref: '#/components/schemas/CellOutput'
            type: array
          - type: 'null'
          - $ref: '#/components/schemas/CellOutput'
          default: null
        op:
          enum:
          - cell-op
        output:
          anyOf:
          - type: 'null'
          - $ref: '#/components/schemas/CellOutput'
          default: null
        run_id:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        serialization:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        stale_inputs:
          anyOf:
          - type: boolean
          - type: 'null'
          default: null
        status:
          anyOf:
          - enum:
            - disabled-transitively
            - idle
            - queued
            - running
          - type: 'null'
          default: null
        timestamp:
          type: number
      required:
      - op
      - cell_id
      title: CellNotification
      type: object
    CellOutput:
      properties:
        channel:
          $ref: '#/components/schemas/CellChannel'
        data:
          anyOf:
          - type: string
          - items:
              anyOf:
              - $ref: '#/components/schemas/SetupRootError'
              - $ref: '#/components/schemas/CycleError'
              - $ref: '#/components/schemas/MultipleDefinitionError'
              - $ref: '#/components/schemas/ImportStarError'
              - $ref: '#/components/schemas/MarimoAncestorStoppedError'
              - $ref: '#/components/schemas/MarimoAncestorPreventedError'
              - $ref: '#/components/schemas/MarimoExceptionRaisedError'
              - $ref: '#/components/schemas/MarimoStrictExecutionError'
              - $ref: '#/components/schemas/MarimoInterruptionError'
              - $ref: '#/components/schemas/MarimoSyntaxError'
              - $ref: '#/components/schemas/MarimoInternalError'
              - $ref: '#/components/schemas/MarimoSQLError'
              - $ref: '#/components/schemas/UnknownError'
              discriminator:
                mapping:
                  ancestor-prevented: '#/components/schemas/MarimoAncestorPreventedError'
                  ancestor-stopped: '#/components/schemas/MarimoAncestorStoppedError'
                  cycle: '#/components/schemas/CycleError'
                  exception: '#/components/schemas/MarimoExceptionRaisedError'
                  import-star: '#/components/schemas/ImportStarError'
                  internal: '#/components/schemas/MarimoInternalError'
                  interruption: '#/components/schemas/MarimoInterruptionError'
                  multiple-defs: '#/components/schemas/MultipleDefinitionError'
                  setup-refs: '#/components/schemas/SetupRootError'
                  sql-error: '#/components/schemas/MarimoSQLError'
                  strict-exception: '#/components/schemas/MarimoStrictExecutionError'
                  syntax: '#/components/schemas/MarimoSyntaxError'
                  unknown: '#/components/schemas/UnknownError'
                propertyName: type
            type: array
          - type: object
        mimetype:
          enum:
          - application/json
          - application/vnd.jupyter.widget-view+json
          - application/vnd.marimo+error
          - application/vnd.marimo+mimebundle
          - application/vnd.marimo+traceback
          - application/vnd.vega.v5+json
          - application/vnd.vega.v6+json
          - application/vnd.vegalite.v5+json
          - application/vnd.vegalite.v6+json
          - image/avif
          - image/bmp
          - image/gif
          - image/jpeg
          - image/png
          - image/svg+xml
          - image/tiff
          - text/csv
          - text/html
          - text/latex
          - text/markdown
          - text/password
          - text/plain
          - video/mp4
          - video/mpeg
        timestamp:
          type: number
      required:
      - channel
      - mimetype
      - data
      title: CellOutput
      type: object
    ColumnStats:
      description: Represents stats for a column in a data table.
      properties:
        'false':
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        max:
          anyOf:
          - {}
          - type: 'null'
          default: null
        mean:
          anyOf:
          - {}
          - type: 'null'
          default: null
        median:
          anyOf:
          - {}
          - type: 'null'
          default: null
        min:
          anyOf:
          - {}
          - type: 'null'
          default: null
        nulls:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        p25:
          anyOf:
          - {}
          - type: 'null'
          default: null
        p5:
          anyOf:
          - {}
          - type: 'null'
          default: null
        p75:
          anyOf:
          - {}
          - type: 'null'
          default: null
        p95:
          anyOf:
          - {}
          - type: 'null'
          default: null
        std:
          anyOf:
          - {}
          - type: 'null'
          default: null
        total:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        'true':
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        unique:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
      required: []
      title: ColumnStats
      type: object
    CompletedRunNotification:
      description: "Run of submitted cells and descendants completed.\n\n    Attributes:\n\
        \        run_id: Correlation ID echoed from the command that triggered\n \
        \           this completion. ``None`` for handlers that don't take a\n   \
        \         ``run_id`` (everything except ``handle_execute_scratchpad``\n  \
        \          today). Consumers that want to wait for a specific command's\n\
        \            completion filter on this field."
      properties:
        op:
          enum:
          - completed-run
        run_id:
          anyOf:
          - type: string
          - type: 'null'
          default: null
      required:
      - op
      title: CompletedRunNotification
      type: object
    CompletionOption:
      properties:
        completion_info:
          anyOf:
          - type: string
          - type: 'null'
        name:
          type: string
        type:
          type: string
      required:
      - name
      - type
      - completion_info
      title: CompletionOption
      type: object
    CompletionResultNotification:
      description: "Code completion result from language server.\n\n    Attributes:\n\
        \        completion_id: Request ID this responds to.\n        prefix_length:\
        \ Length of prefix to replace.\n        options: Completion options to display."
      properties:
        completion_id:
          type: string
        op:
          enum:
          - completion-result
        options:
          items:
            $ref: '#/components/schemas/CompletionOption'
          type: array
        prefix_length:
          type: integer
      required:
      - op
      - completion_id
      - prefix_length
      - options
      title: CompletionResultNotification
      type: object
    CycleError:
      properties:
        edges_with_vars:
          items:
            items: false
            maxItems: 3
            minItems: 3
            prefixItems:
            - type: string
            - items:
                type: string
              type: array
            - type: string
            type: array
          type: array
        type:
          enum:
          - cycle
      required:
      - type
      - edges_with_vars
      title: CycleError
      type: object
    DataColumnPreviewNotification:
      description: "Data column preview with stats and visualization.\n\n    Inherits\
        \ all ColumnPreview attributes.\n\n    Attributes:\n        table_name: Table\
        \ containing the column.\n        column_name: Column being previewed."
      properties:
        chart_code:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        chart_spec:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        column_name:
          type: string
        error:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        missing_packages:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          default: null
        op:
          enum:
          - data-column-preview
        stats:
          anyOf:
          - type: 'null'
          - $ref: '#/components/schemas/ColumnStats'
          default: null
        table_name:
          type: string
      required:
      - op
      - table_name
      - column_name
      title: DataColumnPreviewNotification
      type: object
    DataSourceConnection:
      description: "Represents a data source connection.\n\nAttributes:\n    source\
        \ (str): The source of the data source connection. E.g 'postgres'.\n    dialect\
        \ (str): The dialect of the data source connection. E.g 'postgresql'.\n  \
        \  name (str): The name of the data source connection. E.g 'engine'.\n   \
        \ display_name (str): The display name of the data source connection. E.g\
        \ 'PostgresQL (engine)'.\n    databases (List[Database]): The databases in\
        \ the data source connection.\n    default_database (Optional[str]): The default\
        \ database in the data source connection.\n    default_schema (Optional[str]):\
        \ The default schema in the data source connection."
      properties:
        databases:
          items:
            $ref: '#/components/schemas/Database'
          type: array
        default_database:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        default_schema:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        dialect:
          type: string
        display_name:
          type: string
        name:
          type: string
        source:
          type: string
      required:
      - source
      - dialect
      - name
      - display_name
      - databases
      title: DataSourceConnection
      type: object
    DataSourceConnectionsNotification:
      description: "Available data source connections for SQL cells.\n\n    Attributes:\n\
        \        connections: Available data source connections."
      properties:
        connections:
          items:
            $ref: '#/components/schemas/DataSourceConnection'
          type: array
        op:
          enum:
          - data-source-connections
      required:
      - op
      - connections
      title: DataSourceConnectionsNotification
      type: object
    DataTable:
      description: "Represents a data table.\n\nAttributes:\n    source_type (DataTableSource):\
        \ Type of data source ('local', 'duckdb', 'connection').\n    source (str):\
        \ Can be dialect, or source db name.\n    name (str): Name of the data table.\n\
        \    num_rows (Optional[int]): Total number of rows in the table, if known.\n\
        \    num_columns (Optional[int]): Total number of columns in the table, if\
        \ known.\n    variable_name (Optional[VariableName]): Variable name referencing\
        \ this table in code.\n    columns (List[DataTableColumn]): List of column\
        \ definitions and metadata.\n    engine (Optional[VariableName]): Database\
        \ engine or connection handler, if any.\n    type (DataTableType): Table type,\
        \ either 'table' or 'view'. Defaults to 'table'.\n    primary_keys (Optional[List[str]]):\
        \ Column names used as primary keys, if any.\n    indexes (Optional[List[str]]):\
        \ Column names used as indexes, if any."
      properties:
        columns:
          items:
            $ref: '#/components/schemas/DataTableColumn'
          type: array
        engine:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        indexes:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          default: null
        name:
          type: string
        num_columns:
          anyOf:
          - type: integer
          - type: 'null'
        num_rows:
          anyOf:
          - type: integer
          - type: 'null'
        primary_keys:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          default: null
        source:
          type: string
        source_type:
          enum:
          - catalog
          - connection
          - duckdb
          - local
        type:
          default: table
          enum:
          - table
          - view
        variable_name:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - source_type
      - source
      - name
      - num_rows
      - num_columns
      - variable_name
      - columns
      title: DataTable
      type: object
    DataTableColumn:
      description: "Represents a column in a data table.\n\nAttributes:\n    name\
        \ (str): The name of the column.\n    type (DataType): The data type of the\
        \ column.\n    external_type (ExternalDataType): The raw data type of the\
        \ column.\n    sample_values (List[Any]): The sample values of the column."
      properties:
        external_type:
          type: string
        name:
          type: string
        sample_values:
          type: array
        type:
          enum:
          - boolean
          - date
          - datetime
          - integer
          - number
          - string
          - time
          - unknown
      required:
      - name
      - type
      - external_type
      - sample_values
      title: DataTableColumn
      type: object
    Database:
      description: "Represents a collection of schemas.\n\nAttributes:\n    name (str):\
        \ The name of the database\n    dialect (str): The dialect of the database\n\
        \    schemas (List[Schema]): List of schemas in the database\n    engine (Optional[VariableName]):\
        \ Database engine or connection handler, if any."
      properties:
        dialect:
          type: string
        engine:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        name:
          type: string
        schemas:
          items:
            $ref: '#/components/schemas/Schema'
          type: array
      required:
      - name
      - dialect
      - schemas
      title: Database
      type: object
    DatasetsNotification:
      description: "Available datasets for data explorer.\n\n    Attributes:\n   \
        \     tables: Available data tables/datasets.\n        clear_channel: If set,\
        \ clears tables from this channel first."
      properties:
        clear_channel:
          anyOf:
          - enum:
            - catalog
            - connection
            - duckdb
            - local
          - type: 'null'
          default: null
        op:
          enum:
          - datasets
        tables:
          items:
            $ref: '#/components/schemas/DataTable'
          type: array
      required:
      - op
      - tables
      title: DatasetsNotification
      type: object
    FocusCellNotification:
      description: "Focuses a cell (kiosk mode).\n\n    Attributes:\n        cell_id:\
        \ Cell to focus."
      properties:
        cell_id:
          type: string
        op:
          enum:
          - focus-cell
      required:
      - op
      - cell_id
      title: FocusCellNotification
      type: object
    FunctionCallResultNotification:
      description: "Result of a frontend-initiated function call.\n\n    Attributes:\n\
        \        function_call_id: ID matching the original request.\n        return_value:\
        \ Function return value as JSON.\n        status: Human-readable success/failure\
        \ status.\n        found: Whether the requested function was located in the\
        \ registry.\n            False signals a transient registry desync, so the\
        \ request is safe\n            to retry. True means no retry will help: a\
        \ non-ok status then\n            reflects a failure unrelated to lookup,\
        \ such as the function\n            raising during execution or not being\
        \ associated with a cell."
      properties:
        found:
          type: boolean
        function_call_id:
          type: string
        op:
          enum:
          - function-call-result
        return_value: {}
        status:
          $ref: '#/components/schemas/HumanReadableStatus'
      required:
      - op
      - function_call_id
      - return_value
      - status
      - found
      title: FunctionCallResultNotification
      type: object
    HumanReadableStatus:
      description: "Human-readable status for operation results.\n\n    Attributes:\n\
        \        code: Status code (\"ok\" or \"error\").\n        title: Optional\
        \ short title.\n        message: Optional detailed description."
      properties:
        code:
          enum:
          - error
          - ok
        message:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        title:
          anyOf:
          - type: string
          - type: 'null'
          default: null
      required:
      - code
      title: HumanReadableStatus
      type: object
    ImportStarError:
      properties:
        lineno:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        msg:
          type: string
        type:
          enum:
          - import-star
      required:
      - type
      - msg
      title: ImportStarError
      type: object
    InstallingPackageAlertNotification:
      description: "Package installation progress with streaming logs.\n\n    Attributes:\n\
        \        packages: Package name to status (queued/installing/installed/failed).\n\
        \        logs: Optional streaming logs per package.\n        log_status: Log\
        \ stream status (append/start/done).\n        source: Which Python environment\
        \ packages are installed into.\n                \"kernel\" (default) installs\
        \ in the kernel's venv; \"server\"\n                installs in the server's\
        \ own Python env."
      properties:
        log_status:
          anyOf:
          - enum:
            - append
            - done
            - start
          - type: 'null'
          default: null
        logs:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          default: null
        op:
          enum:
          - installing-package-alert
        packages:
          additionalProperties:
            enum:
            - failed
            - installed
            - installing
            - queued
          type: object
        source:
          default: kernel
          enum:
          - kernel
          - server
      required:
      - op
      - packages
      title: InstallingPackageAlertNotification
      type: object
    InterruptedNotification:
      description: Kernel was interrupted by user (SIGINT/Ctrl+C).
      properties:
        op:
          enum:
          - interrupted
      required:
      - op
      title: InterruptedNotification
      type: object
    KernelCapabilitiesNotification:
      description: "Kernel capabilities detected at startup.\n\n    All fields auto-detected\
        \ in __post_init__.\n\n    Attributes:\n        terminal: Terminal access\
        \ (unavailable on Windows/Pyodide).\n        pylsp: Python Language Server\
        \ Protocol installed.\n        ty: ty type checker installed.\n        basedpyright:\
        \ basedpyright type checker installed."
      properties:
        basedpyright:
          default: false
          type: boolean
        pylsp:
          default: false
          type: boolean
        pyrefly:
          default: false
          type: boolean
        terminal:
          default: false
          type: boolean
        ty:
          default: false
          type: boolean
      required: []
      title: KernelCapabilitiesNotification
      type: object
    KernelReadyNotification:
      description: "Kernel ready for execution. First notification sent at startup.\n\
        \n    Attributes:\n        cell_ids: Cell IDs in order.\n        codes: Source\
        \ code for each cell.\n        names: Cell names/titles.\n        layout:\
        \ Notebook layout config.\n        configs: Per-cell configuration.\n    \
        \    resumed: Whether resumed from previous session.\n        ui_values: Previous\
        \ UI element values if resumed.\n        last_executed_code: Last executed\
        \ code per cell if resumed.\n        last_execution_time: Last execution time\
        \ per cell if resumed.\n        app_config: Application configuration.\n \
        \       kiosk: Whether running in kiosk mode.\n        capabilities: Available\
        \ kernel capabilities.\n        auto_instantiated: Whether cells already executed\
        \ (run mode)."
      properties:
        app_config:
          $ref: '#/components/schemas/_AppConfig'
        auto_instantiated:
          default: false
          type: boolean
        capabilities:
          $ref: '#/components/schemas/KernelCapabilitiesNotification'
        cell_ids:
          items:
            type: string
          type: array
        codes:
          items:
            type: string
          type: array
        configs:
          items:
            $ref: '#/components/schemas/CellConfig'
          type: array
        kiosk:
          type: boolean
        last_executed_code:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
        last_execution_time:
          anyOf:
          - additionalProperties:
              type: number
            type: object
          - type: 'null'
        layout:
          anyOf:
          - $ref: '#/components/schemas/LayoutConfig'
          - type: 'null'
        names:
          items:
            type: string
          type: array
        op:
          enum:
          - kernel-ready
        resumed:
          type: boolean
        ui_values:
          anyOf:
          - type: object
          - type: 'null'
      required:
      - op
      - cell_ids
      - codes
      - names
      - layout
      - configs
      - resumed
      - ui_values
      - last_executed_code
      - last_execution_time
      - app_config
      - kiosk
      - capabilities
      title: KernelReadyNotification
      type: object
    LayoutConfig:
      properties:
        data:
          type: object
        type:
          type: string
      required:
      - type
      - data
      title: LayoutConfig
      type: object
    MarimoAncestorPreventedError:
      properties:
        blamed_cell:
          anyOf:
          - type: string
          - type: 'null'
        msg:
          type: string
        raising_cell:
          type: string
        type:
          enum:
          - ancestor-prevented
      required:
      - type
      - msg
      - raising_cell
      - blamed_cell
      title: MarimoAncestorPreventedError
      type: object
    MarimoAncestorStoppedError:
      properties:
        msg:
          type: string
        raising_cell:
          type: string
        type:
          enum:
          - ancestor-stopped
      required:
      - type
      - msg
      - raising_cell
      title: MarimoAncestorStoppedError
      type: object
    MarimoExceptionRaisedError:
      properties:
        exception_type:
          type: string
        msg:
          type: string
        raising_cell:
          anyOf:
          - type: string
          - type: 'null'
        traceback:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        type:
          enum:
          - exception
      required:
      - type
      - msg
      - exception_type
      - raising_cell
      title: MarimoExceptionRaisedError
      type: object
    MarimoInternalError:
      description: 'An internal error that should be hidden from the user.

        The error is logged to the console and then a new error is broadcasted

        such that the data is hidden.


        They can be linked back to the original error by the error_id.'
      properties:
        error_id:
          type: string
        msg:
          default: ''
          type: string
        type:
          enum:
          - internal
      required:
      - type
      - error_id
      title: MarimoInternalError
      type: object
    MarimoInterruptionError:
      properties:
        type:
          enum:
          - interruption
      required:
      - type
      title: MarimoInterruptionError
      type: object
    MarimoSQLError:
      description: SQL-specific error with enhanced metadata for debugging.
      properties:
        hint:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        msg:
          type: string
        node_col_offset:
          default: 0
          type: integer
        node_lineno:
          default: 0
          type: integer
        sql_col:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        sql_line:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        sql_statement:
          type: string
        type:
          enum:
          - sql-error
      required:
      - type
      - msg
      - sql_statement
      title: MarimoSQLError
      type: object
    MarimoStrictExecutionError:
      properties:
        blamed_cell:
          anyOf:
          - type: string
          - type: 'null'
        msg:
          type: string
        ref:
          type: string
        type:
          enum:
          - strict-exception
      required:
      - type
      - msg
      - ref
      - blamed_cell
      title: MarimoStrictExecutionError
      type: object
    MarimoSyntaxError:
      properties:
        lineno:
          anyOf:
          - type: integer
          - type: 'null'
          default: null
        msg:
          type: string
        type:
          enum:
          - syntax
      required:
      - type
      - msg
      title: MarimoSyntaxError
      type: object
    MissingPackageAlertNotification:
      description: "Alert for missing packages with install option.\n\n    Attributes:\n\
        \        packages: Missing package names.\n        isolated: Whether auto-install\
        \ is possible in this environment.\n        source: Which Python environment\
        \ to install into. \"kernel\" (default)\n                installs in the kernel's\
        \ venv; \"server\" installs in the\n                server's own Python env\
        \ (e.g. for formatter tools like ruff)."
      properties:
        isolated:
          type: boolean
        op:
          enum:
          - missing-package-alert
        packages:
          items:
            type: string
          type: array
        source:
          default: kernel
          enum:
          - kernel
          - server
      required:
      - op
      - packages
      - isolated
      title: MissingPackageAlertNotification
      type: object
    MultipleDefinitionError:
      properties:
        cells:
          items:
            type: string
          type: array
        name:
          type: string
        type:
          enum:
          - multiple-defs
      required:
      - type
      - name
      - cells
      title: MultipleDefinitionError
      type: object
    QueryParamsAppendNotification:
      description: "Appends value to URL query parameter.\n\n    Attributes:\n   \
        \     key: Query parameter key.\n        value: Value to append."
      properties:
        key:
          type: string
        op:
          enum:
          - query-params-append
        value:
          type: string
      required:
      - op
      - key
      - value
      title: QueryParamsAppendNotification
      type: object
    QueryParamsClearNotification:
      description: Clears all URL query parameters.
      properties:
        op:
          enum:
          - query-params-clear
      required:
      - op
      title: QueryParamsClearNotification
      type: object
    QueryParamsDeleteNotification:
      description: "Deletes URL query parameter values.\n\n    Attributes:\n     \
        \   key: Query parameter key.\n        value: Specific value to delete. If\
        \ None, deletes all values for key."
      properties:
        key:
          type: string
        op:
          enum:
          - query-params-delete
        value:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - op
      - key
      - value
      title: QueryParamsDeleteNotification
      type: object
    QueryParamsSetNotification:
      description: "Sets URL query parameter, replacing existing values.\n\n    Attributes:\n\
        \        key: Query parameter key.\n        value: Value(s) to set."
      properties:
        key:
          type: string
        op:
          enum:
          - query-params-set
        value:
          anyOf:
          - type: string
          - items:
              type: string
            type: array
      required:
      - op
      - key
      - value
      title: QueryParamsSetNotification
      type: object
    ReconnectedNotification:
      description: WebSocket reconnection confirmed.
      properties:
        op:
          enum:
          - reconnected
      required:
      - op
      title: ReconnectedNotification
      type: object
    ReloadNotification:
      description: Instructs frontend to reload the page.
      properties:
        op:
          enum:
          - reload
      required:
      - op
      title: ReloadNotification
      type: object
    RemoveUIElementsNotification:
      description: "Removes UI elements associated with a cell.\n\n    Sent when cell\
        \ is re-executed or deleted.\n\n    Attributes:\n        cell_id: Cell whose\
        \ UI elements should be removed."
      properties:
        cell_id:
          type: string
        op:
          enum:
          - remove-ui-elements
      required:
      - op
      - cell_id
      title: RemoveUIElementsNotification
      type: object
    SQLDatabaseMetadata:
      description: "SQL database metadata.\n\n    Attributes:\n        connection:\
        \ Connection identifier.\n        database: Database name."
      properties:
        connection:
          type: string
        database:
          type: string
      required:
      - connection
      - database
      title: SQLDatabaseMetadata
      type: object
    SQLMetadata:
      description: "SQL database and schema metadata.\n\n    Attributes:\n       \
        \ connection: Connection identifier.\n        database: Database name.\n \
        \       schema: Schema name."
      properties:
        connection:
          type: string
        database:
          type: string
        schema:
          type: string
        type:
          enum:
          - sql-metadata
      required:
      - type
      - connection
      - database
      - schema
      title: SQLMetadata
      type: object
    SQLSchemaListPreviewNotification:
      description: "List of SQL schemas in a database.\n\n    Attributes:\n      \
        \  request_id: Request ID this responds to.\n        metadata: Database and\
        \ schema metadata.\n        schemas: Schemas in database.\n        error:\
        \ Error message if failed."
      properties:
        error:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        metadata:
          $ref: '#/components/schemas/SQLDatabaseMetadata'
        op:
          enum:
          - sql-schema-list-preview
        request_id:
          type: string
        schemas:
          default: []
          items:
            $ref: '#/components/schemas/Schema'
          type: array
      required:
      - op
      - request_id
      - metadata
      title: SQLSchemaListPreviewNotification
      type: object
    SQLTableListPreviewNotification:
      description: "List of SQL tables in a schema.\n\n    Attributes:\n        request_id:\
        \ Request ID this responds to.\n        metadata: Database and schema metadata.\n\
        \        tables: Tables in schema.\n        error: Error message if failed."
      properties:
        error:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        metadata:
          $ref: '#/components/schemas/SQLMetadata'
        op:
          enum:
          - sql-table-list-preview
        request_id:
          type: string
        tables:
          default: []
          items:
            $ref: '#/components/schemas/DataTable'
          type: array
      required:
      - op
      - request_id
      - metadata
      title: SQLTableListPreviewNotification
      type: object
    SQLTablePreviewNotification:
      description: "SQL table preview.\n\n    Attributes:\n        request_id: Request\
        \ ID this responds to.\n        metadata: Database and schema metadata.\n\
        \        table: Table data (None if error).\n        error: Error message\
        \ if failed."
      properties:
        error:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        metadata:
          $ref: '#/components/schemas/SQLMetadata'
        op:
          enum:
          - sql-table-preview
        request_id:
          type: string
        table:
          anyOf:
          - type: 'null'
          - $ref: '#/components/schemas/DataTable'
      required:
      - op
      - request_id
      - metadata
      - table
      title: SQLTablePreviewNotification
      type: object
    Schema:
      properties:
        name:
          type: string
        tables:
          items:
            $ref: '#/components/schemas/DataTable'
          type: array
      required:
      - name
      - tables
      title: Schema
      type: object
    SecretKeysResultNotification:
      description: "Available secret keys from secret providers.\n\n    Attributes:\n\
        \        request_id: Request ID this responds to.\n        secrets: Secret\
        \ keys with provider info."
      properties:
        op:
          enum:
          - secret-keys-result
        request_id:
          type: string
        secrets:
          items:
            $ref: '#/components/schemas/SecretKeysWithProvider'
          type: array
      required:
      - op
      - request_id
      - secrets
      title: SecretKeysResultNotification
      type: object
    SecretKeysWithProvider:
      properties:
        keys:
          items:
            type: string
          type: array
        name:
          type: string
        provider:
          enum:
          - dotenv
          - env
      required:
      - provider
      - name
      - keys
      title: SecretKeysWithProvider
      type: object
    SetupRootError:
      properties:
        edges_with_vars:
          items:
            items: false
            maxItems: 3
            minItems: 3
            prefixItems:
            - type: string
            - items:
                type: string
              type: array
            - type: string
            type: array
          type: array
        type:
          enum:
          - setup-refs
      required:
      - type
      - edges_with_vars
      title: SetupRootError
      type: object
    SqlCatalogCheckResult:
      description: Result of running validation against the database.
      properties:
        error_message:
          anyOf:
          - type: string
          - type: 'null'
        success:
          type: boolean
      required:
      - success
      - error_message
      title: SqlCatalogCheckResult
      type: object
    SqlParseError:
      description: "Represents a single SQL parse error.\n\nAttributes:\n    message\
        \ (str): Description of the error.\n    line (int): Line number where the\
        \ error occurred (1-based).\n    column (int): Column number where the error\
        \ occurred (1-based).\n    severity (Literal[\"error\", \"warning\"]): Severity\
        \ of the error."
      properties:
        column:
          type: integer
        line:
          type: integer
        message:
          type: string
        severity:
          enum:
          - error
          - warning
      required:
      - message
      - line
      - column
      - severity
      title: SqlParseError
      type: object
    SqlParseResult:
      description: "Result of parsing an SQL query.\n\nAttributes:\n    success (bool):\
        \ True if parsing succeeded without errors.\n    errors (list[SqlParseError]):\
        \ List of parse errors (empty if success is True)."
      properties:
        errors:
          items:
            $ref: '#/components/schemas/SqlParseError'
          type: array
        success:
          type: boolean
      required:
      - success
      - errors
      title: SqlParseResult
      type: object
    StartupLogsNotification:
      description: "Streaming kernel startup logs.\n\n    Attributes:\n        content:\
        \ Log content to display.\n        status: Stream status (start/append/done)."
      properties:
        content:
          type: string
        op:
          enum:
          - startup-logs
        status:
          enum:
          - append
          - done
          - start
      required:
      - op
      - content
      - status
      title: StartupLogsNotification
      type: object
    UIElementMessageNotification:
      description: "Sends a message to a UI element/widget.\n\n    Attributes:\n \
        \       ui_element: UI element identifier.\n        message: Message payload\
        \ as dictionary.\n        buffers: Optional binary buffers for large data."
      properties:
        buffers:
          anyOf:
          - items:
              contentEncoding: base64
              type: string
            type: array
          - type: 'null'
          default: null
        message:
          type: object
        op:
          enum:
          - send-ui-element-message
        ui_element:
          type: string
      required:
      - op
      - ui_element
      - message
      title: UIElementMessageNotification
      type: object
    UnknownError:
      properties:
        error_type:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        msg:
          type: string
        type:
          enum:
          - unknown
      required:
      - type
      - msg
      title: UnknownError
      type: object
    ValidateSQLResultNotification:
      description: "SQL query validation result.\n\n    Attributes:\n        request_id:\
        \ Request ID this responds to.\n        parse_result: SQL parsing result.\n\
        \        validate_result: Catalog validation result.\n        error: Error\
        \ message if failed."
      properties:
        error:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        op:
          enum:
          - validate-sql-result
        parse_result:
          anyOf:
          - type: 'null'
          - $ref: '#/components/schemas/SqlParseResult'
          default: null
        request_id:
          type: string
        validate_result:
          anyOf:
          - type: 'null'
          - $ref: '#/components/schemas/SqlCatalogCheckResult'
          default: null
      required:
      - op
      - request_id
      title: ValidateSQLResultNotification
      type: object
    VariableDeclarationNotification:
      description: "Variable declaration and usage for dataflow graph.\n\n    Attributes:\n\
        \        name: Variable name.\n        declared_by: Cell IDs that define this\
        \ variable.\n        used_by: Cell IDs that use this variable."
      properties:
        declared_by:
          items:
            type: string
          type: array
        name:
          type: string
        used_by:
          items:
            type: string
          type: array
      required:
      - name
      - declared_by
      - used_by
      title: VariableDeclarationNotification
      type: object
    VariableValue:
      description: "Variable value and type for variables panel.\n\n    Attributes:\n\
        \        name: Variable name.\n        value: String representation of value.\n\
        \        datatype: Data type as string."
      properties:
        datatype:
          anyOf:
          - type: string
          - type: 'null'
        name:
          type: string
        value:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - name
      - value
      - datatype
      title: VariableValue
      type: object
    VariableValuesNotification:
      description: "Current variable values.\n\n    Attributes:\n        variables:\
        \ Variables with current values and types."
      properties:
        op:
          enum:
          - variable-values
        variables:
          items:
            $ref: '#/components/schemas/VariableValue'
          type: array
      required:
      - op
      - variables
      title: VariableValuesNotification
      type: object
    VariablesNotification:
      description: "Variable dataflow graph.\n\n    Attributes:\n        variables:\
        \ Variable declarations and usage."
      properties:
        op:
          enum:
          - variables
        variables:
          items:
            $ref: '#/components/schemas/VariableDeclarationNotification'
          type: array
      required:
      - op
      - variables
      title: VariablesNotification
      type: object
    _AppConfig:
      description: "Program-specific configuration.\n\n    Configuration for frontends\
        \ or runtimes that is specific to\n    a single marimo program."
      properties:
        app_title:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        auto_download:
          items:
            enum:
            - html
            - ipynb
            - markdown
          type: array
        css_file:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        html_head_file:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        layout_file:
          anyOf:
          - type: string
          - type: 'null'
          default: null
        sql_output:
          default: auto
          enum:
          - auto
          - lazy-polars
          - native
          - pandas
          - polars
        width:
          default: compact
          enum:
          - columns
          - compact
          - full
          - medium
          - normal
      required: []
      title: _AppConfig
      type: object
info:
  title: marimo
openapi: 3.0.0
