From bbd42ed29a5e1582cc136e76a1b7fb1a1f706346 Mon Sep 17 00:00:00 2001 From: Derek Fulton Date: Fri, 12 Dec 2025 18:53:06 +0000 Subject: [PATCH 01/16] feat: docker-aware machine stats --- .../wrapper/footer-items/machine-stats.tsx | 6 +- marimo/_server/api/endpoints/health.py | 40 +++- marimo/_utils/health.py | 181 +++++++++++++++++- packages/openapi/api.yaml | 2 + packages/openapi/src/api.ts | 1 + tests/_server/api/endpoints/test_health.py | 2 + 6 files changed, 220 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx index 2b3a0bf8c9c..4f3f3e14bde 100644 --- a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +++ b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx @@ -55,8 +55,10 @@ const MemoryUsageBar: React.FC<{ kernel: UsageResponse["kernel"]; server: UsageResponse["server"]; }> = ({ memory, kernel, server }) => { - const { percent, total, available } = memory; + const { percent, total, available, is_container } = memory; + const isContainer = is_container === true; const roundedPercent = Math.round(percent); + const memoryLabel = isContainer ? "container memory" : "computer memory"; const gbFormatter = useNumberFormatter({ maximumFractionDigits: 2, @@ -82,7 +84,7 @@ const MemoryUsageBar: React.FC<{ content={
- computer memory: {formatGB(total - available)} /{" "} + {memoryLabel}: {formatGB(total - available)} /{" "} {formatGB(total)} GB ({roundedPercent}%) {server?.memory && ( diff --git a/marimo/_server/api/endpoints/health.py b/marimo/_server/api/endpoints/health.py index db4c8ae1560..58ddd8595b0 100644 --- a/marimo/_server/api/endpoints/health.py +++ b/marimo/_server/api/endpoints/health.py @@ -13,6 +13,7 @@ from marimo._server.api.deps import AppState from marimo._server.router import APIRouter from marimo._utils.health import ( + get_container_resources, get_node_version, get_python_version, get_required_modules_list, @@ -131,6 +132,8 @@ async def usage(request: Request) -> JSONResponse: type: integer free: type: integer + is_container: + type: boolean required: - total - available @@ -194,7 +197,32 @@ async def usage(request: Request) -> JSONResponse: import psutil - memory = psutil.virtual_memory() + # Check if running in a container with resource limits + container_resources = get_container_resources() + + if container_resources and "memory" in container_resources: + # Use container memory stats + container_mem = container_resources["memory"] + memory_stats = { + "total": container_mem["total"], + "available": container_mem["available"], + "percent": container_mem["percent"], + "used": container_mem["used"], + "free": container_mem["available"], # Use available as free + "is_container": True, + } + else: + # Use host memory stats + memory = psutil.virtual_memory() + memory_stats = { + "total": memory.total, + "available": memory.available, + "percent": memory.percent, + "used": memory.used, + "free": memory.free, + "is_container": False, + } + # interval=None is nonblocking; first value is meaningless but after # that it's useful. cpu = psutil.cpu_percent(interval=None) @@ -270,14 +298,8 @@ async def usage(request: Request) -> JSONResponse: return JSONResponse( { - # computer memory - "memory": { - "total": memory.total, - "available": memory.available, - "percent": memory.percent, - "used": memory.used, - "free": memory.free, - }, + # computer memory or container memory + "memory": memory_stats, # marimo server "server": { "memory": server_memory, diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 433d0c6f7c0..0f337b8c934 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -2,9 +2,10 @@ from __future__ import annotations import importlib.metadata +import os import subprocess import sys -from typing import Optional +from typing import Any, Optional from marimo import _loggers @@ -183,3 +184,181 @@ def communicate_with_timeout( except subprocess.TimeoutExpired: process.kill() return "", "Error: Process timed out" + + +def has_cgroup_limits() -> tuple[bool, bool]: + """ + Check if cgroup resource limits are explicitly set. + + Returns: + (has_memory_limit, has_cpu_limit): Tuple of booleans indicating + whether memory and CPU limits are set. + """ + has_memory = False + has_cpu = False + + try: + # Check cgroup v2 (modern containers) + if os.path.exists("/sys/fs/cgroup/memory.max"): + memory_max = open("/sys/fs/cgroup/memory.max", encoding="utf-8").read().strip() + # 'max' means unlimited, any number means limited + has_memory = memory_max != "max" + + if os.path.exists("/sys/fs/cgroup/cpu.max"): + cpu_max = open("/sys/fs/cgroup/cpu.max", encoding="utf-8").read().strip() + # 'max' means unlimited + has_cpu = cpu_max != "max" + + # Fallback to cgroup v1 (legacy) + if not has_memory and os.path.exists( + "/sys/fs/cgroup/memory/memory.limit_in_bytes" + ): + limit = int( + open("/sys/fs/cgroup/memory/memory.limit_in_bytes", encoding="utf-8") + .read() + .strip() + ) + # Very large number (typically > 2^62) indicates unlimited + # This is the default "unlimited" value in cgroup v1 + has_memory = limit < (1 << 62) + + if not has_cpu and os.path.exists( + "/sys/fs/cgroup/cpu/cpu.cfs_quota_us" + ): + quota = int( + open("/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8") + .read() + .strip() + ) + # In cgroup v1, -1 means unlimited + has_cpu = quota > 0 + + except (FileNotFoundError, PermissionError, ValueError) as e: + LOGGER.debug(f"Error checking cgroup limits: {e}") + + return has_memory, has_cpu + + +def get_container_resources() -> Optional[dict[str, Any]]: + """ + Get container resource limits if running in a resource-restricted container. + + Returns: + Dictionary with 'memory' and/or 'cpu' keys if limits are set, + None if not in a container or no limits are configured. + + Example return value: + { + 'memory': { + 'total': 2147483648, # bytes + 'used': 1073741824, # bytes + 'available': 1073741824, # bytes + 'percent': 50.0 # percentage + }, + 'cpu': { + 'quota': 200000, # microseconds + 'period': 100000, # microseconds + 'cores': 2.0 # effective number of cores + } + } + """ + has_memory_limit, has_cpu_limit = has_cgroup_limits() + + if not (has_memory_limit or has_cpu_limit): + return None + + resources: dict[str, Any] = {} + + # Get memory stats if limited + if has_memory_limit: + try: + # Try cgroup v2 first + if os.path.exists("/sys/fs/cgroup/memory.max"): + memory_max = ( + open("/sys/fs/cgroup/memory.max", encoding="utf-8").read().strip() + ) + memory_current = ( + open("/sys/fs/cgroup/memory.current", encoding="utf-8").read().strip() + ) + + if memory_max != "max": + total = int(memory_max) + used = int(memory_current) + available = total - used + percent = (used / total) * 100 if total > 0 else 0 + + resources["memory"] = { + "total": total, + "used": used, + "available": available, + "percent": percent, + } + # Fallback to cgroup v1 + elif os.path.exists( + "/sys/fs/cgroup/memory/memory.limit_in_bytes" + ): + total = int( + open("/sys/fs/cgroup/memory/memory.limit_in_bytes", encoding="utf-8") + .read() + .strip() + ) + used = int( + open("/sys/fs/cgroup/memory/memory.usage_in_bytes", encoding="utf-8") + .read() + .strip() + ) + available = total - used + percent = (used / total) * 100 if total > 0 else 0 + + resources["memory"] = { + "total": total, + "used": used, + "available": available, + "percent": percent, + } + except (FileNotFoundError, PermissionError, ValueError) as e: + LOGGER.debug(f"Error reading container memory stats: {e}") + + # Get CPU stats if limited + if has_cpu_limit: + try: + # cgroup v2 + if os.path.exists("/sys/fs/cgroup/cpu.max"): + cpu_max_line = ( + open("/sys/fs/cgroup/cpu.max", encoding="utf-8").read().strip() + ) + if cpu_max_line != "max": + parts = cpu_max_line.split() + if len(parts) == 2: + quota = int(parts[0]) + period = int(parts[1]) + cores = quota / period + + resources["cpu"] = { + "quota": quota, + "period": period, + "cores": cores, + } + # cgroup v1 + elif os.path.exists("/sys/fs/cgroup/cpu/cpu.cfs_quota_us"): + quota = int( + open("/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8") + .read() + .strip() + ) + period = int( + open("/sys/fs/cgroup/cpu/cpu.cfs_period_us", encoding="utf-8") + .read() + .strip() + ) + if quota > 0: # -1 means unlimited + cores = quota / period + resources["cpu"] = { + "quota": quota, + "period": period, + "cores": cores, + } + except (FileNotFoundError, PermissionError, ValueError) as e: + LOGGER.debug(f"Error reading container CPU stats: {e}") + + return resources if resources else None diff --git a/packages/openapi/api.yaml b/packages/openapi/api.yaml index beae4d07fe2..3c035fc6681 100644 --- a/packages/openapi/api.yaml +++ b/packages/openapi/api.yaml @@ -4738,6 +4738,8 @@ paths: type: integer free: type: integer + is_container: + type: boolean percent: type: number total: diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index c1a653a9c0f..c4163c93ddd 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -2663,6 +2663,7 @@ export interface paths { memory: { available: number; free: number; + is_container?: boolean; percent: number; total: number; used: number; diff --git a/tests/_server/api/endpoints/test_health.py b/tests/_server/api/endpoints/test_health.py index 4a368297bfc..d8da31f3105 100644 --- a/tests/_server/api/endpoints/test_health.py +++ b/tests/_server/api/endpoints/test_health.py @@ -60,6 +60,8 @@ def test_memory(client: TestClient) -> None: assert memory["available"] > 0 assert memory["used"] > 0 assert memory["free"] > 0 + assert "is_container" in memory + assert isinstance(memory["is_container"], bool) cpu = response.json()["cpu"] assert cpu["percent"] >= 0 computer = response.json()["server"] From 9a2baf8e3fb5d56bdcf6567369df780bcc5d84d5 Mon Sep 17 00:00:00 2001 From: Derek Fulton Date: Tue, 16 Dec 2025 11:42:41 +0000 Subject: [PATCH 02/16] feat: Show container memory in machine stats when running with cgroup limits + minimal tests --- .../wrapper/footer-items/machine-stats.tsx | 3 +- marimo/_utils/health.py | 95 +- packages/openapi/src/api.ts | 9457 ++++++++--------- packages/openapi/src/notebook.ts | 62 +- packages/openapi/src/session.ts | 163 +- tests/_utils/test_health_utils.py | 20 + 6 files changed, 4829 insertions(+), 4971 deletions(-) diff --git a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx index 4f3f3e14bde..41524e75929 100644 --- a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +++ b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx @@ -56,9 +56,8 @@ const MemoryUsageBar: React.FC<{ server: UsageResponse["server"]; }> = ({ memory, kernel, server }) => { const { percent, total, available, is_container } = memory; - const isContainer = is_container === true; const roundedPercent = Math.round(percent); - const memoryLabel = isContainer ? "container memory" : "computer memory"; + const memoryLabel = is_container ? "container memory" : "computer memory"; const gbFormatter = useNumberFormatter({ maximumFractionDigits: 2, diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 0f337b8c934..97a70fda8c4 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -190,6 +190,11 @@ def has_cgroup_limits() -> tuple[bool, bool]: """ Check if cgroup resource limits are explicitly set. + This is the standard way to detect container resource limits on Linux. + These cgroup paths are part of the kernel ABI and are stable across versions. + See: https://www.kernel.org/doc/Documentation/cgroup-v2.txt + https://www.kernel.org/doc/Documentation/cgroup-v1/ + Returns: (has_memory_limit, has_cpu_limit): Tuple of booleans indicating whether memory and CPU limits are set. @@ -200,12 +205,14 @@ def has_cgroup_limits() -> tuple[bool, bool]: try: # Check cgroup v2 (modern containers) if os.path.exists("/sys/fs/cgroup/memory.max"): - memory_max = open("/sys/fs/cgroup/memory.max", encoding="utf-8").read().strip() + with open("/sys/fs/cgroup/memory.max", encoding="utf-8") as f: + memory_max = f.read().strip() # 'max' means unlimited, any number means limited has_memory = memory_max != "max" if os.path.exists("/sys/fs/cgroup/cpu.max"): - cpu_max = open("/sys/fs/cgroup/cpu.max", encoding="utf-8").read().strip() + with open("/sys/fs/cgroup/cpu.max", encoding="utf-8") as f: + cpu_max = f.read().strip() # 'max' means unlimited has_cpu = cpu_max != "max" @@ -213,11 +220,10 @@ def has_cgroup_limits() -> tuple[bool, bool]: if not has_memory and os.path.exists( "/sys/fs/cgroup/memory/memory.limit_in_bytes" ): - limit = int( - open("/sys/fs/cgroup/memory/memory.limit_in_bytes", encoding="utf-8") - .read() - .strip() - ) + with open( + "/sys/fs/cgroup/memory/memory.limit_in_bytes", encoding="utf-8" + ) as f: + limit = int(f.read().strip()) # Very large number (typically > 2^62) indicates unlimited # This is the default "unlimited" value in cgroup v1 has_memory = limit < (1 << 62) @@ -225,11 +231,10 @@ def has_cgroup_limits() -> tuple[bool, bool]: if not has_cpu and os.path.exists( "/sys/fs/cgroup/cpu/cpu.cfs_quota_us" ): - quota = int( - open("/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8") - .read() - .strip() - ) + with open( + "/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8" + ) as f: + quota = int(f.read().strip()) # In cgroup v1, -1 means unlimited has_cpu = quota > 0 @@ -274,12 +279,14 @@ def get_container_resources() -> Optional[dict[str, Any]]: try: # Try cgroup v2 first if os.path.exists("/sys/fs/cgroup/memory.max"): - memory_max = ( - open("/sys/fs/cgroup/memory.max", encoding="utf-8").read().strip() - ) - memory_current = ( - open("/sys/fs/cgroup/memory.current", encoding="utf-8").read().strip() - ) + with open("/sys/fs/cgroup/memory.max", encoding="utf-8") as f: + memory_max = f.read().strip() + f.close() + with open( + "/sys/fs/cgroup/memory.current", encoding="utf-8" + ) as f: + memory_current = f.read().strip() + f.close() if memory_max != "max": total = int(memory_max) @@ -294,19 +301,19 @@ def get_container_resources() -> Optional[dict[str, Any]]: "percent": percent, } # Fallback to cgroup v1 - elif os.path.exists( - "/sys/fs/cgroup/memory/memory.limit_in_bytes" - ): - total = int( - open("/sys/fs/cgroup/memory/memory.limit_in_bytes", encoding="utf-8") - .read() - .strip() - ) - used = int( - open("/sys/fs/cgroup/memory/memory.usage_in_bytes", encoding="utf-8") - .read() - .strip() - ) + elif os.path.exists("/sys/fs/cgroup/memory/memory.limit_in_bytes"): + with open( + "/sys/fs/cgroup/memory/memory.limit_in_bytes", + encoding="utf-8", + ) as f: + total = int(f.read().strip()) + f.close() + with open( + "/sys/fs/cgroup/memory/memory.usage_in_bytes", + encoding="utf-8", + ) as f: + used = int(f.read().strip()) + f.close() available = total - used percent = (used / total) * 100 if total > 0 else 0 @@ -324,9 +331,9 @@ def get_container_resources() -> Optional[dict[str, Any]]: try: # cgroup v2 if os.path.exists("/sys/fs/cgroup/cpu.max"): - cpu_max_line = ( - open("/sys/fs/cgroup/cpu.max", encoding="utf-8").read().strip() - ) + with open("/sys/fs/cgroup/cpu.max", encoding="utf-8") as f: + cpu_max_line = f.read().strip() + f.close() if cpu_max_line != "max": parts = cpu_max_line.split() if len(parts) == 2: @@ -341,16 +348,16 @@ def get_container_resources() -> Optional[dict[str, Any]]: } # cgroup v1 elif os.path.exists("/sys/fs/cgroup/cpu/cpu.cfs_quota_us"): - quota = int( - open("/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8") - .read() - .strip() - ) - period = int( - open("/sys/fs/cgroup/cpu/cpu.cfs_period_us", encoding="utf-8") - .read() - .strip() - ) + with open( + "/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8" + ) as f: + quota = int(f.read().strip()) + f.close() + with open( + "/sys/fs/cgroup/cpu/cpu.cfs_period_us", encoding="utf-8" + ) as f: + period = int(f.read().strip()) + f.close() if quota > 0: # -1 means unlimited cores = quota / period resources["cpu"] = { diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index c4163c93ddd..bb2cc95d316 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -4,4798 +4,4679 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI chat */ - requestBody: { - content: { - "application/json": components["schemas"]["ChatRequest"]; - }; - }; - responses: never; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/inline_completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI inline completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiInlineCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI inline completion for code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/invoke_tool": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for tool invocation */ - requestBody: { - content: { - "application/json": components["schemas"]["InvokeAiToolRequest"]; - }; - }; - responses: { - /** @description Tool invocation result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["InvokeAiToolResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Refresh MCP server configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPRefreshResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get MCP server status */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPStatusResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/clear": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ClearCacheRequest"]; - }; - }; - responses: { - /** @description Clear all caches */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["GetCacheInfoRequest"]; - }; - }; - responses: { - /** @description Get cache statistics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_datasource_connection": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDataSourceConnectionRequest"]; - }; - }; - responses: { - /** @description Broadcasts a datasource connection */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableRequest"]; - }; - }; - responses: { - /** @description Preview a SQL table */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table_list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableListRequest"]; - }; - }; - responses: { - /** @description Preview a list of tables in an SQL schema */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/ipynb": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsIPYNBRequest"]; - }; - }; - responses: { - /** @description Export the notebook as IPYNB */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileOpenRequest"]; - }; - }; - responses: { - /** @description Open a file in the system editor */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileSearchRequest"]; - }; - }; - responses: { - /** @description Search for files and directories matching a query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileSearchResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/tutorial/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenTutorialRequest"]; - }; - }; - responses: { - /** @description Open a new tutorial */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MarimoFile"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/copy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CopyNotebookRequest"]; - }; - }; - responses: { - /** @description Copy notebook */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FunctionCallRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallMissingPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/pdb/pm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PdbRequest"]; - }; - }; - responses: { - /** @description Run a post mortem on the most recent failed cell. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameFileRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RunRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SetCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_model_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SetModelMessageRequest"]; - }; - }; - responses: { - /** @description Set model value */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateComponentValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/takeover": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully closed existing sessions */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status?: string; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/add": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["AddPackageRequest"]; - }; - }; - responses: { - /** @description Install package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List installed packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListPackagesResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/remove": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RemovePackageRequest"]; - }; - }; - responses: { - /** @description Uninstall package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List dependency tree */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DependencyTreeResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSecretRequest"]; - }; - }; - responses: { - /** @description Create a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Delete a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ListSecretKeysRequest"]; - }; - }; - responses: { - /** @description List all secret keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListSecretKeysResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/sql/validate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ValidateSQLRequest"]; - }; - }; - responses: { - /** @description Validate an SQL query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status/connections": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the number of active websocket connections */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - active?: number; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - percent: number; - }; - gpu?: { - index: number; - memory: { - free: number; - percent: number; - total: number; - used: number; - }; - name: string; - }[]; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - is_container?: boolean; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI chat */ + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: never; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/inline_completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI inline completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiInlineCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI inline completion for code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/invoke_tool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for tool invocation */ + requestBody: { + content: { + "application/json": components["schemas"]["InvokeAiToolRequest"]; + }; + }; + responses: { + /** @description Tool invocation result */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InvokeAiToolResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Refresh MCP server configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPRefreshResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get MCP server status */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPStatusResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/clear": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ClearCacheRequest"]; + }; + }; + responses: { + /** @description Clear all caches */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["GetCacheInfoRequest"]; + }; + }; + responses: { + /** @description Get cache statistics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_datasource_connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDataSourceConnectionRequest"]; + }; + }; + responses: { + /** @description Broadcasts a datasource connection */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableRequest"]; + }; + }; + responses: { + /** @description Preview a SQL table */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table_list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableListRequest"]; + }; + }; + responses: { + /** @description Preview a list of tables in an SQL schema */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/ipynb": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsIPYNBRequest"]; + }; + }; + responses: { + /** @description Export the notebook as IPYNB */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileOpenRequest"]; + }; + }; + responses: { + /** @description Open a file in the system editor */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileSearchRequest"]; + }; + }; + responses: { + /** @description Search for files and directories matching a query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileSearchResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/tutorial/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenTutorialRequest"]; + }; + }; + responses: { + /** @description Open a new tutorial */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MarimoFile"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/copy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CopyNotebookRequest"]; + }; + }; + responses: { + /** @description Copy notebook */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FunctionCallRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallMissingPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/pdb/pm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PdbRequest"]; + }; + }; + responses: { + /** @description Run a post mortem on the most recent failed cell. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameFileRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RunRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_model_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetModelMessageRequest"]; + }; + }; + responses: { + /** @description Set model value */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateComponentValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/takeover": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully closed existing sessions */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status?: string; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/add": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPackageRequest"]; + }; + }; + responses: { + /** @description Install package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List installed packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListPackagesResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/remove": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePackageRequest"]; + }; + }; + responses: { + /** @description Uninstall package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/tree": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List dependency tree */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DependencyTreeResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateSecretRequest"]; + }; + }; + responses: { + /** @description Create a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Delete a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ListSecretKeysRequest"]; + }; + }; + responses: { + /** @description List all secret keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListSecretKeysResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/sql/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ValidateSQLRequest"]; + }; + }; + responses: { + /** @description Validate an SQL query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status/connections": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the number of active websocket connections */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + active?: number; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + percent: number; + }; + gpu?: { + index: number; + memory: { + free: number; + percent: number; + total: number; + used: number; + }; + name: string; + }[]; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + is_container?: boolean; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AddPackageRequest - * @description This can be a remove package or a local package. - * - * Supported formats: - * - * httpx - * httpx==0.27.0 - * httpx>=0.27.0 - * git+https://github.com/encode/httpx - * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz - * /example/foo-0.1.0-py3-none-any.whl - */ - AddPackageRequest: { - package: string; - /** @default false */ - upgrade?: boolean | null; - }; - /** AiCompletionContext */ - AiCompletionContext: { - /** @default */ - plainText?: string; - /** @default [] */ - schema?: components["schemas"]["SchemaTable"][]; - /** @default [] */ - variables?: (string | components["schemas"]["VariableContext"])[]; - }; - /** AiCompletionRequest */ - AiCompletionRequest: { - code: string; - /** @default null */ - context?: null | components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - /** @default [] */ - messages?: components["schemas"]["ChatMessage"][]; - prompt: string; - /** @default null */ - selectedText?: string | null; - }; - /** - * AiConfig - * @description Configuration options for AI. - * - * **Keys.** - * - * - `rules`: custom rules to include in all AI completion prompts - * - `max_tokens`: the maximum number of tokens to use in AI completions - * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` - * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions - * - `models`: the models to use for AI completions - * - `open_ai`: the OpenAI config - * - `anthropic`: the Anthropic config - * - `google`: the Google AI config - * - `bedrock`: the Bedrock config - * - `azure`: the Azure config - * - `ollama`: the Ollama config - * - `github`: the GitHub config - * - `openrouter`: the OpenRouter config - * - `wandb`: the Weights & Biases config - * - `open_ai_compatible`: the OpenAI-compatible config - */ - AiConfig: { - anthropic?: components["schemas"]["AnthropicConfig"]; - azure?: components["schemas"]["OpenAiConfig"]; - bedrock?: components["schemas"]["BedrockConfig"]; - github?: components["schemas"]["GitHubConfig"]; - google?: components["schemas"]["GoogleAiConfig"]; - inline_tooltip?: boolean; - max_tokens?: number; - /** @enum {unknown} */ - mode?: "agent" | "ask" | "manual"; - models?: components["schemas"]["AiModelConfig"]; - ollama?: components["schemas"]["OpenAiConfig"]; - open_ai?: components["schemas"]["OpenAiConfig"]; - open_ai_compatible?: components["schemas"]["OpenAiConfig"]; - openrouter?: components["schemas"]["OpenAiConfig"]; - rules?: string; - wandb?: components["schemas"]["OpenAiConfig"]; - }; - /** AiInlineCompletionRequest */ - AiInlineCompletionRequest: { - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - prefix: string; - suffix: string; - }; - /** - * AiModelConfig - * @description Configuration options for an AI model. - * - * **Keys.** - * - * - `chat_model`: the model to use for chat completions - * - `edit_model`: the model to use for edit completions - * - `autocomplete_model`: the model to use for code completion/autocomplete - * - `displayed_models`: a list of models to display in the UI - * - `custom_models`: a list of custom models to use that are not from the default list - */ - AiModelConfig: { - autocomplete_model?: string; - chat_model?: string; - custom_models: string[]; - displayed_models: string[]; - edit_model?: string; - }; - /** Alert */ - Alert: { - description: string; - /** @enum {unknown} */ - op: "alert"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** - * AnthropicConfig - * @description Configuration options for Anthropic. - * - * **Keys.** - * - * - `api_key`: the Anthropic API key - */ - AnthropicConfig: { - api_key?: string; - }; - /** Banner */ - Banner: { - /** @default null */ - action?: "restart" | null; - description: string; - /** @enum {unknown} */ - op: "banner"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** BaseResponse */ - BaseResponse: { - success: boolean; - }; - /** - * BasedpyrightServerConfig - * @description Configuration options for basedpyright Language Server. - * - * basedpyright handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - BasedpyrightServerConfig: { - enabled?: boolean; - }; - /** - * BedrockConfig - * @description Configuration options for Bedrock. - * - * **Keys.** - * - * - `profile_name`: the AWS profile to use - * - `region_name`: the AWS region to use - * - `aws_access_key_id`: the AWS access key ID - * - `aws_secret_access_key`: the AWS secret access key - */ - BedrockConfig: { - aws_access_key_id?: string; - aws_secret_access_key?: string; - profile_name?: string; - region_name?: string; - }; - /** - * CacheCleared - * @description Result of clearing cache. - */ - CacheCleared: { - bytes_freed: number; - /** @enum {unknown} */ - op: "cache-cleared"; - }; - /** - * CacheInfoFetched - * @description Cache statistics information. - */ - CacheInfoFetched: { - disk_to_free: number; - disk_total: number; - hits: number; - misses: number; - /** @enum {unknown} */ - op: "cache-info-fetched"; - time: number; - }; - /** - * CellChannel - * @description The channel of a cell's output. - * @enum {unknown} - */ - CellChannel: - | "marimo-error" - | "media" - | "output" - | "pdb" - | "stderr" - | "stdin" - | "stdout"; - /** - * CellConfig - * @description Internal representation of a cell's configuration. - * This is not part of the public API. - */ - CellConfig: { - /** @default null */ - column?: number | null; - /** @default false */ - disabled?: boolean; - /** @default false */ - hide_code?: boolean; - }; - /** - * CellOp - * @description Op to transition a cell. - * - * A CellOp's data has some optional fields: - * - * output - a CellOutput - * console - a CellOutput (console msg to append), or a list of - * CellOutputs - * status - execution status - * stale_inputs - whether the cell has stale inputs (variables, modules, ...) - * run_id - the run associated with this cell. - * serialization - the serialization status of the cell - * - * Omitting a field means that its value should be unchanged! - * - * And one required field: - * - * cell_id - the cell id - */ - CellOp: { - cell_id: string; - /** @default null */ - console?: - | components["schemas"]["CellOutput"][] - | null - | components["schemas"]["CellOutput"]; - /** @enum {unknown} */ - op: "cell-op"; - /** @default null */ - output?: null | components["schemas"]["CellOutput"]; - /** @default null */ - run_id?: string | null; - /** @default null */ - serialization?: string | null; - /** @default null */ - stale_inputs?: boolean | null; - /** @default null */ - status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; - timestamp?: number; - }; - /** CellOutput */ - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: - | string - | ( - | components["schemas"]["SetupRootError"] - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["ImportStarError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["MarimoInternalError"] - | components["schemas"]["MarimoSQLError"] - | components["schemas"]["UnknownError"] - )[] - | Record; - /** @enum {unknown} */ - mimetype: - | "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.vegalite.v5+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/plain" - | "video/mp4" - | "video/mpeg"; - timestamp?: number; - }; - /** ChatAttachment */ - ChatAttachment: { - /** @default null */ - content_type?: string | null; - /** @default attachment */ - name?: string; - url: string; - }; - /** - * ChatMessage - * @description A message in a chat. - */ - ChatMessage: { - /** @default null */ - attachments?: components["schemas"]["ChatAttachment"][] | null; - content: unknown; - /** @default null */ - parts?: Record[] | null; - /** @enum {unknown} */ - role: "assistant" | "system" | "user"; - }; - /** ChatRequest */ - ChatRequest: { - context: components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - messages: components["schemas"]["ChatMessage"][]; - /** @default null */ - model?: string | null; - /** @default null */ - tools?: components["schemas"]["ToolDefinition"][] | null; - /** @default null */ - variables?: (string | components["schemas"]["VariableContext"])[] | null; - }; - /** ClearCacheRequest */ - ClearCacheRequest: Record; - /** CodeCompletionRequest */ - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - /** - * ColumnStats - * @description Represents stats for a column in a data table. - */ - ColumnStats: { - /** @default null */ - false?: number | null; - /** @default null */ - max?: unknown | null; - /** @default null */ - mean?: unknown | null; - /** @default null */ - median?: unknown | null; - /** @default null */ - min?: unknown | null; - /** @default null */ - nulls?: number | null; - /** @default null */ - p25?: unknown | null; - /** @default null */ - p5?: unknown | null; - /** @default null */ - p75?: unknown | null; - /** @default null */ - p95?: unknown | null; - /** @default null */ - std?: unknown | null; - /** @default null */ - total?: number | null; - /** @default null */ - true?: number | null; - /** @default null */ - unique?: number | null; - }; - /** - * CompletedRun - * @description Written on run completion (of submitted cells and their descendants. - */ - CompletedRun: { - /** @enum {unknown} */ - op: "completed-run"; - }; - /** - * CompletionConfig - * @description Configuration for code completion. - * - * A dict with key/value pairs configuring code completion in the marimo - * editor. - * - * **Keys.** - * - * - `activate_on_typing`: if `False`, completion won't activate - * until the completion hotkey is entered - * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` - * - `codeium_api_key`: the Codeium API key - */ - CompletionConfig: { - activate_on_typing: boolean; - api_key?: string | null; - base_url?: string | null; - codeium_api_key?: string | null; - copilot: boolean | ("codeium" | "custom" | "github"); - model?: string | null; - }; - /** CompletionOption */ - CompletionOption: { - completion_info: string | null; - name: string; - type: string; - }; - /** - * CompletionResult - * @description Code completion result. - */ - CompletionResult: { - completion_id: string; - /** @enum {unknown} */ - op: "completion-result"; - options: components["schemas"]["CompletionOption"][]; - prefix_length: number; - }; - /** CopyNotebookRequest */ - CopyNotebookRequest: { - destination: string; - source: string; - }; - /** CreateSecretRequest */ - CreateSecretRequest: { - key: string; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - value: string; - }; - /** CycleError */ - CycleError: { - edges_with_vars: [string, string[], string][]; - /** @enum {unknown} */ - type: "cycle"; - }; - /** - * DataColumnPreview - * @description Preview of a column in a dataset. - */ - DataColumnPreview: { - /** @default null */ - chart_code?: string | null; - /** @default null */ - chart_spec?: string | null; - column_name: string; - /** @default null */ - error?: string | null; - /** @default null */ - missing_packages?: string[] | null; - /** @enum {unknown} */ - op: "data-column-preview"; - /** @default null */ - stats?: null | components["schemas"]["ColumnStats"]; - table_name: string; - }; - /** - * DataSourceConnection - * @description Represents a data source connection. - * - * Attributes: - * source (str): The source of the data source connection. E.g 'postgres'. - * dialect (str): The dialect of the data source connection. E.g 'postgresql'. - * name (str): The name of the data source connection. E.g 'engine'. - * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. - * databases (List[Database]): The databases in the data source connection. - * default_database (Optional[str]): The default database in the data source connection. - * default_schema (Optional[str]): The default schema in the data source connection. - */ - DataSourceConnection: { - databases: components["schemas"]["Database"][]; - /** @default null */ - default_database?: string | null; - /** @default null */ - default_schema?: string | null; - dialect: string; - display_name: string; - name: string; - source: string; - }; - /** DataSourceConnections */ - DataSourceConnections: { - connections: components["schemas"]["DataSourceConnection"][]; - /** @enum {unknown} */ - op: "data-source-connections"; - }; - /** - * DataTable - * @description Represents a data table. - * - * Attributes: - * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). - * source (str): Can be dialect, or source db name. - * name (str): Name of the data table. - * num_rows (Optional[int]): Total number of rows in the table, if known. - * num_columns (Optional[int]): Total number of columns in the table, if known. - * variable_name (Optional[VariableName]): Variable name referencing this table in code. - * columns (List[DataTableColumn]): List of column definitions and metadata. - * engine (Optional[VariableName]): Database engine or connection handler, if any. - * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. - * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. - * indexes (Optional[List[str]]): Column names used as indexes, if any. - */ - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - /** @default null */ - engine?: string | null; - /** @default null */ - indexes?: string[] | null; - name: string; - num_columns: number | null; - num_rows: number | null; - /** @default null */ - primary_keys?: string[] | null; - source: string; - /** @enum {unknown} */ - source_type: "catalog" | "connection" | "duckdb" | "local"; - /** - * @default table - * @enum {unknown} - */ - type?: "table" | "view"; - variable_name: string | null; - }; - /** - * DataTableColumn - * @description Represents a column in a data table. - * - * Attributes: - * name (str): The name of the column. - * type (DataType): The data type of the column. - * external_type (ExternalDataType): The raw data type of the column. - * sample_values (List[Any]): The sample values of the column. - */ - DataTableColumn: { - external_type: string; - name: string; - sample_values: unknown[]; - /** @enum {unknown} */ - type: - | "boolean" - | "date" - | "datetime" - | "integer" - | "number" - | "string" - | "time" - | "unknown"; - }; - /** - * Database - * @description Represents a collection of schemas. - * - * Attributes: - * name (str): The name of the database - * dialect (str): The dialect of the database - * schemas (List[Schema]): List of schemas in the database - * engine (Optional[VariableName]): Database engine or connection handler, if any. - */ - Database: { - dialect: string; - /** @default null */ - engine?: string | null; - name: string; - schemas: components["schemas"]["Schema"][]; - }; - /** - * Datasets - * @description List of datasets. - */ - Datasets: { - /** @default null */ - clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; - /** @enum {unknown} */ - op: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - /** - * DatasourcesConfig - * @description Configuration for datasources panel. - * - * **Keys.** - * - * - `auto_discover_schemas`: if `True`, include schemas in the datasource - * - `auto_discover_tables`: if `True`, include tables in the datasource - * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource - */ - DatasourcesConfig: { - auto_discover_columns?: boolean | "auto"; - auto_discover_schemas?: boolean | "auto"; - auto_discover_tables?: boolean | "auto"; - }; - /** DeleteCellRequest */ - DeleteCellRequest: { - cellId: string; - }; - /** DeleteSecretRequest */ - DeleteSecretRequest: { - key: string; - }; - /** DependencyTreeNode */ - DependencyTreeNode: { - dependencies: components["schemas"]["DependencyTreeNode"][]; - name: string; - tags: { - [key: string]: string; - }[]; - version: string | null; - }; - /** DependencyTreeResponse */ - DependencyTreeResponse: { - tree: null | components["schemas"]["DependencyTreeNode"]; - }; - /** - * DiagnosticsConfig - * @description Configuration options for diagnostics. - * - * **Keys.** - * - * - `enabled`: if `True`, diagnostics will be shown in the editor - * - `sql_linter`: if `True`, SQL cells will have linting enabled - */ - DiagnosticsConfig: { - enabled?: boolean; - sql_linter?: boolean; - }; - /** - * DisplayConfig - * @description Configuration for display. - * - * **Keys.** - * - * - `theme`: `"light"`, `"dark"`, or `"system"` - * - `code_editor_font_size`: font size for the code editor - * - `cell_output`: `"above"` or `"below"` - * - `dataframes`: `"rich"` or `"plain"` - * - `custom_css`: list of paths to custom CSS files - * - `default_table_page_size`: default number of rows to display in tables - * - `default_table_max_columns`: default maximum number of columns to display in tables - * - `reference_highlighting`: if `True`, highlight reactive variable references - * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") - */ - DisplayConfig: { - /** @enum {unknown} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - custom_css?: string[]; - /** @enum {unknown} */ - dataframes: "plain" | "rich"; - default_table_max_columns: number; - default_table_page_size: number; - /** @enum {unknown} */ - default_width: "columns" | "compact" | "full" | "medium" | "normal"; - locale?: string | null; - reference_highlighting?: boolean; - /** @enum {unknown} */ - theme: "dark" | "light" | "system"; - }; - /** ExecuteMultipleRequest */ - ExecuteMultipleRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - }; - /** ExecuteScratchpadRequest */ - ExecuteScratchpadRequest: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** ExecuteStaleRequest */ - ExecuteStaleRequest: { - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** ExecutionRequest */ - ExecutionRequest: { - cellId: string; - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - }; - /** ExportAsHTMLRequest */ - ExportAsHTMLRequest: { - /** @default null */ - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - /** ExportAsIPYNBRequest */ - ExportAsIPYNBRequest: { - download: boolean; - }; - /** ExportAsMarkdownRequest */ - ExportAsMarkdownRequest: { - download: boolean; - }; - /** ExportAsScriptRequest */ - ExportAsScriptRequest: { - download: boolean; - }; - /** FileCreateRequest */ - FileCreateRequest: { - /** @default null */ - contents?: string | null; - name: string; - path: string; - /** @enum {unknown} */ - type: "directory" | "file"; - }; - /** FileCreateResponse */ - FileCreateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDeleteRequest */ - FileDeleteRequest: { - path: string; - }; - /** FileDeleteResponse */ - FileDeleteResponse: { - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDetailsRequest */ - FileDetailsRequest: { - path: string; - }; - /** FileDetailsResponse */ - FileDetailsResponse: { - /** @default null */ - contents?: string | null; - file: components["schemas"]["FileInfo"]; - /** @default null */ - mimeType?: string | null; - }; - /** FileInfo */ - FileInfo: { - /** @default [] */ - children?: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - }; - /** FileListRequest */ - FileListRequest: { - /** @default null */ - path?: string | null; - }; - /** FileListResponse */ - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - /** FileMoveRequest */ - FileMoveRequest: { - newPath: string; - path: string; - }; - /** FileMoveResponse */ - FileMoveResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileOpenRequest */ - FileOpenRequest: { - /** @default null */ - lineNumber?: number | null; - path: string; - }; - /** FileSearchRequest */ - FileSearchRequest: { - /** @default 3 */ - depth?: number; - /** @default true */ - includeDirectories?: boolean; - /** @default true */ - includeFiles?: boolean; - /** @default 100 */ - limit?: number; - /** @default null */ - path?: string | null; - query: string; - }; - /** FileSearchResponse */ - FileSearchResponse: { - files: components["schemas"]["FileInfo"][]; - query: string; - totalFound: number; - }; - /** FileUpdateRequest */ - FileUpdateRequest: { - contents: string; - path: string; - }; - /** FileUpdateResponse */ - FileUpdateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FocusCell */ - FocusCell: { - cell_id: string; - /** @enum {unknown} */ - op: "focus-cell"; - }; - /** FormatRequest */ - FormatRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - /** FormatResponse */ - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - /** - * FormattingConfig - * @description Configuration for code formatting. - * - * **Keys.** - * - * - `line_length`: max line length - */ - FormattingConfig: { - line_length: number; - }; - /** FunctionCallRequest */ - FunctionCallRequest: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - }; - /** - * FunctionCallResult - * @description Result of calling a function. - */ - FunctionCallResult: { - function_call_id: string; - /** @enum {unknown} */ - op: "function-call-result"; - return_value: unknown; - status: components["schemas"]["HumanReadableStatus"]; - }; - /** GetCacheInfoRequest */ - GetCacheInfoRequest: Record; - /** - * GitHubConfig - * @description Configuration options for GitHub. - * - * **Keys.** - * - * - `api_key`: the GitHub API token - * - `base_url`: the base URL for the API - * - `copilot_settings`: configuration settings for GitHub Copilot LSP. - * Supports settings like `http` (proxy configuration), `telemetry`, - * and `github-enterprise` (enterprise URI). - */ - GitHubConfig: { - api_key?: string; - base_url?: string; - copilot_settings?: Record; - }; - /** - * GoogleAiConfig - * @description Configuration options for Google AI. - * - * **Keys.** - * - * - `api_key`: the Google AI API key - */ - GoogleAiConfig: { - api_key?: string; - }; - HTTPRequest: { - baseUrl: { - [key: string]: unknown; - }; - cookies: { - [key: string]: string; - }; - headers: { - [key: string]: string; - }; - meta: { - [key: string]: unknown; - }; - pathParams: { - [key: string]: unknown; - }; - queryParams: { - [key: string]: string[]; - }; - url: { - [key: string]: unknown; - }; - user: unknown; - }; - /** - * HumanReadableStatus - * @description Human-readable status. - */ - HumanReadableStatus: { - /** @enum {unknown} */ - code: "error" | "ok"; - /** @default null */ - message?: string | null; - /** @default null */ - title?: string | null; - }; - /** ImportStarError */ - ImportStarError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "import-star"; - }; - /** InstallMissingPackagesRequest */ - InstallMissingPackagesRequest: { - manager: string; - versions: { - [key: string]: string; - }; - }; - /** InstallingPackageAlert */ - InstallingPackageAlert: { - /** @default null */ - log_status?: ("append" | "done" | "start") | null; - /** @default null */ - logs?: { - [key: string]: string; - } | null; - /** @enum {unknown} */ - op: "installing-package-alert"; - packages: { - [key: string]: "failed" | "installed" | "installing" | "queued"; - }; - }; - /** InstantiateRequest */ - InstantiateRequest: { - /** @default true */ - autoRun?: boolean; - objectIds: string[]; - values: unknown[]; - }; - /** - * Interrupted - * @description Written when the kernel is interrupted by the user. - */ - Interrupted: { - /** @enum {unknown} */ - op: "interrupted"; - }; - /** InvokeAiToolRequest */ - InvokeAiToolRequest: { - arguments: Record; - toolName: string; - }; - /** InvokeAiToolResponse */ - InvokeAiToolResponse: { - /** @default null */ - error?: string | null; - result: unknown; - success: boolean; - toolName: string; - }; - /** KernelCapabilities */ - KernelCapabilities: { - /** @default false */ - basedpyright?: boolean; - /** @default false */ - pylsp?: boolean; - /** @default false */ - terminal?: boolean; - /** @default false */ - ty?: boolean; - }; - /** - * KernelReady - * @description Kernel is ready for execution. - */ - KernelReady: { - app_config: components["schemas"]["_AppConfig"]; - capabilities: components["schemas"]["KernelCapabilities"]; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code: { - [key: string]: string; - } | null; - last_execution_time: { - [key: string]: number; - } | null; - layout: components["schemas"]["LayoutConfig"] | null; - names: string[]; - /** @enum {unknown} */ - op: "kernel-ready"; - resumed: boolean; - ui_values: Record | null; - }; - /** - * KeymapConfig - * @description Configuration for keymaps. - * - * **Keys.** - * - * - `preset`: one of `"default"` or `"vim"` - * - `overrides`: a dict of keymap actions to their keymap override - * - `vimrc`: path to a vimrc file to load keymaps from - * - `destructive_delete`: if `True`, allows deleting cells with content. - */ - KeymapConfig: { - destructive_delete?: boolean; - overrides?: { - [key: string]: string; - }; - /** @enum {unknown} */ - preset: "default" | "vim"; - vimrc?: string | null; - }; - /** KnownUnions */ - KnownUnions: { - /** @enum {unknown} */ - data_type: - | "boolean" - | "date" - | "datetime" - | "integer" - | "number" - | "string" - | "time" - | "unknown"; - error: - | components["schemas"]["SetupRootError"] - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["ImportStarError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["MarimoInternalError"] - | components["schemas"]["MarimoSQLError"] - | components["schemas"]["UnknownError"]; - operation: - | components["schemas"]["CellOp"] - | components["schemas"]["FunctionCallResult"] - | components["schemas"]["SendUIElementMessage"] - | components["schemas"]["RemoveUIElements"] - | components["schemas"]["Reload"] - | components["schemas"]["Reconnected"] - | components["schemas"]["Interrupted"] - | components["schemas"]["CompletedRun"] - | components["schemas"]["KernelReady"] - | components["schemas"]["CompletionResult"] - | components["schemas"]["Alert"] - | components["schemas"]["Banner"] - | components["schemas"]["MissingPackageAlert"] - | components["schemas"]["InstallingPackageAlert"] - | components["schemas"]["StartupLogs"] - | components["schemas"]["Variables"] - | components["schemas"]["VariableValues"] - | components["schemas"]["QueryParamsSet"] - | components["schemas"]["QueryParamsAppend"] - | components["schemas"]["QueryParamsDelete"] - | components["schemas"]["QueryParamsClear"] - | components["schemas"]["Datasets"] - | components["schemas"]["DataColumnPreview"] - | components["schemas"]["SQLTablePreview"] - | components["schemas"]["SQLTableListPreview"] - | components["schemas"]["DataSourceConnections"] - | components["schemas"]["ValidateSQLResult"] - | components["schemas"]["SecretKeysResult"] - | components["schemas"]["CacheCleared"] - | components["schemas"]["CacheInfoFetched"] - | components["schemas"]["FocusCell"] - | components["schemas"]["UpdateCellCodes"] - | components["schemas"]["UpdateCellIdsRequest"]; - }; - /** - * LanguageServersConfig - * @description Configuration options for language servers. - * - * **Keys.** - * - * - `pylsp`: the pylsp config - */ - LanguageServersConfig: { - basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; - pylsp?: components["schemas"]["PythonLanguageServerConfig"]; - ty?: components["schemas"]["TyLanguageServerConfig"]; - }; - /** LayoutConfig */ - LayoutConfig: { - data: Record; - type: string; - }; - /** ListPackagesResponse */ - ListPackagesResponse: { - packages: components["schemas"]["PackageDescription"][]; - }; - /** ListSecretKeysRequest */ - ListSecretKeysRequest: { - requestId: string; - }; - /** ListSecretKeysResponse */ - ListSecretKeysResponse: { - keys: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** - * MCPConfig - * @description Configuration for MCP servers - * - * Note: the field name `mcpServers` is camelCased to match MCP server - * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) - */ - MCPConfig: { - mcpServers: { - [key: string]: Record; - }; - presets?: ("context7" | "marimo")[]; - }; - /** MCPRefreshResponse */ - MCPRefreshResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: boolean; - }; - success: boolean; - }; - /** MCPStatusResponse */ - MCPStatusResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: "connected" | "disconnected" | "failed" | "pending"; - }; - /** @enum {unknown} */ - status: "error" | "ok" | "partial"; - }; - /** MarimoAncestorPreventedError */ - MarimoAncestorPreventedError: { - blamed_cell: string | null; - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-prevented"; - }; - /** MarimoAncestorStoppedError */ - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-stopped"; - }; - /** - * MarimoConfig - * @description Configuration for the marimo editor - */ - MarimoConfig: { - ai?: components["schemas"]["AiConfig"]; - completion: components["schemas"]["CompletionConfig"]; - datasources?: components["schemas"]["DatasourcesConfig"]; - diagnostics?: components["schemas"]["DiagnosticsConfig"]; - display: components["schemas"]["DisplayConfig"]; - experimental?: Record; - formatting: components["schemas"]["FormattingConfig"]; - keymap: components["schemas"]["KeymapConfig"]; - language_servers?: components["schemas"]["LanguageServersConfig"]; - mcp?: components["schemas"]["MCPConfig"]; - package_management: components["schemas"]["PackageManagementConfig"]; - runtime: components["schemas"]["RuntimeConfig"]; - save: components["schemas"]["SaveConfig"]; - server: components["schemas"]["ServerConfig"]; - sharing?: components["schemas"]["SharingConfig"]; - snippets?: components["schemas"]["SnippetsConfig"]; - }; - /** MarimoExceptionRaisedError */ - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell: string | null; - /** @enum {unknown} */ - type: "exception"; - }; - /** MarimoFile */ - MarimoFile: { - /** @default null */ - initializationId?: string | null; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - /** @default null */ - sessionId?: string | null; - }; - /** - * 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. - */ - MarimoInternalError: { - error_id: string; - /** @default */ - msg?: string; - /** @enum {unknown} */ - type: "internal"; - }; - /** MarimoInterruptionError */ - MarimoInterruptionError: { - /** @enum {unknown} */ - type: "interruption"; - }; - /** - * MarimoSQLError - * @description SQL-specific error with enhanced metadata for debugging. - */ - MarimoSQLError: { - /** @default null */ - hint?: string | null; - msg: string; - /** @default 0 */ - node_col_offset?: number; - /** @default 0 */ - node_lineno?: number; - /** @default null */ - sql_col?: number | null; - /** @default null */ - sql_line?: number | null; - sql_statement: string; - /** @enum {unknown} */ - type: "sql-error"; - }; - /** MarimoStrictExecutionError */ - MarimoStrictExecutionError: { - blamed_cell: string | null; - msg: string; - ref: string; - /** @enum {unknown} */ - type: "strict-exception"; - }; - /** MarimoSyntaxError */ - MarimoSyntaxError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "syntax"; - }; - /** MissingPackageAlert */ - MissingPackageAlert: { - isolated: boolean; - /** @enum {unknown} */ - op: "missing-package-alert"; - packages: string[]; - }; - /** ModelMessage */ - ModelMessage: { - bufferPaths: (string | number)[][]; - state: Record; - }; - /** MultipleDefinitionError */ - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {unknown} */ - type: "multiple-defs"; - }; - /** - * OpenAiConfig - * @description Configuration options for OpenAI or OpenAI-compatible services. - * - * **Keys.** - * - * - `api_key`: the OpenAI API key - * - `base_url`: the base URL for the API - * - `project`: the project ID for the OpenAI API - * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios - * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client - * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server - * - `extra_headers`: extra headers to be passed to the OpenAI client - */ - OpenAiConfig: { - api_key?: string; - base_url?: string; - ca_bundle_path?: string; - client_pem?: string; - extra_headers?: { - [key: string]: string; - }; - model?: string; - project?: string; - ssl_verify?: boolean; - }; - /** OpenTutorialRequest */ - OpenTutorialRequest: { - tutorialId: - | ( - | "dataflow" - | "fileformat" - | "for-jupyter-users" - | "intro" - | "layout" - | "markdown" - | "plots" - | "sql" - | "ui" - ) - | "markdown-format"; - }; - /** PackageDescription */ - PackageDescription: { - name: string; - version: string; - }; - /** - * PackageManagementConfig - * @description Configuration options for package management. - * - * **Keys.** - * - * - `manager`: the package manager to use - */ - PackageManagementConfig: { - /** @enum {unknown} */ - manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; - }; - /** PackageOperationResponse */ - PackageOperationResponse: { - /** @default null */ - error?: string | null; - success: boolean; - }; - /** PdbRequest */ - PdbRequest: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * PreviewDataSourceConnectionRequest - * @description Fetch a datasource connection - */ - PreviewDataSourceConnectionRequest: { - engine: string; - }; - /** PreviewDatasetColumnRequest */ - PreviewDatasetColumnRequest: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - }; - /** - * PreviewSQLTableListRequest - * @description Preview list of tables in an SQL schema - */ - PreviewSQLTableListRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - }; - /** - * PreviewSQLTableRequest - * @description Preview table details in an SQL database - */ - PreviewSQLTableRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - }; - /** - * PythonLanguageServerConfig - * @description Configuration options for Python Language Server. - * - * pylsp handles completion, hover, go-to-definition, and diagnostics. - */ - PythonLanguageServerConfig: { - enable_flake8?: boolean; - enable_mypy?: boolean; - enable_pydocstyle?: boolean; - enable_pyflakes?: boolean; - enable_pylint?: boolean; - enable_ruff?: boolean; - enabled?: boolean; - }; - /** QueryParamsAppend */ - QueryParamsAppend: { - key: string; - /** @enum {unknown} */ - op: "query-params-append"; - value: string; - }; - /** QueryParamsClear */ - QueryParamsClear: { - /** @enum {unknown} */ - op: "query-params-clear"; - }; - /** QueryParamsDelete */ - QueryParamsDelete: { - key: string; - /** @enum {unknown} */ - op: "query-params-delete"; - value: string | null; - }; - /** - * QueryParamsSet - * @description Set query parameters. - */ - QueryParamsSet: { - key: string; - /** @enum {unknown} */ - op: "query-params-set"; - value: string | string[]; - }; - /** ReadCodeResponse */ - ReadCodeResponse: { - contents: string; - }; - /** RecentFilesResponse */ - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** Reconnected */ - Reconnected: { - /** @enum {unknown} */ - op: "reconnected"; - }; - /** Reload */ - Reload: { - /** @enum {unknown} */ - op: "reload"; - }; - /** RemovePackageRequest */ - RemovePackageRequest: { - package: string; - }; - /** - * RemoveUIElements - * @description Invalidate UI elements for a given cell. - */ - RemoveUIElements: { - cell_id: string; - /** @enum {unknown} */ - op: "remove-ui-elements"; - }; - /** RenameFileRequest */ - RenameFileRequest: { - filename: string; - }; - /** RenameRequest */ - RenameRequest: { - filename: string; - }; - /** RunRequest */ - RunRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** RunningNotebooksResponse */ - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** - * RuntimeConfig - * @description Configuration for runtime. - * - * **Keys.** - * - * - `auto_instantiate`: if `False`, cells won't automatically - * run on startup. This only applies when editing a notebook, - * and not when running as an application. - * The default is `True`. - * - `auto_reload`: if `lazy`, cells importing modified modules will marked - * as stale; if `autorun`, affected cells will be automatically run. similar - * to IPython's %autoreload extension but with more code intelligence. - * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. - * execution. - * - `on_cell_change`: if `lazy`, cells will be marked stale when their - * ancestors run but won't autorun; if `autorun`, cells will automatically - * run when their ancestors run. - * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; - * if `strict` marimo will clone cell declarations by default, avoiding - * hidden potential state build up. - * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks - * affected cells as stale, `"autorun"` automatically runs affected cells. - * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger - * values may affect frontend performance - * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; - * larger values may affect frontend performance - * - `pythonpath`: a list of directories to add to the Python search path. - * Directories will be added to the head of sys.path. Similar to the - * `PYTHONPATH` environment variable, the directories will be included in - * where Python will look for imported modules. - * - `dotenv`: a list of paths to `.env` files to load. - * If the file does not exist, it will be silently ignored. - * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. - * - `default_sql_output`: the default output format for SQL queries. Can be one of: - * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. - * The default is `"auto"`. - * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: - * `html`, `markdown`, `ipynb`. - * The default is None. - */ - RuntimeConfig: { - auto_instantiate: boolean; - /** @enum {unknown} */ - auto_reload: "autorun" | "lazy" | "off"; - default_auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @enum {unknown} */ - default_sql_output: - | "auto" - | "lazy-polars" - | "native" - | "pandas" - | "polars"; - dotenv?: string[]; - /** @enum {unknown} */ - on_cell_change: "autorun" | "lazy"; - output_max_bytes: number; - pythonpath?: string[]; - reactive_tests: boolean; - std_stream_max_bytes: number; - /** @enum {unknown} */ - watcher_on_save: "autorun" | "lazy"; - }; - /** - * SQLMetadata - * @description Metadata for a SQL database. - */ - SQLMetadata: { - connection: string; - database: string; - schema: string; - /** @enum {unknown} */ - type: "sql-metadata"; - }; - /** - * SQLTableListPreview - * @description Preview of a list of tables in a schema. - */ - SQLTableListPreview: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-list-preview"; - request_id: string; - /** @default [] */ - tables?: components["schemas"]["DataTable"][]; - }; - /** - * SQLTablePreview - * @description Preview of a table in a SQL database. - */ - SQLTablePreview: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-preview"; - request_id: string; - table: null | components["schemas"]["DataTable"]; - }; - /** SaveAppConfigurationRequest */ - SaveAppConfigurationRequest: { - config: Record; - }; - /** - * SaveConfig - * @description Configuration for saving. - * - * **Keys.** - * - * - `autosave`: one of `"off"` or `"after_delay"` - * - `delay`: number of milliseconds to wait before autosaving - * - `format_on_save`: if `True`, format the code on save - */ - SaveConfig: { - /** @enum {unknown} */ - autosave: "after_delay" | "off"; - autosave_delay: number; - format_on_save: boolean; - }; - /** SaveNotebookRequest */ - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - /** @default null */ - layout?: Record | null; - names: string[]; - /** @default true */ - persist?: boolean; - }; - /** SaveUserConfigurationRequest */ - SaveUserConfigurationRequest: { - config: Record; - }; - /** Schema */ - Schema: { - name: string; - tables: components["schemas"]["DataTable"][]; - }; - /** SchemaColumn */ - SchemaColumn: { - name: string; - sampleValues: unknown[]; - type: string; - }; - /** SchemaTable */ - SchemaTable: { - columns: components["schemas"]["SchemaColumn"][]; - name: string; - }; - /** - * SecretKeysResult - * @description Result of listing secret keys. - */ - SecretKeysResult: { - /** @enum {unknown} */ - op: "secret-keys-result"; - request_id: string; - secrets: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** SecretKeysWithProvider */ - SecretKeysWithProvider: { - keys: string[]; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - }; - /** - * SendUIElementMessage - * @description Send a message to a UI element. - */ - SendUIElementMessage: { - /** @default null */ - buffers?: string[] | null; - message: Record; - model_id: string | null; - /** @enum {unknown} */ - op: "send-ui-element-message"; - ui_element: string | null; - }; - /** - * ServerConfig - * @description Configuration for the server. - * - * **Keys.** - * - * - `browser`: the web browser to use. `"default"` or a browser registered - * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) - * - `follow_symlink`: if true, the server will follow symlinks it finds - * inside its static assets directory. - */ - ServerConfig: { - browser: "default" | string; - follow_symlink: boolean; - }; - /** SetCellConfigRequest */ - SetCellConfigRequest: { - configs: { - [key: string]: Record; - }; - }; - /** SetModelMessageRequest */ - SetModelMessageRequest: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - }; - /** SetUIElementValueRequest */ - SetUIElementValueRequest: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - values: unknown[]; - }; - /** SetUserConfigRequest */ - SetUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - /** SetupRootError */ - SetupRootError: { - edges_with_vars: [string, string[], string][]; - /** @enum {unknown} */ - type: "setup-refs"; - }; - /** - * SharingConfig - * @description Configuration for sharing features. - * - * **Keys.** - * - * - `html`: if `False`, HTML sharing options will be hidden from the UI - * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI - */ - SharingConfig: { - html?: boolean; - wasm?: boolean; - }; - /** ShutdownSessionRequest */ - ShutdownSessionRequest: { - sessionId: string; - }; - /** Snippet */ - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - /** SnippetSection */ - SnippetSection: { - /** @default null */ - code?: string | null; - /** @default null */ - html?: string | null; - id: string; - }; - /** Snippets */ - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - /** - * SnippetsConfig - * @description Configuration for snippets. - * - * **Keys.** - * - * - `custom_path`: the path to the custom snippets directory - */ - SnippetsConfig: { - custom_paths?: string[]; - include_default_snippets?: boolean; - }; - /** - * SqlCatalogCheckResult - * @description Result of running validation against the database. - */ - SqlCatalogCheckResult: { - error_message: string | null; - success: boolean; - }; - /** - * SqlParseError - * @description Represents a single SQL parse error. - * - * Attributes: - * message (str): Description of the error. - * line (int): Line number where the error occurred (1-based). - * column (int): Column number where the error occurred (1-based). - * severity (Literal["error", "warning"]): Severity of the error. - */ - SqlParseError: { - column: number; - line: number; - message: string; - /** @enum {unknown} */ - severity: "error" | "warning"; - }; - /** - * SqlParseResult - * @description Result of parsing an SQL query. - * - * Attributes: - * success (bool): True if parsing succeeded without errors. - * errors (list[SqlParseError]): List of parse errors (empty if success is True). - */ - SqlParseResult: { - errors: components["schemas"]["SqlParseError"][]; - success: boolean; - }; - /** StartupLogs */ - StartupLogs: { - content: string; - /** @enum {unknown} */ - op: "startup-logs"; - /** @enum {unknown} */ - status: "append" | "done" | "start"; - }; - /** StdinRequest */ - StdinRequest: { - text: string; - }; - /** StopRequest */ - StopRequest: Record; - /** - * StoreConfig - * @description Configuration for cache stores. - */ - StoreConfig: { - args?: Record; - /** @enum {unknown} */ - type?: "file" | "redis" | "rest" | "tiered"; - }; - /** SuccessResponse */ - SuccessResponse: { - /** @default true */ - success?: boolean; - }; - /** - * ToolDefinition - * @description Tool definition compatible with ai-sdk-ui format. - */ - ToolDefinition: { - description: string; - mode: ("agent" | "ask" | "manual")[]; - name: string; - parameters: Record; - /** @enum {unknown} */ - source: "backend" | "frontend" | "mcp"; - }; - /** - * TyLanguageServerConfig - * @description Configuration options for Ty Language Server. - * - * ty handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - TyLanguageServerConfig: { - enabled?: boolean; - }; - /** UnknownError */ - UnknownError: { - /** @default null */ - error_type?: string | null; - msg: string; - /** @enum {unknown} */ - type: "unknown"; - }; - /** UpdateCellCodes */ - UpdateCellCodes: { - cell_ids: string[]; - code_is_stale: boolean; - codes: string[]; - /** @enum {unknown} */ - op: "update-cell-codes"; - }; - /** - * UpdateCellIdsRequest - * @description Update the cell ID ordering of the cells in the notebook. - * - * Right now we send the entire list of cell IDs, - * but in the future we might want to send change-deltas. - */ - UpdateCellIdsRequest: { - cell_ids: string[]; - /** @enum {unknown} */ - op: "update-cell-ids"; - }; - /** UpdateComponentValuesRequest */ - UpdateComponentValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - /** - * ValidateSQLRequest - * @description Validate an SQL query against the engine - */ - ValidateSQLRequest: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - }; - /** ValidateSQLResult */ - ValidateSQLResult: { - /** @default null */ - error?: string | null; - /** @enum {unknown} */ - op: "validate-sql-result"; - /** @default null */ - parse_result?: null | components["schemas"]["SqlParseResult"]; - request_id: string; - /** @default null */ - validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; - }; - /** VariableContext */ - VariableContext: { - name: string; - previewValue: unknown; - valueType: string; - }; - /** VariableDeclaration */ - VariableDeclaration: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - /** VariableValue */ - VariableValue: { - datatype: string | null; - name: string; - value: string | null; - }; - /** - * VariableValues - * @description List of variables and their types/values. - */ - VariableValues: { - /** @enum {unknown} */ - op: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - /** - * Variables - * @description List of variable declarations. - */ - Variables: { - /** @enum {unknown} */ - op: "variables"; - variables: components["schemas"]["VariableDeclaration"][]; - }; - /** WorkspaceFilesRequest */ - WorkspaceFilesRequest: { - /** @default false */ - includeMarkdown?: boolean; - }; - /** WorkspaceFilesResponse */ - WorkspaceFilesResponse: { - /** @default 0 */ - fileCount?: number; - files: components["schemas"]["FileInfo"][]; - /** @default false */ - hasMore?: boolean; - root: string; - }; - /** - * _AppConfig - * @description Program-specific configuration. - * - * Configuration for frontends or runtimes that is specific to - * a single marimo program. - */ - _AppConfig: { - /** @default null */ - app_title?: string | null; - auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @default null */ - css_file?: string | null; - /** @default null */ - html_head_file?: string | null; - /** @default null */ - layout_file?: string | null; - /** - * @default auto - * @enum {unknown} - */ - sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - /** - * @default compact - * @enum {unknown} - */ - width?: "columns" | "compact" | "full" | "medium" | "normal"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AddPackageRequest + * @description This can be a remove package or a local package. + * + * Supported formats: + * + * httpx + * httpx==0.27.0 + * httpx>=0.27.0 + * git+https://github.com/encode/httpx + * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz + * /example/foo-0.1.0-py3-none-any.whl + */ + AddPackageRequest: { + package: string; + /** @default false */ + upgrade?: boolean | null; + }; + /** AiCompletionContext */ + AiCompletionContext: { + /** @default */ + plainText?: string; + /** @default [] */ + schema?: components["schemas"]["SchemaTable"][]; + /** @default [] */ + variables?: (string | components["schemas"]["VariableContext"])[]; + }; + /** AiCompletionRequest */ + AiCompletionRequest: { + code: string; + /** @default null */ + context?: null | components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + /** @default [] */ + messages?: components["schemas"]["ChatMessage"][]; + prompt: string; + /** @default null */ + selectedText?: string | null; + }; + /** + * AiConfig + * @description Configuration options for AI. + * + * **Keys.** + * + * - `rules`: custom rules to include in all AI completion prompts + * - `max_tokens`: the maximum number of tokens to use in AI completions + * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` + * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions + * - `models`: the models to use for AI completions + * - `open_ai`: the OpenAI config + * - `anthropic`: the Anthropic config + * - `google`: the Google AI config + * - `bedrock`: the Bedrock config + * - `azure`: the Azure config + * - `ollama`: the Ollama config + * - `github`: the GitHub config + * - `openrouter`: the OpenRouter config + * - `wandb`: the Weights & Biases config + * - `open_ai_compatible`: the OpenAI-compatible config + */ + AiConfig: { + anthropic?: components["schemas"]["AnthropicConfig"]; + azure?: components["schemas"]["OpenAiConfig"]; + bedrock?: components["schemas"]["BedrockConfig"]; + github?: components["schemas"]["GitHubConfig"]; + google?: components["schemas"]["GoogleAiConfig"]; + inline_tooltip?: boolean; + max_tokens?: number; + /** @enum {unknown} */ + mode?: "agent" | "ask" | "manual"; + models?: components["schemas"]["AiModelConfig"]; + ollama?: components["schemas"]["OpenAiConfig"]; + open_ai?: components["schemas"]["OpenAiConfig"]; + open_ai_compatible?: components["schemas"]["OpenAiConfig"]; + openrouter?: components["schemas"]["OpenAiConfig"]; + rules?: string; + wandb?: components["schemas"]["OpenAiConfig"]; + }; + /** AiInlineCompletionRequest */ + AiInlineCompletionRequest: { + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + prefix: string; + suffix: string; + }; + /** + * AiModelConfig + * @description Configuration options for an AI model. + * + * **Keys.** + * + * - `chat_model`: the model to use for chat completions + * - `edit_model`: the model to use for edit completions + * - `autocomplete_model`: the model to use for code completion/autocomplete + * - `displayed_models`: a list of models to display in the UI + * - `custom_models`: a list of custom models to use that are not from the default list + */ + AiModelConfig: { + autocomplete_model?: string; + chat_model?: string; + custom_models: string[]; + displayed_models: string[]; + edit_model?: string; + }; + /** Alert */ + Alert: { + description: string; + /** @enum {unknown} */ + op: "alert"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** + * AnthropicConfig + * @description Configuration options for Anthropic. + * + * **Keys.** + * + * - `api_key`: the Anthropic API key + */ + AnthropicConfig: { + api_key?: string; + }; + /** Banner */ + Banner: { + /** @default null */ + action?: "restart" | null; + description: string; + /** @enum {unknown} */ + op: "banner"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** BaseResponse */ + BaseResponse: { + success: boolean; + }; + /** + * BasedpyrightServerConfig + * @description Configuration options for basedpyright Language Server. + * + * basedpyright handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + BasedpyrightServerConfig: { + enabled?: boolean; + }; + /** + * BedrockConfig + * @description Configuration options for Bedrock. + * + * **Keys.** + * + * - `profile_name`: the AWS profile to use + * - `region_name`: the AWS region to use + * - `aws_access_key_id`: the AWS access key ID + * - `aws_secret_access_key`: the AWS secret access key + */ + BedrockConfig: { + aws_access_key_id?: string; + aws_secret_access_key?: string; + profile_name?: string; + region_name?: string; + }; + /** + * CacheCleared + * @description Result of clearing cache. + */ + CacheCleared: { + bytes_freed: number; + /** @enum {unknown} */ + op: "cache-cleared"; + }; + /** + * CacheInfoFetched + * @description Cache statistics information. + */ + CacheInfoFetched: { + disk_to_free: number; + disk_total: number; + hits: number; + misses: number; + /** @enum {unknown} */ + op: "cache-info-fetched"; + time: number; + }; + /** + * CellChannel + * @description The channel of a cell's output. + * @enum {unknown} + */ + CellChannel: "marimo-error" | "media" | "output" | "pdb" | "stderr" | "stdin" | "stdout"; + /** + * CellConfig + * @description Internal representation of a cell's configuration. + * This is not part of the public API. + */ + CellConfig: { + /** @default null */ + column?: number | null; + /** @default false */ + disabled?: boolean; + /** @default false */ + hide_code?: boolean; + }; + /** + * CellOp + * @description Op to transition a cell. + * + * A CellOp's data has some optional fields: + * + * output - a CellOutput + * console - a CellOutput (console msg to append), or a list of + * CellOutputs + * status - execution status + * stale_inputs - whether the cell has stale inputs (variables, modules, ...) + * run_id - the run associated with this cell. + * serialization - the serialization status of the cell + * + * Omitting a field means that its value should be unchanged! + * + * And one required field: + * + * cell_id - the cell id + */ + CellOp: { + cell_id: string; + /** @default null */ + console?: components["schemas"]["CellOutput"][] | null | components["schemas"]["CellOutput"]; + /** @enum {unknown} */ + op: "cell-op"; + /** @default null */ + output?: null | components["schemas"]["CellOutput"]; + /** @default null */ + run_id?: string | null; + /** @default null */ + serialization?: string | null; + /** @default null */ + stale_inputs?: boolean | null; + /** @default null */ + status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; + timestamp?: number; + }; + /** CellOutput */ + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: string | (components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"])[] | Record; + /** @enum {unknown} */ + mimetype: "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.vegalite.v5+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/plain" | "video/mp4" | "video/mpeg"; + timestamp?: number; + }; + /** ChatAttachment */ + ChatAttachment: { + /** @default null */ + content_type?: string | null; + /** @default attachment */ + name?: string; + url: string; + }; + /** + * ChatMessage + * @description A message in a chat. + */ + ChatMessage: { + /** @default null */ + attachments?: components["schemas"]["ChatAttachment"][] | null; + content: unknown; + /** @default null */ + parts?: Record[] | null; + /** @enum {unknown} */ + role: "assistant" | "system" | "user"; + }; + /** ChatRequest */ + ChatRequest: { + context: components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + messages: components["schemas"]["ChatMessage"][]; + /** @default null */ + model?: string | null; + /** @default null */ + tools?: components["schemas"]["ToolDefinition"][] | null; + /** @default null */ + variables?: (string | components["schemas"]["VariableContext"])[] | null; + }; + /** ClearCacheRequest */ + ClearCacheRequest: Record; + /** CodeCompletionRequest */ + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + /** + * ColumnStats + * @description Represents stats for a column in a data table. + */ + ColumnStats: { + /** @default null */ + false?: number | null; + /** @default null */ + max?: unknown | null; + /** @default null */ + mean?: unknown | null; + /** @default null */ + median?: unknown | null; + /** @default null */ + min?: unknown | null; + /** @default null */ + nulls?: number | null; + /** @default null */ + p25?: unknown | null; + /** @default null */ + p5?: unknown | null; + /** @default null */ + p75?: unknown | null; + /** @default null */ + p95?: unknown | null; + /** @default null */ + std?: unknown | null; + /** @default null */ + total?: number | null; + /** @default null */ + true?: number | null; + /** @default null */ + unique?: number | null; + }; + /** + * CompletedRun + * @description Written on run completion (of submitted cells and their descendants. + */ + CompletedRun: { + /** @enum {unknown} */ + op: "completed-run"; + }; + /** + * CompletionConfig + * @description Configuration for code completion. + * + * A dict with key/value pairs configuring code completion in the marimo + * editor. + * + * **Keys.** + * + * - `activate_on_typing`: if `False`, completion won't activate + * until the completion hotkey is entered + * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` + * - `codeium_api_key`: the Codeium API key + */ + CompletionConfig: { + activate_on_typing: boolean; + api_key?: string | null; + base_url?: string | null; + codeium_api_key?: string | null; + copilot: boolean | ("codeium" | "custom" | "github"); + model?: string | null; + }; + /** CompletionOption */ + CompletionOption: { + completion_info: string | null; + name: string; + type: string; + }; + /** + * CompletionResult + * @description Code completion result. + */ + CompletionResult: { + completion_id: string; + /** @enum {unknown} */ + op: "completion-result"; + options: components["schemas"]["CompletionOption"][]; + prefix_length: number; + }; + /** CopyNotebookRequest */ + CopyNotebookRequest: { + destination: string; + source: string; + }; + /** CreateSecretRequest */ + CreateSecretRequest: { + key: string; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + value: string; + }; + /** CycleError */ + CycleError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {unknown} */ + type: "cycle"; + }; + /** + * DataColumnPreview + * @description Preview of a column in a dataset. + */ + DataColumnPreview: { + /** @default null */ + chart_code?: string | null; + /** @default null */ + chart_spec?: string | null; + column_name: string; + /** @default null */ + error?: string | null; + /** @default null */ + missing_packages?: string[] | null; + /** @enum {unknown} */ + op: "data-column-preview"; + /** @default null */ + stats?: null | components["schemas"]["ColumnStats"]; + table_name: string; + }; + /** + * DataSourceConnection + * @description Represents a data source connection. + * + * Attributes: + * source (str): The source of the data source connection. E.g 'postgres'. + * dialect (str): The dialect of the data source connection. E.g 'postgresql'. + * name (str): The name of the data source connection. E.g 'engine'. + * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. + * databases (List[Database]): The databases in the data source connection. + * default_database (Optional[str]): The default database in the data source connection. + * default_schema (Optional[str]): The default schema in the data source connection. + */ + DataSourceConnection: { + databases: components["schemas"]["Database"][]; + /** @default null */ + default_database?: string | null; + /** @default null */ + default_schema?: string | null; + dialect: string; + display_name: string; + name: string; + source: string; + }; + /** DataSourceConnections */ + DataSourceConnections: { + connections: components["schemas"]["DataSourceConnection"][]; + /** @enum {unknown} */ + op: "data-source-connections"; + }; + /** + * DataTable + * @description Represents a data table. + * + * Attributes: + * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). + * source (str): Can be dialect, or source db name. + * name (str): Name of the data table. + * num_rows (Optional[int]): Total number of rows in the table, if known. + * num_columns (Optional[int]): Total number of columns in the table, if known. + * variable_name (Optional[VariableName]): Variable name referencing this table in code. + * columns (List[DataTableColumn]): List of column definitions and metadata. + * engine (Optional[VariableName]): Database engine or connection handler, if any. + * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. + * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. + * indexes (Optional[List[str]]): Column names used as indexes, if any. + */ + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + /** @default null */ + engine?: string | null; + /** @default null */ + indexes?: string[] | null; + name: string; + num_columns: number | null; + num_rows: number | null; + /** @default null */ + primary_keys?: string[] | null; + source: string; + /** @enum {unknown} */ + source_type: "catalog" | "connection" | "duckdb" | "local"; + /** + * @default table + * @enum {unknown} + */ + type?: "table" | "view"; + variable_name: string | null; + }; + /** + * DataTableColumn + * @description Represents a column in a data table. + * + * Attributes: + * name (str): The name of the column. + * type (DataType): The data type of the column. + * external_type (ExternalDataType): The raw data type of the column. + * sample_values (List[Any]): The sample values of the column. + */ + DataTableColumn: { + external_type: string; + name: string; + sample_values: unknown[]; + /** @enum {unknown} */ + type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; + }; + /** + * Database + * @description Represents a collection of schemas. + * + * Attributes: + * name (str): The name of the database + * dialect (str): The dialect of the database + * schemas (List[Schema]): List of schemas in the database + * engine (Optional[VariableName]): Database engine or connection handler, if any. + */ + Database: { + dialect: string; + /** @default null */ + engine?: string | null; + name: string; + schemas: components["schemas"]["Schema"][]; + }; + /** + * Datasets + * @description List of datasets. + */ + Datasets: { + /** @default null */ + clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; + /** @enum {unknown} */ + op: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + /** + * DatasourcesConfig + * @description Configuration for datasources panel. + * + * **Keys.** + * + * - `auto_discover_schemas`: if `True`, include schemas in the datasource + * - `auto_discover_tables`: if `True`, include tables in the datasource + * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource + */ + DatasourcesConfig: { + auto_discover_columns?: boolean | "auto"; + auto_discover_schemas?: boolean | "auto"; + auto_discover_tables?: boolean | "auto"; + }; + /** DeleteCellRequest */ + DeleteCellRequest: { + cellId: string; + }; + /** DeleteSecretRequest */ + DeleteSecretRequest: { + key: string; + }; + /** DependencyTreeNode */ + DependencyTreeNode: { + dependencies: components["schemas"]["DependencyTreeNode"][]; + name: string; + tags: { + [key: string]: string; + }[]; + version: string | null; + }; + /** DependencyTreeResponse */ + DependencyTreeResponse: { + tree: null | components["schemas"]["DependencyTreeNode"]; + }; + /** + * DiagnosticsConfig + * @description Configuration options for diagnostics. + * + * **Keys.** + * + * - `enabled`: if `True`, diagnostics will be shown in the editor + * - `sql_linter`: if `True`, SQL cells will have linting enabled + */ + DiagnosticsConfig: { + enabled?: boolean; + sql_linter?: boolean; + }; + /** + * DisplayConfig + * @description Configuration for display. + * + * **Keys.** + * + * - `theme`: `"light"`, `"dark"`, or `"system"` + * - `code_editor_font_size`: font size for the code editor + * - `cell_output`: `"above"` or `"below"` + * - `dataframes`: `"rich"` or `"plain"` + * - `custom_css`: list of paths to custom CSS files + * - `default_table_page_size`: default number of rows to display in tables + * - `default_table_max_columns`: default maximum number of columns to display in tables + * - `reference_highlighting`: if `True`, highlight reactive variable references + * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") + */ + DisplayConfig: { + /** @enum {unknown} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + custom_css?: string[]; + /** @enum {unknown} */ + dataframes: "plain" | "rich"; + default_table_max_columns: number; + default_table_page_size: number; + /** @enum {unknown} */ + default_width: "columns" | "compact" | "full" | "medium" | "normal"; + locale?: string | null; + reference_highlighting?: boolean; + /** @enum {unknown} */ + theme: "dark" | "light" | "system"; + }; + /** ExecuteMultipleRequest */ + ExecuteMultipleRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + }; + /** ExecuteScratchpadRequest */ + ExecuteScratchpadRequest: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** ExecuteStaleRequest */ + ExecuteStaleRequest: { + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** ExecutionRequest */ + ExecutionRequest: { + cellId: string; + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + }; + /** ExportAsHTMLRequest */ + ExportAsHTMLRequest: { + /** @default null */ + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + /** ExportAsIPYNBRequest */ + ExportAsIPYNBRequest: { + download: boolean; + }; + /** ExportAsMarkdownRequest */ + ExportAsMarkdownRequest: { + download: boolean; + }; + /** ExportAsScriptRequest */ + ExportAsScriptRequest: { + download: boolean; + }; + /** FileCreateRequest */ + FileCreateRequest: { + /** @default null */ + contents?: string | null; + name: string; + path: string; + /** @enum {unknown} */ + type: "directory" | "file"; + }; + /** FileCreateResponse */ + FileCreateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDeleteRequest */ + FileDeleteRequest: { + path: string; + }; + /** FileDeleteResponse */ + FileDeleteResponse: { + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDetailsRequest */ + FileDetailsRequest: { + path: string; + }; + /** FileDetailsResponse */ + FileDetailsResponse: { + /** @default null */ + contents?: string | null; + file: components["schemas"]["FileInfo"]; + /** @default null */ + mimeType?: string | null; + }; + /** FileInfo */ + FileInfo: { + /** @default [] */ + children?: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + }; + /** FileListRequest */ + FileListRequest: { + /** @default null */ + path?: string | null; + }; + /** FileListResponse */ + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + /** FileMoveRequest */ + FileMoveRequest: { + newPath: string; + path: string; + }; + /** FileMoveResponse */ + FileMoveResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileOpenRequest */ + FileOpenRequest: { + /** @default null */ + lineNumber?: number | null; + path: string; + }; + /** FileSearchRequest */ + FileSearchRequest: { + /** @default 3 */ + depth?: number; + /** @default true */ + includeDirectories?: boolean; + /** @default true */ + includeFiles?: boolean; + /** @default 100 */ + limit?: number; + /** @default null */ + path?: string | null; + query: string; + }; + /** FileSearchResponse */ + FileSearchResponse: { + files: components["schemas"]["FileInfo"][]; + query: string; + totalFound: number; + }; + /** FileUpdateRequest */ + FileUpdateRequest: { + contents: string; + path: string; + }; + /** FileUpdateResponse */ + FileUpdateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FocusCell */ + FocusCell: { + cell_id: string; + /** @enum {unknown} */ + op: "focus-cell"; + }; + /** FormatRequest */ + FormatRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + /** FormatResponse */ + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + /** + * FormattingConfig + * @description Configuration for code formatting. + * + * **Keys.** + * + * - `line_length`: max line length + */ + FormattingConfig: { + line_length: number; + }; + /** FunctionCallRequest */ + FunctionCallRequest: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + }; + /** + * FunctionCallResult + * @description Result of calling a function. + */ + FunctionCallResult: { + function_call_id: string; + /** @enum {unknown} */ + op: "function-call-result"; + return_value: unknown; + status: components["schemas"]["HumanReadableStatus"]; + }; + /** GetCacheInfoRequest */ + GetCacheInfoRequest: Record; + /** + * GitHubConfig + * @description Configuration options for GitHub. + * + * **Keys.** + * + * - `api_key`: the GitHub API token + * - `base_url`: the base URL for the API + * - `copilot_settings`: configuration settings for GitHub Copilot LSP. + * Supports settings like `http` (proxy configuration), `telemetry`, + * and `github-enterprise` (enterprise URI). + */ + GitHubConfig: { + api_key?: string; + base_url?: string; + copilot_settings?: Record; + }; + /** + * GoogleAiConfig + * @description Configuration options for Google AI. + * + * **Keys.** + * + * - `api_key`: the Google AI API key + */ + GoogleAiConfig: { + api_key?: string; + }; + HTTPRequest: { + baseUrl: { + [key: string]: unknown; + }; + cookies: { + [key: string]: string; + }; + headers: { + [key: string]: string; + }; + meta: { + [key: string]: unknown; + }; + pathParams: { + [key: string]: unknown; + }; + queryParams: { + [key: string]: string[]; + }; + url: { + [key: string]: unknown; + }; + user: unknown; + }; + /** + * HumanReadableStatus + * @description Human-readable status. + */ + HumanReadableStatus: { + /** @enum {unknown} */ + code: "error" | "ok"; + /** @default null */ + message?: string | null; + /** @default null */ + title?: string | null; + }; + /** ImportStarError */ + ImportStarError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "import-star"; + }; + /** InstallMissingPackagesRequest */ + InstallMissingPackagesRequest: { + manager: string; + versions: { + [key: string]: string; + }; + }; + /** InstallingPackageAlert */ + InstallingPackageAlert: { + /** @default null */ + log_status?: ("append" | "done" | "start") | null; + /** @default null */ + logs?: { + [key: string]: string; + } | null; + /** @enum {unknown} */ + op: "installing-package-alert"; + packages: { + [key: string]: "failed" | "installed" | "installing" | "queued"; + }; + }; + /** InstantiateRequest */ + InstantiateRequest: { + /** @default true */ + autoRun?: boolean; + objectIds: string[]; + values: unknown[]; + }; + /** + * Interrupted + * @description Written when the kernel is interrupted by the user. + */ + Interrupted: { + /** @enum {unknown} */ + op: "interrupted"; + }; + /** InvokeAiToolRequest */ + InvokeAiToolRequest: { + arguments: Record; + toolName: string; + }; + /** InvokeAiToolResponse */ + InvokeAiToolResponse: { + /** @default null */ + error?: string | null; + result: unknown; + success: boolean; + toolName: string; + }; + /** KernelCapabilities */ + KernelCapabilities: { + /** @default false */ + basedpyright?: boolean; + /** @default false */ + pylsp?: boolean; + /** @default false */ + terminal?: boolean; + /** @default false */ + ty?: boolean; + }; + /** + * KernelReady + * @description Kernel is ready for execution. + */ + KernelReady: { + app_config: components["schemas"]["_AppConfig"]; + capabilities: components["schemas"]["KernelCapabilities"]; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code: { + [key: string]: string; + } | null; + last_execution_time: { + [key: string]: number; + } | null; + layout: components["schemas"]["LayoutConfig"] | null; + names: string[]; + /** @enum {unknown} */ + op: "kernel-ready"; + resumed: boolean; + ui_values: Record | null; + }; + /** + * KeymapConfig + * @description Configuration for keymaps. + * + * **Keys.** + * + * - `preset`: one of `"default"` or `"vim"` + * - `overrides`: a dict of keymap actions to their keymap override + * - `vimrc`: path to a vimrc file to load keymaps from + * - `destructive_delete`: if `True`, allows deleting cells with content. + */ + KeymapConfig: { + destructive_delete?: boolean; + overrides?: { + [key: string]: string; + }; + /** @enum {unknown} */ + preset: "default" | "vim"; + vimrc?: string | null; + }; + /** KnownUnions */ + KnownUnions: { + /** @enum {unknown} */ + data_type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; + error: components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"]; + operation: components["schemas"]["CellOp"] | components["schemas"]["FunctionCallResult"] | components["schemas"]["SendUIElementMessage"] | components["schemas"]["RemoveUIElements"] | components["schemas"]["Reload"] | components["schemas"]["Reconnected"] | components["schemas"]["Interrupted"] | components["schemas"]["CompletedRun"] | components["schemas"]["KernelReady"] | components["schemas"]["CompletionResult"] | components["schemas"]["Alert"] | components["schemas"]["Banner"] | components["schemas"]["MissingPackageAlert"] | components["schemas"]["InstallingPackageAlert"] | components["schemas"]["StartupLogs"] | components["schemas"]["Variables"] | components["schemas"]["VariableValues"] | components["schemas"]["QueryParamsSet"] | components["schemas"]["QueryParamsAppend"] | components["schemas"]["QueryParamsDelete"] | components["schemas"]["QueryParamsClear"] | components["schemas"]["Datasets"] | components["schemas"]["DataColumnPreview"] | components["schemas"]["SQLTablePreview"] | components["schemas"]["SQLTableListPreview"] | components["schemas"]["DataSourceConnections"] | components["schemas"]["ValidateSQLResult"] | components["schemas"]["SecretKeysResult"] | components["schemas"]["CacheCleared"] | components["schemas"]["CacheInfoFetched"] | components["schemas"]["FocusCell"] | components["schemas"]["UpdateCellCodes"] | components["schemas"]["UpdateCellIdsRequest"]; + }; + /** + * LanguageServersConfig + * @description Configuration options for language servers. + * + * **Keys.** + * + * - `pylsp`: the pylsp config + */ + LanguageServersConfig: { + basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; + pylsp?: components["schemas"]["PythonLanguageServerConfig"]; + ty?: components["schemas"]["TyLanguageServerConfig"]; + }; + /** LayoutConfig */ + LayoutConfig: { + data: Record; + type: string; + }; + /** ListPackagesResponse */ + ListPackagesResponse: { + packages: components["schemas"]["PackageDescription"][]; + }; + /** ListSecretKeysRequest */ + ListSecretKeysRequest: { + requestId: string; + }; + /** ListSecretKeysResponse */ + ListSecretKeysResponse: { + keys: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** + * MCPConfig + * @description Configuration for MCP servers + * + * Note: the field name `mcpServers` is camelCased to match MCP server + * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) + */ + MCPConfig: { + mcpServers: { + [key: string]: Record; + }; + presets?: ("context7" | "marimo")[]; + }; + /** MCPRefreshResponse */ + MCPRefreshResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: boolean; + }; + success: boolean; + }; + /** MCPStatusResponse */ + MCPStatusResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: "connected" | "disconnected" | "failed" | "pending"; + }; + /** @enum {unknown} */ + status: "error" | "ok" | "partial"; + }; + /** MarimoAncestorPreventedError */ + MarimoAncestorPreventedError: { + blamed_cell: string | null; + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-prevented"; + }; + /** MarimoAncestorStoppedError */ + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-stopped"; + }; + /** + * MarimoConfig + * @description Configuration for the marimo editor + */ + MarimoConfig: { + ai?: components["schemas"]["AiConfig"]; + completion: components["schemas"]["CompletionConfig"]; + datasources?: components["schemas"]["DatasourcesConfig"]; + diagnostics?: components["schemas"]["DiagnosticsConfig"]; + display: components["schemas"]["DisplayConfig"]; + experimental?: Record; + formatting: components["schemas"]["FormattingConfig"]; + keymap: components["schemas"]["KeymapConfig"]; + language_servers?: components["schemas"]["LanguageServersConfig"]; + mcp?: components["schemas"]["MCPConfig"]; + package_management: components["schemas"]["PackageManagementConfig"]; + runtime: components["schemas"]["RuntimeConfig"]; + save: components["schemas"]["SaveConfig"]; + server: components["schemas"]["ServerConfig"]; + sharing?: components["schemas"]["SharingConfig"]; + snippets?: components["schemas"]["SnippetsConfig"]; + }; + /** MarimoExceptionRaisedError */ + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell: string | null; + /** @enum {unknown} */ + type: "exception"; + }; + /** MarimoFile */ + MarimoFile: { + /** @default null */ + initializationId?: string | null; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + /** @default null */ + sessionId?: string | null; + }; + /** + * 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. + */ + MarimoInternalError: { + error_id: string; + /** @default */ + msg?: string; + /** @enum {unknown} */ + type: "internal"; + }; + /** MarimoInterruptionError */ + MarimoInterruptionError: { + /** @enum {unknown} */ + type: "interruption"; + }; + /** + * MarimoSQLError + * @description SQL-specific error with enhanced metadata for debugging. + */ + MarimoSQLError: { + /** @default null */ + hint?: string | null; + msg: string; + /** @default 0 */ + node_col_offset?: number; + /** @default 0 */ + node_lineno?: number; + /** @default null */ + sql_col?: number | null; + /** @default null */ + sql_line?: number | null; + sql_statement: string; + /** @enum {unknown} */ + type: "sql-error"; + }; + /** MarimoStrictExecutionError */ + MarimoStrictExecutionError: { + blamed_cell: string | null; + msg: string; + ref: string; + /** @enum {unknown} */ + type: "strict-exception"; + }; + /** MarimoSyntaxError */ + MarimoSyntaxError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "syntax"; + }; + /** MissingPackageAlert */ + MissingPackageAlert: { + isolated: boolean; + /** @enum {unknown} */ + op: "missing-package-alert"; + packages: string[]; + }; + /** ModelMessage */ + ModelMessage: { + bufferPaths: (string | number)[][]; + state: Record; + }; + /** MultipleDefinitionError */ + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {unknown} */ + type: "multiple-defs"; + }; + /** + * OpenAiConfig + * @description Configuration options for OpenAI or OpenAI-compatible services. + * + * **Keys.** + * + * - `api_key`: the OpenAI API key + * - `base_url`: the base URL for the API + * - `project`: the project ID for the OpenAI API + * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios + * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client + * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server + * - `extra_headers`: extra headers to be passed to the OpenAI client + */ + OpenAiConfig: { + api_key?: string; + base_url?: string; + ca_bundle_path?: string; + client_pem?: string; + extra_headers?: { + [key: string]: string; + }; + model?: string; + project?: string; + ssl_verify?: boolean; + }; + /** OpenTutorialRequest */ + OpenTutorialRequest: { + tutorialId: ("dataflow" | "fileformat" | "for-jupyter-users" | "intro" | "layout" | "markdown" | "plots" | "sql" | "ui") | "markdown-format"; + }; + /** PackageDescription */ + PackageDescription: { + name: string; + version: string; + }; + /** + * PackageManagementConfig + * @description Configuration options for package management. + * + * **Keys.** + * + * - `manager`: the package manager to use + */ + PackageManagementConfig: { + /** @enum {unknown} */ + manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; + }; + /** PackageOperationResponse */ + PackageOperationResponse: { + /** @default null */ + error?: string | null; + success: boolean; + }; + /** PdbRequest */ + PdbRequest: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * PreviewDataSourceConnectionRequest + * @description Fetch a datasource connection + */ + PreviewDataSourceConnectionRequest: { + engine: string; + }; + /** PreviewDatasetColumnRequest */ + PreviewDatasetColumnRequest: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + }; + /** + * PreviewSQLTableListRequest + * @description Preview list of tables in an SQL schema + */ + PreviewSQLTableListRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + }; + /** + * PreviewSQLTableRequest + * @description Preview table details in an SQL database + */ + PreviewSQLTableRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + }; + /** + * PythonLanguageServerConfig + * @description Configuration options for Python Language Server. + * + * pylsp handles completion, hover, go-to-definition, and diagnostics. + */ + PythonLanguageServerConfig: { + enable_flake8?: boolean; + enable_mypy?: boolean; + enable_pydocstyle?: boolean; + enable_pyflakes?: boolean; + enable_pylint?: boolean; + enable_ruff?: boolean; + enabled?: boolean; + }; + /** QueryParamsAppend */ + QueryParamsAppend: { + key: string; + /** @enum {unknown} */ + op: "query-params-append"; + value: string; + }; + /** QueryParamsClear */ + QueryParamsClear: { + /** @enum {unknown} */ + op: "query-params-clear"; + }; + /** QueryParamsDelete */ + QueryParamsDelete: { + key: string; + /** @enum {unknown} */ + op: "query-params-delete"; + value: string | null; + }; + /** + * QueryParamsSet + * @description Set query parameters. + */ + QueryParamsSet: { + key: string; + /** @enum {unknown} */ + op: "query-params-set"; + value: string | string[]; + }; + /** ReadCodeResponse */ + ReadCodeResponse: { + contents: string; + }; + /** RecentFilesResponse */ + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** Reconnected */ + Reconnected: { + /** @enum {unknown} */ + op: "reconnected"; + }; + /** Reload */ + Reload: { + /** @enum {unknown} */ + op: "reload"; + }; + /** RemovePackageRequest */ + RemovePackageRequest: { + package: string; + }; + /** + * RemoveUIElements + * @description Invalidate UI elements for a given cell. + */ + RemoveUIElements: { + cell_id: string; + /** @enum {unknown} */ + op: "remove-ui-elements"; + }; + /** RenameFileRequest */ + RenameFileRequest: { + filename: string; + }; + /** RenameRequest */ + RenameRequest: { + filename: string; + }; + /** RunRequest */ + RunRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** RunningNotebooksResponse */ + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** + * RuntimeConfig + * @description Configuration for runtime. + * + * **Keys.** + * + * - `auto_instantiate`: if `False`, cells won't automatically + * run on startup. This only applies when editing a notebook, + * and not when running as an application. + * The default is `True`. + * - `auto_reload`: if `lazy`, cells importing modified modules will marked + * as stale; if `autorun`, affected cells will be automatically run. similar + * to IPython's %autoreload extension but with more code intelligence. + * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. + * execution. + * - `on_cell_change`: if `lazy`, cells will be marked stale when their + * ancestors run but won't autorun; if `autorun`, cells will automatically + * run when their ancestors run. + * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; + * if `strict` marimo will clone cell declarations by default, avoiding + * hidden potential state build up. + * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks + * affected cells as stale, `"autorun"` automatically runs affected cells. + * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger + * values may affect frontend performance + * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; + * larger values may affect frontend performance + * - `pythonpath`: a list of directories to add to the Python search path. + * Directories will be added to the head of sys.path. Similar to the + * `PYTHONPATH` environment variable, the directories will be included in + * where Python will look for imported modules. + * - `dotenv`: a list of paths to `.env` files to load. + * If the file does not exist, it will be silently ignored. + * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. + * - `default_sql_output`: the default output format for SQL queries. Can be one of: + * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. + * The default is `"auto"`. + * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: + * `html`, `markdown`, `ipynb`. + * The default is None. + */ + RuntimeConfig: { + auto_instantiate: boolean; + /** @enum {unknown} */ + auto_reload: "autorun" | "lazy" | "off"; + default_auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @enum {unknown} */ + default_sql_output: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + dotenv?: string[]; + /** @enum {unknown} */ + on_cell_change: "autorun" | "lazy"; + output_max_bytes: number; + pythonpath?: string[]; + reactive_tests: boolean; + std_stream_max_bytes: number; + /** @enum {unknown} */ + watcher_on_save: "autorun" | "lazy"; + }; + /** + * SQLMetadata + * @description Metadata for a SQL database. + */ + SQLMetadata: { + connection: string; + database: string; + schema: string; + /** @enum {unknown} */ + type: "sql-metadata"; + }; + /** + * SQLTableListPreview + * @description Preview of a list of tables in a schema. + */ + SQLTableListPreview: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-list-preview"; + request_id: string; + /** @default [] */ + tables?: components["schemas"]["DataTable"][]; + }; + /** + * SQLTablePreview + * @description Preview of a table in a SQL database. + */ + SQLTablePreview: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-preview"; + request_id: string; + table: null | components["schemas"]["DataTable"]; + }; + /** SaveAppConfigurationRequest */ + SaveAppConfigurationRequest: { + config: Record; + }; + /** + * SaveConfig + * @description Configuration for saving. + * + * **Keys.** + * + * - `autosave`: one of `"off"` or `"after_delay"` + * - `delay`: number of milliseconds to wait before autosaving + * - `format_on_save`: if `True`, format the code on save + */ + SaveConfig: { + /** @enum {unknown} */ + autosave: "after_delay" | "off"; + autosave_delay: number; + format_on_save: boolean; + }; + /** SaveNotebookRequest */ + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + /** @default null */ + layout?: Record | null; + names: string[]; + /** @default true */ + persist?: boolean; + }; + /** SaveUserConfigurationRequest */ + SaveUserConfigurationRequest: { + config: Record; + }; + /** Schema */ + Schema: { + name: string; + tables: components["schemas"]["DataTable"][]; + }; + /** SchemaColumn */ + SchemaColumn: { + name: string; + sampleValues: unknown[]; + type: string; + }; + /** SchemaTable */ + SchemaTable: { + columns: components["schemas"]["SchemaColumn"][]; + name: string; + }; + /** + * SecretKeysResult + * @description Result of listing secret keys. + */ + SecretKeysResult: { + /** @enum {unknown} */ + op: "secret-keys-result"; + request_id: string; + secrets: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** SecretKeysWithProvider */ + SecretKeysWithProvider: { + keys: string[]; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + }; + /** + * SendUIElementMessage + * @description Send a message to a UI element. + */ + SendUIElementMessage: { + /** @default null */ + buffers?: string[] | null; + message: Record; + model_id: string | null; + /** @enum {unknown} */ + op: "send-ui-element-message"; + ui_element: string | null; + }; + /** + * ServerConfig + * @description Configuration for the server. + * + * **Keys.** + * + * - `browser`: the web browser to use. `"default"` or a browser registered + * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) + * - `follow_symlink`: if true, the server will follow symlinks it finds + * inside its static assets directory. + */ + ServerConfig: { + browser: "default" | string; + follow_symlink: boolean; + }; + /** SetCellConfigRequest */ + SetCellConfigRequest: { + configs: { + [key: string]: Record; + }; + }; + /** SetModelMessageRequest */ + SetModelMessageRequest: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + }; + /** SetUIElementValueRequest */ + SetUIElementValueRequest: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + values: unknown[]; + }; + /** SetUserConfigRequest */ + SetUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + /** SetupRootError */ + SetupRootError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {unknown} */ + type: "setup-refs"; + }; + /** + * SharingConfig + * @description Configuration for sharing features. + * + * **Keys.** + * + * - `html`: if `False`, HTML sharing options will be hidden from the UI + * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI + */ + SharingConfig: { + html?: boolean; + wasm?: boolean; + }; + /** ShutdownSessionRequest */ + ShutdownSessionRequest: { + sessionId: string; + }; + /** Snippet */ + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + /** SnippetSection */ + SnippetSection: { + /** @default null */ + code?: string | null; + /** @default null */ + html?: string | null; + id: string; + }; + /** Snippets */ + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + /** + * SnippetsConfig + * @description Configuration for snippets. + * + * **Keys.** + * + * - `custom_path`: the path to the custom snippets directory + */ + SnippetsConfig: { + custom_paths?: string[]; + include_default_snippets?: boolean; + }; + /** + * SqlCatalogCheckResult + * @description Result of running validation against the database. + */ + SqlCatalogCheckResult: { + error_message: string | null; + success: boolean; + }; + /** + * SqlParseError + * @description Represents a single SQL parse error. + * + * Attributes: + * message (str): Description of the error. + * line (int): Line number where the error occurred (1-based). + * column (int): Column number where the error occurred (1-based). + * severity (Literal["error", "warning"]): Severity of the error. + */ + SqlParseError: { + column: number; + line: number; + message: string; + /** @enum {unknown} */ + severity: "error" | "warning"; + }; + /** + * SqlParseResult + * @description Result of parsing an SQL query. + * + * Attributes: + * success (bool): True if parsing succeeded without errors. + * errors (list[SqlParseError]): List of parse errors (empty if success is True). + */ + SqlParseResult: { + errors: components["schemas"]["SqlParseError"][]; + success: boolean; + }; + /** StartupLogs */ + StartupLogs: { + content: string; + /** @enum {unknown} */ + op: "startup-logs"; + /** @enum {unknown} */ + status: "append" | "done" | "start"; + }; + /** StdinRequest */ + StdinRequest: { + text: string; + }; + /** StopRequest */ + StopRequest: Record; + /** + * StoreConfig + * @description Configuration for cache stores. + */ + StoreConfig: { + args?: Record; + /** @enum {unknown} */ + type?: "file" | "redis" | "rest" | "tiered"; + }; + /** SuccessResponse */ + SuccessResponse: { + /** @default true */ + success?: boolean; + }; + /** + * ToolDefinition + * @description Tool definition compatible with ai-sdk-ui format. + */ + ToolDefinition: { + description: string; + mode: ("agent" | "ask" | "manual")[]; + name: string; + parameters: Record; + /** @enum {unknown} */ + source: "backend" | "frontend" | "mcp"; + }; + /** + * TyLanguageServerConfig + * @description Configuration options for Ty Language Server. + * + * ty handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + TyLanguageServerConfig: { + enabled?: boolean; + }; + /** UnknownError */ + UnknownError: { + /** @default null */ + error_type?: string | null; + msg: string; + /** @enum {unknown} */ + type: "unknown"; + }; + /** UpdateCellCodes */ + UpdateCellCodes: { + cell_ids: string[]; + code_is_stale: boolean; + codes: string[]; + /** @enum {unknown} */ + op: "update-cell-codes"; + }; + /** + * UpdateCellIdsRequest + * @description Update the cell ID ordering of the cells in the notebook. + * + * Right now we send the entire list of cell IDs, + * but in the future we might want to send change-deltas. + */ + UpdateCellIdsRequest: { + cell_ids: string[]; + /** @enum {unknown} */ + op: "update-cell-ids"; + }; + /** UpdateComponentValuesRequest */ + UpdateComponentValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + /** + * ValidateSQLRequest + * @description Validate an SQL query against the engine + */ + ValidateSQLRequest: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + }; + /** ValidateSQLResult */ + ValidateSQLResult: { + /** @default null */ + error?: string | null; + /** @enum {unknown} */ + op: "validate-sql-result"; + /** @default null */ + parse_result?: null | components["schemas"]["SqlParseResult"]; + request_id: string; + /** @default null */ + validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; + }; + /** VariableContext */ + VariableContext: { + name: string; + previewValue: unknown; + valueType: string; + }; + /** VariableDeclaration */ + VariableDeclaration: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + /** VariableValue */ + VariableValue: { + datatype: string | null; + name: string; + value: string | null; + }; + /** + * VariableValues + * @description List of variables and their types/values. + */ + VariableValues: { + /** @enum {unknown} */ + op: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + /** + * Variables + * @description List of variable declarations. + */ + Variables: { + /** @enum {unknown} */ + op: "variables"; + variables: components["schemas"]["VariableDeclaration"][]; + }; + /** WorkspaceFilesRequest */ + WorkspaceFilesRequest: { + /** @default false */ + includeMarkdown?: boolean; + }; + /** WorkspaceFilesResponse */ + WorkspaceFilesResponse: { + /** @default 0 */ + fileCount?: number; + files: components["schemas"]["FileInfo"][]; + /** @default false */ + hasMore?: boolean; + root: string; + }; + /** + * _AppConfig + * @description Program-specific configuration. + * + * Configuration for frontends or runtimes that is specific to + * a single marimo program. + */ + _AppConfig: { + /** @default null */ + app_title?: string | null; + auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @default null */ + css_file?: string | null; + /** @default null */ + html_head_file?: string | null; + /** @default null */ + layout_file?: string | null; + /** + * @default auto + * @enum {unknown} + */ + sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + /** + * @default compact + * @enum {unknown} + */ + width?: "columns" | "compact" | "full" | "medium" | "normal"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; diff --git a/packages/openapi/src/notebook.ts b/packages/openapi/src/notebook.ts index 9b3f7ebe525..94bc08bedb8 100644 --- a/packages/openapi/src/notebook.ts +++ b/packages/openapi/src/notebook.ts @@ -6,38 +6,38 @@ export type paths = Record; export type webhooks = Record; export interface components { - schemas: { - NotebookCell: { - code: string | null; - code_hash: string | null; - config: { - column?: number | null; - disabled?: boolean | null; - hide_code?: boolean | null; - }; - id: string | null; - name: string | null; + schemas: { + NotebookCell: { + code: string | null; + code_hash: string | null; + config: { + column?: number | null; + disabled?: boolean | null; + hide_code?: boolean | null; + }; + id: string | null; + name: string | null; + }; + NotebookCellConfig: { + column?: number | null; + disabled?: boolean | null; + hide_code?: boolean | null; + }; + NotebookMetadata: { + marimo_version?: string | null; + }; + NotebookV1: { + cells: components["schemas"]["NotebookCell"][]; + metadata: components["schemas"]["NotebookMetadata"]; + /** @enum {string} */ + version: "1"; + }; }; - NotebookCellConfig: { - column?: number | null; - disabled?: boolean | null; - hide_code?: boolean | null; - }; - NotebookMetadata: { - marimo_version?: string | null; - }; - NotebookV1: { - cells: components["schemas"]["NotebookCell"][]; - metadata: components["schemas"]["NotebookMetadata"]; - /** @enum {string} */ - version: "1"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; diff --git a/packages/openapi/src/session.ts b/packages/openapi/src/session.ts index f4fb701de1a..9787ac37160 100644 --- a/packages/openapi/src/session.ts +++ b/packages/openapi/src/session.ts @@ -6,113 +6,64 @@ export type paths = Record; export type webhooks = Record; export interface components { - schemas: { - Cell: { - code_hash: string | null; - console: ( - | components["schemas"]["StreamOutput"] - | components["schemas"]["StreamMediaOutput"] - )[]; - id: string; - outputs: ( - | components["schemas"]["ErrorOutput"] - | components["schemas"]["DataOutput"] - )[]; + schemas: { + Cell: { + code_hash: string | null; + console: (components["schemas"]["StreamOutput"] | components["schemas"]["StreamMediaOutput"])[]; + id: string; + outputs: (components["schemas"]["ErrorOutput"] | components["schemas"]["DataOutput"])[]; + }; + DataOutput: { + data: { + [key: string]: unknown; + }; + /** @enum {string} */ + type: "data"; + }; + ErrorOutput: { + ename: string; + evalue: string; + traceback: string[]; + /** @enum {string} */ + type: "error"; + }; + NotebookSessionMetadata: { + marimo_version: string | null; + }; + NotebookSessionV1: { + cells: components["schemas"]["Cell"][]; + metadata: components["schemas"]["NotebookSessionMetadata"]; + version: string; + }; + StreamMediaOutput: { + data: string; + /** @enum {string} */ + mimetype: "application/json" | "application/vnd.marimo+error" | "application/vnd.marimo+traceback" | "application/vnd.marimo+mimebundle" | "application/vnd.vega.v5+json" | "application/vnd.vegalite.v5+json" | "application/vnd.jupyter.widget-view+json" | "image/png" | "image/svg+xml" | "image/tiff" | "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "video/mp4" | "video/mpeg" | "text/html" | "text/plain" | "text/markdown" | "text/latex" | "text/csv"; + /** @enum {string} */ + name: "media"; + /** @enum {string} */ + type: "streamMedia"; + }; + StreamOutput: { + /** @enum {string|null} */ + mimetype: "application/json" | "application/vnd.marimo+error" | "application/vnd.marimo+traceback" | "application/vnd.marimo+mimebundle" | "application/vnd.vega.v5+json" | "application/vnd.vegalite.v5+json" | "application/vnd.jupyter.widget-view+json" | "image/png" | "image/svg+xml" | "image/tiff" | "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "video/mp4" | "video/mpeg" | "text/html" | "text/plain" | "text/markdown" | "text/latex" | "text/csv" | null; + /** @enum {string} */ + name: "stdout" | "stderr"; + text: string; + /** @enum {string} */ + type: "stream"; + }; + TimeMetadata: { + completed: string | null; + duration: number | null; + started: string | null; + }; }; - DataOutput: { - data: { - [key: string]: unknown; - }; - /** @enum {string} */ - type: "data"; - }; - ErrorOutput: { - ename: string; - evalue: string; - traceback: string[]; - /** @enum {string} */ - type: "error"; - }; - NotebookSessionMetadata: { - marimo_version: string | null; - }; - NotebookSessionV1: { - cells: components["schemas"]["Cell"][]; - metadata: components["schemas"]["NotebookSessionMetadata"]; - version: string; - }; - StreamMediaOutput: { - data: string; - /** @enum {string} */ - mimetype: - | "application/json" - | "application/vnd.marimo+error" - | "application/vnd.marimo+traceback" - | "application/vnd.marimo+mimebundle" - | "application/vnd.vega.v5+json" - | "application/vnd.vegalite.v5+json" - | "application/vnd.jupyter.widget-view+json" - | "image/png" - | "image/svg+xml" - | "image/tiff" - | "image/avif" - | "image/bmp" - | "image/gif" - | "image/jpeg" - | "video/mp4" - | "video/mpeg" - | "text/html" - | "text/plain" - | "text/markdown" - | "text/latex" - | "text/csv"; - /** @enum {string} */ - name: "media"; - /** @enum {string} */ - type: "streamMedia"; - }; - StreamOutput: { - /** @enum {string|null} */ - mimetype: - | "application/json" - | "application/vnd.marimo+error" - | "application/vnd.marimo+traceback" - | "application/vnd.marimo+mimebundle" - | "application/vnd.vega.v5+json" - | "application/vnd.vegalite.v5+json" - | "application/vnd.jupyter.widget-view+json" - | "image/png" - | "image/svg+xml" - | "image/tiff" - | "image/avif" - | "image/bmp" - | "image/gif" - | "image/jpeg" - | "video/mp4" - | "video/mpeg" - | "text/html" - | "text/plain" - | "text/markdown" - | "text/latex" - | "text/csv" - | null; - /** @enum {string} */ - name: "stdout" | "stderr"; - text: string; - /** @enum {string} */ - type: "stream"; - }; - TimeMetadata: { - completed: string | null; - duration: number | null; - started: string | null; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; diff --git a/tests/_utils/test_health_utils.py b/tests/_utils/test_health_utils.py index 5fa20536a0d..a7794ecf90a 100644 --- a/tests/_utils/test_health_utils.py +++ b/tests/_utils/test_health_utils.py @@ -3,10 +3,12 @@ from marimo._utils.health import ( _get_versions, get_chrome_version, + get_container_resources, get_node_version, get_optional_modules_list, get_python_version, get_required_modules_list, + has_cgroup_limits, ) @@ -32,3 +34,21 @@ def test_get_chrome_version(): def test_get_python_version(): assert isinstance(get_python_version(), str) + + +def test_has_cgroup_limits(): + """Test that has_cgroup_limits returns a tuple of bools and doesn't crash""" + memory_limit, cpu_limit = has_cgroup_limits() + assert isinstance(memory_limit, bool) + assert isinstance(cpu_limit, bool) + + +def test_get_container_resources(): + """Test that get_container_resources returns None or a dict and doesn't crash""" + result = get_container_resources() + assert result is None or isinstance(result, dict) + if isinstance(result, dict): + # If we happen to be in a container, verify structure + if "memory" in result: + assert "total" in result["memory"] + assert "used" in result["memory"] From 808b44d4bc3112497db960970060b4d7c6bcb95b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:47:23 +0000 Subject: [PATCH 03/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- packages/openapi/src/api.ts | 9461 +++++++++++++++--------------- packages/openapi/src/notebook.ts | 62 +- packages/openapi/src/session.ts | 163 +- 3 files changed, 4927 insertions(+), 4759 deletions(-) diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index e59002441d5..1f5a8b6c955 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -4,4681 +4,4800 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI chat */ - requestBody: { - content: { - "application/json": components["schemas"]["ChatRequest"]; - }; - }; - responses: never; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/inline_completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI inline completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiInlineCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI inline completion for code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/invoke_tool": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for tool invocation */ - requestBody: { - content: { - "application/json": components["schemas"]["InvokeAiToolRequest"]; - }; - }; - responses: { - /** @description Tool invocation result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["InvokeAiToolResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Refresh MCP server configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPRefreshResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get MCP server status */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPStatusResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/clear": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ClearCacheRequest"]; - }; - }; - responses: { - /** @description Clear all caches */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["GetCacheInfoRequest"]; - }; - }; - responses: { - /** @description Get cache statistics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_datasource_connection": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDataSourceConnectionRequest"]; - }; - }; - responses: { - /** @description Broadcasts a datasource connection */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableRequest"]; - }; - }; - responses: { - /** @description Preview a SQL table */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table_list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableListRequest"]; - }; - }; - responses: { - /** @description Preview a list of tables in an SQL schema */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/ipynb": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsIPYNBRequest"]; - }; - }; - responses: { - /** @description Export the notebook as IPYNB */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileOpenRequest"]; - }; - }; - responses: { - /** @description Open a file in the system editor */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileSearchRequest"]; - }; - }; - responses: { - /** @description Search for files and directories matching a query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileSearchResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/tutorial/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenTutorialRequest"]; - }; - }; - responses: { - /** @description Open a new tutorial */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MarimoFile"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/copy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CopyNotebookRequest"]; - }; - }; - responses: { - /** @description Copy notebook */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FunctionCallRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallMissingPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/pdb/pm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PdbRequest"]; - }; - }; - responses: { - /** @description Run a post mortem on the most recent failed cell. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameFileRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RunRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SetCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_model_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SetModelMessageRequest"]; - }; - }; - responses: { - /** @description Set model value */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateComponentValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/takeover": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully closed existing sessions */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status?: string; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/add": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["AddPackageRequest"]; - }; - }; - responses: { - /** @description Install package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List installed packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListPackagesResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/remove": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RemovePackageRequest"]; - }; - }; - responses: { - /** @description Uninstall package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List dependency tree */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DependencyTreeResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSecretRequest"]; - }; - }; - responses: { - /** @description Create a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Delete a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ListSecretKeysRequest"]; - }; - }; - responses: { - /** @description List all secret keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListSecretKeysResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/sql/validate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ValidateSQLRequest"]; - }; - }; - responses: { - /** @description Validate an SQL query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status/connections": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the number of active websocket connections */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - active?: number; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - percent: number; - }; - gpu?: { - index: number; - memory: { - free: number; - percent: number; - total: number; - used: number; - }; - name: string; - }[]; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - is_container?: boolean; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI chat */ + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: never; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/inline_completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI inline completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiInlineCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI inline completion for code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/invoke_tool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for tool invocation */ + requestBody: { + content: { + "application/json": components["schemas"]["InvokeAiToolRequest"]; + }; + }; + responses: { + /** @description Tool invocation result */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InvokeAiToolResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Refresh MCP server configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPRefreshResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get MCP server status */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPStatusResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/clear": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ClearCacheRequest"]; + }; + }; + responses: { + /** @description Clear all caches */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["GetCacheInfoRequest"]; + }; + }; + responses: { + /** @description Get cache statistics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_datasource_connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDataSourceConnectionRequest"]; + }; + }; + responses: { + /** @description Broadcasts a datasource connection */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableRequest"]; + }; + }; + responses: { + /** @description Preview a SQL table */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table_list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableListRequest"]; + }; + }; + responses: { + /** @description Preview a list of tables in an SQL schema */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/ipynb": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsIPYNBRequest"]; + }; + }; + responses: { + /** @description Export the notebook as IPYNB */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileOpenRequest"]; + }; + }; + responses: { + /** @description Open a file in the system editor */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileSearchRequest"]; + }; + }; + responses: { + /** @description Search for files and directories matching a query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileSearchResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/tutorial/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenTutorialRequest"]; + }; + }; + responses: { + /** @description Open a new tutorial */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MarimoFile"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/copy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CopyNotebookRequest"]; + }; + }; + responses: { + /** @description Copy notebook */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FunctionCallRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallMissingPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/pdb/pm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PdbRequest"]; + }; + }; + responses: { + /** @description Run a post mortem on the most recent failed cell. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameFileRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RunRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_model_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetModelMessageRequest"]; + }; + }; + responses: { + /** @description Set model value */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateComponentValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/takeover": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully closed existing sessions */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status?: string; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/add": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPackageRequest"]; + }; + }; + responses: { + /** @description Install package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List installed packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListPackagesResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/remove": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePackageRequest"]; + }; + }; + responses: { + /** @description Uninstall package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/tree": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List dependency tree */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DependencyTreeResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateSecretRequest"]; + }; + }; + responses: { + /** @description Create a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Delete a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ListSecretKeysRequest"]; + }; + }; + responses: { + /** @description List all secret keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListSecretKeysResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/sql/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ValidateSQLRequest"]; + }; + }; + responses: { + /** @description Validate an SQL query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status/connections": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the number of active websocket connections */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + active?: number; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + percent: number; + }; + gpu?: { + index: number; + memory: { + free: number; + percent: number; + total: number; + used: number; + }; + name: string; + }[]; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + is_container?: boolean; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AddPackageRequest - * @description This can be a remove package or a local package. - * - * Supported formats: - * - * httpx - * httpx==0.27.0 - * httpx>=0.27.0 - * git+https://github.com/encode/httpx - * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz - * /example/foo-0.1.0-py3-none-any.whl - */ - AddPackageRequest: { - package: string; - /** @default false */ - upgrade?: boolean | null; - }; - /** AiCompletionContext */ - AiCompletionContext: { - /** @default */ - plainText?: string; - /** @default [] */ - schema?: components["schemas"]["SchemaTable"][]; - /** @default [] */ - variables?: (string | components["schemas"]["VariableContext"])[]; - }; - /** AiCompletionRequest */ - AiCompletionRequest: { - code: string; - /** @default null */ - context?: null | components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - /** @default [] */ - messages?: components["schemas"]["ChatMessage"][]; - prompt: string; - /** @default null */ - selectedText?: string | null; - }; - /** - * AiConfig - * @description Configuration options for AI. - * - * **Keys.** - * - * - `rules`: custom rules to include in all AI completion prompts - * - `max_tokens`: the maximum number of tokens to use in AI completions - * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` - * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions - * - `models`: the models to use for AI completions - * - `open_ai`: the OpenAI config - * - `anthropic`: the Anthropic config - * - `google`: the Google AI config - * - `bedrock`: the Bedrock config - * - `azure`: the Azure config - * - `ollama`: the Ollama config - * - `github`: the GitHub config - * - `openrouter`: the OpenRouter config - * - `wandb`: the Weights & Biases config - * - `open_ai_compatible`: the OpenAI-compatible config - */ - AiConfig: { - anthropic?: components["schemas"]["AnthropicConfig"]; - azure?: components["schemas"]["OpenAiConfig"]; - bedrock?: components["schemas"]["BedrockConfig"]; - github?: components["schemas"]["GitHubConfig"]; - google?: components["schemas"]["GoogleAiConfig"]; - inline_tooltip?: boolean; - max_tokens?: number; - /** @enum {unknown} */ - mode?: "agent" | "ask" | "manual"; - models?: components["schemas"]["AiModelConfig"]; - ollama?: components["schemas"]["OpenAiConfig"]; - open_ai?: components["schemas"]["OpenAiConfig"]; - open_ai_compatible?: components["schemas"]["OpenAiConfig"]; - openrouter?: components["schemas"]["OpenAiConfig"]; - rules?: string; - wandb?: components["schemas"]["OpenAiConfig"]; - }; - /** AiInlineCompletionRequest */ - AiInlineCompletionRequest: { - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - prefix: string; - suffix: string; - }; - /** - * AiModelConfig - * @description Configuration options for an AI model. - * - * **Keys.** - * - * - `chat_model`: the model to use for chat completions - * - `edit_model`: the model to use for edit completions - * - `autocomplete_model`: the model to use for code completion/autocomplete - * - `displayed_models`: a list of models to display in the UI - * - `custom_models`: a list of custom models to use that are not from the default list - */ - AiModelConfig: { - autocomplete_model?: string; - chat_model?: string; - custom_models: string[]; - displayed_models: string[]; - edit_model?: string; - }; - /** Alert */ - Alert: { - description: string; - /** @enum {unknown} */ - op: "alert"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** - * AnthropicConfig - * @description Configuration options for Anthropic. - * - * **Keys.** - * - * - `api_key`: the Anthropic API key - */ - AnthropicConfig: { - api_key?: string; - }; - /** Banner */ - Banner: { - /** @default null */ - action?: "restart" | null; - description: string; - /** @enum {unknown} */ - op: "banner"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** BaseResponse */ - BaseResponse: { - success: boolean; - }; - /** - * BasedpyrightServerConfig - * @description Configuration options for basedpyright Language Server. - * - * basedpyright handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - BasedpyrightServerConfig: { - enabled?: boolean; - }; - /** - * BedrockConfig - * @description Configuration options for Bedrock. - * - * **Keys.** - * - * - `profile_name`: the AWS profile to use - * - `region_name`: the AWS region to use - * - `aws_access_key_id`: the AWS access key ID - * - `aws_secret_access_key`: the AWS secret access key - */ - BedrockConfig: { - aws_access_key_id?: string; - aws_secret_access_key?: string; - profile_name?: string; - region_name?: string; - }; - /** - * CacheCleared - * @description Result of clearing cache. - */ - CacheCleared: { - bytes_freed: number; - /** @enum {unknown} */ - op: "cache-cleared"; - }; - /** - * CacheInfoFetched - * @description Cache statistics information. - */ - CacheInfoFetched: { - disk_to_free: number; - disk_total: number; - hits: number; - misses: number; - /** @enum {unknown} */ - op: "cache-info-fetched"; - time: number; - }; - /** - * CellChannel - * @description The channel of a cell's output. - * @enum {unknown} - */ - CellChannel: "marimo-error" | "media" | "output" | "pdb" | "stderr" | "stdin" | "stdout"; - /** - * CellConfig - * @description Internal representation of a cell's configuration. - * This is not part of the public API. - */ - CellConfig: { - /** @default null */ - column?: number | null; - /** @default false */ - disabled?: boolean; - /** @default false */ - hide_code?: boolean; - }; - /** - * CellOp - * @description Op to transition a cell. - * - * A CellOp's data has some optional fields: - * - * output - a CellOutput - * console - a CellOutput (console msg to append), or a list of - * CellOutputs - * status - execution status - * stale_inputs - whether the cell has stale inputs (variables, modules, ...) - * run_id - the run associated with this cell. - * serialization - the serialization status of the cell - * - * Omitting a field means that its value should be unchanged! - * - * And one required field: - * - * cell_id - the cell id - */ - CellOp: { - cell_id: string; - /** @default null */ - console?: components["schemas"]["CellOutput"][] | null | components["schemas"]["CellOutput"]; - /** @enum {unknown} */ - op: "cell-op"; - /** @default null */ - output?: null | components["schemas"]["CellOutput"]; - /** @default null */ - run_id?: string | null; - /** @default null */ - serialization?: string | null; - /** @default null */ - stale_inputs?: boolean | null; - /** @default null */ - status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; - timestamp?: number; - }; - /** CellOutput */ - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: string | (components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"])[] | Record; - /** @enum {unknown} */ - mimetype: "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.vegalite.v5+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/plain" | "video/mp4" | "video/mpeg"; - timestamp?: number; - }; - /** ChatAttachment */ - ChatAttachment: { - /** @default null */ - content_type?: string | null; - /** @default attachment */ - name?: string; - url: string; - }; - /** - * ChatMessage - * @description A message in a chat. - */ - ChatMessage: { - /** @default null */ - attachments?: components["schemas"]["ChatAttachment"][] | null; - content: unknown; - /** @default null */ - parts?: Record[] | null; - /** @enum {unknown} */ - role: "assistant" | "system" | "user"; - }; - /** ChatRequest */ - ChatRequest: { - context: components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - messages: components["schemas"]["ChatMessage"][]; - /** @default null */ - model?: string | null; - /** @default null */ - tools?: components["schemas"]["ToolDefinition"][] | null; - /** @default null */ - variables?: (string | components["schemas"]["VariableContext"])[] | null; - }; - /** ClearCacheRequest */ - ClearCacheRequest: Record; - /** CodeCompletionRequest */ - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - /** - * ColumnStats - * @description Represents stats for a column in a data table. - */ - ColumnStats: { - /** @default null */ - false?: number | null; - /** @default null */ - max?: unknown | null; - /** @default null */ - mean?: unknown | null; - /** @default null */ - median?: unknown | null; - /** @default null */ - min?: unknown | null; - /** @default null */ - nulls?: number | null; - /** @default null */ - p25?: unknown | null; - /** @default null */ - p5?: unknown | null; - /** @default null */ - p75?: unknown | null; - /** @default null */ - p95?: unknown | null; - /** @default null */ - std?: unknown | null; - /** @default null */ - total?: number | null; - /** @default null */ - true?: number | null; - /** @default null */ - unique?: number | null; - }; - /** - * CompletedRun - * @description Written on run completion (of submitted cells and their descendants. - */ - CompletedRun: { - /** @enum {unknown} */ - op: "completed-run"; - }; - /** - * CompletionConfig - * @description Configuration for code completion. - * - * A dict with key/value pairs configuring code completion in the marimo - * editor. - * - * **Keys.** - * - * - `activate_on_typing`: if `False`, completion won't activate - * until the completion hotkey is entered - * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing - * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` - * - `codeium_api_key`: the Codeium API key - */ - CompletionConfig: { - activate_on_typing: boolean; - api_key?: string | null; - base_url?: string | null; - codeium_api_key?: string | null; - copilot: boolean | ("codeium" | "custom" | "github"); - model?: string | null; - signature_hint_on_typing: boolean; - }; - /** CompletionOption */ - CompletionOption: { - completion_info: string | null; - name: string; - type: string; - }; - /** - * CompletionResult - * @description Code completion result. - */ - CompletionResult: { - completion_id: string; - /** @enum {unknown} */ - op: "completion-result"; - options: components["schemas"]["CompletionOption"][]; - prefix_length: number; - }; - /** CopyNotebookRequest */ - CopyNotebookRequest: { - destination: string; - source: string; - }; - /** CreateSecretRequest */ - CreateSecretRequest: { - key: string; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - value: string; - }; - /** CycleError */ - CycleError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {unknown} */ - type: "cycle"; - }; - /** - * DataColumnPreview - * @description Preview of a column in a dataset. - */ - DataColumnPreview: { - /** @default null */ - chart_code?: string | null; - /** @default null */ - chart_spec?: string | null; - column_name: string; - /** @default null */ - error?: string | null; - /** @default null */ - missing_packages?: string[] | null; - /** @enum {unknown} */ - op: "data-column-preview"; - /** @default null */ - stats?: null | components["schemas"]["ColumnStats"]; - table_name: string; - }; - /** - * DataSourceConnection - * @description Represents a data source connection. - * - * Attributes: - * source (str): The source of the data source connection. E.g 'postgres'. - * dialect (str): The dialect of the data source connection. E.g 'postgresql'. - * name (str): The name of the data source connection. E.g 'engine'. - * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. - * databases (List[Database]): The databases in the data source connection. - * default_database (Optional[str]): The default database in the data source connection. - * default_schema (Optional[str]): The default schema in the data source connection. - */ - DataSourceConnection: { - databases: components["schemas"]["Database"][]; - /** @default null */ - default_database?: string | null; - /** @default null */ - default_schema?: string | null; - dialect: string; - display_name: string; - name: string; - source: string; - }; - /** DataSourceConnections */ - DataSourceConnections: { - connections: components["schemas"]["DataSourceConnection"][]; - /** @enum {unknown} */ - op: "data-source-connections"; - }; - /** - * DataTable - * @description Represents a data table. - * - * Attributes: - * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). - * source (str): Can be dialect, or source db name. - * name (str): Name of the data table. - * num_rows (Optional[int]): Total number of rows in the table, if known. - * num_columns (Optional[int]): Total number of columns in the table, if known. - * variable_name (Optional[VariableName]): Variable name referencing this table in code. - * columns (List[DataTableColumn]): List of column definitions and metadata. - * engine (Optional[VariableName]): Database engine or connection handler, if any. - * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. - * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. - * indexes (Optional[List[str]]): Column names used as indexes, if any. - */ - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - /** @default null */ - engine?: string | null; - /** @default null */ - indexes?: string[] | null; - name: string; - num_columns: number | null; - num_rows: number | null; - /** @default null */ - primary_keys?: string[] | null; - source: string; - /** @enum {unknown} */ - source_type: "catalog" | "connection" | "duckdb" | "local"; - /** - * @default table - * @enum {unknown} - */ - type?: "table" | "view"; - variable_name: string | null; - }; - /** - * DataTableColumn - * @description Represents a column in a data table. - * - * Attributes: - * name (str): The name of the column. - * type (DataType): The data type of the column. - * external_type (ExternalDataType): The raw data type of the column. - * sample_values (List[Any]): The sample values of the column. - */ - DataTableColumn: { - external_type: string; - name: string; - sample_values: unknown[]; - /** @enum {unknown} */ - type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; - }; - /** - * Database - * @description Represents a collection of schemas. - * - * Attributes: - * name (str): The name of the database - * dialect (str): The dialect of the database - * schemas (List[Schema]): List of schemas in the database - * engine (Optional[VariableName]): Database engine or connection handler, if any. - */ - Database: { - dialect: string; - /** @default null */ - engine?: string | null; - name: string; - schemas: components["schemas"]["Schema"][]; - }; - /** - * Datasets - * @description List of datasets. - */ - Datasets: { - /** @default null */ - clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; - /** @enum {unknown} */ - op: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - /** - * DatasourcesConfig - * @description Configuration for datasources panel. - * - * **Keys.** - * - * - `auto_discover_schemas`: if `True`, include schemas in the datasource - * - `auto_discover_tables`: if `True`, include tables in the datasource - * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource - */ - DatasourcesConfig: { - auto_discover_columns?: boolean | "auto"; - auto_discover_schemas?: boolean | "auto"; - auto_discover_tables?: boolean | "auto"; - }; - /** DeleteCellRequest */ - DeleteCellRequest: { - cellId: string; - }; - /** DeleteSecretRequest */ - DeleteSecretRequest: { - key: string; - }; - /** DependencyTreeNode */ - DependencyTreeNode: { - dependencies: components["schemas"]["DependencyTreeNode"][]; - name: string; - tags: { - [key: string]: string; - }[]; - version: string | null; - }; - /** DependencyTreeResponse */ - DependencyTreeResponse: { - tree: null | components["schemas"]["DependencyTreeNode"]; - }; - /** - * DiagnosticsConfig - * @description Configuration options for diagnostics. - * - * **Keys.** - * - * - `enabled`: if `True`, diagnostics will be shown in the editor - * - `sql_linter`: if `True`, SQL cells will have linting enabled - */ - DiagnosticsConfig: { - enabled?: boolean; - sql_linter?: boolean; - }; - /** - * DisplayConfig - * @description Configuration for display. - * - * **Keys.** - * - * - `theme`: `"light"`, `"dark"`, or `"system"` - * - `code_editor_font_size`: font size for the code editor - * - `cell_output`: `"above"` or `"below"` - * - `dataframes`: `"rich"` or `"plain"` - * - `custom_css`: list of paths to custom CSS files - * - `default_table_page_size`: default number of rows to display in tables - * - `default_table_max_columns`: default maximum number of columns to display in tables - * - `reference_highlighting`: if `True`, highlight reactive variable references - * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") - */ - DisplayConfig: { - /** @enum {unknown} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - custom_css?: string[]; - /** @enum {unknown} */ - dataframes: "plain" | "rich"; - default_table_max_columns: number; - default_table_page_size: number; - /** @enum {unknown} */ - default_width: "columns" | "compact" | "full" | "medium" | "normal"; - locale?: string | null; - reference_highlighting?: boolean; - /** @enum {unknown} */ - theme: "dark" | "light" | "system"; - }; - /** ExecuteMultipleRequest */ - ExecuteMultipleRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - }; - /** ExecuteScratchpadRequest */ - ExecuteScratchpadRequest: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** ExecuteStaleRequest */ - ExecuteStaleRequest: { - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** ExecutionRequest */ - ExecutionRequest: { - cellId: string; - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - }; - /** ExportAsHTMLRequest */ - ExportAsHTMLRequest: { - /** @default null */ - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - /** ExportAsIPYNBRequest */ - ExportAsIPYNBRequest: { - download: boolean; - }; - /** ExportAsMarkdownRequest */ - ExportAsMarkdownRequest: { - download: boolean; - }; - /** ExportAsScriptRequest */ - ExportAsScriptRequest: { - download: boolean; - }; - /** FileCreateRequest */ - FileCreateRequest: { - /** @default null */ - contents?: string | null; - name: string; - path: string; - /** @enum {unknown} */ - type: "directory" | "file"; - }; - /** FileCreateResponse */ - FileCreateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDeleteRequest */ - FileDeleteRequest: { - path: string; - }; - /** FileDeleteResponse */ - FileDeleteResponse: { - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDetailsRequest */ - FileDetailsRequest: { - path: string; - }; - /** FileDetailsResponse */ - FileDetailsResponse: { - /** @default null */ - contents?: string | null; - file: components["schemas"]["FileInfo"]; - /** @default null */ - mimeType?: string | null; - }; - /** FileInfo */ - FileInfo: { - /** @default [] */ - children?: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - }; - /** FileListRequest */ - FileListRequest: { - /** @default null */ - path?: string | null; - }; - /** FileListResponse */ - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - /** FileMoveRequest */ - FileMoveRequest: { - newPath: string; - path: string; - }; - /** FileMoveResponse */ - FileMoveResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileOpenRequest */ - FileOpenRequest: { - /** @default null */ - lineNumber?: number | null; - path: string; - }; - /** FileSearchRequest */ - FileSearchRequest: { - /** @default 3 */ - depth?: number; - /** @default true */ - includeDirectories?: boolean; - /** @default true */ - includeFiles?: boolean; - /** @default 100 */ - limit?: number; - /** @default null */ - path?: string | null; - query: string; - }; - /** FileSearchResponse */ - FileSearchResponse: { - files: components["schemas"]["FileInfo"][]; - query: string; - totalFound: number; - }; - /** FileUpdateRequest */ - FileUpdateRequest: { - contents: string; - path: string; - }; - /** FileUpdateResponse */ - FileUpdateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FocusCell */ - FocusCell: { - cell_id: string; - /** @enum {unknown} */ - op: "focus-cell"; - }; - /** FormatRequest */ - FormatRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - /** FormatResponse */ - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - /** - * FormattingConfig - * @description Configuration for code formatting. - * - * **Keys.** - * - * - `line_length`: max line length - */ - FormattingConfig: { - line_length: number; - }; - /** FunctionCallRequest */ - FunctionCallRequest: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - }; - /** - * FunctionCallResult - * @description Result of calling a function. - */ - FunctionCallResult: { - function_call_id: string; - /** @enum {unknown} */ - op: "function-call-result"; - return_value: unknown; - status: components["schemas"]["HumanReadableStatus"]; - }; - /** GetCacheInfoRequest */ - GetCacheInfoRequest: Record; - /** - * GitHubConfig - * @description Configuration options for GitHub. - * - * **Keys.** - * - * - `api_key`: the GitHub API token - * - `base_url`: the base URL for the API - * - `copilot_settings`: configuration settings for GitHub Copilot LSP. - * Supports settings like `http` (proxy configuration), `telemetry`, - * and `github-enterprise` (enterprise URI). - */ - GitHubConfig: { - api_key?: string; - base_url?: string; - copilot_settings?: Record; - }; - /** - * GoogleAiConfig - * @description Configuration options for Google AI. - * - * **Keys.** - * - * - `api_key`: the Google AI API key - */ - GoogleAiConfig: { - api_key?: string; - }; - HTTPRequest: { - baseUrl: { - [key: string]: unknown; - }; - cookies: { - [key: string]: string; - }; - headers: { - [key: string]: string; - }; - meta: { - [key: string]: unknown; - }; - pathParams: { - [key: string]: unknown; - }; - queryParams: { - [key: string]: string[]; - }; - url: { - [key: string]: unknown; - }; - user: unknown; - }; - /** - * HumanReadableStatus - * @description Human-readable status. - */ - HumanReadableStatus: { - /** @enum {unknown} */ - code: "error" | "ok"; - /** @default null */ - message?: string | null; - /** @default null */ - title?: string | null; - }; - /** ImportStarError */ - ImportStarError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "import-star"; - }; - /** InstallMissingPackagesRequest */ - InstallMissingPackagesRequest: { - manager: string; - versions: { - [key: string]: string; - }; - }; - /** InstallingPackageAlert */ - InstallingPackageAlert: { - /** @default null */ - log_status?: ("append" | "done" | "start") | null; - /** @default null */ - logs?: { - [key: string]: string; - } | null; - /** @enum {unknown} */ - op: "installing-package-alert"; - packages: { - [key: string]: "failed" | "installed" | "installing" | "queued"; - }; - }; - /** InstantiateRequest */ - InstantiateRequest: { - /** @default true */ - autoRun?: boolean; - objectIds: string[]; - values: unknown[]; - }; - /** - * Interrupted - * @description Written when the kernel is interrupted by the user. - */ - Interrupted: { - /** @enum {unknown} */ - op: "interrupted"; - }; - /** InvokeAiToolRequest */ - InvokeAiToolRequest: { - arguments: Record; - toolName: string; - }; - /** InvokeAiToolResponse */ - InvokeAiToolResponse: { - /** @default null */ - error?: string | null; - result: unknown; - success: boolean; - toolName: string; - }; - /** KernelCapabilities */ - KernelCapabilities: { - /** @default false */ - basedpyright?: boolean; - /** @default false */ - pylsp?: boolean; - /** @default false */ - terminal?: boolean; - /** @default false */ - ty?: boolean; - }; - /** - * KernelReady - * @description Kernel is ready for execution. - */ - KernelReady: { - app_config: components["schemas"]["_AppConfig"]; - capabilities: components["schemas"]["KernelCapabilities"]; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code: { - [key: string]: string; - } | null; - last_execution_time: { - [key: string]: number; - } | null; - layout: components["schemas"]["LayoutConfig"] | null; - names: string[]; - /** @enum {unknown} */ - op: "kernel-ready"; - resumed: boolean; - ui_values: Record | null; - }; - /** - * KeymapConfig - * @description Configuration for keymaps. - * - * **Keys.** - * - * - `preset`: one of `"default"` or `"vim"` - * - `overrides`: a dict of keymap actions to their keymap override - * - `vimrc`: path to a vimrc file to load keymaps from - * - `destructive_delete`: if `True`, allows deleting cells with content. - */ - KeymapConfig: { - destructive_delete?: boolean; - overrides?: { - [key: string]: string; - }; - /** @enum {unknown} */ - preset: "default" | "vim"; - vimrc?: string | null; - }; - /** KnownUnions */ - KnownUnions: { - /** @enum {unknown} */ - data_type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; - error: components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"]; - operation: components["schemas"]["CellOp"] | components["schemas"]["FunctionCallResult"] | components["schemas"]["SendUIElementMessage"] | components["schemas"]["RemoveUIElements"] | components["schemas"]["Reload"] | components["schemas"]["Reconnected"] | components["schemas"]["Interrupted"] | components["schemas"]["CompletedRun"] | components["schemas"]["KernelReady"] | components["schemas"]["CompletionResult"] | components["schemas"]["Alert"] | components["schemas"]["Banner"] | components["schemas"]["MissingPackageAlert"] | components["schemas"]["InstallingPackageAlert"] | components["schemas"]["StartupLogs"] | components["schemas"]["Variables"] | components["schemas"]["VariableValues"] | components["schemas"]["QueryParamsSet"] | components["schemas"]["QueryParamsAppend"] | components["schemas"]["QueryParamsDelete"] | components["schemas"]["QueryParamsClear"] | components["schemas"]["Datasets"] | components["schemas"]["DataColumnPreview"] | components["schemas"]["SQLTablePreview"] | components["schemas"]["SQLTableListPreview"] | components["schemas"]["DataSourceConnections"] | components["schemas"]["ValidateSQLResult"] | components["schemas"]["SecretKeysResult"] | components["schemas"]["CacheCleared"] | components["schemas"]["CacheInfoFetched"] | components["schemas"]["FocusCell"] | components["schemas"]["UpdateCellCodes"] | components["schemas"]["UpdateCellIdsRequest"]; - }; - /** - * LanguageServersConfig - * @description Configuration options for language servers. - * - * **Keys.** - * - * - `pylsp`: the pylsp config - */ - LanguageServersConfig: { - basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; - pylsp?: components["schemas"]["PythonLanguageServerConfig"]; - ty?: components["schemas"]["TyLanguageServerConfig"]; - }; - /** LayoutConfig */ - LayoutConfig: { - data: Record; - type: string; - }; - /** ListPackagesResponse */ - ListPackagesResponse: { - packages: components["schemas"]["PackageDescription"][]; - }; - /** ListSecretKeysRequest */ - ListSecretKeysRequest: { - requestId: string; - }; - /** ListSecretKeysResponse */ - ListSecretKeysResponse: { - keys: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** - * MCPConfig - * @description Configuration for MCP servers - * - * Note: the field name `mcpServers` is camelCased to match MCP server - * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) - */ - MCPConfig: { - mcpServers: { - [key: string]: Record; - }; - presets?: ("context7" | "marimo")[]; - }; - /** MCPRefreshResponse */ - MCPRefreshResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: boolean; - }; - success: boolean; - }; - /** MCPStatusResponse */ - MCPStatusResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: "connected" | "disconnected" | "failed" | "pending"; - }; - /** @enum {unknown} */ - status: "error" | "ok" | "partial"; - }; - /** MarimoAncestorPreventedError */ - MarimoAncestorPreventedError: { - blamed_cell: string | null; - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-prevented"; - }; - /** MarimoAncestorStoppedError */ - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-stopped"; - }; - /** - * MarimoConfig - * @description Configuration for the marimo editor - */ - MarimoConfig: { - ai?: components["schemas"]["AiConfig"]; - completion: components["schemas"]["CompletionConfig"]; - datasources?: components["schemas"]["DatasourcesConfig"]; - diagnostics?: components["schemas"]["DiagnosticsConfig"]; - display: components["schemas"]["DisplayConfig"]; - experimental?: Record; - formatting: components["schemas"]["FormattingConfig"]; - keymap: components["schemas"]["KeymapConfig"]; - language_servers?: components["schemas"]["LanguageServersConfig"]; - mcp?: components["schemas"]["MCPConfig"]; - package_management: components["schemas"]["PackageManagementConfig"]; - runtime: components["schemas"]["RuntimeConfig"]; - save: components["schemas"]["SaveConfig"]; - server: components["schemas"]["ServerConfig"]; - sharing?: components["schemas"]["SharingConfig"]; - snippets?: components["schemas"]["SnippetsConfig"]; - }; - /** MarimoExceptionRaisedError */ - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell: string | null; - /** @enum {unknown} */ - type: "exception"; - }; - /** MarimoFile */ - MarimoFile: { - /** @default null */ - initializationId?: string | null; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - /** @default null */ - sessionId?: string | null; - }; - /** - * 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. - */ - MarimoInternalError: { - error_id: string; - /** @default */ - msg?: string; - /** @enum {unknown} */ - type: "internal"; - }; - /** MarimoInterruptionError */ - MarimoInterruptionError: { - /** @enum {unknown} */ - type: "interruption"; - }; - /** - * MarimoSQLError - * @description SQL-specific error with enhanced metadata for debugging. - */ - MarimoSQLError: { - /** @default null */ - hint?: string | null; - msg: string; - /** @default 0 */ - node_col_offset?: number; - /** @default 0 */ - node_lineno?: number; - /** @default null */ - sql_col?: number | null; - /** @default null */ - sql_line?: number | null; - sql_statement: string; - /** @enum {unknown} */ - type: "sql-error"; - }; - /** MarimoStrictExecutionError */ - MarimoStrictExecutionError: { - blamed_cell: string | null; - msg: string; - ref: string; - /** @enum {unknown} */ - type: "strict-exception"; - }; - /** MarimoSyntaxError */ - MarimoSyntaxError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "syntax"; - }; - /** MissingPackageAlert */ - MissingPackageAlert: { - isolated: boolean; - /** @enum {unknown} */ - op: "missing-package-alert"; - packages: string[]; - }; - /** ModelMessage */ - ModelMessage: { - bufferPaths: (string | number)[][]; - state: Record; - }; - /** MultipleDefinitionError */ - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {unknown} */ - type: "multiple-defs"; - }; - /** - * OpenAiConfig - * @description Configuration options for OpenAI or OpenAI-compatible services. - * - * **Keys.** - * - * - `api_key`: the OpenAI API key - * - `base_url`: the base URL for the API - * - `project`: the project ID for the OpenAI API - * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios - * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client - * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server - * - `extra_headers`: extra headers to be passed to the OpenAI client - */ - OpenAiConfig: { - api_key?: string; - base_url?: string; - ca_bundle_path?: string; - client_pem?: string; - extra_headers?: { - [key: string]: string; - }; - model?: string; - project?: string; - ssl_verify?: boolean; - }; - /** OpenTutorialRequest */ - OpenTutorialRequest: { - tutorialId: ("dataflow" | "fileformat" | "for-jupyter-users" | "intro" | "layout" | "markdown" | "plots" | "sql" | "ui") | "markdown-format"; - }; - /** PackageDescription */ - PackageDescription: { - name: string; - version: string; - }; - /** - * PackageManagementConfig - * @description Configuration options for package management. - * - * **Keys.** - * - * - `manager`: the package manager to use - */ - PackageManagementConfig: { - /** @enum {unknown} */ - manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; - }; - /** PackageOperationResponse */ - PackageOperationResponse: { - /** @default null */ - error?: string | null; - success: boolean; - }; - /** PdbRequest */ - PdbRequest: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * PreviewDataSourceConnectionRequest - * @description Fetch a datasource connection - */ - PreviewDataSourceConnectionRequest: { - engine: string; - }; - /** PreviewDatasetColumnRequest */ - PreviewDatasetColumnRequest: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - }; - /** - * PreviewSQLTableListRequest - * @description Preview list of tables in an SQL schema - */ - PreviewSQLTableListRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - }; - /** - * PreviewSQLTableRequest - * @description Preview table details in an SQL database - */ - PreviewSQLTableRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - }; - /** - * PythonLanguageServerConfig - * @description Configuration options for Python Language Server. - * - * pylsp handles completion, hover, go-to-definition, and diagnostics. - */ - PythonLanguageServerConfig: { - enable_flake8?: boolean; - enable_mypy?: boolean; - enable_pydocstyle?: boolean; - enable_pyflakes?: boolean; - enable_pylint?: boolean; - enable_ruff?: boolean; - enabled?: boolean; - }; - /** QueryParamsAppend */ - QueryParamsAppend: { - key: string; - /** @enum {unknown} */ - op: "query-params-append"; - value: string; - }; - /** QueryParamsClear */ - QueryParamsClear: { - /** @enum {unknown} */ - op: "query-params-clear"; - }; - /** QueryParamsDelete */ - QueryParamsDelete: { - key: string; - /** @enum {unknown} */ - op: "query-params-delete"; - value: string | null; - }; - /** - * QueryParamsSet - * @description Set query parameters. - */ - QueryParamsSet: { - key: string; - /** @enum {unknown} */ - op: "query-params-set"; - value: string | string[]; - }; - /** ReadCodeResponse */ - ReadCodeResponse: { - contents: string; - }; - /** RecentFilesResponse */ - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** Reconnected */ - Reconnected: { - /** @enum {unknown} */ - op: "reconnected"; - }; - /** Reload */ - Reload: { - /** @enum {unknown} */ - op: "reload"; - }; - /** RemovePackageRequest */ - RemovePackageRequest: { - package: string; - }; - /** - * RemoveUIElements - * @description Invalidate UI elements for a given cell. - */ - RemoveUIElements: { - cell_id: string; - /** @enum {unknown} */ - op: "remove-ui-elements"; - }; - /** RenameFileRequest */ - RenameFileRequest: { - filename: string; - }; - /** RenameRequest */ - RenameRequest: { - filename: string; - }; - /** RunRequest */ - RunRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** RunningNotebooksResponse */ - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** - * RuntimeConfig - * @description Configuration for runtime. - * - * **Keys.** - * - * - `auto_instantiate`: if `False`, cells won't automatically - * run on startup. This only applies when editing a notebook, - * and not when running as an application. - * The default is `True`. - * - `auto_reload`: if `lazy`, cells importing modified modules will marked - * as stale; if `autorun`, affected cells will be automatically run. similar - * to IPython's %autoreload extension but with more code intelligence. - * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. - * execution. - * - `on_cell_change`: if `lazy`, cells will be marked stale when their - * ancestors run but won't autorun; if `autorun`, cells will automatically - * run when their ancestors run. - * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; - * if `strict` marimo will clone cell declarations by default, avoiding - * hidden potential state build up. - * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks - * affected cells as stale, `"autorun"` automatically runs affected cells. - * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger - * values may affect frontend performance - * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; - * larger values may affect frontend performance - * - `pythonpath`: a list of directories to add to the Python search path. - * Directories will be added to the head of sys.path. Similar to the - * `PYTHONPATH` environment variable, the directories will be included in - * where Python will look for imported modules. - * - `dotenv`: a list of paths to `.env` files to load. - * If the file does not exist, it will be silently ignored. - * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. - * - `default_sql_output`: the default output format for SQL queries. Can be one of: - * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. - * The default is `"auto"`. - * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: - * `html`, `markdown`, `ipynb`. - * The default is None. - */ - RuntimeConfig: { - auto_instantiate: boolean; - /** @enum {unknown} */ - auto_reload: "autorun" | "lazy" | "off"; - default_auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @enum {unknown} */ - default_sql_output: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - dotenv?: string[]; - /** @enum {unknown} */ - on_cell_change: "autorun" | "lazy"; - output_max_bytes: number; - pythonpath?: string[]; - reactive_tests: boolean; - std_stream_max_bytes: number; - /** @enum {unknown} */ - watcher_on_save: "autorun" | "lazy"; - }; - /** - * SQLMetadata - * @description Metadata for a SQL database. - */ - SQLMetadata: { - connection: string; - database: string; - schema: string; - /** @enum {unknown} */ - type: "sql-metadata"; - }; - /** - * SQLTableListPreview - * @description Preview of a list of tables in a schema. - */ - SQLTableListPreview: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-list-preview"; - request_id: string; - /** @default [] */ - tables?: components["schemas"]["DataTable"][]; - }; - /** - * SQLTablePreview - * @description Preview of a table in a SQL database. - */ - SQLTablePreview: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-preview"; - request_id: string; - table: null | components["schemas"]["DataTable"]; - }; - /** SaveAppConfigurationRequest */ - SaveAppConfigurationRequest: { - config: Record; - }; - /** - * SaveConfig - * @description Configuration for saving. - * - * **Keys.** - * - * - `autosave`: one of `"off"` or `"after_delay"` - * - `delay`: number of milliseconds to wait before autosaving - * - `format_on_save`: if `True`, format the code on save - */ - SaveConfig: { - /** @enum {unknown} */ - autosave: "after_delay" | "off"; - autosave_delay: number; - format_on_save: boolean; - }; - /** SaveNotebookRequest */ - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - /** @default null */ - layout?: Record | null; - names: string[]; - /** @default true */ - persist?: boolean; - }; - /** SaveUserConfigurationRequest */ - SaveUserConfigurationRequest: { - config: Record; - }; - /** Schema */ - Schema: { - name: string; - tables: components["schemas"]["DataTable"][]; - }; - /** SchemaColumn */ - SchemaColumn: { - name: string; - sampleValues: unknown[]; - type: string; - }; - /** SchemaTable */ - SchemaTable: { - columns: components["schemas"]["SchemaColumn"][]; - name: string; - }; - /** - * SecretKeysResult - * @description Result of listing secret keys. - */ - SecretKeysResult: { - /** @enum {unknown} */ - op: "secret-keys-result"; - request_id: string; - secrets: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** SecretKeysWithProvider */ - SecretKeysWithProvider: { - keys: string[]; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - }; - /** - * SendUIElementMessage - * @description Send a message to a UI element. - */ - SendUIElementMessage: { - /** @default null */ - buffers?: string[] | null; - message: Record; - model_id: string | null; - /** @enum {unknown} */ - op: "send-ui-element-message"; - ui_element: string | null; - }; - /** - * ServerConfig - * @description Configuration for the server. - * - * **Keys.** - * - * - `browser`: the web browser to use. `"default"` or a browser registered - * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) - * - `follow_symlink`: if true, the server will follow symlinks it finds - * inside its static assets directory. - */ - ServerConfig: { - browser: "default" | string; - follow_symlink: boolean; - }; - /** SetCellConfigRequest */ - SetCellConfigRequest: { - configs: { - [key: string]: Record; - }; - }; - /** SetModelMessageRequest */ - SetModelMessageRequest: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - }; - /** SetUIElementValueRequest */ - SetUIElementValueRequest: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - values: unknown[]; - }; - /** SetUserConfigRequest */ - SetUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - /** SetupRootError */ - SetupRootError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {unknown} */ - type: "setup-refs"; - }; - /** - * SharingConfig - * @description Configuration for sharing features. - * - * **Keys.** - * - * - `html`: if `False`, HTML sharing options will be hidden from the UI - * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI - */ - SharingConfig: { - html?: boolean; - wasm?: boolean; - }; - /** ShutdownSessionRequest */ - ShutdownSessionRequest: { - sessionId: string; - }; - /** Snippet */ - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - /** SnippetSection */ - SnippetSection: { - /** @default null */ - code?: string | null; - /** @default null */ - html?: string | null; - id: string; - }; - /** Snippets */ - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - /** - * SnippetsConfig - * @description Configuration for snippets. - * - * **Keys.** - * - * - `custom_path`: the path to the custom snippets directory - */ - SnippetsConfig: { - custom_paths?: string[]; - include_default_snippets?: boolean; - }; - /** - * SqlCatalogCheckResult - * @description Result of running validation against the database. - */ - SqlCatalogCheckResult: { - error_message: string | null; - success: boolean; - }; - /** - * SqlParseError - * @description Represents a single SQL parse error. - * - * Attributes: - * message (str): Description of the error. - * line (int): Line number where the error occurred (1-based). - * column (int): Column number where the error occurred (1-based). - * severity (Literal["error", "warning"]): Severity of the error. - */ - SqlParseError: { - column: number; - line: number; - message: string; - /** @enum {unknown} */ - severity: "error" | "warning"; - }; - /** - * SqlParseResult - * @description Result of parsing an SQL query. - * - * Attributes: - * success (bool): True if parsing succeeded without errors. - * errors (list[SqlParseError]): List of parse errors (empty if success is True). - */ - SqlParseResult: { - errors: components["schemas"]["SqlParseError"][]; - success: boolean; - }; - /** StartupLogs */ - StartupLogs: { - content: string; - /** @enum {unknown} */ - op: "startup-logs"; - /** @enum {unknown} */ - status: "append" | "done" | "start"; - }; - /** StdinRequest */ - StdinRequest: { - text: string; - }; - /** StopRequest */ - StopRequest: Record; - /** - * StoreConfig - * @description Configuration for cache stores. - */ - StoreConfig: { - args?: Record; - /** @enum {unknown} */ - type?: "file" | "redis" | "rest" | "tiered"; - }; - /** SuccessResponse */ - SuccessResponse: { - /** @default true */ - success?: boolean; - }; - /** - * ToolDefinition - * @description Tool definition compatible with ai-sdk-ui format. - */ - ToolDefinition: { - description: string; - mode: ("agent" | "ask" | "manual")[]; - name: string; - parameters: Record; - /** @enum {unknown} */ - source: "backend" | "frontend" | "mcp"; - }; - /** - * TyLanguageServerConfig - * @description Configuration options for Ty Language Server. - * - * ty handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - TyLanguageServerConfig: { - enabled?: boolean; - }; - /** UnknownError */ - UnknownError: { - /** @default null */ - error_type?: string | null; - msg: string; - /** @enum {unknown} */ - type: "unknown"; - }; - /** UpdateCellCodes */ - UpdateCellCodes: { - cell_ids: string[]; - code_is_stale: boolean; - codes: string[]; - /** @enum {unknown} */ - op: "update-cell-codes"; - }; - /** - * UpdateCellIdsRequest - * @description Update the cell ID ordering of the cells in the notebook. - * - * Right now we send the entire list of cell IDs, - * but in the future we might want to send change-deltas. - */ - UpdateCellIdsRequest: { - cell_ids: string[]; - /** @enum {unknown} */ - op: "update-cell-ids"; - }; - /** UpdateComponentValuesRequest */ - UpdateComponentValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - /** - * ValidateSQLRequest - * @description Validate an SQL query against the engine - */ - ValidateSQLRequest: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - }; - /** ValidateSQLResult */ - ValidateSQLResult: { - /** @default null */ - error?: string | null; - /** @enum {unknown} */ - op: "validate-sql-result"; - /** @default null */ - parse_result?: null | components["schemas"]["SqlParseResult"]; - request_id: string; - /** @default null */ - validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; - }; - /** VariableContext */ - VariableContext: { - name: string; - previewValue: unknown; - valueType: string; - }; - /** VariableDeclaration */ - VariableDeclaration: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - /** VariableValue */ - VariableValue: { - datatype: string | null; - name: string; - value: string | null; - }; - /** - * VariableValues - * @description List of variables and their types/values. - */ - VariableValues: { - /** @enum {unknown} */ - op: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - /** - * Variables - * @description List of variable declarations. - */ - Variables: { - /** @enum {unknown} */ - op: "variables"; - variables: components["schemas"]["VariableDeclaration"][]; - }; - /** WorkspaceFilesRequest */ - WorkspaceFilesRequest: { - /** @default false */ - includeMarkdown?: boolean; - }; - /** WorkspaceFilesResponse */ - WorkspaceFilesResponse: { - /** @default 0 */ - fileCount?: number; - files: components["schemas"]["FileInfo"][]; - /** @default false */ - hasMore?: boolean; - root: string; - }; - /** - * _AppConfig - * @description Program-specific configuration. - * - * Configuration for frontends or runtimes that is specific to - * a single marimo program. - */ - _AppConfig: { - /** @default null */ - app_title?: string | null; - auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @default null */ - css_file?: string | null; - /** @default null */ - html_head_file?: string | null; - /** @default null */ - layout_file?: string | null; - /** - * @default auto - * @enum {unknown} - */ - sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - /** - * @default compact - * @enum {unknown} - */ - width?: "columns" | "compact" | "full" | "medium" | "normal"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AddPackageRequest + * @description This can be a remove package or a local package. + * + * Supported formats: + * + * httpx + * httpx==0.27.0 + * httpx>=0.27.0 + * git+https://github.com/encode/httpx + * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz + * /example/foo-0.1.0-py3-none-any.whl + */ + AddPackageRequest: { + package: string; + /** @default false */ + upgrade?: boolean | null; + }; + /** AiCompletionContext */ + AiCompletionContext: { + /** @default */ + plainText?: string; + /** @default [] */ + schema?: components["schemas"]["SchemaTable"][]; + /** @default [] */ + variables?: (string | components["schemas"]["VariableContext"])[]; + }; + /** AiCompletionRequest */ + AiCompletionRequest: { + code: string; + /** @default null */ + context?: null | components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + /** @default [] */ + messages?: components["schemas"]["ChatMessage"][]; + prompt: string; + /** @default null */ + selectedText?: string | null; + }; + /** + * AiConfig + * @description Configuration options for AI. + * + * **Keys.** + * + * - `rules`: custom rules to include in all AI completion prompts + * - `max_tokens`: the maximum number of tokens to use in AI completions + * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` + * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions + * - `models`: the models to use for AI completions + * - `open_ai`: the OpenAI config + * - `anthropic`: the Anthropic config + * - `google`: the Google AI config + * - `bedrock`: the Bedrock config + * - `azure`: the Azure config + * - `ollama`: the Ollama config + * - `github`: the GitHub config + * - `openrouter`: the OpenRouter config + * - `wandb`: the Weights & Biases config + * - `open_ai_compatible`: the OpenAI-compatible config + */ + AiConfig: { + anthropic?: components["schemas"]["AnthropicConfig"]; + azure?: components["schemas"]["OpenAiConfig"]; + bedrock?: components["schemas"]["BedrockConfig"]; + github?: components["schemas"]["GitHubConfig"]; + google?: components["schemas"]["GoogleAiConfig"]; + inline_tooltip?: boolean; + max_tokens?: number; + /** @enum {unknown} */ + mode?: "agent" | "ask" | "manual"; + models?: components["schemas"]["AiModelConfig"]; + ollama?: components["schemas"]["OpenAiConfig"]; + open_ai?: components["schemas"]["OpenAiConfig"]; + open_ai_compatible?: components["schemas"]["OpenAiConfig"]; + openrouter?: components["schemas"]["OpenAiConfig"]; + rules?: string; + wandb?: components["schemas"]["OpenAiConfig"]; + }; + /** AiInlineCompletionRequest */ + AiInlineCompletionRequest: { + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + prefix: string; + suffix: string; + }; + /** + * AiModelConfig + * @description Configuration options for an AI model. + * + * **Keys.** + * + * - `chat_model`: the model to use for chat completions + * - `edit_model`: the model to use for edit completions + * - `autocomplete_model`: the model to use for code completion/autocomplete + * - `displayed_models`: a list of models to display in the UI + * - `custom_models`: a list of custom models to use that are not from the default list + */ + AiModelConfig: { + autocomplete_model?: string; + chat_model?: string; + custom_models: string[]; + displayed_models: string[]; + edit_model?: string; + }; + /** Alert */ + Alert: { + description: string; + /** @enum {unknown} */ + op: "alert"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** + * AnthropicConfig + * @description Configuration options for Anthropic. + * + * **Keys.** + * + * - `api_key`: the Anthropic API key + */ + AnthropicConfig: { + api_key?: string; + }; + /** Banner */ + Banner: { + /** @default null */ + action?: "restart" | null; + description: string; + /** @enum {unknown} */ + op: "banner"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** BaseResponse */ + BaseResponse: { + success: boolean; + }; + /** + * BasedpyrightServerConfig + * @description Configuration options for basedpyright Language Server. + * + * basedpyright handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + BasedpyrightServerConfig: { + enabled?: boolean; + }; + /** + * BedrockConfig + * @description Configuration options for Bedrock. + * + * **Keys.** + * + * - `profile_name`: the AWS profile to use + * - `region_name`: the AWS region to use + * - `aws_access_key_id`: the AWS access key ID + * - `aws_secret_access_key`: the AWS secret access key + */ + BedrockConfig: { + aws_access_key_id?: string; + aws_secret_access_key?: string; + profile_name?: string; + region_name?: string; + }; + /** + * CacheCleared + * @description Result of clearing cache. + */ + CacheCleared: { + bytes_freed: number; + /** @enum {unknown} */ + op: "cache-cleared"; + }; + /** + * CacheInfoFetched + * @description Cache statistics information. + */ + CacheInfoFetched: { + disk_to_free: number; + disk_total: number; + hits: number; + misses: number; + /** @enum {unknown} */ + op: "cache-info-fetched"; + time: number; + }; + /** + * CellChannel + * @description The channel of a cell's output. + * @enum {unknown} + */ + CellChannel: + | "marimo-error" + | "media" + | "output" + | "pdb" + | "stderr" + | "stdin" + | "stdout"; + /** + * CellConfig + * @description Internal representation of a cell's configuration. + * This is not part of the public API. + */ + CellConfig: { + /** @default null */ + column?: number | null; + /** @default false */ + disabled?: boolean; + /** @default false */ + hide_code?: boolean; + }; + /** + * CellOp + * @description Op to transition a cell. + * + * A CellOp's data has some optional fields: + * + * output - a CellOutput + * console - a CellOutput (console msg to append), or a list of + * CellOutputs + * status - execution status + * stale_inputs - whether the cell has stale inputs (variables, modules, ...) + * run_id - the run associated with this cell. + * serialization - the serialization status of the cell + * + * Omitting a field means that its value should be unchanged! + * + * And one required field: + * + * cell_id - the cell id + */ + CellOp: { + cell_id: string; + /** @default null */ + console?: + | components["schemas"]["CellOutput"][] + | null + | components["schemas"]["CellOutput"]; + /** @enum {unknown} */ + op: "cell-op"; + /** @default null */ + output?: null | components["schemas"]["CellOutput"]; + /** @default null */ + run_id?: string | null; + /** @default null */ + serialization?: string | null; + /** @default null */ + stale_inputs?: boolean | null; + /** @default null */ + status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; + timestamp?: number; + }; + /** CellOutput */ + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: + | string + | ( + | components["schemas"]["SetupRootError"] + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["ImportStarError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["MarimoInternalError"] + | components["schemas"]["MarimoSQLError"] + | components["schemas"]["UnknownError"] + )[] + | Record; + /** @enum {unknown} */ + mimetype: + | "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.vegalite.v5+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/plain" + | "video/mp4" + | "video/mpeg"; + timestamp?: number; + }; + /** ChatAttachment */ + ChatAttachment: { + /** @default null */ + content_type?: string | null; + /** @default attachment */ + name?: string; + url: string; + }; + /** + * ChatMessage + * @description A message in a chat. + */ + ChatMessage: { + /** @default null */ + attachments?: components["schemas"]["ChatAttachment"][] | null; + content: unknown; + /** @default null */ + parts?: Record[] | null; + /** @enum {unknown} */ + role: "assistant" | "system" | "user"; + }; + /** ChatRequest */ + ChatRequest: { + context: components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + messages: components["schemas"]["ChatMessage"][]; + /** @default null */ + model?: string | null; + /** @default null */ + tools?: components["schemas"]["ToolDefinition"][] | null; + /** @default null */ + variables?: (string | components["schemas"]["VariableContext"])[] | null; + }; + /** ClearCacheRequest */ + ClearCacheRequest: Record; + /** CodeCompletionRequest */ + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + /** + * ColumnStats + * @description Represents stats for a column in a data table. + */ + ColumnStats: { + /** @default null */ + false?: number | null; + /** @default null */ + max?: unknown | null; + /** @default null */ + mean?: unknown | null; + /** @default null */ + median?: unknown | null; + /** @default null */ + min?: unknown | null; + /** @default null */ + nulls?: number | null; + /** @default null */ + p25?: unknown | null; + /** @default null */ + p5?: unknown | null; + /** @default null */ + p75?: unknown | null; + /** @default null */ + p95?: unknown | null; + /** @default null */ + std?: unknown | null; + /** @default null */ + total?: number | null; + /** @default null */ + true?: number | null; + /** @default null */ + unique?: number | null; + }; + /** + * CompletedRun + * @description Written on run completion (of submitted cells and their descendants. + */ + CompletedRun: { + /** @enum {unknown} */ + op: "completed-run"; + }; + /** + * CompletionConfig + * @description Configuration for code completion. + * + * A dict with key/value pairs configuring code completion in the marimo + * editor. + * + * **Keys.** + * + * - `activate_on_typing`: if `False`, completion won't activate + * until the completion hotkey is entered + * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing + * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` + * - `codeium_api_key`: the Codeium API key + */ + CompletionConfig: { + activate_on_typing: boolean; + api_key?: string | null; + base_url?: string | null; + codeium_api_key?: string | null; + copilot: boolean | ("codeium" | "custom" | "github"); + model?: string | null; + signature_hint_on_typing: boolean; + }; + /** CompletionOption */ + CompletionOption: { + completion_info: string | null; + name: string; + type: string; + }; + /** + * CompletionResult + * @description Code completion result. + */ + CompletionResult: { + completion_id: string; + /** @enum {unknown} */ + op: "completion-result"; + options: components["schemas"]["CompletionOption"][]; + prefix_length: number; + }; + /** CopyNotebookRequest */ + CopyNotebookRequest: { + destination: string; + source: string; + }; + /** CreateSecretRequest */ + CreateSecretRequest: { + key: string; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + value: string; + }; + /** CycleError */ + CycleError: { + edges_with_vars: [string, string[], string][]; + /** @enum {unknown} */ + type: "cycle"; + }; + /** + * DataColumnPreview + * @description Preview of a column in a dataset. + */ + DataColumnPreview: { + /** @default null */ + chart_code?: string | null; + /** @default null */ + chart_spec?: string | null; + column_name: string; + /** @default null */ + error?: string | null; + /** @default null */ + missing_packages?: string[] | null; + /** @enum {unknown} */ + op: "data-column-preview"; + /** @default null */ + stats?: null | components["schemas"]["ColumnStats"]; + table_name: string; + }; + /** + * DataSourceConnection + * @description Represents a data source connection. + * + * Attributes: + * source (str): The source of the data source connection. E.g 'postgres'. + * dialect (str): The dialect of the data source connection. E.g 'postgresql'. + * name (str): The name of the data source connection. E.g 'engine'. + * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. + * databases (List[Database]): The databases in the data source connection. + * default_database (Optional[str]): The default database in the data source connection. + * default_schema (Optional[str]): The default schema in the data source connection. + */ + DataSourceConnection: { + databases: components["schemas"]["Database"][]; + /** @default null */ + default_database?: string | null; + /** @default null */ + default_schema?: string | null; + dialect: string; + display_name: string; + name: string; + source: string; + }; + /** DataSourceConnections */ + DataSourceConnections: { + connections: components["schemas"]["DataSourceConnection"][]; + /** @enum {unknown} */ + op: "data-source-connections"; + }; + /** + * DataTable + * @description Represents a data table. + * + * Attributes: + * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). + * source (str): Can be dialect, or source db name. + * name (str): Name of the data table. + * num_rows (Optional[int]): Total number of rows in the table, if known. + * num_columns (Optional[int]): Total number of columns in the table, if known. + * variable_name (Optional[VariableName]): Variable name referencing this table in code. + * columns (List[DataTableColumn]): List of column definitions and metadata. + * engine (Optional[VariableName]): Database engine or connection handler, if any. + * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. + * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. + * indexes (Optional[List[str]]): Column names used as indexes, if any. + */ + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + /** @default null */ + engine?: string | null; + /** @default null */ + indexes?: string[] | null; + name: string; + num_columns: number | null; + num_rows: number | null; + /** @default null */ + primary_keys?: string[] | null; + source: string; + /** @enum {unknown} */ + source_type: "catalog" | "connection" | "duckdb" | "local"; + /** + * @default table + * @enum {unknown} + */ + type?: "table" | "view"; + variable_name: string | null; + }; + /** + * DataTableColumn + * @description Represents a column in a data table. + * + * Attributes: + * name (str): The name of the column. + * type (DataType): The data type of the column. + * external_type (ExternalDataType): The raw data type of the column. + * sample_values (List[Any]): The sample values of the column. + */ + DataTableColumn: { + external_type: string; + name: string; + sample_values: unknown[]; + /** @enum {unknown} */ + type: + | "boolean" + | "date" + | "datetime" + | "integer" + | "number" + | "string" + | "time" + | "unknown"; + }; + /** + * Database + * @description Represents a collection of schemas. + * + * Attributes: + * name (str): The name of the database + * dialect (str): The dialect of the database + * schemas (List[Schema]): List of schemas in the database + * engine (Optional[VariableName]): Database engine or connection handler, if any. + */ + Database: { + dialect: string; + /** @default null */ + engine?: string | null; + name: string; + schemas: components["schemas"]["Schema"][]; + }; + /** + * Datasets + * @description List of datasets. + */ + Datasets: { + /** @default null */ + clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; + /** @enum {unknown} */ + op: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + /** + * DatasourcesConfig + * @description Configuration for datasources panel. + * + * **Keys.** + * + * - `auto_discover_schemas`: if `True`, include schemas in the datasource + * - `auto_discover_tables`: if `True`, include tables in the datasource + * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource + */ + DatasourcesConfig: { + auto_discover_columns?: boolean | "auto"; + auto_discover_schemas?: boolean | "auto"; + auto_discover_tables?: boolean | "auto"; + }; + /** DeleteCellRequest */ + DeleteCellRequest: { + cellId: string; + }; + /** DeleteSecretRequest */ + DeleteSecretRequest: { + key: string; + }; + /** DependencyTreeNode */ + DependencyTreeNode: { + dependencies: components["schemas"]["DependencyTreeNode"][]; + name: string; + tags: { + [key: string]: string; + }[]; + version: string | null; + }; + /** DependencyTreeResponse */ + DependencyTreeResponse: { + tree: null | components["schemas"]["DependencyTreeNode"]; + }; + /** + * DiagnosticsConfig + * @description Configuration options for diagnostics. + * + * **Keys.** + * + * - `enabled`: if `True`, diagnostics will be shown in the editor + * - `sql_linter`: if `True`, SQL cells will have linting enabled + */ + DiagnosticsConfig: { + enabled?: boolean; + sql_linter?: boolean; + }; + /** + * DisplayConfig + * @description Configuration for display. + * + * **Keys.** + * + * - `theme`: `"light"`, `"dark"`, or `"system"` + * - `code_editor_font_size`: font size for the code editor + * - `cell_output`: `"above"` or `"below"` + * - `dataframes`: `"rich"` or `"plain"` + * - `custom_css`: list of paths to custom CSS files + * - `default_table_page_size`: default number of rows to display in tables + * - `default_table_max_columns`: default maximum number of columns to display in tables + * - `reference_highlighting`: if `True`, highlight reactive variable references + * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") + */ + DisplayConfig: { + /** @enum {unknown} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + custom_css?: string[]; + /** @enum {unknown} */ + dataframes: "plain" | "rich"; + default_table_max_columns: number; + default_table_page_size: number; + /** @enum {unknown} */ + default_width: "columns" | "compact" | "full" | "medium" | "normal"; + locale?: string | null; + reference_highlighting?: boolean; + /** @enum {unknown} */ + theme: "dark" | "light" | "system"; + }; + /** ExecuteMultipleRequest */ + ExecuteMultipleRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + }; + /** ExecuteScratchpadRequest */ + ExecuteScratchpadRequest: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** ExecuteStaleRequest */ + ExecuteStaleRequest: { + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** ExecutionRequest */ + ExecutionRequest: { + cellId: string; + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + }; + /** ExportAsHTMLRequest */ + ExportAsHTMLRequest: { + /** @default null */ + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + /** ExportAsIPYNBRequest */ + ExportAsIPYNBRequest: { + download: boolean; + }; + /** ExportAsMarkdownRequest */ + ExportAsMarkdownRequest: { + download: boolean; + }; + /** ExportAsScriptRequest */ + ExportAsScriptRequest: { + download: boolean; + }; + /** FileCreateRequest */ + FileCreateRequest: { + /** @default null */ + contents?: string | null; + name: string; + path: string; + /** @enum {unknown} */ + type: "directory" | "file"; + }; + /** FileCreateResponse */ + FileCreateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDeleteRequest */ + FileDeleteRequest: { + path: string; + }; + /** FileDeleteResponse */ + FileDeleteResponse: { + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDetailsRequest */ + FileDetailsRequest: { + path: string; + }; + /** FileDetailsResponse */ + FileDetailsResponse: { + /** @default null */ + contents?: string | null; + file: components["schemas"]["FileInfo"]; + /** @default null */ + mimeType?: string | null; + }; + /** FileInfo */ + FileInfo: { + /** @default [] */ + children?: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + }; + /** FileListRequest */ + FileListRequest: { + /** @default null */ + path?: string | null; + }; + /** FileListResponse */ + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + /** FileMoveRequest */ + FileMoveRequest: { + newPath: string; + path: string; + }; + /** FileMoveResponse */ + FileMoveResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileOpenRequest */ + FileOpenRequest: { + /** @default null */ + lineNumber?: number | null; + path: string; + }; + /** FileSearchRequest */ + FileSearchRequest: { + /** @default 3 */ + depth?: number; + /** @default true */ + includeDirectories?: boolean; + /** @default true */ + includeFiles?: boolean; + /** @default 100 */ + limit?: number; + /** @default null */ + path?: string | null; + query: string; + }; + /** FileSearchResponse */ + FileSearchResponse: { + files: components["schemas"]["FileInfo"][]; + query: string; + totalFound: number; + }; + /** FileUpdateRequest */ + FileUpdateRequest: { + contents: string; + path: string; + }; + /** FileUpdateResponse */ + FileUpdateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FocusCell */ + FocusCell: { + cell_id: string; + /** @enum {unknown} */ + op: "focus-cell"; + }; + /** FormatRequest */ + FormatRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + /** FormatResponse */ + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + /** + * FormattingConfig + * @description Configuration for code formatting. + * + * **Keys.** + * + * - `line_length`: max line length + */ + FormattingConfig: { + line_length: number; + }; + /** FunctionCallRequest */ + FunctionCallRequest: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + }; + /** + * FunctionCallResult + * @description Result of calling a function. + */ + FunctionCallResult: { + function_call_id: string; + /** @enum {unknown} */ + op: "function-call-result"; + return_value: unknown; + status: components["schemas"]["HumanReadableStatus"]; + }; + /** GetCacheInfoRequest */ + GetCacheInfoRequest: Record; + /** + * GitHubConfig + * @description Configuration options for GitHub. + * + * **Keys.** + * + * - `api_key`: the GitHub API token + * - `base_url`: the base URL for the API + * - `copilot_settings`: configuration settings for GitHub Copilot LSP. + * Supports settings like `http` (proxy configuration), `telemetry`, + * and `github-enterprise` (enterprise URI). + */ + GitHubConfig: { + api_key?: string; + base_url?: string; + copilot_settings?: Record; + }; + /** + * GoogleAiConfig + * @description Configuration options for Google AI. + * + * **Keys.** + * + * - `api_key`: the Google AI API key + */ + GoogleAiConfig: { + api_key?: string; + }; + HTTPRequest: { + baseUrl: { + [key: string]: unknown; + }; + cookies: { + [key: string]: string; + }; + headers: { + [key: string]: string; + }; + meta: { + [key: string]: unknown; + }; + pathParams: { + [key: string]: unknown; + }; + queryParams: { + [key: string]: string[]; + }; + url: { + [key: string]: unknown; + }; + user: unknown; + }; + /** + * HumanReadableStatus + * @description Human-readable status. + */ + HumanReadableStatus: { + /** @enum {unknown} */ + code: "error" | "ok"; + /** @default null */ + message?: string | null; + /** @default null */ + title?: string | null; + }; + /** ImportStarError */ + ImportStarError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "import-star"; + }; + /** InstallMissingPackagesRequest */ + InstallMissingPackagesRequest: { + manager: string; + versions: { + [key: string]: string; + }; + }; + /** InstallingPackageAlert */ + InstallingPackageAlert: { + /** @default null */ + log_status?: ("append" | "done" | "start") | null; + /** @default null */ + logs?: { + [key: string]: string; + } | null; + /** @enum {unknown} */ + op: "installing-package-alert"; + packages: { + [key: string]: "failed" | "installed" | "installing" | "queued"; + }; + }; + /** InstantiateRequest */ + InstantiateRequest: { + /** @default true */ + autoRun?: boolean; + objectIds: string[]; + values: unknown[]; + }; + /** + * Interrupted + * @description Written when the kernel is interrupted by the user. + */ + Interrupted: { + /** @enum {unknown} */ + op: "interrupted"; + }; + /** InvokeAiToolRequest */ + InvokeAiToolRequest: { + arguments: Record; + toolName: string; + }; + /** InvokeAiToolResponse */ + InvokeAiToolResponse: { + /** @default null */ + error?: string | null; + result: unknown; + success: boolean; + toolName: string; + }; + /** KernelCapabilities */ + KernelCapabilities: { + /** @default false */ + basedpyright?: boolean; + /** @default false */ + pylsp?: boolean; + /** @default false */ + terminal?: boolean; + /** @default false */ + ty?: boolean; + }; + /** + * KernelReady + * @description Kernel is ready for execution. + */ + KernelReady: { + app_config: components["schemas"]["_AppConfig"]; + capabilities: components["schemas"]["KernelCapabilities"]; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code: { + [key: string]: string; + } | null; + last_execution_time: { + [key: string]: number; + } | null; + layout: components["schemas"]["LayoutConfig"] | null; + names: string[]; + /** @enum {unknown} */ + op: "kernel-ready"; + resumed: boolean; + ui_values: Record | null; + }; + /** + * KeymapConfig + * @description Configuration for keymaps. + * + * **Keys.** + * + * - `preset`: one of `"default"` or `"vim"` + * - `overrides`: a dict of keymap actions to their keymap override + * - `vimrc`: path to a vimrc file to load keymaps from + * - `destructive_delete`: if `True`, allows deleting cells with content. + */ + KeymapConfig: { + destructive_delete?: boolean; + overrides?: { + [key: string]: string; + }; + /** @enum {unknown} */ + preset: "default" | "vim"; + vimrc?: string | null; + }; + /** KnownUnions */ + KnownUnions: { + /** @enum {unknown} */ + data_type: + | "boolean" + | "date" + | "datetime" + | "integer" + | "number" + | "string" + | "time" + | "unknown"; + error: + | components["schemas"]["SetupRootError"] + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["ImportStarError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["MarimoInternalError"] + | components["schemas"]["MarimoSQLError"] + | components["schemas"]["UnknownError"]; + operation: + | components["schemas"]["CellOp"] + | components["schemas"]["FunctionCallResult"] + | components["schemas"]["SendUIElementMessage"] + | components["schemas"]["RemoveUIElements"] + | components["schemas"]["Reload"] + | components["schemas"]["Reconnected"] + | components["schemas"]["Interrupted"] + | components["schemas"]["CompletedRun"] + | components["schemas"]["KernelReady"] + | components["schemas"]["CompletionResult"] + | components["schemas"]["Alert"] + | components["schemas"]["Banner"] + | components["schemas"]["MissingPackageAlert"] + | components["schemas"]["InstallingPackageAlert"] + | components["schemas"]["StartupLogs"] + | components["schemas"]["Variables"] + | components["schemas"]["VariableValues"] + | components["schemas"]["QueryParamsSet"] + | components["schemas"]["QueryParamsAppend"] + | components["schemas"]["QueryParamsDelete"] + | components["schemas"]["QueryParamsClear"] + | components["schemas"]["Datasets"] + | components["schemas"]["DataColumnPreview"] + | components["schemas"]["SQLTablePreview"] + | components["schemas"]["SQLTableListPreview"] + | components["schemas"]["DataSourceConnections"] + | components["schemas"]["ValidateSQLResult"] + | components["schemas"]["SecretKeysResult"] + | components["schemas"]["CacheCleared"] + | components["schemas"]["CacheInfoFetched"] + | components["schemas"]["FocusCell"] + | components["schemas"]["UpdateCellCodes"] + | components["schemas"]["UpdateCellIdsRequest"]; + }; + /** + * LanguageServersConfig + * @description Configuration options for language servers. + * + * **Keys.** + * + * - `pylsp`: the pylsp config + */ + LanguageServersConfig: { + basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; + pylsp?: components["schemas"]["PythonLanguageServerConfig"]; + ty?: components["schemas"]["TyLanguageServerConfig"]; + }; + /** LayoutConfig */ + LayoutConfig: { + data: Record; + type: string; + }; + /** ListPackagesResponse */ + ListPackagesResponse: { + packages: components["schemas"]["PackageDescription"][]; + }; + /** ListSecretKeysRequest */ + ListSecretKeysRequest: { + requestId: string; + }; + /** ListSecretKeysResponse */ + ListSecretKeysResponse: { + keys: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** + * MCPConfig + * @description Configuration for MCP servers + * + * Note: the field name `mcpServers` is camelCased to match MCP server + * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) + */ + MCPConfig: { + mcpServers: { + [key: string]: Record; + }; + presets?: ("context7" | "marimo")[]; + }; + /** MCPRefreshResponse */ + MCPRefreshResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: boolean; + }; + success: boolean; + }; + /** MCPStatusResponse */ + MCPStatusResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: "connected" | "disconnected" | "failed" | "pending"; + }; + /** @enum {unknown} */ + status: "error" | "ok" | "partial"; + }; + /** MarimoAncestorPreventedError */ + MarimoAncestorPreventedError: { + blamed_cell: string | null; + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-prevented"; + }; + /** MarimoAncestorStoppedError */ + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-stopped"; + }; + /** + * MarimoConfig + * @description Configuration for the marimo editor + */ + MarimoConfig: { + ai?: components["schemas"]["AiConfig"]; + completion: components["schemas"]["CompletionConfig"]; + datasources?: components["schemas"]["DatasourcesConfig"]; + diagnostics?: components["schemas"]["DiagnosticsConfig"]; + display: components["schemas"]["DisplayConfig"]; + experimental?: Record; + formatting: components["schemas"]["FormattingConfig"]; + keymap: components["schemas"]["KeymapConfig"]; + language_servers?: components["schemas"]["LanguageServersConfig"]; + mcp?: components["schemas"]["MCPConfig"]; + package_management: components["schemas"]["PackageManagementConfig"]; + runtime: components["schemas"]["RuntimeConfig"]; + save: components["schemas"]["SaveConfig"]; + server: components["schemas"]["ServerConfig"]; + sharing?: components["schemas"]["SharingConfig"]; + snippets?: components["schemas"]["SnippetsConfig"]; + }; + /** MarimoExceptionRaisedError */ + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell: string | null; + /** @enum {unknown} */ + type: "exception"; + }; + /** MarimoFile */ + MarimoFile: { + /** @default null */ + initializationId?: string | null; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + /** @default null */ + sessionId?: string | null; + }; + /** + * 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. + */ + MarimoInternalError: { + error_id: string; + /** @default */ + msg?: string; + /** @enum {unknown} */ + type: "internal"; + }; + /** MarimoInterruptionError */ + MarimoInterruptionError: { + /** @enum {unknown} */ + type: "interruption"; + }; + /** + * MarimoSQLError + * @description SQL-specific error with enhanced metadata for debugging. + */ + MarimoSQLError: { + /** @default null */ + hint?: string | null; + msg: string; + /** @default 0 */ + node_col_offset?: number; + /** @default 0 */ + node_lineno?: number; + /** @default null */ + sql_col?: number | null; + /** @default null */ + sql_line?: number | null; + sql_statement: string; + /** @enum {unknown} */ + type: "sql-error"; + }; + /** MarimoStrictExecutionError */ + MarimoStrictExecutionError: { + blamed_cell: string | null; + msg: string; + ref: string; + /** @enum {unknown} */ + type: "strict-exception"; + }; + /** MarimoSyntaxError */ + MarimoSyntaxError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "syntax"; + }; + /** MissingPackageAlert */ + MissingPackageAlert: { + isolated: boolean; + /** @enum {unknown} */ + op: "missing-package-alert"; + packages: string[]; + }; + /** ModelMessage */ + ModelMessage: { + bufferPaths: (string | number)[][]; + state: Record; + }; + /** MultipleDefinitionError */ + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {unknown} */ + type: "multiple-defs"; + }; + /** + * OpenAiConfig + * @description Configuration options for OpenAI or OpenAI-compatible services. + * + * **Keys.** + * + * - `api_key`: the OpenAI API key + * - `base_url`: the base URL for the API + * - `project`: the project ID for the OpenAI API + * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios + * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client + * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server + * - `extra_headers`: extra headers to be passed to the OpenAI client + */ + OpenAiConfig: { + api_key?: string; + base_url?: string; + ca_bundle_path?: string; + client_pem?: string; + extra_headers?: { + [key: string]: string; + }; + model?: string; + project?: string; + ssl_verify?: boolean; + }; + /** OpenTutorialRequest */ + OpenTutorialRequest: { + tutorialId: + | ( + | "dataflow" + | "fileformat" + | "for-jupyter-users" + | "intro" + | "layout" + | "markdown" + | "plots" + | "sql" + | "ui" + ) + | "markdown-format"; + }; + /** PackageDescription */ + PackageDescription: { + name: string; + version: string; + }; + /** + * PackageManagementConfig + * @description Configuration options for package management. + * + * **Keys.** + * + * - `manager`: the package manager to use + */ + PackageManagementConfig: { + /** @enum {unknown} */ + manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; + }; + /** PackageOperationResponse */ + PackageOperationResponse: { + /** @default null */ + error?: string | null; + success: boolean; + }; + /** PdbRequest */ + PdbRequest: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * PreviewDataSourceConnectionRequest + * @description Fetch a datasource connection + */ + PreviewDataSourceConnectionRequest: { + engine: string; + }; + /** PreviewDatasetColumnRequest */ + PreviewDatasetColumnRequest: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + }; + /** + * PreviewSQLTableListRequest + * @description Preview list of tables in an SQL schema + */ + PreviewSQLTableListRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + }; + /** + * PreviewSQLTableRequest + * @description Preview table details in an SQL database + */ + PreviewSQLTableRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + }; + /** + * PythonLanguageServerConfig + * @description Configuration options for Python Language Server. + * + * pylsp handles completion, hover, go-to-definition, and diagnostics. + */ + PythonLanguageServerConfig: { + enable_flake8?: boolean; + enable_mypy?: boolean; + enable_pydocstyle?: boolean; + enable_pyflakes?: boolean; + enable_pylint?: boolean; + enable_ruff?: boolean; + enabled?: boolean; + }; + /** QueryParamsAppend */ + QueryParamsAppend: { + key: string; + /** @enum {unknown} */ + op: "query-params-append"; + value: string; + }; + /** QueryParamsClear */ + QueryParamsClear: { + /** @enum {unknown} */ + op: "query-params-clear"; + }; + /** QueryParamsDelete */ + QueryParamsDelete: { + key: string; + /** @enum {unknown} */ + op: "query-params-delete"; + value: string | null; + }; + /** + * QueryParamsSet + * @description Set query parameters. + */ + QueryParamsSet: { + key: string; + /** @enum {unknown} */ + op: "query-params-set"; + value: string | string[]; + }; + /** ReadCodeResponse */ + ReadCodeResponse: { + contents: string; + }; + /** RecentFilesResponse */ + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** Reconnected */ + Reconnected: { + /** @enum {unknown} */ + op: "reconnected"; + }; + /** Reload */ + Reload: { + /** @enum {unknown} */ + op: "reload"; + }; + /** RemovePackageRequest */ + RemovePackageRequest: { + package: string; + }; + /** + * RemoveUIElements + * @description Invalidate UI elements for a given cell. + */ + RemoveUIElements: { + cell_id: string; + /** @enum {unknown} */ + op: "remove-ui-elements"; + }; + /** RenameFileRequest */ + RenameFileRequest: { + filename: string; + }; + /** RenameRequest */ + RenameRequest: { + filename: string; + }; + /** RunRequest */ + RunRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** RunningNotebooksResponse */ + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** + * RuntimeConfig + * @description Configuration for runtime. + * + * **Keys.** + * + * - `auto_instantiate`: if `False`, cells won't automatically + * run on startup. This only applies when editing a notebook, + * and not when running as an application. + * The default is `True`. + * - `auto_reload`: if `lazy`, cells importing modified modules will marked + * as stale; if `autorun`, affected cells will be automatically run. similar + * to IPython's %autoreload extension but with more code intelligence. + * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. + * execution. + * - `on_cell_change`: if `lazy`, cells will be marked stale when their + * ancestors run but won't autorun; if `autorun`, cells will automatically + * run when their ancestors run. + * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; + * if `strict` marimo will clone cell declarations by default, avoiding + * hidden potential state build up. + * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks + * affected cells as stale, `"autorun"` automatically runs affected cells. + * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger + * values may affect frontend performance + * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; + * larger values may affect frontend performance + * - `pythonpath`: a list of directories to add to the Python search path. + * Directories will be added to the head of sys.path. Similar to the + * `PYTHONPATH` environment variable, the directories will be included in + * where Python will look for imported modules. + * - `dotenv`: a list of paths to `.env` files to load. + * If the file does not exist, it will be silently ignored. + * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. + * - `default_sql_output`: the default output format for SQL queries. Can be one of: + * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. + * The default is `"auto"`. + * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: + * `html`, `markdown`, `ipynb`. + * The default is None. + */ + RuntimeConfig: { + auto_instantiate: boolean; + /** @enum {unknown} */ + auto_reload: "autorun" | "lazy" | "off"; + default_auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @enum {unknown} */ + default_sql_output: + | "auto" + | "lazy-polars" + | "native" + | "pandas" + | "polars"; + dotenv?: string[]; + /** @enum {unknown} */ + on_cell_change: "autorun" | "lazy"; + output_max_bytes: number; + pythonpath?: string[]; + reactive_tests: boolean; + std_stream_max_bytes: number; + /** @enum {unknown} */ + watcher_on_save: "autorun" | "lazy"; + }; + /** + * SQLMetadata + * @description Metadata for a SQL database. + */ + SQLMetadata: { + connection: string; + database: string; + schema: string; + /** @enum {unknown} */ + type: "sql-metadata"; + }; + /** + * SQLTableListPreview + * @description Preview of a list of tables in a schema. + */ + SQLTableListPreview: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-list-preview"; + request_id: string; + /** @default [] */ + tables?: components["schemas"]["DataTable"][]; + }; + /** + * SQLTablePreview + * @description Preview of a table in a SQL database. + */ + SQLTablePreview: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-preview"; + request_id: string; + table: null | components["schemas"]["DataTable"]; + }; + /** SaveAppConfigurationRequest */ + SaveAppConfigurationRequest: { + config: Record; + }; + /** + * SaveConfig + * @description Configuration for saving. + * + * **Keys.** + * + * - `autosave`: one of `"off"` or `"after_delay"` + * - `delay`: number of milliseconds to wait before autosaving + * - `format_on_save`: if `True`, format the code on save + */ + SaveConfig: { + /** @enum {unknown} */ + autosave: "after_delay" | "off"; + autosave_delay: number; + format_on_save: boolean; + }; + /** SaveNotebookRequest */ + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + /** @default null */ + layout?: Record | null; + names: string[]; + /** @default true */ + persist?: boolean; + }; + /** SaveUserConfigurationRequest */ + SaveUserConfigurationRequest: { + config: Record; + }; + /** Schema */ + Schema: { + name: string; + tables: components["schemas"]["DataTable"][]; + }; + /** SchemaColumn */ + SchemaColumn: { + name: string; + sampleValues: unknown[]; + type: string; + }; + /** SchemaTable */ + SchemaTable: { + columns: components["schemas"]["SchemaColumn"][]; + name: string; + }; + /** + * SecretKeysResult + * @description Result of listing secret keys. + */ + SecretKeysResult: { + /** @enum {unknown} */ + op: "secret-keys-result"; + request_id: string; + secrets: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** SecretKeysWithProvider */ + SecretKeysWithProvider: { + keys: string[]; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + }; + /** + * SendUIElementMessage + * @description Send a message to a UI element. + */ + SendUIElementMessage: { + /** @default null */ + buffers?: string[] | null; + message: Record; + model_id: string | null; + /** @enum {unknown} */ + op: "send-ui-element-message"; + ui_element: string | null; + }; + /** + * ServerConfig + * @description Configuration for the server. + * + * **Keys.** + * + * - `browser`: the web browser to use. `"default"` or a browser registered + * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) + * - `follow_symlink`: if true, the server will follow symlinks it finds + * inside its static assets directory. + */ + ServerConfig: { + browser: "default" | string; + follow_symlink: boolean; + }; + /** SetCellConfigRequest */ + SetCellConfigRequest: { + configs: { + [key: string]: Record; + }; + }; + /** SetModelMessageRequest */ + SetModelMessageRequest: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + }; + /** SetUIElementValueRequest */ + SetUIElementValueRequest: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + values: unknown[]; + }; + /** SetUserConfigRequest */ + SetUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + /** SetupRootError */ + SetupRootError: { + edges_with_vars: [string, string[], string][]; + /** @enum {unknown} */ + type: "setup-refs"; + }; + /** + * SharingConfig + * @description Configuration for sharing features. + * + * **Keys.** + * + * - `html`: if `False`, HTML sharing options will be hidden from the UI + * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI + */ + SharingConfig: { + html?: boolean; + wasm?: boolean; + }; + /** ShutdownSessionRequest */ + ShutdownSessionRequest: { + sessionId: string; + }; + /** Snippet */ + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + /** SnippetSection */ + SnippetSection: { + /** @default null */ + code?: string | null; + /** @default null */ + html?: string | null; + id: string; + }; + /** Snippets */ + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + /** + * SnippetsConfig + * @description Configuration for snippets. + * + * **Keys.** + * + * - `custom_path`: the path to the custom snippets directory + */ + SnippetsConfig: { + custom_paths?: string[]; + include_default_snippets?: boolean; + }; + /** + * SqlCatalogCheckResult + * @description Result of running validation against the database. + */ + SqlCatalogCheckResult: { + error_message: string | null; + success: boolean; + }; + /** + * SqlParseError + * @description Represents a single SQL parse error. + * + * Attributes: + * message (str): Description of the error. + * line (int): Line number where the error occurred (1-based). + * column (int): Column number where the error occurred (1-based). + * severity (Literal["error", "warning"]): Severity of the error. + */ + SqlParseError: { + column: number; + line: number; + message: string; + /** @enum {unknown} */ + severity: "error" | "warning"; + }; + /** + * SqlParseResult + * @description Result of parsing an SQL query. + * + * Attributes: + * success (bool): True if parsing succeeded without errors. + * errors (list[SqlParseError]): List of parse errors (empty if success is True). + */ + SqlParseResult: { + errors: components["schemas"]["SqlParseError"][]; + success: boolean; + }; + /** StartupLogs */ + StartupLogs: { + content: string; + /** @enum {unknown} */ + op: "startup-logs"; + /** @enum {unknown} */ + status: "append" | "done" | "start"; + }; + /** StdinRequest */ + StdinRequest: { + text: string; + }; + /** StopRequest */ + StopRequest: Record; + /** + * StoreConfig + * @description Configuration for cache stores. + */ + StoreConfig: { + args?: Record; + /** @enum {unknown} */ + type?: "file" | "redis" | "rest" | "tiered"; + }; + /** SuccessResponse */ + SuccessResponse: { + /** @default true */ + success?: boolean; + }; + /** + * ToolDefinition + * @description Tool definition compatible with ai-sdk-ui format. + */ + ToolDefinition: { + description: string; + mode: ("agent" | "ask" | "manual")[]; + name: string; + parameters: Record; + /** @enum {unknown} */ + source: "backend" | "frontend" | "mcp"; + }; + /** + * TyLanguageServerConfig + * @description Configuration options for Ty Language Server. + * + * ty handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + TyLanguageServerConfig: { + enabled?: boolean; + }; + /** UnknownError */ + UnknownError: { + /** @default null */ + error_type?: string | null; + msg: string; + /** @enum {unknown} */ + type: "unknown"; + }; + /** UpdateCellCodes */ + UpdateCellCodes: { + cell_ids: string[]; + code_is_stale: boolean; + codes: string[]; + /** @enum {unknown} */ + op: "update-cell-codes"; + }; + /** + * UpdateCellIdsRequest + * @description Update the cell ID ordering of the cells in the notebook. + * + * Right now we send the entire list of cell IDs, + * but in the future we might want to send change-deltas. + */ + UpdateCellIdsRequest: { + cell_ids: string[]; + /** @enum {unknown} */ + op: "update-cell-ids"; + }; + /** UpdateComponentValuesRequest */ + UpdateComponentValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + /** + * ValidateSQLRequest + * @description Validate an SQL query against the engine + */ + ValidateSQLRequest: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + }; + /** ValidateSQLResult */ + ValidateSQLResult: { + /** @default null */ + error?: string | null; + /** @enum {unknown} */ + op: "validate-sql-result"; + /** @default null */ + parse_result?: null | components["schemas"]["SqlParseResult"]; + request_id: string; + /** @default null */ + validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; + }; + /** VariableContext */ + VariableContext: { + name: string; + previewValue: unknown; + valueType: string; + }; + /** VariableDeclaration */ + VariableDeclaration: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + /** VariableValue */ + VariableValue: { + datatype: string | null; + name: string; + value: string | null; + }; + /** + * VariableValues + * @description List of variables and their types/values. + */ + VariableValues: { + /** @enum {unknown} */ + op: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + /** + * Variables + * @description List of variable declarations. + */ + Variables: { + /** @enum {unknown} */ + op: "variables"; + variables: components["schemas"]["VariableDeclaration"][]; + }; + /** WorkspaceFilesRequest */ + WorkspaceFilesRequest: { + /** @default false */ + includeMarkdown?: boolean; + }; + /** WorkspaceFilesResponse */ + WorkspaceFilesResponse: { + /** @default 0 */ + fileCount?: number; + files: components["schemas"]["FileInfo"][]; + /** @default false */ + hasMore?: boolean; + root: string; + }; + /** + * _AppConfig + * @description Program-specific configuration. + * + * Configuration for frontends or runtimes that is specific to + * a single marimo program. + */ + _AppConfig: { + /** @default null */ + app_title?: string | null; + auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @default null */ + css_file?: string | null; + /** @default null */ + html_head_file?: string | null; + /** @default null */ + layout_file?: string | null; + /** + * @default auto + * @enum {unknown} + */ + sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + /** + * @default compact + * @enum {unknown} + */ + width?: "columns" | "compact" | "full" | "medium" | "normal"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; diff --git a/packages/openapi/src/notebook.ts b/packages/openapi/src/notebook.ts index 94bc08bedb8..9b3f7ebe525 100644 --- a/packages/openapi/src/notebook.ts +++ b/packages/openapi/src/notebook.ts @@ -6,38 +6,38 @@ export type paths = Record; export type webhooks = Record; export interface components { - schemas: { - NotebookCell: { - code: string | null; - code_hash: string | null; - config: { - column?: number | null; - disabled?: boolean | null; - hide_code?: boolean | null; - }; - id: string | null; - name: string | null; - }; - NotebookCellConfig: { - column?: number | null; - disabled?: boolean | null; - hide_code?: boolean | null; - }; - NotebookMetadata: { - marimo_version?: string | null; - }; - NotebookV1: { - cells: components["schemas"]["NotebookCell"][]; - metadata: components["schemas"]["NotebookMetadata"]; - /** @enum {string} */ - version: "1"; - }; + schemas: { + NotebookCell: { + code: string | null; + code_hash: string | null; + config: { + column?: number | null; + disabled?: boolean | null; + hide_code?: boolean | null; + }; + id: string | null; + name: string | null; }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + NotebookCellConfig: { + column?: number | null; + disabled?: boolean | null; + hide_code?: boolean | null; + }; + NotebookMetadata: { + marimo_version?: string | null; + }; + NotebookV1: { + cells: components["schemas"]["NotebookCell"][]; + metadata: components["schemas"]["NotebookMetadata"]; + /** @enum {string} */ + version: "1"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; diff --git a/packages/openapi/src/session.ts b/packages/openapi/src/session.ts index 9787ac37160..f4fb701de1a 100644 --- a/packages/openapi/src/session.ts +++ b/packages/openapi/src/session.ts @@ -6,64 +6,113 @@ export type paths = Record; export type webhooks = Record; export interface components { - schemas: { - Cell: { - code_hash: string | null; - console: (components["schemas"]["StreamOutput"] | components["schemas"]["StreamMediaOutput"])[]; - id: string; - outputs: (components["schemas"]["ErrorOutput"] | components["schemas"]["DataOutput"])[]; - }; - DataOutput: { - data: { - [key: string]: unknown; - }; - /** @enum {string} */ - type: "data"; - }; - ErrorOutput: { - ename: string; - evalue: string; - traceback: string[]; - /** @enum {string} */ - type: "error"; - }; - NotebookSessionMetadata: { - marimo_version: string | null; - }; - NotebookSessionV1: { - cells: components["schemas"]["Cell"][]; - metadata: components["schemas"]["NotebookSessionMetadata"]; - version: string; - }; - StreamMediaOutput: { - data: string; - /** @enum {string} */ - mimetype: "application/json" | "application/vnd.marimo+error" | "application/vnd.marimo+traceback" | "application/vnd.marimo+mimebundle" | "application/vnd.vega.v5+json" | "application/vnd.vegalite.v5+json" | "application/vnd.jupyter.widget-view+json" | "image/png" | "image/svg+xml" | "image/tiff" | "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "video/mp4" | "video/mpeg" | "text/html" | "text/plain" | "text/markdown" | "text/latex" | "text/csv"; - /** @enum {string} */ - name: "media"; - /** @enum {string} */ - type: "streamMedia"; - }; - StreamOutput: { - /** @enum {string|null} */ - mimetype: "application/json" | "application/vnd.marimo+error" | "application/vnd.marimo+traceback" | "application/vnd.marimo+mimebundle" | "application/vnd.vega.v5+json" | "application/vnd.vegalite.v5+json" | "application/vnd.jupyter.widget-view+json" | "image/png" | "image/svg+xml" | "image/tiff" | "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "video/mp4" | "video/mpeg" | "text/html" | "text/plain" | "text/markdown" | "text/latex" | "text/csv" | null; - /** @enum {string} */ - name: "stdout" | "stderr"; - text: string; - /** @enum {string} */ - type: "stream"; - }; - TimeMetadata: { - completed: string | null; - duration: number | null; - started: string | null; - }; + schemas: { + Cell: { + code_hash: string | null; + console: ( + | components["schemas"]["StreamOutput"] + | components["schemas"]["StreamMediaOutput"] + )[]; + id: string; + outputs: ( + | components["schemas"]["ErrorOutput"] + | components["schemas"]["DataOutput"] + )[]; }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + DataOutput: { + data: { + [key: string]: unknown; + }; + /** @enum {string} */ + type: "data"; + }; + ErrorOutput: { + ename: string; + evalue: string; + traceback: string[]; + /** @enum {string} */ + type: "error"; + }; + NotebookSessionMetadata: { + marimo_version: string | null; + }; + NotebookSessionV1: { + cells: components["schemas"]["Cell"][]; + metadata: components["schemas"]["NotebookSessionMetadata"]; + version: string; + }; + StreamMediaOutput: { + data: string; + /** @enum {string} */ + mimetype: + | "application/json" + | "application/vnd.marimo+error" + | "application/vnd.marimo+traceback" + | "application/vnd.marimo+mimebundle" + | "application/vnd.vega.v5+json" + | "application/vnd.vegalite.v5+json" + | "application/vnd.jupyter.widget-view+json" + | "image/png" + | "image/svg+xml" + | "image/tiff" + | "image/avif" + | "image/bmp" + | "image/gif" + | "image/jpeg" + | "video/mp4" + | "video/mpeg" + | "text/html" + | "text/plain" + | "text/markdown" + | "text/latex" + | "text/csv"; + /** @enum {string} */ + name: "media"; + /** @enum {string} */ + type: "streamMedia"; + }; + StreamOutput: { + /** @enum {string|null} */ + mimetype: + | "application/json" + | "application/vnd.marimo+error" + | "application/vnd.marimo+traceback" + | "application/vnd.marimo+mimebundle" + | "application/vnd.vega.v5+json" + | "application/vnd.vegalite.v5+json" + | "application/vnd.jupyter.widget-view+json" + | "image/png" + | "image/svg+xml" + | "image/tiff" + | "image/avif" + | "image/bmp" + | "image/gif" + | "image/jpeg" + | "video/mp4" + | "video/mpeg" + | "text/html" + | "text/plain" + | "text/markdown" + | "text/latex" + | "text/csv" + | null; + /** @enum {string} */ + name: "stdout" | "stderr"; + text: string; + /** @enum {string} */ + type: "stream"; + }; + TimeMetadata: { + completed: string | null; + duration: number | null; + started: string | null; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; From 50f15a461e7fbcd6cce2ec1b3a5bb3d3df569d16 Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 26 Dec 2025 21:07:47 +0000 Subject: [PATCH 04/16] refactor: split mem and cpu cgroups functions + TypedDict for memory stats --- .../wrapper/footer-items/machine-stats.tsx | 4 +- marimo/_server/api/endpoints/health.py | 33 +- marimo/_utils/health.py | 345 +- packages/openapi/api.yaml | 6 +- packages/openapi/src/api.ts | 10394 ++++++++-------- 5 files changed, 5331 insertions(+), 5451 deletions(-) diff --git a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx index 41524e75929..97ea2c44145 100644 --- a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +++ b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx @@ -55,9 +55,9 @@ const MemoryUsageBar: React.FC<{ kernel: UsageResponse["kernel"]; server: UsageResponse["server"]; }> = ({ memory, kernel, server }) => { - const { percent, total, available, is_container } = memory; + const { percent, total, available, has_cgroup_mem_limit } = memory; const roundedPercent = Math.round(percent); - const memoryLabel = is_container ? "container memory" : "computer memory"; + const memoryLabel = has_cgroup_mem_limit ? "container memory" : "computer memory"; const gbFormatter = useNumberFormatter({ maximumFractionDigits: 2, diff --git a/marimo/_server/api/endpoints/health.py b/marimo/_server/api/endpoints/health.py index 6c78bb59011..e603c7ad385 100644 --- a/marimo/_server/api/endpoints/health.py +++ b/marimo/_server/api/endpoints/health.py @@ -12,7 +12,8 @@ from marimo._server.api.deps import AppState from marimo._server.router import APIRouter from marimo._utils.health import ( - get_container_resources, + get_cgroup_cpu_percent, + get_cgroup_mem_stats, get_node_version, get_python_version, get_required_modules_list, @@ -131,7 +132,7 @@ async def usage(request: Request) -> JSONResponse: type: integer free: type: integer - is_container: + has_cgroup_mem_limit: type: boolean required: - total @@ -139,6 +140,7 @@ async def usage(request: Request) -> JSONResponse: - percent - used - free + - has_cgroup_mem_limit server: type: object properties: @@ -196,19 +198,10 @@ async def usage(request: Request) -> JSONResponse: import psutil - # Check if running in a container with resource limits - container_resources = get_container_resources() - - if container_resources and "memory" in container_resources: - # Use container memory stats - container_mem = container_resources["memory"] + if cgroup_mem_stats := get_cgroup_mem_stats(): memory_stats = { - "total": container_mem["total"], - "available": container_mem["available"], - "percent": container_mem["percent"], - "used": container_mem["used"], - "free": container_mem["available"], # Use available as free - "is_container": True, + "has_cgroup_mem_limit": True, + **cgroup_mem_stats, } else: # Use host memory stats @@ -219,12 +212,14 @@ async def usage(request: Request) -> JSONResponse: "percent": memory.percent, "used": memory.used, "free": memory.free, - "is_container": False, + "has_cgroup_mem_limit": False, } - # interval=None is nonblocking; first value is meaningless but after - # that it's useful. - cpu = psutil.cpu_percent(interval=None) + cpu_percent = get_cgroup_cpu_percent() + if cpu_percent is None: + # interval=None is nonblocking; first call returns meaningless value + # subsequent calls return delta since last call + cpu_percent = psutil.cpu_percent(interval=None) # Server memory (and children) main_process = psutil.Process() @@ -306,7 +301,7 @@ async def usage(request: Request) -> JSONResponse: "memory": kernel_memory, }, "cpu": { - "percent": cpu, + "percent": cpu_percent, }, "gpu": gpu_stats, } diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 97a70fda8c4..5ab7ac3c10a 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -5,7 +5,8 @@ import os import subprocess import sys -from typing import Any, Optional +import time +from typing import Any, Optional, TypedDict from marimo import _loggers @@ -13,6 +14,30 @@ TIMEOUT = 10 # seconds +# Module-level state for cgroup CPU percent calculation (like psutil does) +_last_cgroup_cpu_sample: Optional[tuple[int, float]] = ( + None # (usage_usec, timestamp) +) + + +class MemoryStats(TypedDict): + total: int + used: int + available: int + percent: float + free: int + + +CGROUP_V2_MEMORY_MAX_FILE = "/sys/fs/cgroup/memory.max" +CGROUP_V2_MEMORY_CURRENT_FILE = "/sys/fs/cgroup/memory.current" +CGROUP_V1_MEMORY_LIMIT_FILE = "/sys/fs/cgroup/memory/memory.limit_in_bytes" +CGROUP_V1_MEMORY_USAGE_FILE = "/sys/fs/cgroup/memory/memory.usage_in_bytes" +CGROUP_V2_CPU_STAT_FILE = "/sys/fs/cgroup/cpu.stat" +CGROUP_V1_CPU_USAGE_FILE = "/sys/fs/cgroup/cpuacct/cpuacct.usage" +CGROUP_V2_CPU_MAX_FILE = "/sys/fs/cgroup/cpu.max" +CGROUP_V1_CPU_CFS_QUOTA_US_FILE = "/sys/fs/cgroup/cpu/cpu.cfs_quota_us" +CGROUP_V1_CPU_CFS_PERIOD_US_FILE = "/sys/fs/cgroup/cpu/cpu.cfs_period_us" + def get_node_version() -> Optional[str]: try: @@ -186,186 +211,184 @@ def communicate_with_timeout( return "", "Error: Process timed out" -def has_cgroup_limits() -> tuple[bool, bool]: +def _has_cgroup_cpu_limit() -> bool: """ - Check if cgroup resource limits are explicitly set. - - This is the standard way to detect container resource limits on Linux. - These cgroup paths are part of the kernel ABI and are stable across versions. - See: https://www.kernel.org/doc/Documentation/cgroup-v2.txt - https://www.kernel.org/doc/Documentation/cgroup-v1/ + Returns True/False whether the container has a CPU limit set. + This function checks for both cgroups v1 and v2. + """ + # TODO Constants + # cgroups v2 + if os.path.exists(CGROUP_V2_CPU_MAX_FILE): + with open(CGROUP_V2_CPU_MAX_FILE, encoding="utf-8") as f: + cpu_max = f.read().strip() + return cpu_max != "max" + # Fallback to cgroup v1 (legacy) + if os.path.exists(CGROUP_V1_CPU_CFS_QUOTA_US_FILE): + with open(CGROUP_V1_CPU_CFS_QUOTA_US_FILE, encoding="utf-8") as f: + quota = int(f.read().strip()) + return quota > 0 + return False + + +def get_cgroup_mem_stats() -> Optional[MemoryStats]: + """ + Get container memory stats from cgroup. Returns: - (has_memory_limit, has_cpu_limit): Tuple of booleans indicating - whether memory and CPU limits are set. + Dictionary with memory stats if cgroup limits are configured, + None if cgroup limits are not configured or unable to read. + + Example return value: + { + 'total': 2147483648, # bytes + 'used': 1073741824, # bytes + 'available': 1073741824, # bytes + 'free': 1073741824, # bytes + 'percent': 50.0, # percentage + } """ - has_memory = False - has_cpu = False try: - # Check cgroup v2 (modern containers) - if os.path.exists("/sys/fs/cgroup/memory.max"): - with open("/sys/fs/cgroup/memory.max", encoding="utf-8") as f: + # Try cgroup v2 first + if os.path.exists(CGROUP_V2_MEMORY_MAX_FILE): + with open(CGROUP_V2_MEMORY_MAX_FILE, encoding="utf-8") as f: memory_max = f.read().strip() - # 'max' means unlimited, any number means limited - has_memory = memory_max != "max" - - if os.path.exists("/sys/fs/cgroup/cpu.max"): - with open("/sys/fs/cgroup/cpu.max", encoding="utf-8") as f: - cpu_max = f.read().strip() - # 'max' means unlimited - has_cpu = cpu_max != "max" - - # Fallback to cgroup v1 (legacy) - if not has_memory and os.path.exists( - "/sys/fs/cgroup/memory/memory.limit_in_bytes" - ): + f.close() + with open(CGROUP_V2_MEMORY_CURRENT_FILE, encoding="utf-8") as f: + memory_current = f.read().strip() + f.close() + + if memory_max != "max": + total = int(memory_max) + used = int(memory_current) + available = total - used + percent = (used / total) * 100 if total > 0 else 0 + free = total - used + return MemoryStats( + total=total, + used=used, + available=available, + percent=percent, + free=free, + ) + # Fallback to cgroup v1 + elif os.path.exists(CGROUP_V1_MEMORY_LIMIT_FILE): with open( - "/sys/fs/cgroup/memory/memory.limit_in_bytes", encoding="utf-8" + CGROUP_V1_MEMORY_LIMIT_FILE, + encoding="utf-8", ) as f: - limit = int(f.read().strip()) - # Very large number (typically > 2^62) indicates unlimited - # This is the default "unlimited" value in cgroup v1 - has_memory = limit < (1 << 62) - - if not has_cpu and os.path.exists( - "/sys/fs/cgroup/cpu/cpu.cfs_quota_us" - ): + total = int(f.read().strip()) + f.close() with open( - "/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8" + CGROUP_V1_MEMORY_USAGE_FILE, + encoding="utf-8", ) as f: - quota = int(f.read().strip()) - # In cgroup v1, -1 means unlimited - has_cpu = quota > 0 - + used = int(f.read().strip()) + f.close() + available = total - used + percent = (used / total) * 100 if total > 0 else 0 + free = total - used + + return MemoryStats( + total=total, + used=used, + available=available, + percent=percent, + free=free, + ) except (FileNotFoundError, PermissionError, ValueError) as e: - LOGGER.debug(f"Error checking cgroup limits: {e}") + LOGGER.debug(f"Error reading container memory stats: {e}") - return has_memory, has_cpu + return None -def get_container_resources() -> Optional[dict[str, Any]]: +def _get_cgroup_allocated_cores() -> Optional[float]: + """Get the number of CPU cores allocated to this cgroup (quota / period).""" + try: + if os.path.exists(CGROUP_V2_CPU_MAX_FILE): + # cgroups v2 + with open(CGROUP_V2_CPU_MAX_FILE, encoding="utf-8") as f: + parts = f.read().strip().split() + if len(parts) == 2 and parts[0] != "max": + return int(parts[0]) / int(parts[1]) + elif os.path.exists(CGROUP_V1_CPU_CFS_QUOTA_US_FILE): + # cgroups v1 + with open(CGROUP_V1_CPU_CFS_QUOTA_US_FILE, encoding="utf-8") as f: + quota = int(f.read().strip()) + with open(CGROUP_V1_CPU_CFS_PERIOD_US_FILE, encoding="utf-8") as f: + period = int(f.read().strip()) + if quota > 0: + return quota / period + except (FileNotFoundError, PermissionError, ValueError): + pass + return None + + +def get_cgroup_cpu_percent() -> Optional[float]: """ - Get container resource limits if running in a resource-restricted container. + Get CPU usage percentage for a cgroup-limited container. - Returns: - Dictionary with 'memory' and/or 'cpu' keys if limits are set, - None if not in a container or no limits are configured. + Works like psutil.cpu_percent(interval=None): + - First call stores the current reading and returns None + - Subsequent calls return the CPU percent since the last call - Example return value: - { - 'memory': { - 'total': 2147483648, # bytes - 'used': 1073741824, # bytes - 'available': 1073741824, # bytes - 'percent': 50.0 # percentage - }, - 'cpu': { - 'quota': 200000, # microseconds - 'period': 100000, # microseconds - 'cores': 2.0 # effective number of cores - } - } + Returns: + CPU usage as a percentage (0-100). + 0.0 if cgroup limits are configured but unable to read current usage (ie on the first call) + None if cgroup limits are not configured or unable to read. """ - has_memory_limit, has_cpu_limit = has_cgroup_limits() + global _last_cgroup_cpu_sample - if not (has_memory_limit or has_cpu_limit): - return None + try: + # Read current usage (microseconds) + current_usage: Optional[int] = None + + if os.path.exists(CGROUP_V2_CPU_STAT_FILE): + # cgroups v2 + with open(CGROUP_V2_CPU_STAT_FILE, encoding="utf-8") as f: + for line in f: + if line.startswith("usage_usec"): + current_usage = int(line.split()[1]) + break + + elif os.path.exists(CGROUP_V1_CPU_USAGE_FILE): + # cgroups v1 + with open(CGROUP_V1_CPU_USAGE_FILE, encoding="utf-8") as f: + current_usage = int(f.read().strip()) // 1_000_000 # ns -> μs - resources: dict[str, Any] = {} + else: + # No cgroup files exist + return None - # Get memory stats if limited - if has_memory_limit: - try: - # Try cgroup v2 first - if os.path.exists("/sys/fs/cgroup/memory.max"): - with open("/sys/fs/cgroup/memory.max", encoding="utf-8") as f: - memory_max = f.read().strip() - f.close() - with open( - "/sys/fs/cgroup/memory.current", encoding="utf-8" - ) as f: - memory_current = f.read().strip() - f.close() - - if memory_max != "max": - total = int(memory_max) - used = int(memory_current) - available = total - used - percent = (used / total) * 100 if total > 0 else 0 - - resources["memory"] = { - "total": total, - "used": used, - "available": available, - "percent": percent, - } - # Fallback to cgroup v1 - elif os.path.exists("/sys/fs/cgroup/memory/memory.limit_in_bytes"): - with open( - "/sys/fs/cgroup/memory/memory.limit_in_bytes", - encoding="utf-8", - ) as f: - total = int(f.read().strip()) - f.close() - with open( - "/sys/fs/cgroup/memory/memory.usage_in_bytes", - encoding="utf-8", - ) as f: - used = int(f.read().strip()) - f.close() - available = total - used - percent = (used / total) * 100 if total > 0 else 0 + if current_usage is None: + return 0.0 - resources["memory"] = { - "total": total, - "used": used, - "available": available, - "percent": percent, - } - except (FileNotFoundError, PermissionError, ValueError) as e: - LOGGER.debug(f"Error reading container memory stats: {e}") - - # Get CPU stats if limited - if has_cpu_limit: - try: - # cgroup v2 - if os.path.exists("/sys/fs/cgroup/cpu.max"): - with open("/sys/fs/cgroup/cpu.max", encoding="utf-8") as f: - cpu_max_line = f.read().strip() - f.close() - if cpu_max_line != "max": - parts = cpu_max_line.split() - if len(parts) == 2: - quota = int(parts[0]) - period = int(parts[1]) - cores = quota / period - - resources["cpu"] = { - "quota": quota, - "period": period, - "cores": cores, - } - # cgroup v1 - elif os.path.exists("/sys/fs/cgroup/cpu/cpu.cfs_quota_us"): - with open( - "/sys/fs/cgroup/cpu/cpu.cfs_quota_us", encoding="utf-8" - ) as f: - quota = int(f.read().strip()) - f.close() - with open( - "/sys/fs/cgroup/cpu/cpu.cfs_period_us", encoding="utf-8" - ) as f: - period = int(f.read().strip()) - f.close() - if quota > 0: # -1 means unlimited - cores = quota / period - resources["cpu"] = { - "quota": quota, - "period": period, - "cores": cores, - } - except (FileNotFoundError, PermissionError, ValueError) as e: - LOGGER.debug(f"Error reading container CPU stats: {e}") - - return resources if resources else None + allocated_cores = _get_cgroup_allocated_cores() + if allocated_cores is None or allocated_cores <= 0: + return 0.0 + + current_time = time.time() + + if _last_cgroup_cpu_sample is None: + # First call - store reading, return None (like psutil's first call) + _last_cgroup_cpu_sample = (current_usage, current_time) + return 0.0 + + last_usage, last_time = _last_cgroup_cpu_sample + _last_cgroup_cpu_sample = (current_usage, current_time) + + delta_time = current_time - last_time + if delta_time <= 0: + return 0.0 + + delta_usage_usec = current_usage - last_usage + # percent = (usage_usec / (time_sec * 1_000_000 * cores)) * 100 + percent = ( + delta_usage_usec / (delta_time * 1_000_000 * allocated_cores) + ) * 100 + + return min(100.0, max(0.0, percent)) + + except (FileNotFoundError, PermissionError, ValueError, IndexError): + # Error reading cgroup CPU stats — fall back to psutil + return None diff --git a/packages/openapi/api.yaml b/packages/openapi/api.yaml index 2f21c895ae1..5644c36b801 100644 --- a/packages/openapi/api.yaml +++ b/packages/openapi/api.yaml @@ -5298,10 +5298,13 @@ paths: properties: cpu: properties: + has_cgroup_cpu_limit: + type: boolean percent: type: number required: - percent + - has_cgroup_cpu_limit type: object gpu: items: @@ -5343,7 +5346,7 @@ paths: type: integer free: type: integer - is_container: + has_cgroup_mem_limit: type: boolean percent: type: number @@ -5357,6 +5360,7 @@ paths: - percent - used - free + - has_cgroup_mem_limit type: object server: properties: diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index 73e353b4804..80d92f1974f 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -4,5278 +4,5136 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI chat */ - requestBody: { - content: { - "application/json": components["schemas"]["ChatRequest"]; - }; - }; - responses: never; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/inline_completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI inline completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiInlineCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI inline completion for code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/invoke_tool": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for tool invocation */ - requestBody: { - content: { - "application/json": components["schemas"]["InvokeAiToolRequest"]; - }; - }; - responses: { - /** @description Tool invocation result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["InvokeAiToolResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Refresh MCP server configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPRefreshResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get MCP server status */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPStatusResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/clear": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ClearCacheRequest"]; - }; - }; - responses: { - /** @description Clear all caches */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["GetCacheInfoRequest"]; - }; - }; - responses: { - /** @description Get cache statistics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_datasource_connection": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; - }; - }; - responses: { - /** @description Broadcasts a datasource connection */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableRequest"]; - }; - }; - responses: { - /** @description Preview a SQL table */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table_list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListSQLTablesRequest"]; - }; - }; - responses: { - /** @description Preview a list of tables in an SQL schema */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/ipynb": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsIPYNBRequest"]; - }; - }; - responses: { - /** @description Export the notebook as IPYNB */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileOpenRequest"]; - }; - }; - responses: { - /** @description Open a file in the system editor */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileSearchRequest"]; - }; - }; - responses: { - /** @description Search for files and directories matching a query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileSearchResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/tutorial/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenTutorialRequest"]; - }; - }; - responses: { - /** @description Open a new tutorial */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MarimoFile"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/copy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CopyNotebookRequest"]; - }; - }; - responses: { - /** @description Copy notebook */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatCellsRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InvokeFunctionRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateNotebookRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/pdb/pm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DebugCellRequest"]; - }; - }; - responses: { - /** @description Run a post mortem on the most recent failed cell. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameNotebookRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteCellsRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_model_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateWidgetModelRequest"]; - }; - }; - responses: { - /** @description Set model value */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/takeover": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully closed existing sessions */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status?: string; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/add": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["AddPackageRequest"]; - }; - }; - responses: { - /** @description Install package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List installed packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListPackagesResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/remove": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RemovePackageRequest"]; - }; - }; - responses: { - /** @description Uninstall package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List dependency tree */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DependencyTreeResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSecretRequest"]; - }; - }; - responses: { - /** @description Create a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Delete a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ListSecretKeysRequest"]; - }; - }; - responses: { - /** @description List all secret keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListSecretKeysResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/sql/validate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ValidateSQLRequest"]; - }; - }; - responses: { - /** @description Validate an SQL query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status/connections": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the number of active websocket connections */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - active?: number; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - percent: number; - }; - gpu?: { - index: number; - memory: { - free: number; - percent: number; - total: number; - used: number; - }; - name: string; - }[]; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - is_container?: boolean; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI chat */ + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: never; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/inline_completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI inline completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiInlineCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI inline completion for code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/invoke_tool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for tool invocation */ + requestBody: { + content: { + "application/json": components["schemas"]["InvokeAiToolRequest"]; + }; + }; + responses: { + /** @description Tool invocation result */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InvokeAiToolResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Refresh MCP server configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPRefreshResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get MCP server status */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPStatusResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/clear": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ClearCacheRequest"]; + }; + }; + responses: { + /** @description Clear all caches */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["GetCacheInfoRequest"]; + }; + }; + responses: { + /** @description Get cache statistics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_datasource_connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; + }; + }; + responses: { + /** @description Broadcasts a datasource connection */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableRequest"]; + }; + }; + responses: { + /** @description Preview a SQL table */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table_list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListSQLTablesRequest"]; + }; + }; + responses: { + /** @description Preview a list of tables in an SQL schema */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/ipynb": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsIPYNBRequest"]; + }; + }; + responses: { + /** @description Export the notebook as IPYNB */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileOpenRequest"]; + }; + }; + responses: { + /** @description Open a file in the system editor */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileSearchRequest"]; + }; + }; + responses: { + /** @description Search for files and directories matching a query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileSearchResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/tutorial/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenTutorialRequest"]; + }; + }; + responses: { + /** @description Open a new tutorial */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MarimoFile"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/copy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CopyNotebookRequest"]; + }; + }; + responses: { + /** @description Copy notebook */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatCellsRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InvokeFunctionRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateNotebookRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/pdb/pm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DebugCellRequest"]; + }; + }; + responses: { + /** @description Run a post mortem on the most recent failed cell. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameNotebookRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteCellsRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_model_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateWidgetModelRequest"]; + }; + }; + responses: { + /** @description Set model value */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/takeover": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully closed existing sessions */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status?: string; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/add": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPackageRequest"]; + }; + }; + responses: { + /** @description Install package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List installed packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListPackagesResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/remove": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePackageRequest"]; + }; + }; + responses: { + /** @description Uninstall package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/tree": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List dependency tree */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DependencyTreeResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateSecretRequest"]; + }; + }; + responses: { + /** @description Create a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Delete a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ListSecretKeysRequest"]; + }; + }; + responses: { + /** @description List all secret keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListSecretKeysResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/sql/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ValidateSQLRequest"]; + }; + }; + responses: { + /** @description Validate an SQL query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status/connections": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the number of active websocket connections */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + active?: number; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + has_cgroup_cpu_limit: boolean; + percent: number; + }; + gpu?: { + index: number; + memory: { + free: number; + percent: number; + total: number; + used: number; + }; + name: string; + }[]; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + has_cgroup_mem_limit: boolean; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AddPackageRequest - * @description This can be a remove package or a local package. - * - * Supported formats: - * - * httpx - * httpx==0.27.0 - * httpx>=0.27.0 - * git+https://github.com/encode/httpx - * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz - * /example/foo-0.1.0-py3-none-any.whl - */ - AddPackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - /** @default false */ - upgrade?: boolean | null; - }; - /** AiCompletionContext */ - AiCompletionContext: { - /** @default */ - plainText?: string; - /** @default [] */ - schema?: components["schemas"]["SchemaTable"][]; - /** @default [] */ - variables?: (string | components["schemas"]["VariableContext"])[]; - }; - /** AiCompletionRequest */ - AiCompletionRequest: { - code: string; - /** @default null */ - context?: null | components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - /** @default [] */ - messages?: components["schemas"]["ChatMessage"][]; - prompt: string; - /** @default null */ - selectedText?: string | null; - }; - /** - * AiConfig - * @description Configuration options for AI. - * - * **Keys.** - * - * - `rules`: custom rules to include in all AI completion prompts - * - `max_tokens`: the maximum number of tokens to use in AI completions - * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` - * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions - * - `models`: the models to use for AI completions - * - `open_ai`: the OpenAI config - * - `anthropic`: the Anthropic config - * - `google`: the Google AI config - * - `bedrock`: the Bedrock config - * - `azure`: the Azure config - * - `ollama`: the Ollama config - * - `github`: the GitHub config - * - `openrouter`: the OpenRouter config - * - `wandb`: the Weights & Biases config - * - `open_ai_compatible`: the OpenAI-compatible config - */ - AiConfig: { - anthropic?: components["schemas"]["AnthropicConfig"]; - azure?: components["schemas"]["OpenAiConfig"]; - bedrock?: components["schemas"]["BedrockConfig"]; - github?: components["schemas"]["GitHubConfig"]; - google?: components["schemas"]["GoogleAiConfig"]; - inline_tooltip?: boolean; - max_tokens?: number; - /** @enum {unknown} */ - mode?: "agent" | "ask" | "manual"; - models?: components["schemas"]["AiModelConfig"]; - ollama?: components["schemas"]["OpenAiConfig"]; - open_ai?: components["schemas"]["OpenAiConfig"]; - open_ai_compatible?: components["schemas"]["OpenAiConfig"]; - openrouter?: components["schemas"]["OpenAiConfig"]; - rules?: string; - wandb?: components["schemas"]["OpenAiConfig"]; - }; - /** AiInlineCompletionRequest */ - AiInlineCompletionRequest: { - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - prefix: string; - suffix: string; - }; - /** - * AiModelConfig - * @description Configuration options for an AI model. - * - * **Keys.** - * - * - `chat_model`: the model to use for chat completions - * - `edit_model`: the model to use for edit completions - * - `autocomplete_model`: the model to use for code completion/autocomplete - * - `displayed_models`: a list of models to display in the UI - * - `custom_models`: a list of custom models to use that are not from the default list - */ - AiModelConfig: { - autocomplete_model?: string; - chat_model?: string; - custom_models: string[]; - displayed_models: string[]; - edit_model?: string; - }; - /** AlertNotification */ - AlertNotification: { - description: string; - /** @enum {unknown} */ - op: "alert"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** - * AnthropicConfig - * @description Configuration options for Anthropic. - * - * **Keys.** - * - * - `api_key`: the Anthropic API key - */ - AnthropicConfig: { - api_key?: string; - }; - /** BannerNotification */ - BannerNotification: { - /** @default null */ - action?: "restart" | null; - description: string; - /** @enum {unknown} */ - op: "banner"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** BaseResponse */ - BaseResponse: { - success: boolean; - }; - /** - * BasedpyrightServerConfig - * @description Configuration options for basedpyright Language Server. - * - * basedpyright handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - BasedpyrightServerConfig: { - enabled?: boolean; - }; - /** - * BedrockConfig - * @description Configuration options for Bedrock. - * - * **Keys.** - * - * - `profile_name`: the AWS profile to use - * - `region_name`: the AWS region to use - * - `aws_access_key_id`: the AWS access key ID - * - `aws_secret_access_key`: the AWS secret access key - */ - BedrockConfig: { - aws_access_key_id?: string; - aws_secret_access_key?: string; - profile_name?: string; - region_name?: string; - }; - /** - * CacheClearedNotification - * @description Result of clearing cache. - */ - CacheClearedNotification: { - bytes_freed: number; - /** @enum {unknown} */ - op: "cache-cleared"; - }; - /** - * CacheInfoNotification - * @description Cache statistics information. - */ - CacheInfoNotification: { - disk_to_free: number; - disk_total: number; - hits: number; - misses: number; - /** @enum {unknown} */ - op: "cache-info"; - time: number; - }; - /** - * CellChannel - * @description The channel of a cell's output. - * @enum {unknown} - */ - CellChannel: - | "marimo-error" - | "media" - | "output" - | "pdb" - | "stderr" - | "stdin" - | "stdout"; - /** - * CellConfig - * @description Internal representation of a cell's configuration. - * This is not part of the public API. - */ - CellConfig: { - /** @default null */ - column?: number | null; - /** @default false */ - disabled?: boolean; - /** @default false */ - hide_code?: boolean; - }; - /** - * CellNotification - * @description Op to transition a cell. - * - * A CellNotification's data has some optional fields: - * - * output - a CellOutput - * console - a CellOutput (console msg to append), or a list of - * CellOutputs - * status - execution status - * stale_inputs - whether the cell has stale inputs (variables, modules, ...) - * run_id - the run associated with this cell. - * serialization - the serialization status of the cell - * - * Omitting a field means that its value should be unchanged! - * - * And one required field: - * - * cell_id - the cell id - */ - CellNotification: { - cell_id: string; - /** @default null */ - console?: - | components["schemas"]["CellOutput"][] - | null - | components["schemas"]["CellOutput"]; - /** @enum {unknown} */ - op: "cell-op"; - /** @default null */ - output?: null | components["schemas"]["CellOutput"]; - /** @default null */ - run_id?: string | null; - /** @default null */ - serialization?: string | null; - /** @default null */ - stale_inputs?: boolean | null; - /** @default null */ - status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; - timestamp?: number; - }; - /** CellOutput */ - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: - | string - | ( - | components["schemas"]["SetupRootError"] - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["ImportStarError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["MarimoInternalError"] - | components["schemas"]["MarimoSQLError"] - | components["schemas"]["UnknownError"] - )[] - | Record; - /** @enum {unknown} */ - mimetype: - | "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.vegalite.v5+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/plain" - | "video/mp4" - | "video/mpeg"; - timestamp?: number; - }; - /** ChatAttachment */ - ChatAttachment: { - /** @default null */ - content_type?: string | null; - /** @default attachment */ - name?: string; - url: string; - }; - /** - * ChatMessage - * @description A message in a chat. - */ - ChatMessage: { - /** @default null */ - attachments?: components["schemas"]["ChatAttachment"][] | null; - content: unknown; - /** @default null */ - parts?: Record[] | null; - /** @enum {unknown} */ - role: "assistant" | "system" | "user"; - }; - /** ChatRequest */ - ChatRequest: { - context: components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - messages: components["schemas"]["ChatMessage"][]; - /** @default null */ - model?: string | null; - /** @default null */ - tools?: components["schemas"]["ToolDefinition"][] | null; - /** @default null */ - variables?: (string | components["schemas"]["VariableContext"])[] | null; - }; - /** - * ClearCacheCommand - * @description Clear all cached data. - * - * Clears all cache contexts, freeing memory and disk space. - * Affects all cells using the @cache decorator. - */ - ClearCacheCommand: { - /** @enum {unknown} */ - type: "clear-cache"; - }; - /** ClearCacheRequest */ - ClearCacheRequest: Record; - /** - * CodeCompletionCommand - * @description Request code completion suggestions. - * - * Sent when the user requests autocomplete. Provides code context up to - * the cursor position for the language server. - * - * Attributes: - * id: Unique identifier for this request. - * document: Source code up to the cursor position. - * cell_id: Cell where completion is requested. - */ - CodeCompletionCommand: { - cellId: string; - document: string; - id: string; - /** @enum {unknown} */ - type: "code-completion"; - }; - /** CodeCompletionRequest */ - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - /** - * ColumnStats - * @description Represents stats for a column in a data table. - */ - ColumnStats: { - /** @default null */ - false?: number | null; - /** @default null */ - max?: unknown | null; - /** @default null */ - mean?: unknown | null; - /** @default null */ - median?: unknown | null; - /** @default null */ - min?: unknown | null; - /** @default null */ - nulls?: number | null; - /** @default null */ - p25?: unknown | null; - /** @default null */ - p5?: unknown | null; - /** @default null */ - p75?: unknown | null; - /** @default null */ - p95?: unknown | null; - /** @default null */ - std?: unknown | null; - /** @default null */ - total?: number | null; - /** @default null */ - true?: number | null; - /** @default null */ - unique?: number | null; - }; - /** - * CompletedRunNotification - * @description Written on run completion (of submitted cells and their descendants. - */ - CompletedRunNotification: { - /** @enum {unknown} */ - op: "completed-run"; - }; - /** - * CompletionConfig - * @description Configuration for code completion. - * - * A dict with key/value pairs configuring code completion in the marimo - * editor. - * - * **Keys.** - * - * - `activate_on_typing`: if `False`, completion won't activate - * until the completion hotkey is entered - * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing - * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` - * - `codeium_api_key`: the Codeium API key - */ - CompletionConfig: { - activate_on_typing: boolean; - api_key?: string | null; - base_url?: string | null; - codeium_api_key?: string | null; - copilot: boolean | ("codeium" | "custom" | "github"); - model?: string | null; - signature_hint_on_typing: boolean; - }; - /** CompletionOption */ - CompletionOption: { - completion_info: string | null; - name: string; - type: string; - }; - /** - * CompletionResultNotification - * @description Code completion result. - */ - CompletionResultNotification: { - completion_id: string; - /** @enum {unknown} */ - op: "completion-result"; - options: components["schemas"]["CompletionOption"][]; - prefix_length: number; - }; - /** CopyNotebookRequest */ - CopyNotebookRequest: { - destination: string; - source: string; - }; - /** - * CreateNotebookCommand - * @description Instantiate and initialize a notebook. - * - * Sent when a notebook is first loaded. Contains all cells and initial UI element values. - * - * Attributes: - * execution_requests: ExecuteCellCommand for each notebook cell. - * set_ui_element_value_request: Initial UI element values. - * auto_run: Whether to automatically execute cells on instantiation. - * request: HTTP request context if available. - */ - CreateNotebookCommand: { - autoRun: boolean; - executionRequests: components["schemas"]["ExecuteCellCommand"][]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; - /** @enum {unknown} */ - type: "create-notebook"; - }; - /** CreateSecretRequest */ - CreateSecretRequest: { - key: string; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - value: string; - }; - /** CycleError */ - CycleError: { - edges_with_vars: [string, string[], string][]; - /** @enum {unknown} */ - type: "cycle"; - }; - /** - * DataColumnPreviewNotification - * @description Preview of a column in a dataset. - */ - DataColumnPreviewNotification: { - /** @default null */ - chart_code?: string | null; - /** @default null */ - chart_spec?: string | null; - column_name: string; - /** @default null */ - error?: string | null; - /** @default null */ - missing_packages?: string[] | null; - /** @enum {unknown} */ - op: "data-column-preview"; - /** @default null */ - stats?: null | components["schemas"]["ColumnStats"]; - table_name: string; - }; - /** - * DataSourceConnection - * @description Represents a data source connection. - * - * Attributes: - * source (str): The source of the data source connection. E.g 'postgres'. - * dialect (str): The dialect of the data source connection. E.g 'postgresql'. - * name (str): The name of the data source connection. E.g 'engine'. - * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. - * databases (List[Database]): The databases in the data source connection. - * default_database (Optional[str]): The default database in the data source connection. - * default_schema (Optional[str]): The default schema in the data source connection. - */ - DataSourceConnection: { - databases: components["schemas"]["Database"][]; - /** @default null */ - default_database?: string | null; - /** @default null */ - default_schema?: string | null; - dialect: string; - display_name: string; - name: string; - source: string; - }; - /** DataSourceConnectionsNotification */ - DataSourceConnectionsNotification: { - connections: components["schemas"]["DataSourceConnection"][]; - /** @enum {unknown} */ - op: "data-source-connections"; - }; - /** - * DataTable - * @description Represents a data table. - * - * Attributes: - * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). - * source (str): Can be dialect, or source db name. - * name (str): Name of the data table. - * num_rows (Optional[int]): Total number of rows in the table, if known. - * num_columns (Optional[int]): Total number of columns in the table, if known. - * variable_name (Optional[VariableName]): Variable name referencing this table in code. - * columns (List[DataTableColumn]): List of column definitions and metadata. - * engine (Optional[VariableName]): Database engine or connection handler, if any. - * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. - * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. - * indexes (Optional[List[str]]): Column names used as indexes, if any. - */ - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - /** @default null */ - engine?: string | null; - /** @default null */ - indexes?: string[] | null; - name: string; - num_columns: number | null; - num_rows: number | null; - /** @default null */ - primary_keys?: string[] | null; - source: string; - /** @enum {unknown} */ - source_type: "catalog" | "connection" | "duckdb" | "local"; - /** - * @default table - * @enum {unknown} - */ - type?: "table" | "view"; - variable_name: string | null; - }; - /** - * DataTableColumn - * @description Represents a column in a data table. - * - * Attributes: - * name (str): The name of the column. - * type (DataType): The data type of the column. - * external_type (ExternalDataType): The raw data type of the column. - * sample_values (List[Any]): The sample values of the column. - */ - DataTableColumn: { - external_type: string; - name: string; - sample_values: unknown[]; - /** @enum {unknown} */ - type: - | "boolean" - | "date" - | "datetime" - | "integer" - | "number" - | "string" - | "time" - | "unknown"; - }; - /** - * Database - * @description Represents a collection of schemas. - * - * Attributes: - * name (str): The name of the database - * dialect (str): The dialect of the database - * schemas (List[Schema]): List of schemas in the database - * engine (Optional[VariableName]): Database engine or connection handler, if any. - */ - Database: { - dialect: string; - /** @default null */ - engine?: string | null; - name: string; - schemas: components["schemas"]["Schema"][]; - }; - /** - * DatasetsNotification - * @description List of datasets. - */ - DatasetsNotification: { - /** @default null */ - clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; - /** @enum {unknown} */ - op: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - /** - * DatasourcesConfig - * @description Configuration for datasources panel. - * - * **Keys.** - * - * - `auto_discover_schemas`: if `True`, include schemas in the datasource - * - `auto_discover_tables`: if `True`, include tables in the datasource - * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource - */ - DatasourcesConfig: { - auto_discover_columns?: boolean | "auto"; - auto_discover_schemas?: boolean | "auto"; - auto_discover_tables?: boolean | "auto"; - }; - /** - * DebugCellCommand - * @description Enter debugger mode for a cell. - * - * Starts the Python debugger (pdb) for the specified cell. - * - * Attributes: - * cell_id: Cell to debug. - * request: HTTP request context if available. - */ - DebugCellCommand: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "debug-cell"; - }; - /** DebugCellRequest */ - DebugCellRequest: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * DeleteCellCommand - * @description Delete a cell from the notebook. - * - * Removes cell from the dependency graph and cleans up its variables. - * Dependent cells may become stale. - * - * Attributes: - * cell_id: Cell to delete. - */ - DeleteCellCommand: { - cellId: string; - /** @enum {unknown} */ - type: "delete-cell"; - }; - /** DeleteCellRequest */ - DeleteCellRequest: { - cellId: string; - }; - /** DeleteSecretRequest */ - DeleteSecretRequest: { - key: string; - }; - /** DependencyTreeNode */ - DependencyTreeNode: { - dependencies: components["schemas"]["DependencyTreeNode"][]; - name: string; - tags: { - [key: string]: string; - }[]; - version: string | null; - }; - /** DependencyTreeResponse */ - DependencyTreeResponse: { - tree: null | components["schemas"]["DependencyTreeNode"]; - }; - /** - * DiagnosticsConfig - * @description Configuration options for diagnostics. - * - * **Keys.** - * - * - `enabled`: if `True`, diagnostics will be shown in the editor - * - `sql_linter`: if `True`, SQL cells will have linting enabled - */ - DiagnosticsConfig: { - enabled?: boolean; - sql_linter?: boolean; - }; - /** - * DisplayConfig - * @description Configuration for display. - * - * **Keys.** - * - * - `theme`: `"light"`, `"dark"`, or `"system"` - * - `code_editor_font_size`: font size for the code editor - * - `cell_output`: `"above"` or `"below"` - * - `dataframes`: `"rich"` or `"plain"` - * - `custom_css`: list of paths to custom CSS files - * - `default_table_page_size`: default number of rows to display in tables - * - `default_table_max_columns`: default maximum number of columns to display in tables - * - `reference_highlighting`: if `True`, highlight reactive variable references - * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") - */ - DisplayConfig: { - /** @enum {unknown} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - custom_css?: string[]; - /** @enum {unknown} */ - dataframes: "plain" | "rich"; - default_table_max_columns: number; - default_table_page_size: number; - /** @enum {unknown} */ - default_width: "columns" | "compact" | "full" | "medium" | "normal"; - locale?: string | null; - reference_highlighting?: boolean; - /** @enum {unknown} */ - theme: "dark" | "light" | "system"; - }; - /** - * ExecuteCellCommand - * @description Execute a single cell. - * - * Executes a cell with the provided code. Dependent cells may be - * re-executed based on the reactive execution mode. - * - * Attributes: - * cell_id: Cell to execute. - * code: Python code to execute. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellCommand: { - cellId: string; - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cell"; - }; - /** - * ExecuteCellsCommand - * @description Execute multiple cells in a batch. - * - * Executes multiple cells with their corresponding code. The kernel manages - * dependency tracking and reactive execution. - * - * Attributes: - * cell_ids: Cells to execute. - * codes: Python code for each cell. Must match length of cell_ids. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellsCommand: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cells"; - }; - /** ExecuteCellsRequest */ - ExecuteCellsRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteScratchpadCommand - * @description Execute code in the scratchpad. - * - * The scratchpad is a temporary execution environment that doesn't affect - * the notebook's cells or dependencies. Runs in an isolated cell with a copy - * of the global namespace, useful for experimentation. - * - * Attributes: - * code: Python code to execute. - * request: HTTP request context if available. - */ - ExecuteScratchpadCommand: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-scratchpad"; - }; - /** ExecuteScratchpadRequest */ - ExecuteScratchpadRequest: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteStaleCellsCommand - * @description Execute all stale cells. - * - * Cells become stale when their dependencies change but haven't been - * re-executed yet. Brings the notebook to a consistent state. - * - * Attributes: - * request: HTTP request context if available. - */ - ExecuteStaleCellsCommand: { - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-stale-cells"; - }; - /** ExportAsHTMLRequest */ - ExportAsHTMLRequest: { - /** @default null */ - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - /** ExportAsIPYNBRequest */ - ExportAsIPYNBRequest: { - download: boolean; - }; - /** ExportAsMarkdownRequest */ - ExportAsMarkdownRequest: { - download: boolean; - }; - /** ExportAsScriptRequest */ - ExportAsScriptRequest: { - download: boolean; - }; - /** FileCreateRequest */ - FileCreateRequest: { - /** @default null */ - contents?: string | null; - name: string; - path: string; - /** @enum {unknown} */ - type: "directory" | "file"; - }; - /** FileCreateResponse */ - FileCreateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDeleteRequest */ - FileDeleteRequest: { - path: string; - }; - /** FileDeleteResponse */ - FileDeleteResponse: { - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDetailsRequest */ - FileDetailsRequest: { - path: string; - }; - /** FileDetailsResponse */ - FileDetailsResponse: { - /** @default null */ - contents?: string | null; - file: components["schemas"]["FileInfo"]; - /** @default null */ - mimeType?: string | null; - }; - /** FileInfo */ - FileInfo: { - /** @default [] */ - children?: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - }; - /** FileListRequest */ - FileListRequest: { - /** @default null */ - path?: string | null; - }; - /** FileListResponse */ - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - /** FileMoveRequest */ - FileMoveRequest: { - newPath: string; - path: string; - }; - /** FileMoveResponse */ - FileMoveResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileOpenRequest */ - FileOpenRequest: { - /** @default null */ - lineNumber?: number | null; - path: string; - }; - /** FileSearchRequest */ - FileSearchRequest: { - /** @default 3 */ - depth?: number; - /** @default true */ - includeDirectories?: boolean; - /** @default true */ - includeFiles?: boolean; - /** @default 100 */ - limit?: number; - /** @default null */ - path?: string | null; - query: string; - }; - /** FileSearchResponse */ - FileSearchResponse: { - files: components["schemas"]["FileInfo"][]; - query: string; - totalFound: number; - }; - /** FileUpdateRequest */ - FileUpdateRequest: { - contents: string; - path: string; - }; - /** FileUpdateResponse */ - FileUpdateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FocusCellNotification */ - FocusCellNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "focus-cell"; - }; - /** FormatCellsRequest */ - FormatCellsRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - /** FormatResponse */ - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - /** - * FormattingConfig - * @description Configuration for code formatting. - * - * **Keys.** - * - * - `line_length`: max line length - */ - FormattingConfig: { - line_length: number; - }; - /** - * FunctionCallResultNotification - * @description Result of calling a function. - */ - FunctionCallResultNotification: { - function_call_id: string; - /** @enum {unknown} */ - op: "function-call-result"; - return_value: unknown; - status: components["schemas"]["HumanReadableStatus"]; - }; - /** - * GetCacheInfoCommand - * @description Retrieve cache statistics. - * - * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). - */ - GetCacheInfoCommand: { - /** @enum {unknown} */ - type: "get-cache-info"; - }; - /** GetCacheInfoRequest */ - GetCacheInfoRequest: Record; - /** - * GitHubConfig - * @description Configuration options for GitHub. - * - * **Keys.** - * - * - `api_key`: the GitHub API token - * - `base_url`: the base URL for the API - * - `copilot_settings`: configuration settings for GitHub Copilot LSP. - * Supports settings like `http` (proxy configuration), `telemetry`, - * and `github-enterprise` (enterprise URI). - */ - GitHubConfig: { - api_key?: string; - base_url?: string; - copilot_settings?: Record; - }; - /** - * GoogleAiConfig - * @description Configuration options for Google AI. - * - * **Keys.** - * - * - `api_key`: the Google AI API key - */ - GoogleAiConfig: { - api_key?: string; - }; - /** - * HTTPRequest - * @description Serializable HTTP request representation. - * - * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe - * subset of data. Excludes session and auth to prevent exposing sensitive data. - * - * Attributes: - * url: Serialized URL with path, port, scheme, netloc, query, hostname. - * base_url: Serialized base URL. - * headers: Request headers (marimo-specific headers excluded). - * query_params: Query parameters mapped to lists of values. - * path_params: Path parameters from the URL route. - * cookies: Request cookies. - * meta: User-defined storage for custom data. - * user: User info from authentication middleware (e.g., is_authenticated, username). - */ - HTTPRequest: { - base_url: Record; - cookies: { - [key: string]: string; - }; - headers: { - [key: string]: string; - }; - meta: Record; - path_params: Record; - query_params: { - [key: string]: string[]; - }; - url: Record; - user: unknown; - }; - /** - * HumanReadableStatus - * @description Human-readable status. - */ - HumanReadableStatus: { - /** @enum {unknown} */ - code: "error" | "ok"; - /** @default null */ - message?: string | null; - /** @default null */ - title?: string | null; - }; - /** ImportStarError */ - ImportStarError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "import-star"; - }; - /** - * InstallPackagesCommand - * @description Install Python packages. - * - * Installs missing packages using the specified package manager. Triggered - * automatically on import errors or manually by the user. - * - * Attributes: - * manager: Package manager to use ('pip', 'conda', 'uv', etc.). - * versions: Package names mapped to version specifiers. Empty version - * means install latest. - */ - InstallPackagesCommand: { - manager: string; - /** @enum {unknown} */ - type: "install-packages"; - versions: { - [key: string]: string; - }; - }; - /** InstallPackagesRequest */ - InstallPackagesRequest: { - manager: string; - versions: { - [key: string]: string; - }; - }; - /** InstallingPackageAlertNotification */ - InstallingPackageAlertNotification: { - /** @default null */ - log_status?: ("append" | "done" | "start") | null; - /** @default null */ - logs?: { - [key: string]: string; - } | null; - /** @enum {unknown} */ - op: "installing-package-alert"; - packages: { - [key: string]: "failed" | "installed" | "installing" | "queued"; - }; - }; - /** InstantiateNotebookRequest */ - InstantiateNotebookRequest: { - /** @default true */ - autoRun?: boolean; - objectIds: string[]; - values: unknown[]; - }; - /** - * InterruptedNotification - * @description Written when the kernel is interrupted by the user. - */ - InterruptedNotification: { - /** @enum {unknown} */ - op: "interrupted"; - }; - /** InvokeAiToolRequest */ - InvokeAiToolRequest: { - arguments: Record; - toolName: string; - }; - /** InvokeAiToolResponse */ - InvokeAiToolResponse: { - /** @default null */ - error?: string | null; - result: unknown; - success: boolean; - toolName: string; - }; - /** - * InvokeFunctionCommand - * @description Invoke a function from a UI element. - * - * Called when a UI element needs to invoke a Python function. - * - * Attributes: - * function_call_id: Unique identifier for this call. - * namespace: Namespace where the function is registered. - * function_name: Function to invoke. - * args: Keyword arguments for the function. - */ - InvokeFunctionCommand: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - /** @enum {unknown} */ - type: "invoke-function"; - }; - /** InvokeFunctionRequest */ - InvokeFunctionRequest: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - }; - /** KernelCapabilitiesNotification */ - KernelCapabilitiesNotification: { - /** @default false */ - basedpyright?: boolean; - /** @default false */ - pylsp?: boolean; - /** @default false */ - terminal?: boolean; - /** @default false */ - ty?: boolean; - }; - /** - * KernelReadyNotification - * @description Kernel is ready for execution. - */ - KernelReadyNotification: { - app_config: components["schemas"]["_AppConfig"]; - capabilities: components["schemas"]["KernelCapabilitiesNotification"]; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code: { - [key: string]: string; - } | null; - last_execution_time: { - [key: string]: number; - } | null; - layout: components["schemas"]["LayoutConfig"] | null; - names: string[]; - /** @enum {unknown} */ - op: "kernel-ready"; - resumed: boolean; - ui_values: Record | null; - }; - /** - * KeymapConfig - * @description Configuration for keymaps. - * - * **Keys.** - * - * - `preset`: one of `"default"` or `"vim"` - * - `overrides`: a dict of keymap actions to their keymap override - * - `vimrc`: path to a vimrc file to load keymaps from - * - `destructive_delete`: if `True`, allows deleting cells with content. - */ - KeymapConfig: { - destructive_delete?: boolean; - overrides?: { - [key: string]: string; - }; - /** @enum {unknown} */ - preset: "default" | "vim"; - vimrc?: string | null; - }; - /** KnownUnions */ - KnownUnions: { - command: - | components["schemas"]["CreateNotebookCommand"] - | components["schemas"]["RenameNotebookCommand"] - | components["schemas"]["ExecuteCellsCommand"] - | components["schemas"]["ExecuteScratchpadCommand"] - | components["schemas"]["ExecuteStaleCellsCommand"] - | components["schemas"]["DebugCellCommand"] - | components["schemas"]["DeleteCellCommand"] - | components["schemas"]["SyncGraphCommand"] - | components["schemas"]["UpdateCellConfigCommand"] - | components["schemas"]["InstallPackagesCommand"] - | components["schemas"]["UpdateUIElementCommand"] - | components["schemas"]["UpdateWidgetModelCommand"] - | components["schemas"]["InvokeFunctionCommand"] - | components["schemas"]["UpdateUserConfigCommand"] - | components["schemas"]["PreviewDatasetColumnCommand"] - | components["schemas"]["PreviewSQLTableCommand"] - | components["schemas"]["ListSQLTablesCommand"] - | components["schemas"]["ValidateSQLCommand"] - | components["schemas"]["ListDataSourceConnectionCommand"] - | components["schemas"]["ListSecretKeysCommand"] - | components["schemas"]["RefreshSecretsCommand"] - | components["schemas"]["ClearCacheCommand"] - | components["schemas"]["GetCacheInfoCommand"] - | components["schemas"]["StopKernelCommand"]; - /** @enum {unknown} */ - data_type: - | "boolean" - | "date" - | "datetime" - | "integer" - | "number" - | "string" - | "time" - | "unknown"; - error: - | components["schemas"]["SetupRootError"] - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["ImportStarError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["MarimoInternalError"] - | components["schemas"]["MarimoSQLError"] - | components["schemas"]["UnknownError"]; - notification: - | components["schemas"]["CellNotification"] - | components["schemas"]["FunctionCallResultNotification"] - | components["schemas"]["UIElementMessageNotification"] - | components["schemas"]["RemoveUIElementsNotification"] - | components["schemas"]["ReloadNotification"] - | components["schemas"]["ReconnectedNotification"] - | components["schemas"]["InterruptedNotification"] - | components["schemas"]["CompletedRunNotification"] - | components["schemas"]["KernelReadyNotification"] - | components["schemas"]["CompletionResultNotification"] - | components["schemas"]["AlertNotification"] - | components["schemas"]["BannerNotification"] - | components["schemas"]["MissingPackageAlertNotification"] - | components["schemas"]["InstallingPackageAlertNotification"] - | components["schemas"]["StartupLogsNotification"] - | components["schemas"]["VariablesNotification"] - | components["schemas"]["VariableValuesNotification"] - | components["schemas"]["QueryParamsSetNotification"] - | components["schemas"]["QueryParamsAppendNotification"] - | components["schemas"]["QueryParamsDeleteNotification"] - | components["schemas"]["QueryParamsClearNotification"] - | components["schemas"]["DatasetsNotification"] - | components["schemas"]["DataColumnPreviewNotification"] - | components["schemas"]["SQLTablePreviewNotification"] - | components["schemas"]["SQLTableListPreviewNotification"] - | components["schemas"]["DataSourceConnectionsNotification"] - | components["schemas"]["ValidateSQLResultNotification"] - | components["schemas"]["SecretKeysResultNotification"] - | components["schemas"]["CacheClearedNotification"] - | components["schemas"]["CacheInfoNotification"] - | components["schemas"]["FocusCellNotification"] - | components["schemas"]["UpdateCellCodesNotification"] - | components["schemas"]["UpdateCellIdsNotification"]; - }; - /** - * LanguageServersConfig - * @description Configuration options for language servers. - * - * **Keys.** - * - * - `pylsp`: the pylsp config - */ - LanguageServersConfig: { - basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; - pylsp?: components["schemas"]["PythonLanguageServerConfig"]; - ty?: components["schemas"]["TyLanguageServerConfig"]; - }; - /** LayoutConfig */ - LayoutConfig: { - data: Record; - type: string; - }; - /** - * ListDataSourceConnectionCommand - * @description List data source schemas. - * - * Retrieves available schemas for a data source engine. - * - * Attributes: - * engine: Data source engine identifier. - */ - ListDataSourceConnectionCommand: { - engine: string; - /** @enum {unknown} */ - type: "list-data-source-connection"; - }; - /** ListDataSourceConnectionRequest */ - ListDataSourceConnectionRequest: { - engine: string; - }; - /** ListPackagesResponse */ - ListPackagesResponse: { - packages: components["schemas"]["PackageDescription"][]; - }; - /** - * ListSQLTablesCommand - * @description List tables in an SQL schema. - * - * Retrieves names of all tables and views in a schema. Used by the SQL - * editor for table selection. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database to query. - * schema: Schema to list tables from. - */ - ListSQLTablesCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - /** @enum {unknown} */ - type: "list-sql-tables"; - }; - /** ListSQLTablesRequest */ - ListSQLTablesRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - }; - /** - * ListSecretKeysCommand - * @description List available secret keys. - * - * Retrieves secret names without exposing values. - * - * Attributes: - * request_id: Unique identifier for this request. - */ - ListSecretKeysCommand: { - requestId: string; - /** @enum {unknown} */ - type: "list-secret-keys"; - }; - /** ListSecretKeysRequest */ - ListSecretKeysRequest: { - requestId: string; - }; - /** ListSecretKeysResponse */ - ListSecretKeysResponse: { - keys: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** - * MCPConfig - * @description Configuration for MCP servers - * - * Note: the field name `mcpServers` is camelCased to match MCP server - * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) - */ - MCPConfig: { - mcpServers: { - [key: string]: Record; - }; - presets?: ("context7" | "marimo")[]; - }; - /** MCPRefreshResponse */ - MCPRefreshResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: boolean; - }; - success: boolean; - }; - /** MCPStatusResponse */ - MCPStatusResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: "connected" | "disconnected" | "failed" | "pending"; - }; - /** @enum {unknown} */ - status: "error" | "ok" | "partial"; - }; - /** MarimoAncestorPreventedError */ - MarimoAncestorPreventedError: { - blamed_cell: string | null; - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-prevented"; - }; - /** MarimoAncestorStoppedError */ - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-stopped"; - }; - /** - * MarimoConfig - * @description Configuration for the marimo editor - */ - MarimoConfig: { - ai?: components["schemas"]["AiConfig"]; - completion: components["schemas"]["CompletionConfig"]; - datasources?: components["schemas"]["DatasourcesConfig"]; - diagnostics?: components["schemas"]["DiagnosticsConfig"]; - display: components["schemas"]["DisplayConfig"]; - experimental?: Record; - formatting: components["schemas"]["FormattingConfig"]; - keymap: components["schemas"]["KeymapConfig"]; - language_servers?: components["schemas"]["LanguageServersConfig"]; - mcp?: components["schemas"]["MCPConfig"]; - package_management: components["schemas"]["PackageManagementConfig"]; - runtime: components["schemas"]["RuntimeConfig"]; - save: components["schemas"]["SaveConfig"]; - server: components["schemas"]["ServerConfig"]; - sharing?: components["schemas"]["SharingConfig"]; - snippets?: components["schemas"]["SnippetsConfig"]; - }; - /** MarimoExceptionRaisedError */ - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell: string | null; - /** @enum {unknown} */ - type: "exception"; - }; - /** MarimoFile */ - MarimoFile: { - /** @default null */ - initializationId?: string | null; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - /** @default null */ - sessionId?: string | null; - }; - /** - * 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. - */ - MarimoInternalError: { - error_id: string; - /** @default */ - msg?: string; - /** @enum {unknown} */ - type: "internal"; - }; - /** MarimoInterruptionError */ - MarimoInterruptionError: { - /** @enum {unknown} */ - type: "interruption"; - }; - /** - * MarimoSQLError - * @description SQL-specific error with enhanced metadata for debugging. - */ - MarimoSQLError: { - /** @default null */ - hint?: string | null; - msg: string; - /** @default 0 */ - node_col_offset?: number; - /** @default 0 */ - node_lineno?: number; - /** @default null */ - sql_col?: number | null; - /** @default null */ - sql_line?: number | null; - sql_statement: string; - /** @enum {unknown} */ - type: "sql-error"; - }; - /** MarimoStrictExecutionError */ - MarimoStrictExecutionError: { - blamed_cell: string | null; - msg: string; - ref: string; - /** @enum {unknown} */ - type: "strict-exception"; - }; - /** MarimoSyntaxError */ - MarimoSyntaxError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "syntax"; - }; - /** MissingPackageAlertNotification */ - MissingPackageAlertNotification: { - isolated: boolean; - /** @enum {unknown} */ - op: "missing-package-alert"; - packages: string[]; - }; - /** - * ModelMessage - * @description Widget model state update message. - * - * State changes for anywidget models, including state dict and binary buffer paths. - * - * Attributes: - * state: Model state updates. - * buffer_paths: Paths within state dict pointing to binary buffers. - */ - ModelMessage: { - bufferPaths: (string | number)[][]; - state: Record; - }; - /** MultipleDefinitionError */ - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {unknown} */ - type: "multiple-defs"; - }; - /** - * OpenAiConfig - * @description Configuration options for OpenAI or OpenAI-compatible services. - * - * **Keys.** - * - * - `api_key`: the OpenAI API key - * - `base_url`: the base URL for the API - * - `project`: the project ID for the OpenAI API - * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios - * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client - * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server - * - `extra_headers`: extra headers to be passed to the OpenAI client - */ - OpenAiConfig: { - api_key?: string; - base_url?: string; - ca_bundle_path?: string; - client_pem?: string; - extra_headers?: { - [key: string]: string; - }; - model?: string; - project?: string; - ssl_verify?: boolean; - }; - /** OpenTutorialRequest */ - OpenTutorialRequest: { - tutorialId: - | ( - | "dataflow" - | "fileformat" - | "for-jupyter-users" - | "intro" - | "layout" - | "markdown" - | "plots" - | "sql" - | "ui" - ) - | "markdown-format"; - }; - /** PackageDescription */ - PackageDescription: { - name: string; - version: string; - }; - /** - * PackageManagementConfig - * @description Configuration options for package management. - * - * **Keys.** - * - * - `manager`: the package manager to use - */ - PackageManagementConfig: { - /** @enum {unknown} */ - manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; - }; - /** PackageOperationResponse */ - PackageOperationResponse: { - /** @default null */ - error?: string | null; - success: boolean; - }; - /** - * PreviewDatasetColumnCommand - * @description Preview a dataset column. - * - * Retrieves and displays data from a single column (dataframe or SQL table). - * Used by the data explorer UI. - * - * Attributes: - * source_type: Data source type ('dataframe', 'sql', etc.). - * source: Source identifier (connection string or variable name). - * table_name: Table or dataframe variable name. - * column_name: Column to preview. - * fully_qualified_table_name: Full database.schema.table name for SQL. - */ - PreviewDatasetColumnCommand: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - /** @enum {unknown} */ - type: "preview-dataset-column"; - }; - /** PreviewDatasetColumnRequest */ - PreviewDatasetColumnRequest: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - }; - /** - * PreviewSQLTableCommand - * @description Preview SQL table details. - * - * Retrieves metadata and sample data for a table. Used by the SQL editor - * and data explorer. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database containing the table. - * schema: Schema containing the table. - * table_name: Table to preview. - */ - PreviewSQLTableCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - /** @enum {unknown} */ - type: "preview-sql-table"; - }; - /** PreviewSQLTableRequest */ - PreviewSQLTableRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - }; - /** - * PythonLanguageServerConfig - * @description Configuration options for Python Language Server. - * - * pylsp handles completion, hover, go-to-definition, and diagnostics. - */ - PythonLanguageServerConfig: { - enable_flake8?: boolean; - enable_mypy?: boolean; - enable_pydocstyle?: boolean; - enable_pyflakes?: boolean; - enable_pylint?: boolean; - enable_ruff?: boolean; - enabled?: boolean; - }; - /** QueryParamsAppendNotification */ - QueryParamsAppendNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-append"; - value: string; - }; - /** QueryParamsClearNotification */ - QueryParamsClearNotification: { - /** @enum {unknown} */ - op: "query-params-clear"; - }; - /** QueryParamsDeleteNotification */ - QueryParamsDeleteNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-delete"; - value: string | null; - }; - /** - * QueryParamsSetNotification - * @description Set query parameters. - */ - QueryParamsSetNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-set"; - value: string | string[]; - }; - /** ReadCodeResponse */ - ReadCodeResponse: { - contents: string; - }; - /** RecentFilesResponse */ - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** ReconnectedNotification */ - ReconnectedNotification: { - /** @enum {unknown} */ - op: "reconnected"; - }; - /** - * RefreshSecretsCommand - * @description Refresh secrets from the secrets store. - * - * Reloads secrets from the provider without restarting the kernel. - */ - RefreshSecretsCommand: { - /** @enum {unknown} */ - type: "refresh-secrets"; - }; - /** RefreshSecretsRequest */ - RefreshSecretsRequest: Record; - /** ReloadNotification */ - ReloadNotification: { - /** @enum {unknown} */ - op: "reload"; - }; - /** RemovePackageRequest */ - RemovePackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - }; - /** - * RemoveUIElementsNotification - * @description Invalidate UI elements for a given cell. - */ - RemoveUIElementsNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "remove-ui-elements"; - }; - /** - * RenameNotebookCommand - * @description Rename or move the notebook file. - * - * Updates the notebook's filename in the kernel metadata. - * - * Attributes: - * filename: New filename or path for the notebook. - */ - RenameNotebookCommand: { - filename: string; - /** @enum {unknown} */ - type: "rename-notebook"; - }; - /** RenameNotebookRequest */ - RenameNotebookRequest: { - filename: string; - }; - /** RunningNotebooksResponse */ - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** - * RuntimeConfig - * @description Configuration for runtime. - * - * **Keys.** - * - * - `auto_instantiate`: if `False`, cells won't automatically - * run on startup. This only applies when editing a notebook, - * and not when running as an application. - * The default is `True`. - * - `auto_reload`: if `lazy`, cells importing modified modules will marked - * as stale; if `autorun`, affected cells will be automatically run. similar - * to IPython's %autoreload extension but with more code intelligence. - * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. - * execution. - * - `on_cell_change`: if `lazy`, cells will be marked stale when their - * ancestors run but won't autorun; if `autorun`, cells will automatically - * run when their ancestors run. - * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; - * if `strict` marimo will clone cell declarations by default, avoiding - * hidden potential state build up. - * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks - * affected cells as stale, `"autorun"` automatically runs affected cells. - * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger - * values may affect frontend performance - * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; - * larger values may affect frontend performance - * - `pythonpath`: a list of directories to add to the Python search path. - * Directories will be added to the head of sys.path. Similar to the - * `PYTHONPATH` environment variable, the directories will be included in - * where Python will look for imported modules. - * - `dotenv`: a list of paths to `.env` files to load. - * If the file does not exist, it will be silently ignored. - * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. - * - `default_sql_output`: the default output format for SQL queries. Can be one of: - * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. - * The default is `"auto"`. - * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: - * `html`, `markdown`, `ipynb`. - * The default is None. - */ - RuntimeConfig: { - auto_instantiate: boolean; - /** @enum {unknown} */ - auto_reload: "autorun" | "lazy" | "off"; - default_auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @enum {unknown} */ - default_sql_output: - | "auto" - | "lazy-polars" - | "native" - | "pandas" - | "polars"; - dotenv?: string[]; - /** @enum {unknown} */ - on_cell_change: "autorun" | "lazy"; - output_max_bytes: number; - pythonpath?: string[]; - reactive_tests: boolean; - std_stream_max_bytes: number; - /** @enum {unknown} */ - watcher_on_save: "autorun" | "lazy"; - }; - /** - * SQLMetadata - * @description Metadata for a SQL database. - */ - SQLMetadata: { - connection: string; - database: string; - schema: string; - /** @enum {unknown} */ - type: "sql-metadata"; - }; - /** - * SQLTableListPreviewNotification - * @description Preview of a list of tables in a schema. - */ - SQLTableListPreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-list-preview"; - request_id: string; - /** @default [] */ - tables?: components["schemas"]["DataTable"][]; - }; - /** - * SQLTablePreviewNotification - * @description Preview of a table in a SQL database. - */ - SQLTablePreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-preview"; - request_id: string; - table: null | components["schemas"]["DataTable"]; - }; - /** SaveAppConfigurationRequest */ - SaveAppConfigurationRequest: { - config: Record; - }; - /** - * SaveConfig - * @description Configuration for saving. - * - * **Keys.** - * - * - `autosave`: one of `"off"` or `"after_delay"` - * - `delay`: number of milliseconds to wait before autosaving - * - `format_on_save`: if `True`, format the code on save - */ - SaveConfig: { - /** @enum {unknown} */ - autosave: "after_delay" | "off"; - autosave_delay: number; - format_on_save: boolean; - }; - /** SaveNotebookRequest */ - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - /** @default null */ - layout?: Record | null; - names: string[]; - /** @default true */ - persist?: boolean; - }; - /** SaveUserConfigurationRequest */ - SaveUserConfigurationRequest: { - config: Record; - }; - /** Schema */ - Schema: { - name: string; - tables: components["schemas"]["DataTable"][]; - }; - /** SchemaColumn */ - SchemaColumn: { - name: string; - sampleValues: unknown[]; - type: string; - }; - /** SchemaTable */ - SchemaTable: { - columns: components["schemas"]["SchemaColumn"][]; - name: string; - }; - /** - * SecretKeysResultNotification - * @description Result of listing secret keys. - */ - SecretKeysResultNotification: { - /** @enum {unknown} */ - op: "secret-keys-result"; - request_id: string; - secrets: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** SecretKeysWithProvider */ - SecretKeysWithProvider: { - keys: string[]; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - }; - /** - * ServerConfig - * @description Configuration for the server. - * - * **Keys.** - * - * - `browser`: the web browser to use. `"default"` or a browser registered - * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) - * - `follow_symlink`: if true, the server will follow symlinks it finds - * inside its static assets directory. - */ - ServerConfig: { - browser: "default" | string; - follow_symlink: boolean; - }; - /** SetupRootError */ - SetupRootError: { - edges_with_vars: [string, string[], string][]; - /** @enum {unknown} */ - type: "setup-refs"; - }; - /** - * SharingConfig - * @description Configuration for sharing features. - * - * **Keys.** - * - * - `html`: if `False`, HTML sharing options will be hidden from the UI - * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI - */ - SharingConfig: { - html?: boolean; - wasm?: boolean; - }; - /** ShutdownSessionRequest */ - ShutdownSessionRequest: { - sessionId: string; - }; - /** Snippet */ - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - /** SnippetSection */ - SnippetSection: { - /** @default null */ - code?: string | null; - /** @default null */ - html?: string | null; - id: string; - }; - /** Snippets */ - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - /** - * SnippetsConfig - * @description Configuration for snippets. - * - * **Keys.** - * - * - `custom_path`: the path to the custom snippets directory - */ - SnippetsConfig: { - custom_paths?: string[]; - include_default_snippets?: boolean; - }; - /** - * SqlCatalogCheckResult - * @description Result of running validation against the database. - */ - SqlCatalogCheckResult: { - error_message: string | null; - success: boolean; - }; - /** - * SqlParseError - * @description Represents a single SQL parse error. - * - * Attributes: - * message (str): Description of the error. - * line (int): Line number where the error occurred (1-based). - * column (int): Column number where the error occurred (1-based). - * severity (Literal["error", "warning"]): Severity of the error. - */ - SqlParseError: { - column: number; - line: number; - message: string; - /** @enum {unknown} */ - severity: "error" | "warning"; - }; - /** - * SqlParseResult - * @description Result of parsing an SQL query. - * - * Attributes: - * success (bool): True if parsing succeeded without errors. - * errors (list[SqlParseError]): List of parse errors (empty if success is True). - */ - SqlParseResult: { - errors: components["schemas"]["SqlParseError"][]; - success: boolean; - }; - /** StartupLogsNotification */ - StartupLogsNotification: { - content: string; - /** @enum {unknown} */ - op: "startup-logs"; - /** @enum {unknown} */ - status: "append" | "done" | "start"; - }; - /** StdinRequest */ - StdinRequest: { - text: string; - }; - /** - * StopKernelCommand - * @description Stop kernel execution. - * - * Signals the kernel to stop processing and shut down gracefully. - * Used when closing a notebook or terminating a session. - */ - StopKernelCommand: { - /** @enum {unknown} */ - type: "stop-kernel"; - }; - /** - * StoreConfig - * @description Configuration for cache stores. - */ - StoreConfig: { - args?: Record; - /** @enum {unknown} */ - type?: "file" | "redis" | "rest" | "tiered"; - }; - /** SuccessResponse */ - SuccessResponse: { - /** @default true */ - success?: boolean; - }; - /** - * SyncGraphCommand - * @description Synchronize the kernel graph with file manager state. - * - * Used when the notebook file changes externally (e.g., file reload or version control). - * Updates changed cells, deletes removed cells, and optionally executes modified cells. - * - * Attributes: - * cells: All cells known to file manager, mapping cell_id to code. - * run_ids: Cells to execute or update. - * delete_ids: Cells to delete from the graph. - * timestamp: Unix timestamp when command was created. - */ - SyncGraphCommand: { - cells: { - [key: string]: string; - }; - deleteIds: string[]; - runIds: string[]; - timestamp?: number; - /** @enum {unknown} */ - type: "sync-graph"; - }; - /** - * ToolDefinition - * @description Tool definition compatible with ai-sdk-ui format. - */ - ToolDefinition: { - description: string; - mode: ("agent" | "ask" | "manual")[]; - name: string; - parameters: Record; - /** @enum {unknown} */ - source: "backend" | "frontend" | "mcp"; - }; - /** - * TyLanguageServerConfig - * @description Configuration options for Ty Language Server. - * - * ty handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - TyLanguageServerConfig: { - enabled?: boolean; - }; - /** - * UIElementMessageNotification - * @description Send a message to a UI element. - */ - UIElementMessageNotification: { - /** @default null */ - buffers?: string[] | null; - message: Record; - model_id: string | null; - /** @enum {unknown} */ - op: "send-ui-element-message"; - ui_element: string | null; - }; - /** UnknownError */ - UnknownError: { - /** @default null */ - error_type?: string | null; - msg: string; - /** @enum {unknown} */ - type: "unknown"; - }; - /** UpdateCellCodesNotification */ - UpdateCellCodesNotification: { - cell_ids: string[]; - code_is_stale: boolean; - codes: string[]; - /** @enum {unknown} */ - op: "update-cell-codes"; - }; - /** - * UpdateCellConfigCommand - * @description Update cell configuration. - * - * Updates cell-level settings like disabled state, hide code, etc. - * - * Attributes: - * configs: Cell IDs mapped to their config updates. Each config dict - * can contain partial updates. - */ - UpdateCellConfigCommand: { - configs: { - [key: string]: Record; - }; - /** @enum {unknown} */ - type: "update-cell-config"; - }; - /** UpdateCellConfigRequest */ - UpdateCellConfigRequest: { - configs: { - [key: string]: Record; - }; - }; - /** - * UpdateCellIdsNotification - * @description Update the cell ID ordering of the cells in the notebook. - * - * Right now we send the entire list of cell IDs, - * but in the future we might want to send change-deltas. - */ - UpdateCellIdsNotification: { - cell_ids: string[]; - /** @enum {unknown} */ - op: "update-cell-ids"; - }; - /** UpdateCellIdsRequest */ - UpdateCellIdsRequest: { - cellIds: string[]; - }; - /** - * UpdateUIElementCommand - * @description Update UI element values. - * - * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). - * Updates element values and re-executes dependent cells. - * - * Attributes: - * object_ids: UI elements to update. - * values: New values for the elements. Must match length of object_ids. - * request: HTTP request context if available. - * token: Unique request identifier for deduplication. - */ - UpdateUIElementCommand: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - /** @enum {unknown} */ - type: "update-ui-element"; - values: unknown[]; - }; - /** UpdateUIElementRequest */ - UpdateUIElementRequest: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - values: unknown[]; - }; - /** UpdateUIElementValuesRequest */ - UpdateUIElementValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - /** - * UpdateUserConfigCommand - * @description Update user configuration. - * - * Updates global marimo configuration (runtime settings, display options, editor preferences). - * - * Attributes: - * config: Complete user configuration. - */ - UpdateUserConfigCommand: { - config: components["schemas"]["MarimoConfig"]; - /** @enum {unknown} */ - type: "update-user-config"; - }; - /** UpdateUserConfigRequest */ - UpdateUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - /** - * UpdateWidgetModelCommand - * @description Update anywidget model state. - * - * Updates widget model state for bidirectional Python-JavaScript communication. - * - * Attributes: - * model_id: Widget model identifier. - * message: Model message with state updates and buffer paths. - * buffers: Base64-encoded binary buffers referenced by buffer_paths. - */ - UpdateWidgetModelCommand: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - /** @enum {unknown} */ - type: "update-widget-model"; - }; - /** UpdateWidgetModelRequest */ - UpdateWidgetModelRequest: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - }; - /** - * ValidateSQLCommand - * @description Validate an SQL query. - * - * Checks if an SQL query is valid by parsing against a dialect (no DB connection) - * or validating against an actual database. - * - * Attributes: - * request_id: Unique identifier for this request. - * query: SQL query to validate. - * only_parse: If True, only parse using dialect. If False, validate against DB. - * engine: SQL engine (required if only_parse is False). - * dialect: SQL dialect for parsing (required if only_parse is True). - */ - ValidateSQLCommand: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - /** @enum {unknown} */ - type: "validate-sql"; - }; - /** ValidateSQLRequest */ - ValidateSQLRequest: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - }; - /** ValidateSQLResultNotification */ - ValidateSQLResultNotification: { - /** @default null */ - error?: string | null; - /** @enum {unknown} */ - op: "validate-sql-result"; - /** @default null */ - parse_result?: null | components["schemas"]["SqlParseResult"]; - request_id: string; - /** @default null */ - validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; - }; - /** VariableContext */ - VariableContext: { - name: string; - previewValue: unknown; - valueType: string; - }; - /** VariableDeclarationNotification */ - VariableDeclarationNotification: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - /** VariableValue */ - VariableValue: { - datatype: string | null; - name: string; - value: string | null; - }; - /** - * VariableValuesNotification - * @description List of variables and their types/values. - */ - VariableValuesNotification: { - /** @enum {unknown} */ - op: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - /** - * VariablesNotification - * @description List of variable declarations. - */ - VariablesNotification: { - /** @enum {unknown} */ - op: "variables"; - variables: components["schemas"]["VariableDeclarationNotification"][]; - }; - /** WorkspaceFilesRequest */ - WorkspaceFilesRequest: { - /** @default false */ - includeMarkdown?: boolean; - }; - /** WorkspaceFilesResponse */ - WorkspaceFilesResponse: { - /** @default 0 */ - fileCount?: number; - files: components["schemas"]["FileInfo"][]; - /** @default false */ - hasMore?: boolean; - root: string; - }; - /** - * _AppConfig - * @description Program-specific configuration. - * - * Configuration for frontends or runtimes that is specific to - * a single marimo program. - */ - _AppConfig: { - /** @default null */ - app_title?: string | null; - auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @default null */ - css_file?: string | null; - /** @default null */ - html_head_file?: string | null; - /** @default null */ - layout_file?: string | null; - /** - * @default auto - * @enum {unknown} - */ - sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - /** - * @default compact - * @enum {unknown} - */ - width?: "columns" | "compact" | "full" | "medium" | "normal"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AddPackageRequest + * @description This can be a remove package or a local package. + * + * Supported formats: + * + * httpx + * httpx==0.27.0 + * httpx>=0.27.0 + * git+https://github.com/encode/httpx + * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz + * /example/foo-0.1.0-py3-none-any.whl + */ + AddPackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + /** @default false */ + upgrade?: boolean | null; + }; + /** AiCompletionContext */ + AiCompletionContext: { + /** @default */ + plainText?: string; + /** @default [] */ + schema?: components["schemas"]["SchemaTable"][]; + /** @default [] */ + variables?: (string | components["schemas"]["VariableContext"])[]; + }; + /** AiCompletionRequest */ + AiCompletionRequest: { + code: string; + /** @default null */ + context?: null | components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + /** @default [] */ + messages?: components["schemas"]["ChatMessage"][]; + prompt: string; + /** @default null */ + selectedText?: string | null; + }; + /** + * AiConfig + * @description Configuration options for AI. + * + * **Keys.** + * + * - `rules`: custom rules to include in all AI completion prompts + * - `max_tokens`: the maximum number of tokens to use in AI completions + * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` + * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions + * - `models`: the models to use for AI completions + * - `open_ai`: the OpenAI config + * - `anthropic`: the Anthropic config + * - `google`: the Google AI config + * - `bedrock`: the Bedrock config + * - `azure`: the Azure config + * - `ollama`: the Ollama config + * - `github`: the GitHub config + * - `openrouter`: the OpenRouter config + * - `wandb`: the Weights & Biases config + * - `open_ai_compatible`: the OpenAI-compatible config + */ + AiConfig: { + anthropic?: components["schemas"]["AnthropicConfig"]; + azure?: components["schemas"]["OpenAiConfig"]; + bedrock?: components["schemas"]["BedrockConfig"]; + github?: components["schemas"]["GitHubConfig"]; + google?: components["schemas"]["GoogleAiConfig"]; + inline_tooltip?: boolean; + max_tokens?: number; + /** @enum {unknown} */ + mode?: "agent" | "ask" | "manual"; + models?: components["schemas"]["AiModelConfig"]; + ollama?: components["schemas"]["OpenAiConfig"]; + open_ai?: components["schemas"]["OpenAiConfig"]; + open_ai_compatible?: components["schemas"]["OpenAiConfig"]; + openrouter?: components["schemas"]["OpenAiConfig"]; + rules?: string; + wandb?: components["schemas"]["OpenAiConfig"]; + }; + /** AiInlineCompletionRequest */ + AiInlineCompletionRequest: { + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + prefix: string; + suffix: string; + }; + /** + * AiModelConfig + * @description Configuration options for an AI model. + * + * **Keys.** + * + * - `chat_model`: the model to use for chat completions + * - `edit_model`: the model to use for edit completions + * - `autocomplete_model`: the model to use for code completion/autocomplete + * - `displayed_models`: a list of models to display in the UI + * - `custom_models`: a list of custom models to use that are not from the default list + */ + AiModelConfig: { + autocomplete_model?: string; + chat_model?: string; + custom_models: string[]; + displayed_models: string[]; + edit_model?: string; + }; + /** AlertNotification */ + AlertNotification: { + description: string; + /** @enum {unknown} */ + op: "alert"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** + * AnthropicConfig + * @description Configuration options for Anthropic. + * + * **Keys.** + * + * - `api_key`: the Anthropic API key + */ + AnthropicConfig: { + api_key?: string; + }; + /** BannerNotification */ + BannerNotification: { + /** @default null */ + action?: "restart" | null; + description: string; + /** @enum {unknown} */ + op: "banner"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** BaseResponse */ + BaseResponse: { + success: boolean; + }; + /** + * BasedpyrightServerConfig + * @description Configuration options for basedpyright Language Server. + * + * basedpyright handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + BasedpyrightServerConfig: { + enabled?: boolean; + }; + /** + * BedrockConfig + * @description Configuration options for Bedrock. + * + * **Keys.** + * + * - `profile_name`: the AWS profile to use + * - `region_name`: the AWS region to use + * - `aws_access_key_id`: the AWS access key ID + * - `aws_secret_access_key`: the AWS secret access key + */ + BedrockConfig: { + aws_access_key_id?: string; + aws_secret_access_key?: string; + profile_name?: string; + region_name?: string; + }; + /** + * CacheClearedNotification + * @description Result of clearing cache. + */ + CacheClearedNotification: { + bytes_freed: number; + /** @enum {unknown} */ + op: "cache-cleared"; + }; + /** + * CacheInfoNotification + * @description Cache statistics information. + */ + CacheInfoNotification: { + disk_to_free: number; + disk_total: number; + hits: number; + misses: number; + /** @enum {unknown} */ + op: "cache-info"; + time: number; + }; + /** + * CellChannel + * @description The channel of a cell's output. + * @enum {unknown} + */ + CellChannel: "marimo-error" | "media" | "output" | "pdb" | "stderr" | "stdin" | "stdout"; + /** + * CellConfig + * @description Internal representation of a cell's configuration. + * This is not part of the public API. + */ + CellConfig: { + /** @default null */ + column?: number | null; + /** @default false */ + disabled?: boolean; + /** @default false */ + hide_code?: boolean; + }; + /** + * CellNotification + * @description Op to transition a cell. + * + * A CellNotification's data has some optional fields: + * + * output - a CellOutput + * console - a CellOutput (console msg to append), or a list of + * CellOutputs + * status - execution status + * stale_inputs - whether the cell has stale inputs (variables, modules, ...) + * run_id - the run associated with this cell. + * serialization - the serialization status of the cell + * + * Omitting a field means that its value should be unchanged! + * + * And one required field: + * + * cell_id - the cell id + */ + CellNotification: { + cell_id: string; + /** @default null */ + console?: components["schemas"]["CellOutput"][] | null | components["schemas"]["CellOutput"]; + /** @enum {unknown} */ + op: "cell-op"; + /** @default null */ + output?: null | components["schemas"]["CellOutput"]; + /** @default null */ + run_id?: string | null; + /** @default null */ + serialization?: string | null; + /** @default null */ + stale_inputs?: boolean | null; + /** @default null */ + status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; + timestamp?: number; + }; + /** CellOutput */ + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: string | (components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"])[] | Record; + /** @enum {unknown} */ + mimetype: "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.vegalite.v5+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/plain" | "video/mp4" | "video/mpeg"; + timestamp?: number; + }; + /** ChatAttachment */ + ChatAttachment: { + /** @default null */ + content_type?: string | null; + /** @default attachment */ + name?: string; + url: string; + }; + /** + * ChatMessage + * @description A message in a chat. + */ + ChatMessage: { + /** @default null */ + attachments?: components["schemas"]["ChatAttachment"][] | null; + content: unknown; + /** @default null */ + parts?: Record[] | null; + /** @enum {unknown} */ + role: "assistant" | "system" | "user"; + }; + /** ChatRequest */ + ChatRequest: { + context: components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + messages: components["schemas"]["ChatMessage"][]; + /** @default null */ + model?: string | null; + /** @default null */ + tools?: components["schemas"]["ToolDefinition"][] | null; + /** @default null */ + variables?: (string | components["schemas"]["VariableContext"])[] | null; + }; + /** + * ClearCacheCommand + * @description Clear all cached data. + * + * Clears all cache contexts, freeing memory and disk space. + * Affects all cells using the @cache decorator. + */ + ClearCacheCommand: { + /** @enum {unknown} */ + type: "clear-cache"; + }; + /** ClearCacheRequest */ + ClearCacheRequest: Record; + /** + * CodeCompletionCommand + * @description Request code completion suggestions. + * + * Sent when the user requests autocomplete. Provides code context up to + * the cursor position for the language server. + * + * Attributes: + * id: Unique identifier for this request. + * document: Source code up to the cursor position. + * cell_id: Cell where completion is requested. + */ + CodeCompletionCommand: { + cellId: string; + document: string; + id: string; + /** @enum {unknown} */ + type: "code-completion"; + }; + /** CodeCompletionRequest */ + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + /** + * ColumnStats + * @description Represents stats for a column in a data table. + */ + ColumnStats: { + /** @default null */ + false?: number | null; + /** @default null */ + max?: unknown | null; + /** @default null */ + mean?: unknown | null; + /** @default null */ + median?: unknown | null; + /** @default null */ + min?: unknown | null; + /** @default null */ + nulls?: number | null; + /** @default null */ + p25?: unknown | null; + /** @default null */ + p5?: unknown | null; + /** @default null */ + p75?: unknown | null; + /** @default null */ + p95?: unknown | null; + /** @default null */ + std?: unknown | null; + /** @default null */ + total?: number | null; + /** @default null */ + true?: number | null; + /** @default null */ + unique?: number | null; + }; + /** + * CompletedRunNotification + * @description Written on run completion (of submitted cells and their descendants. + */ + CompletedRunNotification: { + /** @enum {unknown} */ + op: "completed-run"; + }; + /** + * CompletionConfig + * @description Configuration for code completion. + * + * A dict with key/value pairs configuring code completion in the marimo + * editor. + * + * **Keys.** + * + * - `activate_on_typing`: if `False`, completion won't activate + * until the completion hotkey is entered + * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing + * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` + * - `codeium_api_key`: the Codeium API key + */ + CompletionConfig: { + activate_on_typing: boolean; + api_key?: string | null; + base_url?: string | null; + codeium_api_key?: string | null; + copilot: boolean | ("codeium" | "custom" | "github"); + model?: string | null; + signature_hint_on_typing: boolean; + }; + /** CompletionOption */ + CompletionOption: { + completion_info: string | null; + name: string; + type: string; + }; + /** + * CompletionResultNotification + * @description Code completion result. + */ + CompletionResultNotification: { + completion_id: string; + /** @enum {unknown} */ + op: "completion-result"; + options: components["schemas"]["CompletionOption"][]; + prefix_length: number; + }; + /** CopyNotebookRequest */ + CopyNotebookRequest: { + destination: string; + source: string; + }; + /** + * CreateNotebookCommand + * @description Instantiate and initialize a notebook. + * + * Sent when a notebook is first loaded. Contains all cells and initial UI element values. + * + * Attributes: + * execution_requests: ExecuteCellCommand for each notebook cell. + * set_ui_element_value_request: Initial UI element values. + * auto_run: Whether to automatically execute cells on instantiation. + * request: HTTP request context if available. + */ + CreateNotebookCommand: { + autoRun: boolean; + executionRequests: components["schemas"]["ExecuteCellCommand"][]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; + /** @enum {unknown} */ + type: "create-notebook"; + }; + /** CreateSecretRequest */ + CreateSecretRequest: { + key: string; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + value: string; + }; + /** CycleError */ + CycleError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {unknown} */ + type: "cycle"; + }; + /** + * DataColumnPreviewNotification + * @description Preview of a column in a dataset. + */ + DataColumnPreviewNotification: { + /** @default null */ + chart_code?: string | null; + /** @default null */ + chart_spec?: string | null; + column_name: string; + /** @default null */ + error?: string | null; + /** @default null */ + missing_packages?: string[] | null; + /** @enum {unknown} */ + op: "data-column-preview"; + /** @default null */ + stats?: null | components["schemas"]["ColumnStats"]; + table_name: string; + }; + /** + * DataSourceConnection + * @description Represents a data source connection. + * + * Attributes: + * source (str): The source of the data source connection. E.g 'postgres'. + * dialect (str): The dialect of the data source connection. E.g 'postgresql'. + * name (str): The name of the data source connection. E.g 'engine'. + * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. + * databases (List[Database]): The databases in the data source connection. + * default_database (Optional[str]): The default database in the data source connection. + * default_schema (Optional[str]): The default schema in the data source connection. + */ + DataSourceConnection: { + databases: components["schemas"]["Database"][]; + /** @default null */ + default_database?: string | null; + /** @default null */ + default_schema?: string | null; + dialect: string; + display_name: string; + name: string; + source: string; + }; + /** DataSourceConnectionsNotification */ + DataSourceConnectionsNotification: { + connections: components["schemas"]["DataSourceConnection"][]; + /** @enum {unknown} */ + op: "data-source-connections"; + }; + /** + * DataTable + * @description Represents a data table. + * + * Attributes: + * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). + * source (str): Can be dialect, or source db name. + * name (str): Name of the data table. + * num_rows (Optional[int]): Total number of rows in the table, if known. + * num_columns (Optional[int]): Total number of columns in the table, if known. + * variable_name (Optional[VariableName]): Variable name referencing this table in code. + * columns (List[DataTableColumn]): List of column definitions and metadata. + * engine (Optional[VariableName]): Database engine or connection handler, if any. + * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. + * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. + * indexes (Optional[List[str]]): Column names used as indexes, if any. + */ + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + /** @default null */ + engine?: string | null; + /** @default null */ + indexes?: string[] | null; + name: string; + num_columns: number | null; + num_rows: number | null; + /** @default null */ + primary_keys?: string[] | null; + source: string; + /** @enum {unknown} */ + source_type: "catalog" | "connection" | "duckdb" | "local"; + /** + * @default table + * @enum {unknown} + */ + type?: "table" | "view"; + variable_name: string | null; + }; + /** + * DataTableColumn + * @description Represents a column in a data table. + * + * Attributes: + * name (str): The name of the column. + * type (DataType): The data type of the column. + * external_type (ExternalDataType): The raw data type of the column. + * sample_values (List[Any]): The sample values of the column. + */ + DataTableColumn: { + external_type: string; + name: string; + sample_values: unknown[]; + /** @enum {unknown} */ + type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; + }; + /** + * Database + * @description Represents a collection of schemas. + * + * Attributes: + * name (str): The name of the database + * dialect (str): The dialect of the database + * schemas (List[Schema]): List of schemas in the database + * engine (Optional[VariableName]): Database engine or connection handler, if any. + */ + Database: { + dialect: string; + /** @default null */ + engine?: string | null; + name: string; + schemas: components["schemas"]["Schema"][]; + }; + /** + * DatasetsNotification + * @description List of datasets. + */ + DatasetsNotification: { + /** @default null */ + clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; + /** @enum {unknown} */ + op: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + /** + * DatasourcesConfig + * @description Configuration for datasources panel. + * + * **Keys.** + * + * - `auto_discover_schemas`: if `True`, include schemas in the datasource + * - `auto_discover_tables`: if `True`, include tables in the datasource + * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource + */ + DatasourcesConfig: { + auto_discover_columns?: boolean | "auto"; + auto_discover_schemas?: boolean | "auto"; + auto_discover_tables?: boolean | "auto"; + }; + /** + * DebugCellCommand + * @description Enter debugger mode for a cell. + * + * Starts the Python debugger (pdb) for the specified cell. + * + * Attributes: + * cell_id: Cell to debug. + * request: HTTP request context if available. + */ + DebugCellCommand: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "debug-cell"; + }; + /** DebugCellRequest */ + DebugCellRequest: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * DeleteCellCommand + * @description Delete a cell from the notebook. + * + * Removes cell from the dependency graph and cleans up its variables. + * Dependent cells may become stale. + * + * Attributes: + * cell_id: Cell to delete. + */ + DeleteCellCommand: { + cellId: string; + /** @enum {unknown} */ + type: "delete-cell"; + }; + /** DeleteCellRequest */ + DeleteCellRequest: { + cellId: string; + }; + /** DeleteSecretRequest */ + DeleteSecretRequest: { + key: string; + }; + /** DependencyTreeNode */ + DependencyTreeNode: { + dependencies: components["schemas"]["DependencyTreeNode"][]; + name: string; + tags: { + [key: string]: string; + }[]; + version: string | null; + }; + /** DependencyTreeResponse */ + DependencyTreeResponse: { + tree: null | components["schemas"]["DependencyTreeNode"]; + }; + /** + * DiagnosticsConfig + * @description Configuration options for diagnostics. + * + * **Keys.** + * + * - `enabled`: if `True`, diagnostics will be shown in the editor + * - `sql_linter`: if `True`, SQL cells will have linting enabled + */ + DiagnosticsConfig: { + enabled?: boolean; + sql_linter?: boolean; + }; + /** + * DisplayConfig + * @description Configuration for display. + * + * **Keys.** + * + * - `theme`: `"light"`, `"dark"`, or `"system"` + * - `code_editor_font_size`: font size for the code editor + * - `cell_output`: `"above"` or `"below"` + * - `dataframes`: `"rich"` or `"plain"` + * - `custom_css`: list of paths to custom CSS files + * - `default_table_page_size`: default number of rows to display in tables + * - `default_table_max_columns`: default maximum number of columns to display in tables + * - `reference_highlighting`: if `True`, highlight reactive variable references + * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") + */ + DisplayConfig: { + /** @enum {unknown} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + custom_css?: string[]; + /** @enum {unknown} */ + dataframes: "plain" | "rich"; + default_table_max_columns: number; + default_table_page_size: number; + /** @enum {unknown} */ + default_width: "columns" | "compact" | "full" | "medium" | "normal"; + locale?: string | null; + reference_highlighting?: boolean; + /** @enum {unknown} */ + theme: "dark" | "light" | "system"; + }; + /** + * ExecuteCellCommand + * @description Execute a single cell. + * + * Executes a cell with the provided code. Dependent cells may be + * re-executed based on the reactive execution mode. + * + * Attributes: + * cell_id: Cell to execute. + * code: Python code to execute. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellCommand: { + cellId: string; + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cell"; + }; + /** + * ExecuteCellsCommand + * @description Execute multiple cells in a batch. + * + * Executes multiple cells with their corresponding code. The kernel manages + * dependency tracking and reactive execution. + * + * Attributes: + * cell_ids: Cells to execute. + * codes: Python code for each cell. Must match length of cell_ids. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellsCommand: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cells"; + }; + /** ExecuteCellsRequest */ + ExecuteCellsRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteScratchpadCommand + * @description Execute code in the scratchpad. + * + * The scratchpad is a temporary execution environment that doesn't affect + * the notebook's cells or dependencies. Runs in an isolated cell with a copy + * of the global namespace, useful for experimentation. + * + * Attributes: + * code: Python code to execute. + * request: HTTP request context if available. + */ + ExecuteScratchpadCommand: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-scratchpad"; + }; + /** ExecuteScratchpadRequest */ + ExecuteScratchpadRequest: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteStaleCellsCommand + * @description Execute all stale cells. + * + * Cells become stale when their dependencies change but haven't been + * re-executed yet. Brings the notebook to a consistent state. + * + * Attributes: + * request: HTTP request context if available. + */ + ExecuteStaleCellsCommand: { + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-stale-cells"; + }; + /** ExportAsHTMLRequest */ + ExportAsHTMLRequest: { + /** @default null */ + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + /** ExportAsIPYNBRequest */ + ExportAsIPYNBRequest: { + download: boolean; + }; + /** ExportAsMarkdownRequest */ + ExportAsMarkdownRequest: { + download: boolean; + }; + /** ExportAsScriptRequest */ + ExportAsScriptRequest: { + download: boolean; + }; + /** FileCreateRequest */ + FileCreateRequest: { + /** @default null */ + contents?: string | null; + name: string; + path: string; + /** @enum {unknown} */ + type: "directory" | "file"; + }; + /** FileCreateResponse */ + FileCreateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDeleteRequest */ + FileDeleteRequest: { + path: string; + }; + /** FileDeleteResponse */ + FileDeleteResponse: { + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDetailsRequest */ + FileDetailsRequest: { + path: string; + }; + /** FileDetailsResponse */ + FileDetailsResponse: { + /** @default null */ + contents?: string | null; + file: components["schemas"]["FileInfo"]; + /** @default null */ + mimeType?: string | null; + }; + /** FileInfo */ + FileInfo: { + /** @default [] */ + children?: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + }; + /** FileListRequest */ + FileListRequest: { + /** @default null */ + path?: string | null; + }; + /** FileListResponse */ + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + /** FileMoveRequest */ + FileMoveRequest: { + newPath: string; + path: string; + }; + /** FileMoveResponse */ + FileMoveResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileOpenRequest */ + FileOpenRequest: { + /** @default null */ + lineNumber?: number | null; + path: string; + }; + /** FileSearchRequest */ + FileSearchRequest: { + /** @default 3 */ + depth?: number; + /** @default true */ + includeDirectories?: boolean; + /** @default true */ + includeFiles?: boolean; + /** @default 100 */ + limit?: number; + /** @default null */ + path?: string | null; + query: string; + }; + /** FileSearchResponse */ + FileSearchResponse: { + files: components["schemas"]["FileInfo"][]; + query: string; + totalFound: number; + }; + /** FileUpdateRequest */ + FileUpdateRequest: { + contents: string; + path: string; + }; + /** FileUpdateResponse */ + FileUpdateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FocusCellNotification */ + FocusCellNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "focus-cell"; + }; + /** FormatCellsRequest */ + FormatCellsRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + /** FormatResponse */ + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + /** + * FormattingConfig + * @description Configuration for code formatting. + * + * **Keys.** + * + * - `line_length`: max line length + */ + FormattingConfig: { + line_length: number; + }; + /** + * FunctionCallResultNotification + * @description Result of calling a function. + */ + FunctionCallResultNotification: { + function_call_id: string; + /** @enum {unknown} */ + op: "function-call-result"; + return_value: unknown; + status: components["schemas"]["HumanReadableStatus"]; + }; + /** + * GetCacheInfoCommand + * @description Retrieve cache statistics. + * + * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). + */ + GetCacheInfoCommand: { + /** @enum {unknown} */ + type: "get-cache-info"; + }; + /** GetCacheInfoRequest */ + GetCacheInfoRequest: Record; + /** + * GitHubConfig + * @description Configuration options for GitHub. + * + * **Keys.** + * + * - `api_key`: the GitHub API token + * - `base_url`: the base URL for the API + * - `copilot_settings`: configuration settings for GitHub Copilot LSP. + * Supports settings like `http` (proxy configuration), `telemetry`, + * and `github-enterprise` (enterprise URI). + */ + GitHubConfig: { + api_key?: string; + base_url?: string; + copilot_settings?: Record; + }; + /** + * GoogleAiConfig + * @description Configuration options for Google AI. + * + * **Keys.** + * + * - `api_key`: the Google AI API key + */ + GoogleAiConfig: { + api_key?: string; + }; + /** + * HTTPRequest + * @description Serializable HTTP request representation. + * + * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe + * subset of data. Excludes session and auth to prevent exposing sensitive data. + * + * Attributes: + * url: Serialized URL with path, port, scheme, netloc, query, hostname. + * base_url: Serialized base URL. + * headers: Request headers (marimo-specific headers excluded). + * query_params: Query parameters mapped to lists of values. + * path_params: Path parameters from the URL route. + * cookies: Request cookies. + * meta: User-defined storage for custom data. + * user: User info from authentication middleware (e.g., is_authenticated, username). + */ + HTTPRequest: { + base_url: Record; + cookies: { + [key: string]: string; + }; + headers: { + [key: string]: string; + }; + meta: Record; + path_params: Record; + query_params: { + [key: string]: string[]; + }; + url: Record; + user: unknown; + }; + /** + * HumanReadableStatus + * @description Human-readable status. + */ + HumanReadableStatus: { + /** @enum {unknown} */ + code: "error" | "ok"; + /** @default null */ + message?: string | null; + /** @default null */ + title?: string | null; + }; + /** ImportStarError */ + ImportStarError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "import-star"; + }; + /** + * InstallPackagesCommand + * @description Install Python packages. + * + * Installs missing packages using the specified package manager. Triggered + * automatically on import errors or manually by the user. + * + * Attributes: + * manager: Package manager to use ('pip', 'conda', 'uv', etc.). + * versions: Package names mapped to version specifiers. Empty version + * means install latest. + */ + InstallPackagesCommand: { + manager: string; + /** @enum {unknown} */ + type: "install-packages"; + versions: { + [key: string]: string; + }; + }; + /** InstallPackagesRequest */ + InstallPackagesRequest: { + manager: string; + versions: { + [key: string]: string; + }; + }; + /** InstallingPackageAlertNotification */ + InstallingPackageAlertNotification: { + /** @default null */ + log_status?: ("append" | "done" | "start") | null; + /** @default null */ + logs?: { + [key: string]: string; + } | null; + /** @enum {unknown} */ + op: "installing-package-alert"; + packages: { + [key: string]: "failed" | "installed" | "installing" | "queued"; + }; + }; + /** InstantiateNotebookRequest */ + InstantiateNotebookRequest: { + /** @default true */ + autoRun?: boolean; + objectIds: string[]; + values: unknown[]; + }; + /** + * InterruptedNotification + * @description Written when the kernel is interrupted by the user. + */ + InterruptedNotification: { + /** @enum {unknown} */ + op: "interrupted"; + }; + /** InvokeAiToolRequest */ + InvokeAiToolRequest: { + arguments: Record; + toolName: string; + }; + /** InvokeAiToolResponse */ + InvokeAiToolResponse: { + /** @default null */ + error?: string | null; + result: unknown; + success: boolean; + toolName: string; + }; + /** + * InvokeFunctionCommand + * @description Invoke a function from a UI element. + * + * Called when a UI element needs to invoke a Python function. + * + * Attributes: + * function_call_id: Unique identifier for this call. + * namespace: Namespace where the function is registered. + * function_name: Function to invoke. + * args: Keyword arguments for the function. + */ + InvokeFunctionCommand: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + /** @enum {unknown} */ + type: "invoke-function"; + }; + /** InvokeFunctionRequest */ + InvokeFunctionRequest: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + }; + /** KernelCapabilitiesNotification */ + KernelCapabilitiesNotification: { + /** @default false */ + basedpyright?: boolean; + /** @default false */ + pylsp?: boolean; + /** @default false */ + terminal?: boolean; + /** @default false */ + ty?: boolean; + }; + /** + * KernelReadyNotification + * @description Kernel is ready for execution. + */ + KernelReadyNotification: { + app_config: components["schemas"]["_AppConfig"]; + capabilities: components["schemas"]["KernelCapabilitiesNotification"]; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code: { + [key: string]: string; + } | null; + last_execution_time: { + [key: string]: number; + } | null; + layout: components["schemas"]["LayoutConfig"] | null; + names: string[]; + /** @enum {unknown} */ + op: "kernel-ready"; + resumed: boolean; + ui_values: Record | null; + }; + /** + * KeymapConfig + * @description Configuration for keymaps. + * + * **Keys.** + * + * - `preset`: one of `"default"` or `"vim"` + * - `overrides`: a dict of keymap actions to their keymap override + * - `vimrc`: path to a vimrc file to load keymaps from + * - `destructive_delete`: if `True`, allows deleting cells with content. + */ + KeymapConfig: { + destructive_delete?: boolean; + overrides?: { + [key: string]: string; + }; + /** @enum {unknown} */ + preset: "default" | "vim"; + vimrc?: string | null; + }; + /** KnownUnions */ + KnownUnions: { + command: components["schemas"]["CreateNotebookCommand"] | components["schemas"]["RenameNotebookCommand"] | components["schemas"]["ExecuteCellsCommand"] | components["schemas"]["ExecuteScratchpadCommand"] | components["schemas"]["ExecuteStaleCellsCommand"] | components["schemas"]["DebugCellCommand"] | components["schemas"]["DeleteCellCommand"] | components["schemas"]["SyncGraphCommand"] | components["schemas"]["UpdateCellConfigCommand"] | components["schemas"]["InstallPackagesCommand"] | components["schemas"]["UpdateUIElementCommand"] | components["schemas"]["UpdateWidgetModelCommand"] | components["schemas"]["InvokeFunctionCommand"] | components["schemas"]["UpdateUserConfigCommand"] | components["schemas"]["PreviewDatasetColumnCommand"] | components["schemas"]["PreviewSQLTableCommand"] | components["schemas"]["ListSQLTablesCommand"] | components["schemas"]["ValidateSQLCommand"] | components["schemas"]["ListDataSourceConnectionCommand"] | components["schemas"]["ListSecretKeysCommand"] | components["schemas"]["RefreshSecretsCommand"] | components["schemas"]["ClearCacheCommand"] | components["schemas"]["GetCacheInfoCommand"] | components["schemas"]["StopKernelCommand"]; + /** @enum {unknown} */ + data_type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; + error: components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"]; + notification: components["schemas"]["CellNotification"] | components["schemas"]["FunctionCallResultNotification"] | components["schemas"]["UIElementMessageNotification"] | components["schemas"]["RemoveUIElementsNotification"] | components["schemas"]["ReloadNotification"] | components["schemas"]["ReconnectedNotification"] | components["schemas"]["InterruptedNotification"] | components["schemas"]["CompletedRunNotification"] | components["schemas"]["KernelReadyNotification"] | components["schemas"]["CompletionResultNotification"] | components["schemas"]["AlertNotification"] | components["schemas"]["BannerNotification"] | components["schemas"]["MissingPackageAlertNotification"] | components["schemas"]["InstallingPackageAlertNotification"] | components["schemas"]["StartupLogsNotification"] | components["schemas"]["VariablesNotification"] | components["schemas"]["VariableValuesNotification"] | components["schemas"]["QueryParamsSetNotification"] | components["schemas"]["QueryParamsAppendNotification"] | components["schemas"]["QueryParamsDeleteNotification"] | components["schemas"]["QueryParamsClearNotification"] | components["schemas"]["DatasetsNotification"] | components["schemas"]["DataColumnPreviewNotification"] | components["schemas"]["SQLTablePreviewNotification"] | components["schemas"]["SQLTableListPreviewNotification"] | components["schemas"]["DataSourceConnectionsNotification"] | components["schemas"]["ValidateSQLResultNotification"] | components["schemas"]["SecretKeysResultNotification"] | components["schemas"]["CacheClearedNotification"] | components["schemas"]["CacheInfoNotification"] | components["schemas"]["FocusCellNotification"] | components["schemas"]["UpdateCellCodesNotification"] | components["schemas"]["UpdateCellIdsNotification"]; + }; + /** + * LanguageServersConfig + * @description Configuration options for language servers. + * + * **Keys.** + * + * - `pylsp`: the pylsp config + */ + LanguageServersConfig: { + basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; + pylsp?: components["schemas"]["PythonLanguageServerConfig"]; + ty?: components["schemas"]["TyLanguageServerConfig"]; + }; + /** LayoutConfig */ + LayoutConfig: { + data: Record; + type: string; + }; + /** + * ListDataSourceConnectionCommand + * @description List data source schemas. + * + * Retrieves available schemas for a data source engine. + * + * Attributes: + * engine: Data source engine identifier. + */ + ListDataSourceConnectionCommand: { + engine: string; + /** @enum {unknown} */ + type: "list-data-source-connection"; + }; + /** ListDataSourceConnectionRequest */ + ListDataSourceConnectionRequest: { + engine: string; + }; + /** ListPackagesResponse */ + ListPackagesResponse: { + packages: components["schemas"]["PackageDescription"][]; + }; + /** + * ListSQLTablesCommand + * @description List tables in an SQL schema. + * + * Retrieves names of all tables and views in a schema. Used by the SQL + * editor for table selection. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database to query. + * schema: Schema to list tables from. + */ + ListSQLTablesCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + /** @enum {unknown} */ + type: "list-sql-tables"; + }; + /** ListSQLTablesRequest */ + ListSQLTablesRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + }; + /** + * ListSecretKeysCommand + * @description List available secret keys. + * + * Retrieves secret names without exposing values. + * + * Attributes: + * request_id: Unique identifier for this request. + */ + ListSecretKeysCommand: { + requestId: string; + /** @enum {unknown} */ + type: "list-secret-keys"; + }; + /** ListSecretKeysRequest */ + ListSecretKeysRequest: { + requestId: string; + }; + /** ListSecretKeysResponse */ + ListSecretKeysResponse: { + keys: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** + * MCPConfig + * @description Configuration for MCP servers + * + * Note: the field name `mcpServers` is camelCased to match MCP server + * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) + */ + MCPConfig: { + mcpServers: { + [key: string]: Record; + }; + presets?: ("context7" | "marimo")[]; + }; + /** MCPRefreshResponse */ + MCPRefreshResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: boolean; + }; + success: boolean; + }; + /** MCPStatusResponse */ + MCPStatusResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: "connected" | "disconnected" | "failed" | "pending"; + }; + /** @enum {unknown} */ + status: "error" | "ok" | "partial"; + }; + /** MarimoAncestorPreventedError */ + MarimoAncestorPreventedError: { + blamed_cell: string | null; + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-prevented"; + }; + /** MarimoAncestorStoppedError */ + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-stopped"; + }; + /** + * MarimoConfig + * @description Configuration for the marimo editor + */ + MarimoConfig: { + ai?: components["schemas"]["AiConfig"]; + completion: components["schemas"]["CompletionConfig"]; + datasources?: components["schemas"]["DatasourcesConfig"]; + diagnostics?: components["schemas"]["DiagnosticsConfig"]; + display: components["schemas"]["DisplayConfig"]; + experimental?: Record; + formatting: components["schemas"]["FormattingConfig"]; + keymap: components["schemas"]["KeymapConfig"]; + language_servers?: components["schemas"]["LanguageServersConfig"]; + mcp?: components["schemas"]["MCPConfig"]; + package_management: components["schemas"]["PackageManagementConfig"]; + runtime: components["schemas"]["RuntimeConfig"]; + save: components["schemas"]["SaveConfig"]; + server: components["schemas"]["ServerConfig"]; + sharing?: components["schemas"]["SharingConfig"]; + snippets?: components["schemas"]["SnippetsConfig"]; + }; + /** MarimoExceptionRaisedError */ + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell: string | null; + /** @enum {unknown} */ + type: "exception"; + }; + /** MarimoFile */ + MarimoFile: { + /** @default null */ + initializationId?: string | null; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + /** @default null */ + sessionId?: string | null; + }; + /** + * 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. + */ + MarimoInternalError: { + error_id: string; + /** @default */ + msg?: string; + /** @enum {unknown} */ + type: "internal"; + }; + /** MarimoInterruptionError */ + MarimoInterruptionError: { + /** @enum {unknown} */ + type: "interruption"; + }; + /** + * MarimoSQLError + * @description SQL-specific error with enhanced metadata for debugging. + */ + MarimoSQLError: { + /** @default null */ + hint?: string | null; + msg: string; + /** @default 0 */ + node_col_offset?: number; + /** @default 0 */ + node_lineno?: number; + /** @default null */ + sql_col?: number | null; + /** @default null */ + sql_line?: number | null; + sql_statement: string; + /** @enum {unknown} */ + type: "sql-error"; + }; + /** MarimoStrictExecutionError */ + MarimoStrictExecutionError: { + blamed_cell: string | null; + msg: string; + ref: string; + /** @enum {unknown} */ + type: "strict-exception"; + }; + /** MarimoSyntaxError */ + MarimoSyntaxError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "syntax"; + }; + /** MissingPackageAlertNotification */ + MissingPackageAlertNotification: { + isolated: boolean; + /** @enum {unknown} */ + op: "missing-package-alert"; + packages: string[]; + }; + /** + * ModelMessage + * @description Widget model state update message. + * + * State changes for anywidget models, including state dict and binary buffer paths. + * + * Attributes: + * state: Model state updates. + * buffer_paths: Paths within state dict pointing to binary buffers. + */ + ModelMessage: { + bufferPaths: (string | number)[][]; + state: Record; + }; + /** MultipleDefinitionError */ + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {unknown} */ + type: "multiple-defs"; + }; + /** + * OpenAiConfig + * @description Configuration options for OpenAI or OpenAI-compatible services. + * + * **Keys.** + * + * - `api_key`: the OpenAI API key + * - `base_url`: the base URL for the API + * - `project`: the project ID for the OpenAI API + * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios + * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client + * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server + * - `extra_headers`: extra headers to be passed to the OpenAI client + */ + OpenAiConfig: { + api_key?: string; + base_url?: string; + ca_bundle_path?: string; + client_pem?: string; + extra_headers?: { + [key: string]: string; + }; + model?: string; + project?: string; + ssl_verify?: boolean; + }; + /** OpenTutorialRequest */ + OpenTutorialRequest: { + tutorialId: ("dataflow" | "fileformat" | "for-jupyter-users" | "intro" | "layout" | "markdown" | "plots" | "sql" | "ui") | "markdown-format"; + }; + /** PackageDescription */ + PackageDescription: { + name: string; + version: string; + }; + /** + * PackageManagementConfig + * @description Configuration options for package management. + * + * **Keys.** + * + * - `manager`: the package manager to use + */ + PackageManagementConfig: { + /** @enum {unknown} */ + manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; + }; + /** PackageOperationResponse */ + PackageOperationResponse: { + /** @default null */ + error?: string | null; + success: boolean; + }; + /** + * PreviewDatasetColumnCommand + * @description Preview a dataset column. + * + * Retrieves and displays data from a single column (dataframe or SQL table). + * Used by the data explorer UI. + * + * Attributes: + * source_type: Data source type ('dataframe', 'sql', etc.). + * source: Source identifier (connection string or variable name). + * table_name: Table or dataframe variable name. + * column_name: Column to preview. + * fully_qualified_table_name: Full database.schema.table name for SQL. + */ + PreviewDatasetColumnCommand: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + /** @enum {unknown} */ + type: "preview-dataset-column"; + }; + /** PreviewDatasetColumnRequest */ + PreviewDatasetColumnRequest: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + }; + /** + * PreviewSQLTableCommand + * @description Preview SQL table details. + * + * Retrieves metadata and sample data for a table. Used by the SQL editor + * and data explorer. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database containing the table. + * schema: Schema containing the table. + * table_name: Table to preview. + */ + PreviewSQLTableCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + /** @enum {unknown} */ + type: "preview-sql-table"; + }; + /** PreviewSQLTableRequest */ + PreviewSQLTableRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + }; + /** + * PythonLanguageServerConfig + * @description Configuration options for Python Language Server. + * + * pylsp handles completion, hover, go-to-definition, and diagnostics. + */ + PythonLanguageServerConfig: { + enable_flake8?: boolean; + enable_mypy?: boolean; + enable_pydocstyle?: boolean; + enable_pyflakes?: boolean; + enable_pylint?: boolean; + enable_ruff?: boolean; + enabled?: boolean; + }; + /** QueryParamsAppendNotification */ + QueryParamsAppendNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-append"; + value: string; + }; + /** QueryParamsClearNotification */ + QueryParamsClearNotification: { + /** @enum {unknown} */ + op: "query-params-clear"; + }; + /** QueryParamsDeleteNotification */ + QueryParamsDeleteNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-delete"; + value: string | null; + }; + /** + * QueryParamsSetNotification + * @description Set query parameters. + */ + QueryParamsSetNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-set"; + value: string | string[]; + }; + /** ReadCodeResponse */ + ReadCodeResponse: { + contents: string; + }; + /** RecentFilesResponse */ + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** ReconnectedNotification */ + ReconnectedNotification: { + /** @enum {unknown} */ + op: "reconnected"; + }; + /** + * RefreshSecretsCommand + * @description Refresh secrets from the secrets store. + * + * Reloads secrets from the provider without restarting the kernel. + */ + RefreshSecretsCommand: { + /** @enum {unknown} */ + type: "refresh-secrets"; + }; + /** RefreshSecretsRequest */ + RefreshSecretsRequest: Record; + /** ReloadNotification */ + ReloadNotification: { + /** @enum {unknown} */ + op: "reload"; + }; + /** RemovePackageRequest */ + RemovePackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + }; + /** + * RemoveUIElementsNotification + * @description Invalidate UI elements for a given cell. + */ + RemoveUIElementsNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "remove-ui-elements"; + }; + /** + * RenameNotebookCommand + * @description Rename or move the notebook file. + * + * Updates the notebook's filename in the kernel metadata. + * + * Attributes: + * filename: New filename or path for the notebook. + */ + RenameNotebookCommand: { + filename: string; + /** @enum {unknown} */ + type: "rename-notebook"; + }; + /** RenameNotebookRequest */ + RenameNotebookRequest: { + filename: string; + }; + /** RunningNotebooksResponse */ + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** + * RuntimeConfig + * @description Configuration for runtime. + * + * **Keys.** + * + * - `auto_instantiate`: if `False`, cells won't automatically + * run on startup. This only applies when editing a notebook, + * and not when running as an application. + * The default is `True`. + * - `auto_reload`: if `lazy`, cells importing modified modules will marked + * as stale; if `autorun`, affected cells will be automatically run. similar + * to IPython's %autoreload extension but with more code intelligence. + * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. + * execution. + * - `on_cell_change`: if `lazy`, cells will be marked stale when their + * ancestors run but won't autorun; if `autorun`, cells will automatically + * run when their ancestors run. + * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; + * if `strict` marimo will clone cell declarations by default, avoiding + * hidden potential state build up. + * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks + * affected cells as stale, `"autorun"` automatically runs affected cells. + * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger + * values may affect frontend performance + * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; + * larger values may affect frontend performance + * - `pythonpath`: a list of directories to add to the Python search path. + * Directories will be added to the head of sys.path. Similar to the + * `PYTHONPATH` environment variable, the directories will be included in + * where Python will look for imported modules. + * - `dotenv`: a list of paths to `.env` files to load. + * If the file does not exist, it will be silently ignored. + * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. + * - `default_sql_output`: the default output format for SQL queries. Can be one of: + * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. + * The default is `"auto"`. + * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: + * `html`, `markdown`, `ipynb`. + * The default is None. + */ + RuntimeConfig: { + auto_instantiate: boolean; + /** @enum {unknown} */ + auto_reload: "autorun" | "lazy" | "off"; + default_auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @enum {unknown} */ + default_sql_output: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + dotenv?: string[]; + /** @enum {unknown} */ + on_cell_change: "autorun" | "lazy"; + output_max_bytes: number; + pythonpath?: string[]; + reactive_tests: boolean; + std_stream_max_bytes: number; + /** @enum {unknown} */ + watcher_on_save: "autorun" | "lazy"; + }; + /** + * SQLMetadata + * @description Metadata for a SQL database. + */ + SQLMetadata: { + connection: string; + database: string; + schema: string; + /** @enum {unknown} */ + type: "sql-metadata"; + }; + /** + * SQLTableListPreviewNotification + * @description Preview of a list of tables in a schema. + */ + SQLTableListPreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-list-preview"; + request_id: string; + /** @default [] */ + tables?: components["schemas"]["DataTable"][]; + }; + /** + * SQLTablePreviewNotification + * @description Preview of a table in a SQL database. + */ + SQLTablePreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-preview"; + request_id: string; + table: null | components["schemas"]["DataTable"]; + }; + /** SaveAppConfigurationRequest */ + SaveAppConfigurationRequest: { + config: Record; + }; + /** + * SaveConfig + * @description Configuration for saving. + * + * **Keys.** + * + * - `autosave`: one of `"off"` or `"after_delay"` + * - `delay`: number of milliseconds to wait before autosaving + * - `format_on_save`: if `True`, format the code on save + */ + SaveConfig: { + /** @enum {unknown} */ + autosave: "after_delay" | "off"; + autosave_delay: number; + format_on_save: boolean; + }; + /** SaveNotebookRequest */ + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + /** @default null */ + layout?: Record | null; + names: string[]; + /** @default true */ + persist?: boolean; + }; + /** SaveUserConfigurationRequest */ + SaveUserConfigurationRequest: { + config: Record; + }; + /** Schema */ + Schema: { + name: string; + tables: components["schemas"]["DataTable"][]; + }; + /** SchemaColumn */ + SchemaColumn: { + name: string; + sampleValues: unknown[]; + type: string; + }; + /** SchemaTable */ + SchemaTable: { + columns: components["schemas"]["SchemaColumn"][]; + name: string; + }; + /** + * SecretKeysResultNotification + * @description Result of listing secret keys. + */ + SecretKeysResultNotification: { + /** @enum {unknown} */ + op: "secret-keys-result"; + request_id: string; + secrets: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** SecretKeysWithProvider */ + SecretKeysWithProvider: { + keys: string[]; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + }; + /** + * ServerConfig + * @description Configuration for the server. + * + * **Keys.** + * + * - `browser`: the web browser to use. `"default"` or a browser registered + * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) + * - `follow_symlink`: if true, the server will follow symlinks it finds + * inside its static assets directory. + */ + ServerConfig: { + browser: "default" | string; + follow_symlink: boolean; + }; + /** SetupRootError */ + SetupRootError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {unknown} */ + type: "setup-refs"; + }; + /** + * SharingConfig + * @description Configuration for sharing features. + * + * **Keys.** + * + * - `html`: if `False`, HTML sharing options will be hidden from the UI + * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI + */ + SharingConfig: { + html?: boolean; + wasm?: boolean; + }; + /** ShutdownSessionRequest */ + ShutdownSessionRequest: { + sessionId: string; + }; + /** Snippet */ + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + /** SnippetSection */ + SnippetSection: { + /** @default null */ + code?: string | null; + /** @default null */ + html?: string | null; + id: string; + }; + /** Snippets */ + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + /** + * SnippetsConfig + * @description Configuration for snippets. + * + * **Keys.** + * + * - `custom_path`: the path to the custom snippets directory + */ + SnippetsConfig: { + custom_paths?: string[]; + include_default_snippets?: boolean; + }; + /** + * SqlCatalogCheckResult + * @description Result of running validation against the database. + */ + SqlCatalogCheckResult: { + error_message: string | null; + success: boolean; + }; + /** + * SqlParseError + * @description Represents a single SQL parse error. + * + * Attributes: + * message (str): Description of the error. + * line (int): Line number where the error occurred (1-based). + * column (int): Column number where the error occurred (1-based). + * severity (Literal["error", "warning"]): Severity of the error. + */ + SqlParseError: { + column: number; + line: number; + message: string; + /** @enum {unknown} */ + severity: "error" | "warning"; + }; + /** + * SqlParseResult + * @description Result of parsing an SQL query. + * + * Attributes: + * success (bool): True if parsing succeeded without errors. + * errors (list[SqlParseError]): List of parse errors (empty if success is True). + */ + SqlParseResult: { + errors: components["schemas"]["SqlParseError"][]; + success: boolean; + }; + /** StartupLogsNotification */ + StartupLogsNotification: { + content: string; + /** @enum {unknown} */ + op: "startup-logs"; + /** @enum {unknown} */ + status: "append" | "done" | "start"; + }; + /** StdinRequest */ + StdinRequest: { + text: string; + }; + /** + * StopKernelCommand + * @description Stop kernel execution. + * + * Signals the kernel to stop processing and shut down gracefully. + * Used when closing a notebook or terminating a session. + */ + StopKernelCommand: { + /** @enum {unknown} */ + type: "stop-kernel"; + }; + /** + * StoreConfig + * @description Configuration for cache stores. + */ + StoreConfig: { + args?: Record; + /** @enum {unknown} */ + type?: "file" | "redis" | "rest" | "tiered"; + }; + /** SuccessResponse */ + SuccessResponse: { + /** @default true */ + success?: boolean; + }; + /** + * SyncGraphCommand + * @description Synchronize the kernel graph with file manager state. + * + * Used when the notebook file changes externally (e.g., file reload or version control). + * Updates changed cells, deletes removed cells, and optionally executes modified cells. + * + * Attributes: + * cells: All cells known to file manager, mapping cell_id to code. + * run_ids: Cells to execute or update. + * delete_ids: Cells to delete from the graph. + * timestamp: Unix timestamp when command was created. + */ + SyncGraphCommand: { + cells: { + [key: string]: string; + }; + deleteIds: string[]; + runIds: string[]; + timestamp?: number; + /** @enum {unknown} */ + type: "sync-graph"; + }; + /** + * ToolDefinition + * @description Tool definition compatible with ai-sdk-ui format. + */ + ToolDefinition: { + description: string; + mode: ("agent" | "ask" | "manual")[]; + name: string; + parameters: Record; + /** @enum {unknown} */ + source: "backend" | "frontend" | "mcp"; + }; + /** + * TyLanguageServerConfig + * @description Configuration options for Ty Language Server. + * + * ty handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + TyLanguageServerConfig: { + enabled?: boolean; + }; + /** + * UIElementMessageNotification + * @description Send a message to a UI element. + */ + UIElementMessageNotification: { + /** @default null */ + buffers?: string[] | null; + message: Record; + model_id: string | null; + /** @enum {unknown} */ + op: "send-ui-element-message"; + ui_element: string | null; + }; + /** UnknownError */ + UnknownError: { + /** @default null */ + error_type?: string | null; + msg: string; + /** @enum {unknown} */ + type: "unknown"; + }; + /** UpdateCellCodesNotification */ + UpdateCellCodesNotification: { + cell_ids: string[]; + code_is_stale: boolean; + codes: string[]; + /** @enum {unknown} */ + op: "update-cell-codes"; + }; + /** + * UpdateCellConfigCommand + * @description Update cell configuration. + * + * Updates cell-level settings like disabled state, hide code, etc. + * + * Attributes: + * configs: Cell IDs mapped to their config updates. Each config dict + * can contain partial updates. + */ + UpdateCellConfigCommand: { + configs: { + [key: string]: Record; + }; + /** @enum {unknown} */ + type: "update-cell-config"; + }; + /** UpdateCellConfigRequest */ + UpdateCellConfigRequest: { + configs: { + [key: string]: Record; + }; + }; + /** + * UpdateCellIdsNotification + * @description Update the cell ID ordering of the cells in the notebook. + * + * Right now we send the entire list of cell IDs, + * but in the future we might want to send change-deltas. + */ + UpdateCellIdsNotification: { + cell_ids: string[]; + /** @enum {unknown} */ + op: "update-cell-ids"; + }; + /** UpdateCellIdsRequest */ + UpdateCellIdsRequest: { + cellIds: string[]; + }; + /** + * UpdateUIElementCommand + * @description Update UI element values. + * + * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). + * Updates element values and re-executes dependent cells. + * + * Attributes: + * object_ids: UI elements to update. + * values: New values for the elements. Must match length of object_ids. + * request: HTTP request context if available. + * token: Unique request identifier for deduplication. + */ + UpdateUIElementCommand: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + /** @enum {unknown} */ + type: "update-ui-element"; + values: unknown[]; + }; + /** UpdateUIElementRequest */ + UpdateUIElementRequest: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + values: unknown[]; + }; + /** UpdateUIElementValuesRequest */ + UpdateUIElementValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + /** + * UpdateUserConfigCommand + * @description Update user configuration. + * + * Updates global marimo configuration (runtime settings, display options, editor preferences). + * + * Attributes: + * config: Complete user configuration. + */ + UpdateUserConfigCommand: { + config: components["schemas"]["MarimoConfig"]; + /** @enum {unknown} */ + type: "update-user-config"; + }; + /** UpdateUserConfigRequest */ + UpdateUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + /** + * UpdateWidgetModelCommand + * @description Update anywidget model state. + * + * Updates widget model state for bidirectional Python-JavaScript communication. + * + * Attributes: + * model_id: Widget model identifier. + * message: Model message with state updates and buffer paths. + * buffers: Base64-encoded binary buffers referenced by buffer_paths. + */ + UpdateWidgetModelCommand: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + /** @enum {unknown} */ + type: "update-widget-model"; + }; + /** UpdateWidgetModelRequest */ + UpdateWidgetModelRequest: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + }; + /** + * ValidateSQLCommand + * @description Validate an SQL query. + * + * Checks if an SQL query is valid by parsing against a dialect (no DB connection) + * or validating against an actual database. + * + * Attributes: + * request_id: Unique identifier for this request. + * query: SQL query to validate. + * only_parse: If True, only parse using dialect. If False, validate against DB. + * engine: SQL engine (required if only_parse is False). + * dialect: SQL dialect for parsing (required if only_parse is True). + */ + ValidateSQLCommand: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + /** @enum {unknown} */ + type: "validate-sql"; + }; + /** ValidateSQLRequest */ + ValidateSQLRequest: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + }; + /** ValidateSQLResultNotification */ + ValidateSQLResultNotification: { + /** @default null */ + error?: string | null; + /** @enum {unknown} */ + op: "validate-sql-result"; + /** @default null */ + parse_result?: null | components["schemas"]["SqlParseResult"]; + request_id: string; + /** @default null */ + validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; + }; + /** VariableContext */ + VariableContext: { + name: string; + previewValue: unknown; + valueType: string; + }; + /** VariableDeclarationNotification */ + VariableDeclarationNotification: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + /** VariableValue */ + VariableValue: { + datatype: string | null; + name: string; + value: string | null; + }; + /** + * VariableValuesNotification + * @description List of variables and their types/values. + */ + VariableValuesNotification: { + /** @enum {unknown} */ + op: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + /** + * VariablesNotification + * @description List of variable declarations. + */ + VariablesNotification: { + /** @enum {unknown} */ + op: "variables"; + variables: components["schemas"]["VariableDeclarationNotification"][]; + }; + /** WorkspaceFilesRequest */ + WorkspaceFilesRequest: { + /** @default false */ + includeMarkdown?: boolean; + }; + /** WorkspaceFilesResponse */ + WorkspaceFilesResponse: { + /** @default 0 */ + fileCount?: number; + files: components["schemas"]["FileInfo"][]; + /** @default false */ + hasMore?: boolean; + root: string; + }; + /** + * _AppConfig + * @description Program-specific configuration. + * + * Configuration for frontends or runtimes that is specific to + * a single marimo program. + */ + _AppConfig: { + /** @default null */ + app_title?: string | null; + auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @default null */ + css_file?: string | null; + /** @default null */ + html_head_file?: string | null; + /** @default null */ + layout_file?: string | null; + /** + * @default auto + * @enum {unknown} + */ + sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + /** + * @default compact + * @enum {unknown} + */ + width?: "columns" | "compact" | "full" | "medium" | "normal"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; From 3e80595089f1a9d1b7fbb5d951f72ae29801d9f7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 26 Dec 2025 21:22:10 +0000 Subject: [PATCH 05/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../wrapper/footer-items/machine-stats.tsx | 4 +- packages/openapi/src/api.ts | 10395 ++++++++-------- 2 files changed, 5272 insertions(+), 5127 deletions(-) diff --git a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx index 24a1f265a59..f73dd8e2767 100644 --- a/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +++ b/frontend/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx @@ -57,7 +57,9 @@ const MemoryUsageBar: React.FC<{ }> = ({ memory, kernel, server }) => { const { percent, total, available, has_cgroup_mem_limit } = memory; const roundedPercent = Math.round(percent); - const memoryLabel = has_cgroup_mem_limit ? "container memory" : "computer memory"; + const memoryLabel = has_cgroup_mem_limit + ? "container memory" + : "computer memory"; const gbFormatter = useNumberFormatter({ maximumFractionDigits: 2, diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index 80d92f1974f..3ea8d1bbaec 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -4,5136 +4,5279 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI chat */ - requestBody: { - content: { - "application/json": components["schemas"]["ChatRequest"]; - }; - }; - responses: never; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/inline_completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI inline completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiInlineCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI inline completion for code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/invoke_tool": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for tool invocation */ - requestBody: { - content: { - "application/json": components["schemas"]["InvokeAiToolRequest"]; - }; - }; - responses: { - /** @description Tool invocation result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["InvokeAiToolResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Refresh MCP server configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPRefreshResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get MCP server status */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPStatusResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/clear": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ClearCacheRequest"]; - }; - }; - responses: { - /** @description Clear all caches */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["GetCacheInfoRequest"]; - }; - }; - responses: { - /** @description Get cache statistics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_datasource_connection": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; - }; - }; - responses: { - /** @description Broadcasts a datasource connection */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableRequest"]; - }; - }; - responses: { - /** @description Preview a SQL table */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table_list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListSQLTablesRequest"]; - }; - }; - responses: { - /** @description Preview a list of tables in an SQL schema */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/ipynb": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsIPYNBRequest"]; - }; - }; - responses: { - /** @description Export the notebook as IPYNB */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileOpenRequest"]; - }; - }; - responses: { - /** @description Open a file in the system editor */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileSearchRequest"]; - }; - }; - responses: { - /** @description Search for files and directories matching a query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileSearchResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/tutorial/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenTutorialRequest"]; - }; - }; - responses: { - /** @description Open a new tutorial */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MarimoFile"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/copy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CopyNotebookRequest"]; - }; - }; - responses: { - /** @description Copy notebook */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatCellsRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InvokeFunctionRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateNotebookRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/pdb/pm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DebugCellRequest"]; - }; - }; - responses: { - /** @description Run a post mortem on the most recent failed cell. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameNotebookRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteCellsRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_model_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateWidgetModelRequest"]; - }; - }; - responses: { - /** @description Set model value */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/takeover": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully closed existing sessions */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status?: string; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/add": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["AddPackageRequest"]; - }; - }; - responses: { - /** @description Install package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List installed packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListPackagesResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/remove": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RemovePackageRequest"]; - }; - }; - responses: { - /** @description Uninstall package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List dependency tree */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DependencyTreeResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSecretRequest"]; - }; - }; - responses: { - /** @description Create a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Delete a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ListSecretKeysRequest"]; - }; - }; - responses: { - /** @description List all secret keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListSecretKeysResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/sql/validate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ValidateSQLRequest"]; - }; - }; - responses: { - /** @description Validate an SQL query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status/connections": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the number of active websocket connections */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - active?: number; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - has_cgroup_cpu_limit: boolean; - percent: number; - }; - gpu?: { - index: number; - memory: { - free: number; - percent: number; - total: number; - used: number; - }; - name: string; - }[]; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - has_cgroup_mem_limit: boolean; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI chat */ + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: never; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/inline_completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI inline completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiInlineCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI inline completion for code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/invoke_tool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for tool invocation */ + requestBody: { + content: { + "application/json": components["schemas"]["InvokeAiToolRequest"]; + }; + }; + responses: { + /** @description Tool invocation result */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InvokeAiToolResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Refresh MCP server configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPRefreshResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get MCP server status */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPStatusResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/clear": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ClearCacheRequest"]; + }; + }; + responses: { + /** @description Clear all caches */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["GetCacheInfoRequest"]; + }; + }; + responses: { + /** @description Get cache statistics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_datasource_connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; + }; + }; + responses: { + /** @description Broadcasts a datasource connection */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableRequest"]; + }; + }; + responses: { + /** @description Preview a SQL table */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table_list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListSQLTablesRequest"]; + }; + }; + responses: { + /** @description Preview a list of tables in an SQL schema */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/ipynb": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsIPYNBRequest"]; + }; + }; + responses: { + /** @description Export the notebook as IPYNB */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileOpenRequest"]; + }; + }; + responses: { + /** @description Open a file in the system editor */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileSearchRequest"]; + }; + }; + responses: { + /** @description Search for files and directories matching a query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileSearchResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/tutorial/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenTutorialRequest"]; + }; + }; + responses: { + /** @description Open a new tutorial */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MarimoFile"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/copy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CopyNotebookRequest"]; + }; + }; + responses: { + /** @description Copy notebook */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatCellsRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InvokeFunctionRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateNotebookRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/pdb/pm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DebugCellRequest"]; + }; + }; + responses: { + /** @description Run a post mortem on the most recent failed cell. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameNotebookRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteCellsRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_model_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateWidgetModelRequest"]; + }; + }; + responses: { + /** @description Set model value */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/takeover": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully closed existing sessions */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status?: string; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/add": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPackageRequest"]; + }; + }; + responses: { + /** @description Install package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List installed packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListPackagesResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/remove": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePackageRequest"]; + }; + }; + responses: { + /** @description Uninstall package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/tree": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List dependency tree */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DependencyTreeResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateSecretRequest"]; + }; + }; + responses: { + /** @description Create a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Delete a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ListSecretKeysRequest"]; + }; + }; + responses: { + /** @description List all secret keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListSecretKeysResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/sql/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ValidateSQLRequest"]; + }; + }; + responses: { + /** @description Validate an SQL query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status/connections": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the number of active websocket connections */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + active?: number; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + has_cgroup_cpu_limit: boolean; + percent: number; + }; + gpu?: { + index: number; + memory: { + free: number; + percent: number; + total: number; + used: number; + }; + name: string; + }[]; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + has_cgroup_mem_limit: boolean; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AddPackageRequest - * @description This can be a remove package or a local package. - * - * Supported formats: - * - * httpx - * httpx==0.27.0 - * httpx>=0.27.0 - * git+https://github.com/encode/httpx - * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz - * /example/foo-0.1.0-py3-none-any.whl - */ - AddPackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - /** @default false */ - upgrade?: boolean | null; - }; - /** AiCompletionContext */ - AiCompletionContext: { - /** @default */ - plainText?: string; - /** @default [] */ - schema?: components["schemas"]["SchemaTable"][]; - /** @default [] */ - variables?: (string | components["schemas"]["VariableContext"])[]; - }; - /** AiCompletionRequest */ - AiCompletionRequest: { - code: string; - /** @default null */ - context?: null | components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - /** @default [] */ - messages?: components["schemas"]["ChatMessage"][]; - prompt: string; - /** @default null */ - selectedText?: string | null; - }; - /** - * AiConfig - * @description Configuration options for AI. - * - * **Keys.** - * - * - `rules`: custom rules to include in all AI completion prompts - * - `max_tokens`: the maximum number of tokens to use in AI completions - * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` - * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions - * - `models`: the models to use for AI completions - * - `open_ai`: the OpenAI config - * - `anthropic`: the Anthropic config - * - `google`: the Google AI config - * - `bedrock`: the Bedrock config - * - `azure`: the Azure config - * - `ollama`: the Ollama config - * - `github`: the GitHub config - * - `openrouter`: the OpenRouter config - * - `wandb`: the Weights & Biases config - * - `open_ai_compatible`: the OpenAI-compatible config - */ - AiConfig: { - anthropic?: components["schemas"]["AnthropicConfig"]; - azure?: components["schemas"]["OpenAiConfig"]; - bedrock?: components["schemas"]["BedrockConfig"]; - github?: components["schemas"]["GitHubConfig"]; - google?: components["schemas"]["GoogleAiConfig"]; - inline_tooltip?: boolean; - max_tokens?: number; - /** @enum {unknown} */ - mode?: "agent" | "ask" | "manual"; - models?: components["schemas"]["AiModelConfig"]; - ollama?: components["schemas"]["OpenAiConfig"]; - open_ai?: components["schemas"]["OpenAiConfig"]; - open_ai_compatible?: components["schemas"]["OpenAiConfig"]; - openrouter?: components["schemas"]["OpenAiConfig"]; - rules?: string; - wandb?: components["schemas"]["OpenAiConfig"]; - }; - /** AiInlineCompletionRequest */ - AiInlineCompletionRequest: { - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - prefix: string; - suffix: string; - }; - /** - * AiModelConfig - * @description Configuration options for an AI model. - * - * **Keys.** - * - * - `chat_model`: the model to use for chat completions - * - `edit_model`: the model to use for edit completions - * - `autocomplete_model`: the model to use for code completion/autocomplete - * - `displayed_models`: a list of models to display in the UI - * - `custom_models`: a list of custom models to use that are not from the default list - */ - AiModelConfig: { - autocomplete_model?: string; - chat_model?: string; - custom_models: string[]; - displayed_models: string[]; - edit_model?: string; - }; - /** AlertNotification */ - AlertNotification: { - description: string; - /** @enum {unknown} */ - op: "alert"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** - * AnthropicConfig - * @description Configuration options for Anthropic. - * - * **Keys.** - * - * - `api_key`: the Anthropic API key - */ - AnthropicConfig: { - api_key?: string; - }; - /** BannerNotification */ - BannerNotification: { - /** @default null */ - action?: "restart" | null; - description: string; - /** @enum {unknown} */ - op: "banner"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** BaseResponse */ - BaseResponse: { - success: boolean; - }; - /** - * BasedpyrightServerConfig - * @description Configuration options for basedpyright Language Server. - * - * basedpyright handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - BasedpyrightServerConfig: { - enabled?: boolean; - }; - /** - * BedrockConfig - * @description Configuration options for Bedrock. - * - * **Keys.** - * - * - `profile_name`: the AWS profile to use - * - `region_name`: the AWS region to use - * - `aws_access_key_id`: the AWS access key ID - * - `aws_secret_access_key`: the AWS secret access key - */ - BedrockConfig: { - aws_access_key_id?: string; - aws_secret_access_key?: string; - profile_name?: string; - region_name?: string; - }; - /** - * CacheClearedNotification - * @description Result of clearing cache. - */ - CacheClearedNotification: { - bytes_freed: number; - /** @enum {unknown} */ - op: "cache-cleared"; - }; - /** - * CacheInfoNotification - * @description Cache statistics information. - */ - CacheInfoNotification: { - disk_to_free: number; - disk_total: number; - hits: number; - misses: number; - /** @enum {unknown} */ - op: "cache-info"; - time: number; - }; - /** - * CellChannel - * @description The channel of a cell's output. - * @enum {unknown} - */ - CellChannel: "marimo-error" | "media" | "output" | "pdb" | "stderr" | "stdin" | "stdout"; - /** - * CellConfig - * @description Internal representation of a cell's configuration. - * This is not part of the public API. - */ - CellConfig: { - /** @default null */ - column?: number | null; - /** @default false */ - disabled?: boolean; - /** @default false */ - hide_code?: boolean; - }; - /** - * CellNotification - * @description Op to transition a cell. - * - * A CellNotification's data has some optional fields: - * - * output - a CellOutput - * console - a CellOutput (console msg to append), or a list of - * CellOutputs - * status - execution status - * stale_inputs - whether the cell has stale inputs (variables, modules, ...) - * run_id - the run associated with this cell. - * serialization - the serialization status of the cell - * - * Omitting a field means that its value should be unchanged! - * - * And one required field: - * - * cell_id - the cell id - */ - CellNotification: { - cell_id: string; - /** @default null */ - console?: components["schemas"]["CellOutput"][] | null | components["schemas"]["CellOutput"]; - /** @enum {unknown} */ - op: "cell-op"; - /** @default null */ - output?: null | components["schemas"]["CellOutput"]; - /** @default null */ - run_id?: string | null; - /** @default null */ - serialization?: string | null; - /** @default null */ - stale_inputs?: boolean | null; - /** @default null */ - status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; - timestamp?: number; - }; - /** CellOutput */ - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: string | (components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"])[] | Record; - /** @enum {unknown} */ - mimetype: "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.vegalite.v5+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/plain" | "video/mp4" | "video/mpeg"; - timestamp?: number; - }; - /** ChatAttachment */ - ChatAttachment: { - /** @default null */ - content_type?: string | null; - /** @default attachment */ - name?: string; - url: string; - }; - /** - * ChatMessage - * @description A message in a chat. - */ - ChatMessage: { - /** @default null */ - attachments?: components["schemas"]["ChatAttachment"][] | null; - content: unknown; - /** @default null */ - parts?: Record[] | null; - /** @enum {unknown} */ - role: "assistant" | "system" | "user"; - }; - /** ChatRequest */ - ChatRequest: { - context: components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - messages: components["schemas"]["ChatMessage"][]; - /** @default null */ - model?: string | null; - /** @default null */ - tools?: components["schemas"]["ToolDefinition"][] | null; - /** @default null */ - variables?: (string | components["schemas"]["VariableContext"])[] | null; - }; - /** - * ClearCacheCommand - * @description Clear all cached data. - * - * Clears all cache contexts, freeing memory and disk space. - * Affects all cells using the @cache decorator. - */ - ClearCacheCommand: { - /** @enum {unknown} */ - type: "clear-cache"; - }; - /** ClearCacheRequest */ - ClearCacheRequest: Record; - /** - * CodeCompletionCommand - * @description Request code completion suggestions. - * - * Sent when the user requests autocomplete. Provides code context up to - * the cursor position for the language server. - * - * Attributes: - * id: Unique identifier for this request. - * document: Source code up to the cursor position. - * cell_id: Cell where completion is requested. - */ - CodeCompletionCommand: { - cellId: string; - document: string; - id: string; - /** @enum {unknown} */ - type: "code-completion"; - }; - /** CodeCompletionRequest */ - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - /** - * ColumnStats - * @description Represents stats for a column in a data table. - */ - ColumnStats: { - /** @default null */ - false?: number | null; - /** @default null */ - max?: unknown | null; - /** @default null */ - mean?: unknown | null; - /** @default null */ - median?: unknown | null; - /** @default null */ - min?: unknown | null; - /** @default null */ - nulls?: number | null; - /** @default null */ - p25?: unknown | null; - /** @default null */ - p5?: unknown | null; - /** @default null */ - p75?: unknown | null; - /** @default null */ - p95?: unknown | null; - /** @default null */ - std?: unknown | null; - /** @default null */ - total?: number | null; - /** @default null */ - true?: number | null; - /** @default null */ - unique?: number | null; - }; - /** - * CompletedRunNotification - * @description Written on run completion (of submitted cells and their descendants. - */ - CompletedRunNotification: { - /** @enum {unknown} */ - op: "completed-run"; - }; - /** - * CompletionConfig - * @description Configuration for code completion. - * - * A dict with key/value pairs configuring code completion in the marimo - * editor. - * - * **Keys.** - * - * - `activate_on_typing`: if `False`, completion won't activate - * until the completion hotkey is entered - * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing - * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` - * - `codeium_api_key`: the Codeium API key - */ - CompletionConfig: { - activate_on_typing: boolean; - api_key?: string | null; - base_url?: string | null; - codeium_api_key?: string | null; - copilot: boolean | ("codeium" | "custom" | "github"); - model?: string | null; - signature_hint_on_typing: boolean; - }; - /** CompletionOption */ - CompletionOption: { - completion_info: string | null; - name: string; - type: string; - }; - /** - * CompletionResultNotification - * @description Code completion result. - */ - CompletionResultNotification: { - completion_id: string; - /** @enum {unknown} */ - op: "completion-result"; - options: components["schemas"]["CompletionOption"][]; - prefix_length: number; - }; - /** CopyNotebookRequest */ - CopyNotebookRequest: { - destination: string; - source: string; - }; - /** - * CreateNotebookCommand - * @description Instantiate and initialize a notebook. - * - * Sent when a notebook is first loaded. Contains all cells and initial UI element values. - * - * Attributes: - * execution_requests: ExecuteCellCommand for each notebook cell. - * set_ui_element_value_request: Initial UI element values. - * auto_run: Whether to automatically execute cells on instantiation. - * request: HTTP request context if available. - */ - CreateNotebookCommand: { - autoRun: boolean; - executionRequests: components["schemas"]["ExecuteCellCommand"][]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; - /** @enum {unknown} */ - type: "create-notebook"; - }; - /** CreateSecretRequest */ - CreateSecretRequest: { - key: string; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - value: string; - }; - /** CycleError */ - CycleError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {unknown} */ - type: "cycle"; - }; - /** - * DataColumnPreviewNotification - * @description Preview of a column in a dataset. - */ - DataColumnPreviewNotification: { - /** @default null */ - chart_code?: string | null; - /** @default null */ - chart_spec?: string | null; - column_name: string; - /** @default null */ - error?: string | null; - /** @default null */ - missing_packages?: string[] | null; - /** @enum {unknown} */ - op: "data-column-preview"; - /** @default null */ - stats?: null | components["schemas"]["ColumnStats"]; - table_name: string; - }; - /** - * DataSourceConnection - * @description Represents a data source connection. - * - * Attributes: - * source (str): The source of the data source connection. E.g 'postgres'. - * dialect (str): The dialect of the data source connection. E.g 'postgresql'. - * name (str): The name of the data source connection. E.g 'engine'. - * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. - * databases (List[Database]): The databases in the data source connection. - * default_database (Optional[str]): The default database in the data source connection. - * default_schema (Optional[str]): The default schema in the data source connection. - */ - DataSourceConnection: { - databases: components["schemas"]["Database"][]; - /** @default null */ - default_database?: string | null; - /** @default null */ - default_schema?: string | null; - dialect: string; - display_name: string; - name: string; - source: string; - }; - /** DataSourceConnectionsNotification */ - DataSourceConnectionsNotification: { - connections: components["schemas"]["DataSourceConnection"][]; - /** @enum {unknown} */ - op: "data-source-connections"; - }; - /** - * DataTable - * @description Represents a data table. - * - * Attributes: - * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). - * source (str): Can be dialect, or source db name. - * name (str): Name of the data table. - * num_rows (Optional[int]): Total number of rows in the table, if known. - * num_columns (Optional[int]): Total number of columns in the table, if known. - * variable_name (Optional[VariableName]): Variable name referencing this table in code. - * columns (List[DataTableColumn]): List of column definitions and metadata. - * engine (Optional[VariableName]): Database engine or connection handler, if any. - * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. - * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. - * indexes (Optional[List[str]]): Column names used as indexes, if any. - */ - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - /** @default null */ - engine?: string | null; - /** @default null */ - indexes?: string[] | null; - name: string; - num_columns: number | null; - num_rows: number | null; - /** @default null */ - primary_keys?: string[] | null; - source: string; - /** @enum {unknown} */ - source_type: "catalog" | "connection" | "duckdb" | "local"; - /** - * @default table - * @enum {unknown} - */ - type?: "table" | "view"; - variable_name: string | null; - }; - /** - * DataTableColumn - * @description Represents a column in a data table. - * - * Attributes: - * name (str): The name of the column. - * type (DataType): The data type of the column. - * external_type (ExternalDataType): The raw data type of the column. - * sample_values (List[Any]): The sample values of the column. - */ - DataTableColumn: { - external_type: string; - name: string; - sample_values: unknown[]; - /** @enum {unknown} */ - type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; - }; - /** - * Database - * @description Represents a collection of schemas. - * - * Attributes: - * name (str): The name of the database - * dialect (str): The dialect of the database - * schemas (List[Schema]): List of schemas in the database - * engine (Optional[VariableName]): Database engine or connection handler, if any. - */ - Database: { - dialect: string; - /** @default null */ - engine?: string | null; - name: string; - schemas: components["schemas"]["Schema"][]; - }; - /** - * DatasetsNotification - * @description List of datasets. - */ - DatasetsNotification: { - /** @default null */ - clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; - /** @enum {unknown} */ - op: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - /** - * DatasourcesConfig - * @description Configuration for datasources panel. - * - * **Keys.** - * - * - `auto_discover_schemas`: if `True`, include schemas in the datasource - * - `auto_discover_tables`: if `True`, include tables in the datasource - * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource - */ - DatasourcesConfig: { - auto_discover_columns?: boolean | "auto"; - auto_discover_schemas?: boolean | "auto"; - auto_discover_tables?: boolean | "auto"; - }; - /** - * DebugCellCommand - * @description Enter debugger mode for a cell. - * - * Starts the Python debugger (pdb) for the specified cell. - * - * Attributes: - * cell_id: Cell to debug. - * request: HTTP request context if available. - */ - DebugCellCommand: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "debug-cell"; - }; - /** DebugCellRequest */ - DebugCellRequest: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * DeleteCellCommand - * @description Delete a cell from the notebook. - * - * Removes cell from the dependency graph and cleans up its variables. - * Dependent cells may become stale. - * - * Attributes: - * cell_id: Cell to delete. - */ - DeleteCellCommand: { - cellId: string; - /** @enum {unknown} */ - type: "delete-cell"; - }; - /** DeleteCellRequest */ - DeleteCellRequest: { - cellId: string; - }; - /** DeleteSecretRequest */ - DeleteSecretRequest: { - key: string; - }; - /** DependencyTreeNode */ - DependencyTreeNode: { - dependencies: components["schemas"]["DependencyTreeNode"][]; - name: string; - tags: { - [key: string]: string; - }[]; - version: string | null; - }; - /** DependencyTreeResponse */ - DependencyTreeResponse: { - tree: null | components["schemas"]["DependencyTreeNode"]; - }; - /** - * DiagnosticsConfig - * @description Configuration options for diagnostics. - * - * **Keys.** - * - * - `enabled`: if `True`, diagnostics will be shown in the editor - * - `sql_linter`: if `True`, SQL cells will have linting enabled - */ - DiagnosticsConfig: { - enabled?: boolean; - sql_linter?: boolean; - }; - /** - * DisplayConfig - * @description Configuration for display. - * - * **Keys.** - * - * - `theme`: `"light"`, `"dark"`, or `"system"` - * - `code_editor_font_size`: font size for the code editor - * - `cell_output`: `"above"` or `"below"` - * - `dataframes`: `"rich"` or `"plain"` - * - `custom_css`: list of paths to custom CSS files - * - `default_table_page_size`: default number of rows to display in tables - * - `default_table_max_columns`: default maximum number of columns to display in tables - * - `reference_highlighting`: if `True`, highlight reactive variable references - * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") - */ - DisplayConfig: { - /** @enum {unknown} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - custom_css?: string[]; - /** @enum {unknown} */ - dataframes: "plain" | "rich"; - default_table_max_columns: number; - default_table_page_size: number; - /** @enum {unknown} */ - default_width: "columns" | "compact" | "full" | "medium" | "normal"; - locale?: string | null; - reference_highlighting?: boolean; - /** @enum {unknown} */ - theme: "dark" | "light" | "system"; - }; - /** - * ExecuteCellCommand - * @description Execute a single cell. - * - * Executes a cell with the provided code. Dependent cells may be - * re-executed based on the reactive execution mode. - * - * Attributes: - * cell_id: Cell to execute. - * code: Python code to execute. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellCommand: { - cellId: string; - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cell"; - }; - /** - * ExecuteCellsCommand - * @description Execute multiple cells in a batch. - * - * Executes multiple cells with their corresponding code. The kernel manages - * dependency tracking and reactive execution. - * - * Attributes: - * cell_ids: Cells to execute. - * codes: Python code for each cell. Must match length of cell_ids. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellsCommand: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cells"; - }; - /** ExecuteCellsRequest */ - ExecuteCellsRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteScratchpadCommand - * @description Execute code in the scratchpad. - * - * The scratchpad is a temporary execution environment that doesn't affect - * the notebook's cells or dependencies. Runs in an isolated cell with a copy - * of the global namespace, useful for experimentation. - * - * Attributes: - * code: Python code to execute. - * request: HTTP request context if available. - */ - ExecuteScratchpadCommand: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-scratchpad"; - }; - /** ExecuteScratchpadRequest */ - ExecuteScratchpadRequest: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteStaleCellsCommand - * @description Execute all stale cells. - * - * Cells become stale when their dependencies change but haven't been - * re-executed yet. Brings the notebook to a consistent state. - * - * Attributes: - * request: HTTP request context if available. - */ - ExecuteStaleCellsCommand: { - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-stale-cells"; - }; - /** ExportAsHTMLRequest */ - ExportAsHTMLRequest: { - /** @default null */ - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - /** ExportAsIPYNBRequest */ - ExportAsIPYNBRequest: { - download: boolean; - }; - /** ExportAsMarkdownRequest */ - ExportAsMarkdownRequest: { - download: boolean; - }; - /** ExportAsScriptRequest */ - ExportAsScriptRequest: { - download: boolean; - }; - /** FileCreateRequest */ - FileCreateRequest: { - /** @default null */ - contents?: string | null; - name: string; - path: string; - /** @enum {unknown} */ - type: "directory" | "file"; - }; - /** FileCreateResponse */ - FileCreateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDeleteRequest */ - FileDeleteRequest: { - path: string; - }; - /** FileDeleteResponse */ - FileDeleteResponse: { - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDetailsRequest */ - FileDetailsRequest: { - path: string; - }; - /** FileDetailsResponse */ - FileDetailsResponse: { - /** @default null */ - contents?: string | null; - file: components["schemas"]["FileInfo"]; - /** @default null */ - mimeType?: string | null; - }; - /** FileInfo */ - FileInfo: { - /** @default [] */ - children?: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - }; - /** FileListRequest */ - FileListRequest: { - /** @default null */ - path?: string | null; - }; - /** FileListResponse */ - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - /** FileMoveRequest */ - FileMoveRequest: { - newPath: string; - path: string; - }; - /** FileMoveResponse */ - FileMoveResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileOpenRequest */ - FileOpenRequest: { - /** @default null */ - lineNumber?: number | null; - path: string; - }; - /** FileSearchRequest */ - FileSearchRequest: { - /** @default 3 */ - depth?: number; - /** @default true */ - includeDirectories?: boolean; - /** @default true */ - includeFiles?: boolean; - /** @default 100 */ - limit?: number; - /** @default null */ - path?: string | null; - query: string; - }; - /** FileSearchResponse */ - FileSearchResponse: { - files: components["schemas"]["FileInfo"][]; - query: string; - totalFound: number; - }; - /** FileUpdateRequest */ - FileUpdateRequest: { - contents: string; - path: string; - }; - /** FileUpdateResponse */ - FileUpdateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FocusCellNotification */ - FocusCellNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "focus-cell"; - }; - /** FormatCellsRequest */ - FormatCellsRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - /** FormatResponse */ - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - /** - * FormattingConfig - * @description Configuration for code formatting. - * - * **Keys.** - * - * - `line_length`: max line length - */ - FormattingConfig: { - line_length: number; - }; - /** - * FunctionCallResultNotification - * @description Result of calling a function. - */ - FunctionCallResultNotification: { - function_call_id: string; - /** @enum {unknown} */ - op: "function-call-result"; - return_value: unknown; - status: components["schemas"]["HumanReadableStatus"]; - }; - /** - * GetCacheInfoCommand - * @description Retrieve cache statistics. - * - * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). - */ - GetCacheInfoCommand: { - /** @enum {unknown} */ - type: "get-cache-info"; - }; - /** GetCacheInfoRequest */ - GetCacheInfoRequest: Record; - /** - * GitHubConfig - * @description Configuration options for GitHub. - * - * **Keys.** - * - * - `api_key`: the GitHub API token - * - `base_url`: the base URL for the API - * - `copilot_settings`: configuration settings for GitHub Copilot LSP. - * Supports settings like `http` (proxy configuration), `telemetry`, - * and `github-enterprise` (enterprise URI). - */ - GitHubConfig: { - api_key?: string; - base_url?: string; - copilot_settings?: Record; - }; - /** - * GoogleAiConfig - * @description Configuration options for Google AI. - * - * **Keys.** - * - * - `api_key`: the Google AI API key - */ - GoogleAiConfig: { - api_key?: string; - }; - /** - * HTTPRequest - * @description Serializable HTTP request representation. - * - * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe - * subset of data. Excludes session and auth to prevent exposing sensitive data. - * - * Attributes: - * url: Serialized URL with path, port, scheme, netloc, query, hostname. - * base_url: Serialized base URL. - * headers: Request headers (marimo-specific headers excluded). - * query_params: Query parameters mapped to lists of values. - * path_params: Path parameters from the URL route. - * cookies: Request cookies. - * meta: User-defined storage for custom data. - * user: User info from authentication middleware (e.g., is_authenticated, username). - */ - HTTPRequest: { - base_url: Record; - cookies: { - [key: string]: string; - }; - headers: { - [key: string]: string; - }; - meta: Record; - path_params: Record; - query_params: { - [key: string]: string[]; - }; - url: Record; - user: unknown; - }; - /** - * HumanReadableStatus - * @description Human-readable status. - */ - HumanReadableStatus: { - /** @enum {unknown} */ - code: "error" | "ok"; - /** @default null */ - message?: string | null; - /** @default null */ - title?: string | null; - }; - /** ImportStarError */ - ImportStarError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "import-star"; - }; - /** - * InstallPackagesCommand - * @description Install Python packages. - * - * Installs missing packages using the specified package manager. Triggered - * automatically on import errors or manually by the user. - * - * Attributes: - * manager: Package manager to use ('pip', 'conda', 'uv', etc.). - * versions: Package names mapped to version specifiers. Empty version - * means install latest. - */ - InstallPackagesCommand: { - manager: string; - /** @enum {unknown} */ - type: "install-packages"; - versions: { - [key: string]: string; - }; - }; - /** InstallPackagesRequest */ - InstallPackagesRequest: { - manager: string; - versions: { - [key: string]: string; - }; - }; - /** InstallingPackageAlertNotification */ - InstallingPackageAlertNotification: { - /** @default null */ - log_status?: ("append" | "done" | "start") | null; - /** @default null */ - logs?: { - [key: string]: string; - } | null; - /** @enum {unknown} */ - op: "installing-package-alert"; - packages: { - [key: string]: "failed" | "installed" | "installing" | "queued"; - }; - }; - /** InstantiateNotebookRequest */ - InstantiateNotebookRequest: { - /** @default true */ - autoRun?: boolean; - objectIds: string[]; - values: unknown[]; - }; - /** - * InterruptedNotification - * @description Written when the kernel is interrupted by the user. - */ - InterruptedNotification: { - /** @enum {unknown} */ - op: "interrupted"; - }; - /** InvokeAiToolRequest */ - InvokeAiToolRequest: { - arguments: Record; - toolName: string; - }; - /** InvokeAiToolResponse */ - InvokeAiToolResponse: { - /** @default null */ - error?: string | null; - result: unknown; - success: boolean; - toolName: string; - }; - /** - * InvokeFunctionCommand - * @description Invoke a function from a UI element. - * - * Called when a UI element needs to invoke a Python function. - * - * Attributes: - * function_call_id: Unique identifier for this call. - * namespace: Namespace where the function is registered. - * function_name: Function to invoke. - * args: Keyword arguments for the function. - */ - InvokeFunctionCommand: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - /** @enum {unknown} */ - type: "invoke-function"; - }; - /** InvokeFunctionRequest */ - InvokeFunctionRequest: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - }; - /** KernelCapabilitiesNotification */ - KernelCapabilitiesNotification: { - /** @default false */ - basedpyright?: boolean; - /** @default false */ - pylsp?: boolean; - /** @default false */ - terminal?: boolean; - /** @default false */ - ty?: boolean; - }; - /** - * KernelReadyNotification - * @description Kernel is ready for execution. - */ - KernelReadyNotification: { - app_config: components["schemas"]["_AppConfig"]; - capabilities: components["schemas"]["KernelCapabilitiesNotification"]; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code: { - [key: string]: string; - } | null; - last_execution_time: { - [key: string]: number; - } | null; - layout: components["schemas"]["LayoutConfig"] | null; - names: string[]; - /** @enum {unknown} */ - op: "kernel-ready"; - resumed: boolean; - ui_values: Record | null; - }; - /** - * KeymapConfig - * @description Configuration for keymaps. - * - * **Keys.** - * - * - `preset`: one of `"default"` or `"vim"` - * - `overrides`: a dict of keymap actions to their keymap override - * - `vimrc`: path to a vimrc file to load keymaps from - * - `destructive_delete`: if `True`, allows deleting cells with content. - */ - KeymapConfig: { - destructive_delete?: boolean; - overrides?: { - [key: string]: string; - }; - /** @enum {unknown} */ - preset: "default" | "vim"; - vimrc?: string | null; - }; - /** KnownUnions */ - KnownUnions: { - command: components["schemas"]["CreateNotebookCommand"] | components["schemas"]["RenameNotebookCommand"] | components["schemas"]["ExecuteCellsCommand"] | components["schemas"]["ExecuteScratchpadCommand"] | components["schemas"]["ExecuteStaleCellsCommand"] | components["schemas"]["DebugCellCommand"] | components["schemas"]["DeleteCellCommand"] | components["schemas"]["SyncGraphCommand"] | components["schemas"]["UpdateCellConfigCommand"] | components["schemas"]["InstallPackagesCommand"] | components["schemas"]["UpdateUIElementCommand"] | components["schemas"]["UpdateWidgetModelCommand"] | components["schemas"]["InvokeFunctionCommand"] | components["schemas"]["UpdateUserConfigCommand"] | components["schemas"]["PreviewDatasetColumnCommand"] | components["schemas"]["PreviewSQLTableCommand"] | components["schemas"]["ListSQLTablesCommand"] | components["schemas"]["ValidateSQLCommand"] | components["schemas"]["ListDataSourceConnectionCommand"] | components["schemas"]["ListSecretKeysCommand"] | components["schemas"]["RefreshSecretsCommand"] | components["schemas"]["ClearCacheCommand"] | components["schemas"]["GetCacheInfoCommand"] | components["schemas"]["StopKernelCommand"]; - /** @enum {unknown} */ - data_type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; - error: components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"]; - notification: components["schemas"]["CellNotification"] | components["schemas"]["FunctionCallResultNotification"] | components["schemas"]["UIElementMessageNotification"] | components["schemas"]["RemoveUIElementsNotification"] | components["schemas"]["ReloadNotification"] | components["schemas"]["ReconnectedNotification"] | components["schemas"]["InterruptedNotification"] | components["schemas"]["CompletedRunNotification"] | components["schemas"]["KernelReadyNotification"] | components["schemas"]["CompletionResultNotification"] | components["schemas"]["AlertNotification"] | components["schemas"]["BannerNotification"] | components["schemas"]["MissingPackageAlertNotification"] | components["schemas"]["InstallingPackageAlertNotification"] | components["schemas"]["StartupLogsNotification"] | components["schemas"]["VariablesNotification"] | components["schemas"]["VariableValuesNotification"] | components["schemas"]["QueryParamsSetNotification"] | components["schemas"]["QueryParamsAppendNotification"] | components["schemas"]["QueryParamsDeleteNotification"] | components["schemas"]["QueryParamsClearNotification"] | components["schemas"]["DatasetsNotification"] | components["schemas"]["DataColumnPreviewNotification"] | components["schemas"]["SQLTablePreviewNotification"] | components["schemas"]["SQLTableListPreviewNotification"] | components["schemas"]["DataSourceConnectionsNotification"] | components["schemas"]["ValidateSQLResultNotification"] | components["schemas"]["SecretKeysResultNotification"] | components["schemas"]["CacheClearedNotification"] | components["schemas"]["CacheInfoNotification"] | components["schemas"]["FocusCellNotification"] | components["schemas"]["UpdateCellCodesNotification"] | components["schemas"]["UpdateCellIdsNotification"]; - }; - /** - * LanguageServersConfig - * @description Configuration options for language servers. - * - * **Keys.** - * - * - `pylsp`: the pylsp config - */ - LanguageServersConfig: { - basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; - pylsp?: components["schemas"]["PythonLanguageServerConfig"]; - ty?: components["schemas"]["TyLanguageServerConfig"]; - }; - /** LayoutConfig */ - LayoutConfig: { - data: Record; - type: string; - }; - /** - * ListDataSourceConnectionCommand - * @description List data source schemas. - * - * Retrieves available schemas for a data source engine. - * - * Attributes: - * engine: Data source engine identifier. - */ - ListDataSourceConnectionCommand: { - engine: string; - /** @enum {unknown} */ - type: "list-data-source-connection"; - }; - /** ListDataSourceConnectionRequest */ - ListDataSourceConnectionRequest: { - engine: string; - }; - /** ListPackagesResponse */ - ListPackagesResponse: { - packages: components["schemas"]["PackageDescription"][]; - }; - /** - * ListSQLTablesCommand - * @description List tables in an SQL schema. - * - * Retrieves names of all tables and views in a schema. Used by the SQL - * editor for table selection. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database to query. - * schema: Schema to list tables from. - */ - ListSQLTablesCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - /** @enum {unknown} */ - type: "list-sql-tables"; - }; - /** ListSQLTablesRequest */ - ListSQLTablesRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - }; - /** - * ListSecretKeysCommand - * @description List available secret keys. - * - * Retrieves secret names without exposing values. - * - * Attributes: - * request_id: Unique identifier for this request. - */ - ListSecretKeysCommand: { - requestId: string; - /** @enum {unknown} */ - type: "list-secret-keys"; - }; - /** ListSecretKeysRequest */ - ListSecretKeysRequest: { - requestId: string; - }; - /** ListSecretKeysResponse */ - ListSecretKeysResponse: { - keys: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** - * MCPConfig - * @description Configuration for MCP servers - * - * Note: the field name `mcpServers` is camelCased to match MCP server - * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) - */ - MCPConfig: { - mcpServers: { - [key: string]: Record; - }; - presets?: ("context7" | "marimo")[]; - }; - /** MCPRefreshResponse */ - MCPRefreshResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: boolean; - }; - success: boolean; - }; - /** MCPStatusResponse */ - MCPStatusResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: "connected" | "disconnected" | "failed" | "pending"; - }; - /** @enum {unknown} */ - status: "error" | "ok" | "partial"; - }; - /** MarimoAncestorPreventedError */ - MarimoAncestorPreventedError: { - blamed_cell: string | null; - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-prevented"; - }; - /** MarimoAncestorStoppedError */ - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-stopped"; - }; - /** - * MarimoConfig - * @description Configuration for the marimo editor - */ - MarimoConfig: { - ai?: components["schemas"]["AiConfig"]; - completion: components["schemas"]["CompletionConfig"]; - datasources?: components["schemas"]["DatasourcesConfig"]; - diagnostics?: components["schemas"]["DiagnosticsConfig"]; - display: components["schemas"]["DisplayConfig"]; - experimental?: Record; - formatting: components["schemas"]["FormattingConfig"]; - keymap: components["schemas"]["KeymapConfig"]; - language_servers?: components["schemas"]["LanguageServersConfig"]; - mcp?: components["schemas"]["MCPConfig"]; - package_management: components["schemas"]["PackageManagementConfig"]; - runtime: components["schemas"]["RuntimeConfig"]; - save: components["schemas"]["SaveConfig"]; - server: components["schemas"]["ServerConfig"]; - sharing?: components["schemas"]["SharingConfig"]; - snippets?: components["schemas"]["SnippetsConfig"]; - }; - /** MarimoExceptionRaisedError */ - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell: string | null; - /** @enum {unknown} */ - type: "exception"; - }; - /** MarimoFile */ - MarimoFile: { - /** @default null */ - initializationId?: string | null; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - /** @default null */ - sessionId?: string | null; - }; - /** - * 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. - */ - MarimoInternalError: { - error_id: string; - /** @default */ - msg?: string; - /** @enum {unknown} */ - type: "internal"; - }; - /** MarimoInterruptionError */ - MarimoInterruptionError: { - /** @enum {unknown} */ - type: "interruption"; - }; - /** - * MarimoSQLError - * @description SQL-specific error with enhanced metadata for debugging. - */ - MarimoSQLError: { - /** @default null */ - hint?: string | null; - msg: string; - /** @default 0 */ - node_col_offset?: number; - /** @default 0 */ - node_lineno?: number; - /** @default null */ - sql_col?: number | null; - /** @default null */ - sql_line?: number | null; - sql_statement: string; - /** @enum {unknown} */ - type: "sql-error"; - }; - /** MarimoStrictExecutionError */ - MarimoStrictExecutionError: { - blamed_cell: string | null; - msg: string; - ref: string; - /** @enum {unknown} */ - type: "strict-exception"; - }; - /** MarimoSyntaxError */ - MarimoSyntaxError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "syntax"; - }; - /** MissingPackageAlertNotification */ - MissingPackageAlertNotification: { - isolated: boolean; - /** @enum {unknown} */ - op: "missing-package-alert"; - packages: string[]; - }; - /** - * ModelMessage - * @description Widget model state update message. - * - * State changes for anywidget models, including state dict and binary buffer paths. - * - * Attributes: - * state: Model state updates. - * buffer_paths: Paths within state dict pointing to binary buffers. - */ - ModelMessage: { - bufferPaths: (string | number)[][]; - state: Record; - }; - /** MultipleDefinitionError */ - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {unknown} */ - type: "multiple-defs"; - }; - /** - * OpenAiConfig - * @description Configuration options for OpenAI or OpenAI-compatible services. - * - * **Keys.** - * - * - `api_key`: the OpenAI API key - * - `base_url`: the base URL for the API - * - `project`: the project ID for the OpenAI API - * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios - * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client - * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server - * - `extra_headers`: extra headers to be passed to the OpenAI client - */ - OpenAiConfig: { - api_key?: string; - base_url?: string; - ca_bundle_path?: string; - client_pem?: string; - extra_headers?: { - [key: string]: string; - }; - model?: string; - project?: string; - ssl_verify?: boolean; - }; - /** OpenTutorialRequest */ - OpenTutorialRequest: { - tutorialId: ("dataflow" | "fileformat" | "for-jupyter-users" | "intro" | "layout" | "markdown" | "plots" | "sql" | "ui") | "markdown-format"; - }; - /** PackageDescription */ - PackageDescription: { - name: string; - version: string; - }; - /** - * PackageManagementConfig - * @description Configuration options for package management. - * - * **Keys.** - * - * - `manager`: the package manager to use - */ - PackageManagementConfig: { - /** @enum {unknown} */ - manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; - }; - /** PackageOperationResponse */ - PackageOperationResponse: { - /** @default null */ - error?: string | null; - success: boolean; - }; - /** - * PreviewDatasetColumnCommand - * @description Preview a dataset column. - * - * Retrieves and displays data from a single column (dataframe or SQL table). - * Used by the data explorer UI. - * - * Attributes: - * source_type: Data source type ('dataframe', 'sql', etc.). - * source: Source identifier (connection string or variable name). - * table_name: Table or dataframe variable name. - * column_name: Column to preview. - * fully_qualified_table_name: Full database.schema.table name for SQL. - */ - PreviewDatasetColumnCommand: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - /** @enum {unknown} */ - type: "preview-dataset-column"; - }; - /** PreviewDatasetColumnRequest */ - PreviewDatasetColumnRequest: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - }; - /** - * PreviewSQLTableCommand - * @description Preview SQL table details. - * - * Retrieves metadata and sample data for a table. Used by the SQL editor - * and data explorer. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database containing the table. - * schema: Schema containing the table. - * table_name: Table to preview. - */ - PreviewSQLTableCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - /** @enum {unknown} */ - type: "preview-sql-table"; - }; - /** PreviewSQLTableRequest */ - PreviewSQLTableRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - }; - /** - * PythonLanguageServerConfig - * @description Configuration options for Python Language Server. - * - * pylsp handles completion, hover, go-to-definition, and diagnostics. - */ - PythonLanguageServerConfig: { - enable_flake8?: boolean; - enable_mypy?: boolean; - enable_pydocstyle?: boolean; - enable_pyflakes?: boolean; - enable_pylint?: boolean; - enable_ruff?: boolean; - enabled?: boolean; - }; - /** QueryParamsAppendNotification */ - QueryParamsAppendNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-append"; - value: string; - }; - /** QueryParamsClearNotification */ - QueryParamsClearNotification: { - /** @enum {unknown} */ - op: "query-params-clear"; - }; - /** QueryParamsDeleteNotification */ - QueryParamsDeleteNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-delete"; - value: string | null; - }; - /** - * QueryParamsSetNotification - * @description Set query parameters. - */ - QueryParamsSetNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-set"; - value: string | string[]; - }; - /** ReadCodeResponse */ - ReadCodeResponse: { - contents: string; - }; - /** RecentFilesResponse */ - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** ReconnectedNotification */ - ReconnectedNotification: { - /** @enum {unknown} */ - op: "reconnected"; - }; - /** - * RefreshSecretsCommand - * @description Refresh secrets from the secrets store. - * - * Reloads secrets from the provider without restarting the kernel. - */ - RefreshSecretsCommand: { - /** @enum {unknown} */ - type: "refresh-secrets"; - }; - /** RefreshSecretsRequest */ - RefreshSecretsRequest: Record; - /** ReloadNotification */ - ReloadNotification: { - /** @enum {unknown} */ - op: "reload"; - }; - /** RemovePackageRequest */ - RemovePackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - }; - /** - * RemoveUIElementsNotification - * @description Invalidate UI elements for a given cell. - */ - RemoveUIElementsNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "remove-ui-elements"; - }; - /** - * RenameNotebookCommand - * @description Rename or move the notebook file. - * - * Updates the notebook's filename in the kernel metadata. - * - * Attributes: - * filename: New filename or path for the notebook. - */ - RenameNotebookCommand: { - filename: string; - /** @enum {unknown} */ - type: "rename-notebook"; - }; - /** RenameNotebookRequest */ - RenameNotebookRequest: { - filename: string; - }; - /** RunningNotebooksResponse */ - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** - * RuntimeConfig - * @description Configuration for runtime. - * - * **Keys.** - * - * - `auto_instantiate`: if `False`, cells won't automatically - * run on startup. This only applies when editing a notebook, - * and not when running as an application. - * The default is `True`. - * - `auto_reload`: if `lazy`, cells importing modified modules will marked - * as stale; if `autorun`, affected cells will be automatically run. similar - * to IPython's %autoreload extension but with more code intelligence. - * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. - * execution. - * - `on_cell_change`: if `lazy`, cells will be marked stale when their - * ancestors run but won't autorun; if `autorun`, cells will automatically - * run when their ancestors run. - * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; - * if `strict` marimo will clone cell declarations by default, avoiding - * hidden potential state build up. - * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks - * affected cells as stale, `"autorun"` automatically runs affected cells. - * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger - * values may affect frontend performance - * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; - * larger values may affect frontend performance - * - `pythonpath`: a list of directories to add to the Python search path. - * Directories will be added to the head of sys.path. Similar to the - * `PYTHONPATH` environment variable, the directories will be included in - * where Python will look for imported modules. - * - `dotenv`: a list of paths to `.env` files to load. - * If the file does not exist, it will be silently ignored. - * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. - * - `default_sql_output`: the default output format for SQL queries. Can be one of: - * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. - * The default is `"auto"`. - * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: - * `html`, `markdown`, `ipynb`. - * The default is None. - */ - RuntimeConfig: { - auto_instantiate: boolean; - /** @enum {unknown} */ - auto_reload: "autorun" | "lazy" | "off"; - default_auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @enum {unknown} */ - default_sql_output: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - dotenv?: string[]; - /** @enum {unknown} */ - on_cell_change: "autorun" | "lazy"; - output_max_bytes: number; - pythonpath?: string[]; - reactive_tests: boolean; - std_stream_max_bytes: number; - /** @enum {unknown} */ - watcher_on_save: "autorun" | "lazy"; - }; - /** - * SQLMetadata - * @description Metadata for a SQL database. - */ - SQLMetadata: { - connection: string; - database: string; - schema: string; - /** @enum {unknown} */ - type: "sql-metadata"; - }; - /** - * SQLTableListPreviewNotification - * @description Preview of a list of tables in a schema. - */ - SQLTableListPreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-list-preview"; - request_id: string; - /** @default [] */ - tables?: components["schemas"]["DataTable"][]; - }; - /** - * SQLTablePreviewNotification - * @description Preview of a table in a SQL database. - */ - SQLTablePreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-preview"; - request_id: string; - table: null | components["schemas"]["DataTable"]; - }; - /** SaveAppConfigurationRequest */ - SaveAppConfigurationRequest: { - config: Record; - }; - /** - * SaveConfig - * @description Configuration for saving. - * - * **Keys.** - * - * - `autosave`: one of `"off"` or `"after_delay"` - * - `delay`: number of milliseconds to wait before autosaving - * - `format_on_save`: if `True`, format the code on save - */ - SaveConfig: { - /** @enum {unknown} */ - autosave: "after_delay" | "off"; - autosave_delay: number; - format_on_save: boolean; - }; - /** SaveNotebookRequest */ - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - /** @default null */ - layout?: Record | null; - names: string[]; - /** @default true */ - persist?: boolean; - }; - /** SaveUserConfigurationRequest */ - SaveUserConfigurationRequest: { - config: Record; - }; - /** Schema */ - Schema: { - name: string; - tables: components["schemas"]["DataTable"][]; - }; - /** SchemaColumn */ - SchemaColumn: { - name: string; - sampleValues: unknown[]; - type: string; - }; - /** SchemaTable */ - SchemaTable: { - columns: components["schemas"]["SchemaColumn"][]; - name: string; - }; - /** - * SecretKeysResultNotification - * @description Result of listing secret keys. - */ - SecretKeysResultNotification: { - /** @enum {unknown} */ - op: "secret-keys-result"; - request_id: string; - secrets: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** SecretKeysWithProvider */ - SecretKeysWithProvider: { - keys: string[]; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - }; - /** - * ServerConfig - * @description Configuration for the server. - * - * **Keys.** - * - * - `browser`: the web browser to use. `"default"` or a browser registered - * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) - * - `follow_symlink`: if true, the server will follow symlinks it finds - * inside its static assets directory. - */ - ServerConfig: { - browser: "default" | string; - follow_symlink: boolean; - }; - /** SetupRootError */ - SetupRootError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {unknown} */ - type: "setup-refs"; - }; - /** - * SharingConfig - * @description Configuration for sharing features. - * - * **Keys.** - * - * - `html`: if `False`, HTML sharing options will be hidden from the UI - * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI - */ - SharingConfig: { - html?: boolean; - wasm?: boolean; - }; - /** ShutdownSessionRequest */ - ShutdownSessionRequest: { - sessionId: string; - }; - /** Snippet */ - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - /** SnippetSection */ - SnippetSection: { - /** @default null */ - code?: string | null; - /** @default null */ - html?: string | null; - id: string; - }; - /** Snippets */ - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - /** - * SnippetsConfig - * @description Configuration for snippets. - * - * **Keys.** - * - * - `custom_path`: the path to the custom snippets directory - */ - SnippetsConfig: { - custom_paths?: string[]; - include_default_snippets?: boolean; - }; - /** - * SqlCatalogCheckResult - * @description Result of running validation against the database. - */ - SqlCatalogCheckResult: { - error_message: string | null; - success: boolean; - }; - /** - * SqlParseError - * @description Represents a single SQL parse error. - * - * Attributes: - * message (str): Description of the error. - * line (int): Line number where the error occurred (1-based). - * column (int): Column number where the error occurred (1-based). - * severity (Literal["error", "warning"]): Severity of the error. - */ - SqlParseError: { - column: number; - line: number; - message: string; - /** @enum {unknown} */ - severity: "error" | "warning"; - }; - /** - * SqlParseResult - * @description Result of parsing an SQL query. - * - * Attributes: - * success (bool): True if parsing succeeded without errors. - * errors (list[SqlParseError]): List of parse errors (empty if success is True). - */ - SqlParseResult: { - errors: components["schemas"]["SqlParseError"][]; - success: boolean; - }; - /** StartupLogsNotification */ - StartupLogsNotification: { - content: string; - /** @enum {unknown} */ - op: "startup-logs"; - /** @enum {unknown} */ - status: "append" | "done" | "start"; - }; - /** StdinRequest */ - StdinRequest: { - text: string; - }; - /** - * StopKernelCommand - * @description Stop kernel execution. - * - * Signals the kernel to stop processing and shut down gracefully. - * Used when closing a notebook or terminating a session. - */ - StopKernelCommand: { - /** @enum {unknown} */ - type: "stop-kernel"; - }; - /** - * StoreConfig - * @description Configuration for cache stores. - */ - StoreConfig: { - args?: Record; - /** @enum {unknown} */ - type?: "file" | "redis" | "rest" | "tiered"; - }; - /** SuccessResponse */ - SuccessResponse: { - /** @default true */ - success?: boolean; - }; - /** - * SyncGraphCommand - * @description Synchronize the kernel graph with file manager state. - * - * Used when the notebook file changes externally (e.g., file reload or version control). - * Updates changed cells, deletes removed cells, and optionally executes modified cells. - * - * Attributes: - * cells: All cells known to file manager, mapping cell_id to code. - * run_ids: Cells to execute or update. - * delete_ids: Cells to delete from the graph. - * timestamp: Unix timestamp when command was created. - */ - SyncGraphCommand: { - cells: { - [key: string]: string; - }; - deleteIds: string[]; - runIds: string[]; - timestamp?: number; - /** @enum {unknown} */ - type: "sync-graph"; - }; - /** - * ToolDefinition - * @description Tool definition compatible with ai-sdk-ui format. - */ - ToolDefinition: { - description: string; - mode: ("agent" | "ask" | "manual")[]; - name: string; - parameters: Record; - /** @enum {unknown} */ - source: "backend" | "frontend" | "mcp"; - }; - /** - * TyLanguageServerConfig - * @description Configuration options for Ty Language Server. - * - * ty handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - TyLanguageServerConfig: { - enabled?: boolean; - }; - /** - * UIElementMessageNotification - * @description Send a message to a UI element. - */ - UIElementMessageNotification: { - /** @default null */ - buffers?: string[] | null; - message: Record; - model_id: string | null; - /** @enum {unknown} */ - op: "send-ui-element-message"; - ui_element: string | null; - }; - /** UnknownError */ - UnknownError: { - /** @default null */ - error_type?: string | null; - msg: string; - /** @enum {unknown} */ - type: "unknown"; - }; - /** UpdateCellCodesNotification */ - UpdateCellCodesNotification: { - cell_ids: string[]; - code_is_stale: boolean; - codes: string[]; - /** @enum {unknown} */ - op: "update-cell-codes"; - }; - /** - * UpdateCellConfigCommand - * @description Update cell configuration. - * - * Updates cell-level settings like disabled state, hide code, etc. - * - * Attributes: - * configs: Cell IDs mapped to their config updates. Each config dict - * can contain partial updates. - */ - UpdateCellConfigCommand: { - configs: { - [key: string]: Record; - }; - /** @enum {unknown} */ - type: "update-cell-config"; - }; - /** UpdateCellConfigRequest */ - UpdateCellConfigRequest: { - configs: { - [key: string]: Record; - }; - }; - /** - * UpdateCellIdsNotification - * @description Update the cell ID ordering of the cells in the notebook. - * - * Right now we send the entire list of cell IDs, - * but in the future we might want to send change-deltas. - */ - UpdateCellIdsNotification: { - cell_ids: string[]; - /** @enum {unknown} */ - op: "update-cell-ids"; - }; - /** UpdateCellIdsRequest */ - UpdateCellIdsRequest: { - cellIds: string[]; - }; - /** - * UpdateUIElementCommand - * @description Update UI element values. - * - * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). - * Updates element values and re-executes dependent cells. - * - * Attributes: - * object_ids: UI elements to update. - * values: New values for the elements. Must match length of object_ids. - * request: HTTP request context if available. - * token: Unique request identifier for deduplication. - */ - UpdateUIElementCommand: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - /** @enum {unknown} */ - type: "update-ui-element"; - values: unknown[]; - }; - /** UpdateUIElementRequest */ - UpdateUIElementRequest: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - values: unknown[]; - }; - /** UpdateUIElementValuesRequest */ - UpdateUIElementValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - /** - * UpdateUserConfigCommand - * @description Update user configuration. - * - * Updates global marimo configuration (runtime settings, display options, editor preferences). - * - * Attributes: - * config: Complete user configuration. - */ - UpdateUserConfigCommand: { - config: components["schemas"]["MarimoConfig"]; - /** @enum {unknown} */ - type: "update-user-config"; - }; - /** UpdateUserConfigRequest */ - UpdateUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - /** - * UpdateWidgetModelCommand - * @description Update anywidget model state. - * - * Updates widget model state for bidirectional Python-JavaScript communication. - * - * Attributes: - * model_id: Widget model identifier. - * message: Model message with state updates and buffer paths. - * buffers: Base64-encoded binary buffers referenced by buffer_paths. - */ - UpdateWidgetModelCommand: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - /** @enum {unknown} */ - type: "update-widget-model"; - }; - /** UpdateWidgetModelRequest */ - UpdateWidgetModelRequest: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - }; - /** - * ValidateSQLCommand - * @description Validate an SQL query. - * - * Checks if an SQL query is valid by parsing against a dialect (no DB connection) - * or validating against an actual database. - * - * Attributes: - * request_id: Unique identifier for this request. - * query: SQL query to validate. - * only_parse: If True, only parse using dialect. If False, validate against DB. - * engine: SQL engine (required if only_parse is False). - * dialect: SQL dialect for parsing (required if only_parse is True). - */ - ValidateSQLCommand: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - /** @enum {unknown} */ - type: "validate-sql"; - }; - /** ValidateSQLRequest */ - ValidateSQLRequest: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - }; - /** ValidateSQLResultNotification */ - ValidateSQLResultNotification: { - /** @default null */ - error?: string | null; - /** @enum {unknown} */ - op: "validate-sql-result"; - /** @default null */ - parse_result?: null | components["schemas"]["SqlParseResult"]; - request_id: string; - /** @default null */ - validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; - }; - /** VariableContext */ - VariableContext: { - name: string; - previewValue: unknown; - valueType: string; - }; - /** VariableDeclarationNotification */ - VariableDeclarationNotification: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - /** VariableValue */ - VariableValue: { - datatype: string | null; - name: string; - value: string | null; - }; - /** - * VariableValuesNotification - * @description List of variables and their types/values. - */ - VariableValuesNotification: { - /** @enum {unknown} */ - op: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - /** - * VariablesNotification - * @description List of variable declarations. - */ - VariablesNotification: { - /** @enum {unknown} */ - op: "variables"; - variables: components["schemas"]["VariableDeclarationNotification"][]; - }; - /** WorkspaceFilesRequest */ - WorkspaceFilesRequest: { - /** @default false */ - includeMarkdown?: boolean; - }; - /** WorkspaceFilesResponse */ - WorkspaceFilesResponse: { - /** @default 0 */ - fileCount?: number; - files: components["schemas"]["FileInfo"][]; - /** @default false */ - hasMore?: boolean; - root: string; - }; - /** - * _AppConfig - * @description Program-specific configuration. - * - * Configuration for frontends or runtimes that is specific to - * a single marimo program. - */ - _AppConfig: { - /** @default null */ - app_title?: string | null; - auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @default null */ - css_file?: string | null; - /** @default null */ - html_head_file?: string | null; - /** @default null */ - layout_file?: string | null; - /** - * @default auto - * @enum {unknown} - */ - sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - /** - * @default compact - * @enum {unknown} - */ - width?: "columns" | "compact" | "full" | "medium" | "normal"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AddPackageRequest + * @description This can be a remove package or a local package. + * + * Supported formats: + * + * httpx + * httpx==0.27.0 + * httpx>=0.27.0 + * git+https://github.com/encode/httpx + * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz + * /example/foo-0.1.0-py3-none-any.whl + */ + AddPackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + /** @default false */ + upgrade?: boolean | null; + }; + /** AiCompletionContext */ + AiCompletionContext: { + /** @default */ + plainText?: string; + /** @default [] */ + schema?: components["schemas"]["SchemaTable"][]; + /** @default [] */ + variables?: (string | components["schemas"]["VariableContext"])[]; + }; + /** AiCompletionRequest */ + AiCompletionRequest: { + code: string; + /** @default null */ + context?: null | components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + /** @default [] */ + messages?: components["schemas"]["ChatMessage"][]; + prompt: string; + /** @default null */ + selectedText?: string | null; + }; + /** + * AiConfig + * @description Configuration options for AI. + * + * **Keys.** + * + * - `rules`: custom rules to include in all AI completion prompts + * - `max_tokens`: the maximum number of tokens to use in AI completions + * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` + * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions + * - `models`: the models to use for AI completions + * - `open_ai`: the OpenAI config + * - `anthropic`: the Anthropic config + * - `google`: the Google AI config + * - `bedrock`: the Bedrock config + * - `azure`: the Azure config + * - `ollama`: the Ollama config + * - `github`: the GitHub config + * - `openrouter`: the OpenRouter config + * - `wandb`: the Weights & Biases config + * - `open_ai_compatible`: the OpenAI-compatible config + */ + AiConfig: { + anthropic?: components["schemas"]["AnthropicConfig"]; + azure?: components["schemas"]["OpenAiConfig"]; + bedrock?: components["schemas"]["BedrockConfig"]; + github?: components["schemas"]["GitHubConfig"]; + google?: components["schemas"]["GoogleAiConfig"]; + inline_tooltip?: boolean; + max_tokens?: number; + /** @enum {unknown} */ + mode?: "agent" | "ask" | "manual"; + models?: components["schemas"]["AiModelConfig"]; + ollama?: components["schemas"]["OpenAiConfig"]; + open_ai?: components["schemas"]["OpenAiConfig"]; + open_ai_compatible?: components["schemas"]["OpenAiConfig"]; + openrouter?: components["schemas"]["OpenAiConfig"]; + rules?: string; + wandb?: components["schemas"]["OpenAiConfig"]; + }; + /** AiInlineCompletionRequest */ + AiInlineCompletionRequest: { + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + prefix: string; + suffix: string; + }; + /** + * AiModelConfig + * @description Configuration options for an AI model. + * + * **Keys.** + * + * - `chat_model`: the model to use for chat completions + * - `edit_model`: the model to use for edit completions + * - `autocomplete_model`: the model to use for code completion/autocomplete + * - `displayed_models`: a list of models to display in the UI + * - `custom_models`: a list of custom models to use that are not from the default list + */ + AiModelConfig: { + autocomplete_model?: string; + chat_model?: string; + custom_models: string[]; + displayed_models: string[]; + edit_model?: string; + }; + /** AlertNotification */ + AlertNotification: { + description: string; + /** @enum {unknown} */ + op: "alert"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** + * AnthropicConfig + * @description Configuration options for Anthropic. + * + * **Keys.** + * + * - `api_key`: the Anthropic API key + */ + AnthropicConfig: { + api_key?: string; + }; + /** BannerNotification */ + BannerNotification: { + /** @default null */ + action?: "restart" | null; + description: string; + /** @enum {unknown} */ + op: "banner"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** BaseResponse */ + BaseResponse: { + success: boolean; + }; + /** + * BasedpyrightServerConfig + * @description Configuration options for basedpyright Language Server. + * + * basedpyright handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + BasedpyrightServerConfig: { + enabled?: boolean; + }; + /** + * BedrockConfig + * @description Configuration options for Bedrock. + * + * **Keys.** + * + * - `profile_name`: the AWS profile to use + * - `region_name`: the AWS region to use + * - `aws_access_key_id`: the AWS access key ID + * - `aws_secret_access_key`: the AWS secret access key + */ + BedrockConfig: { + aws_access_key_id?: string; + aws_secret_access_key?: string; + profile_name?: string; + region_name?: string; + }; + /** + * CacheClearedNotification + * @description Result of clearing cache. + */ + CacheClearedNotification: { + bytes_freed: number; + /** @enum {unknown} */ + op: "cache-cleared"; + }; + /** + * CacheInfoNotification + * @description Cache statistics information. + */ + CacheInfoNotification: { + disk_to_free: number; + disk_total: number; + hits: number; + misses: number; + /** @enum {unknown} */ + op: "cache-info"; + time: number; + }; + /** + * CellChannel + * @description The channel of a cell's output. + * @enum {unknown} + */ + CellChannel: + | "marimo-error" + | "media" + | "output" + | "pdb" + | "stderr" + | "stdin" + | "stdout"; + /** + * CellConfig + * @description Internal representation of a cell's configuration. + * This is not part of the public API. + */ + CellConfig: { + /** @default null */ + column?: number | null; + /** @default false */ + disabled?: boolean; + /** @default false */ + hide_code?: boolean; + }; + /** + * CellNotification + * @description Op to transition a cell. + * + * A CellNotification's data has some optional fields: + * + * output - a CellOutput + * console - a CellOutput (console msg to append), or a list of + * CellOutputs + * status - execution status + * stale_inputs - whether the cell has stale inputs (variables, modules, ...) + * run_id - the run associated with this cell. + * serialization - the serialization status of the cell + * + * Omitting a field means that its value should be unchanged! + * + * And one required field: + * + * cell_id - the cell id + */ + CellNotification: { + cell_id: string; + /** @default null */ + console?: + | components["schemas"]["CellOutput"][] + | null + | components["schemas"]["CellOutput"]; + /** @enum {unknown} */ + op: "cell-op"; + /** @default null */ + output?: null | components["schemas"]["CellOutput"]; + /** @default null */ + run_id?: string | null; + /** @default null */ + serialization?: string | null; + /** @default null */ + stale_inputs?: boolean | null; + /** @default null */ + status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; + timestamp?: number; + }; + /** CellOutput */ + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: + | string + | ( + | components["schemas"]["SetupRootError"] + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["ImportStarError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["MarimoInternalError"] + | components["schemas"]["MarimoSQLError"] + | components["schemas"]["UnknownError"] + )[] + | Record; + /** @enum {unknown} */ + mimetype: + | "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.vegalite.v5+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/plain" + | "video/mp4" + | "video/mpeg"; + timestamp?: number; + }; + /** ChatAttachment */ + ChatAttachment: { + /** @default null */ + content_type?: string | null; + /** @default attachment */ + name?: string; + url: string; + }; + /** + * ChatMessage + * @description A message in a chat. + */ + ChatMessage: { + /** @default null */ + attachments?: components["schemas"]["ChatAttachment"][] | null; + content: unknown; + /** @default null */ + parts?: Record[] | null; + /** @enum {unknown} */ + role: "assistant" | "system" | "user"; + }; + /** ChatRequest */ + ChatRequest: { + context: components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + messages: components["schemas"]["ChatMessage"][]; + /** @default null */ + model?: string | null; + /** @default null */ + tools?: components["schemas"]["ToolDefinition"][] | null; + /** @default null */ + variables?: (string | components["schemas"]["VariableContext"])[] | null; + }; + /** + * ClearCacheCommand + * @description Clear all cached data. + * + * Clears all cache contexts, freeing memory and disk space. + * Affects all cells using the @cache decorator. + */ + ClearCacheCommand: { + /** @enum {unknown} */ + type: "clear-cache"; + }; + /** ClearCacheRequest */ + ClearCacheRequest: Record; + /** + * CodeCompletionCommand + * @description Request code completion suggestions. + * + * Sent when the user requests autocomplete. Provides code context up to + * the cursor position for the language server. + * + * Attributes: + * id: Unique identifier for this request. + * document: Source code up to the cursor position. + * cell_id: Cell where completion is requested. + */ + CodeCompletionCommand: { + cellId: string; + document: string; + id: string; + /** @enum {unknown} */ + type: "code-completion"; + }; + /** CodeCompletionRequest */ + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + /** + * ColumnStats + * @description Represents stats for a column in a data table. + */ + ColumnStats: { + /** @default null */ + false?: number | null; + /** @default null */ + max?: unknown | null; + /** @default null */ + mean?: unknown | null; + /** @default null */ + median?: unknown | null; + /** @default null */ + min?: unknown | null; + /** @default null */ + nulls?: number | null; + /** @default null */ + p25?: unknown | null; + /** @default null */ + p5?: unknown | null; + /** @default null */ + p75?: unknown | null; + /** @default null */ + p95?: unknown | null; + /** @default null */ + std?: unknown | null; + /** @default null */ + total?: number | null; + /** @default null */ + true?: number | null; + /** @default null */ + unique?: number | null; + }; + /** + * CompletedRunNotification + * @description Written on run completion (of submitted cells and their descendants. + */ + CompletedRunNotification: { + /** @enum {unknown} */ + op: "completed-run"; + }; + /** + * CompletionConfig + * @description Configuration for code completion. + * + * A dict with key/value pairs configuring code completion in the marimo + * editor. + * + * **Keys.** + * + * - `activate_on_typing`: if `False`, completion won't activate + * until the completion hotkey is entered + * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing + * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` + * - `codeium_api_key`: the Codeium API key + */ + CompletionConfig: { + activate_on_typing: boolean; + api_key?: string | null; + base_url?: string | null; + codeium_api_key?: string | null; + copilot: boolean | ("codeium" | "custom" | "github"); + model?: string | null; + signature_hint_on_typing: boolean; + }; + /** CompletionOption */ + CompletionOption: { + completion_info: string | null; + name: string; + type: string; + }; + /** + * CompletionResultNotification + * @description Code completion result. + */ + CompletionResultNotification: { + completion_id: string; + /** @enum {unknown} */ + op: "completion-result"; + options: components["schemas"]["CompletionOption"][]; + prefix_length: number; + }; + /** CopyNotebookRequest */ + CopyNotebookRequest: { + destination: string; + source: string; + }; + /** + * CreateNotebookCommand + * @description Instantiate and initialize a notebook. + * + * Sent when a notebook is first loaded. Contains all cells and initial UI element values. + * + * Attributes: + * execution_requests: ExecuteCellCommand for each notebook cell. + * set_ui_element_value_request: Initial UI element values. + * auto_run: Whether to automatically execute cells on instantiation. + * request: HTTP request context if available. + */ + CreateNotebookCommand: { + autoRun: boolean; + executionRequests: components["schemas"]["ExecuteCellCommand"][]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; + /** @enum {unknown} */ + type: "create-notebook"; + }; + /** CreateSecretRequest */ + CreateSecretRequest: { + key: string; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + value: string; + }; + /** CycleError */ + CycleError: { + edges_with_vars: [string, string[], string][]; + /** @enum {unknown} */ + type: "cycle"; + }; + /** + * DataColumnPreviewNotification + * @description Preview of a column in a dataset. + */ + DataColumnPreviewNotification: { + /** @default null */ + chart_code?: string | null; + /** @default null */ + chart_spec?: string | null; + column_name: string; + /** @default null */ + error?: string | null; + /** @default null */ + missing_packages?: string[] | null; + /** @enum {unknown} */ + op: "data-column-preview"; + /** @default null */ + stats?: null | components["schemas"]["ColumnStats"]; + table_name: string; + }; + /** + * DataSourceConnection + * @description Represents a data source connection. + * + * Attributes: + * source (str): The source of the data source connection. E.g 'postgres'. + * dialect (str): The dialect of the data source connection. E.g 'postgresql'. + * name (str): The name of the data source connection. E.g 'engine'. + * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. + * databases (List[Database]): The databases in the data source connection. + * default_database (Optional[str]): The default database in the data source connection. + * default_schema (Optional[str]): The default schema in the data source connection. + */ + DataSourceConnection: { + databases: components["schemas"]["Database"][]; + /** @default null */ + default_database?: string | null; + /** @default null */ + default_schema?: string | null; + dialect: string; + display_name: string; + name: string; + source: string; + }; + /** DataSourceConnectionsNotification */ + DataSourceConnectionsNotification: { + connections: components["schemas"]["DataSourceConnection"][]; + /** @enum {unknown} */ + op: "data-source-connections"; + }; + /** + * DataTable + * @description Represents a data table. + * + * Attributes: + * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). + * source (str): Can be dialect, or source db name. + * name (str): Name of the data table. + * num_rows (Optional[int]): Total number of rows in the table, if known. + * num_columns (Optional[int]): Total number of columns in the table, if known. + * variable_name (Optional[VariableName]): Variable name referencing this table in code. + * columns (List[DataTableColumn]): List of column definitions and metadata. + * engine (Optional[VariableName]): Database engine or connection handler, if any. + * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. + * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. + * indexes (Optional[List[str]]): Column names used as indexes, if any. + */ + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + /** @default null */ + engine?: string | null; + /** @default null */ + indexes?: string[] | null; + name: string; + num_columns: number | null; + num_rows: number | null; + /** @default null */ + primary_keys?: string[] | null; + source: string; + /** @enum {unknown} */ + source_type: "catalog" | "connection" | "duckdb" | "local"; + /** + * @default table + * @enum {unknown} + */ + type?: "table" | "view"; + variable_name: string | null; + }; + /** + * DataTableColumn + * @description Represents a column in a data table. + * + * Attributes: + * name (str): The name of the column. + * type (DataType): The data type of the column. + * external_type (ExternalDataType): The raw data type of the column. + * sample_values (List[Any]): The sample values of the column. + */ + DataTableColumn: { + external_type: string; + name: string; + sample_values: unknown[]; + /** @enum {unknown} */ + type: + | "boolean" + | "date" + | "datetime" + | "integer" + | "number" + | "string" + | "time" + | "unknown"; + }; + /** + * Database + * @description Represents a collection of schemas. + * + * Attributes: + * name (str): The name of the database + * dialect (str): The dialect of the database + * schemas (List[Schema]): List of schemas in the database + * engine (Optional[VariableName]): Database engine or connection handler, if any. + */ + Database: { + dialect: string; + /** @default null */ + engine?: string | null; + name: string; + schemas: components["schemas"]["Schema"][]; + }; + /** + * DatasetsNotification + * @description List of datasets. + */ + DatasetsNotification: { + /** @default null */ + clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; + /** @enum {unknown} */ + op: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + /** + * DatasourcesConfig + * @description Configuration for datasources panel. + * + * **Keys.** + * + * - `auto_discover_schemas`: if `True`, include schemas in the datasource + * - `auto_discover_tables`: if `True`, include tables in the datasource + * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource + */ + DatasourcesConfig: { + auto_discover_columns?: boolean | "auto"; + auto_discover_schemas?: boolean | "auto"; + auto_discover_tables?: boolean | "auto"; + }; + /** + * DebugCellCommand + * @description Enter debugger mode for a cell. + * + * Starts the Python debugger (pdb) for the specified cell. + * + * Attributes: + * cell_id: Cell to debug. + * request: HTTP request context if available. + */ + DebugCellCommand: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "debug-cell"; + }; + /** DebugCellRequest */ + DebugCellRequest: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * DeleteCellCommand + * @description Delete a cell from the notebook. + * + * Removes cell from the dependency graph and cleans up its variables. + * Dependent cells may become stale. + * + * Attributes: + * cell_id: Cell to delete. + */ + DeleteCellCommand: { + cellId: string; + /** @enum {unknown} */ + type: "delete-cell"; + }; + /** DeleteCellRequest */ + DeleteCellRequest: { + cellId: string; + }; + /** DeleteSecretRequest */ + DeleteSecretRequest: { + key: string; + }; + /** DependencyTreeNode */ + DependencyTreeNode: { + dependencies: components["schemas"]["DependencyTreeNode"][]; + name: string; + tags: { + [key: string]: string; + }[]; + version: string | null; + }; + /** DependencyTreeResponse */ + DependencyTreeResponse: { + tree: null | components["schemas"]["DependencyTreeNode"]; + }; + /** + * DiagnosticsConfig + * @description Configuration options for diagnostics. + * + * **Keys.** + * + * - `enabled`: if `True`, diagnostics will be shown in the editor + * - `sql_linter`: if `True`, SQL cells will have linting enabled + */ + DiagnosticsConfig: { + enabled?: boolean; + sql_linter?: boolean; + }; + /** + * DisplayConfig + * @description Configuration for display. + * + * **Keys.** + * + * - `theme`: `"light"`, `"dark"`, or `"system"` + * - `code_editor_font_size`: font size for the code editor + * - `cell_output`: `"above"` or `"below"` + * - `dataframes`: `"rich"` or `"plain"` + * - `custom_css`: list of paths to custom CSS files + * - `default_table_page_size`: default number of rows to display in tables + * - `default_table_max_columns`: default maximum number of columns to display in tables + * - `reference_highlighting`: if `True`, highlight reactive variable references + * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") + */ + DisplayConfig: { + /** @enum {unknown} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + custom_css?: string[]; + /** @enum {unknown} */ + dataframes: "plain" | "rich"; + default_table_max_columns: number; + default_table_page_size: number; + /** @enum {unknown} */ + default_width: "columns" | "compact" | "full" | "medium" | "normal"; + locale?: string | null; + reference_highlighting?: boolean; + /** @enum {unknown} */ + theme: "dark" | "light" | "system"; + }; + /** + * ExecuteCellCommand + * @description Execute a single cell. + * + * Executes a cell with the provided code. Dependent cells may be + * re-executed based on the reactive execution mode. + * + * Attributes: + * cell_id: Cell to execute. + * code: Python code to execute. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellCommand: { + cellId: string; + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cell"; + }; + /** + * ExecuteCellsCommand + * @description Execute multiple cells in a batch. + * + * Executes multiple cells with their corresponding code. The kernel manages + * dependency tracking and reactive execution. + * + * Attributes: + * cell_ids: Cells to execute. + * codes: Python code for each cell. Must match length of cell_ids. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellsCommand: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cells"; + }; + /** ExecuteCellsRequest */ + ExecuteCellsRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteScratchpadCommand + * @description Execute code in the scratchpad. + * + * The scratchpad is a temporary execution environment that doesn't affect + * the notebook's cells or dependencies. Runs in an isolated cell with a copy + * of the global namespace, useful for experimentation. + * + * Attributes: + * code: Python code to execute. + * request: HTTP request context if available. + */ + ExecuteScratchpadCommand: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-scratchpad"; + }; + /** ExecuteScratchpadRequest */ + ExecuteScratchpadRequest: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteStaleCellsCommand + * @description Execute all stale cells. + * + * Cells become stale when their dependencies change but haven't been + * re-executed yet. Brings the notebook to a consistent state. + * + * Attributes: + * request: HTTP request context if available. + */ + ExecuteStaleCellsCommand: { + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-stale-cells"; + }; + /** ExportAsHTMLRequest */ + ExportAsHTMLRequest: { + /** @default null */ + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + /** ExportAsIPYNBRequest */ + ExportAsIPYNBRequest: { + download: boolean; + }; + /** ExportAsMarkdownRequest */ + ExportAsMarkdownRequest: { + download: boolean; + }; + /** ExportAsScriptRequest */ + ExportAsScriptRequest: { + download: boolean; + }; + /** FileCreateRequest */ + FileCreateRequest: { + /** @default null */ + contents?: string | null; + name: string; + path: string; + /** @enum {unknown} */ + type: "directory" | "file"; + }; + /** FileCreateResponse */ + FileCreateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDeleteRequest */ + FileDeleteRequest: { + path: string; + }; + /** FileDeleteResponse */ + FileDeleteResponse: { + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDetailsRequest */ + FileDetailsRequest: { + path: string; + }; + /** FileDetailsResponse */ + FileDetailsResponse: { + /** @default null */ + contents?: string | null; + file: components["schemas"]["FileInfo"]; + /** @default null */ + mimeType?: string | null; + }; + /** FileInfo */ + FileInfo: { + /** @default [] */ + children?: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + }; + /** FileListRequest */ + FileListRequest: { + /** @default null */ + path?: string | null; + }; + /** FileListResponse */ + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + /** FileMoveRequest */ + FileMoveRequest: { + newPath: string; + path: string; + }; + /** FileMoveResponse */ + FileMoveResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileOpenRequest */ + FileOpenRequest: { + /** @default null */ + lineNumber?: number | null; + path: string; + }; + /** FileSearchRequest */ + FileSearchRequest: { + /** @default 3 */ + depth?: number; + /** @default true */ + includeDirectories?: boolean; + /** @default true */ + includeFiles?: boolean; + /** @default 100 */ + limit?: number; + /** @default null */ + path?: string | null; + query: string; + }; + /** FileSearchResponse */ + FileSearchResponse: { + files: components["schemas"]["FileInfo"][]; + query: string; + totalFound: number; + }; + /** FileUpdateRequest */ + FileUpdateRequest: { + contents: string; + path: string; + }; + /** FileUpdateResponse */ + FileUpdateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FocusCellNotification */ + FocusCellNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "focus-cell"; + }; + /** FormatCellsRequest */ + FormatCellsRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + /** FormatResponse */ + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + /** + * FormattingConfig + * @description Configuration for code formatting. + * + * **Keys.** + * + * - `line_length`: max line length + */ + FormattingConfig: { + line_length: number; + }; + /** + * FunctionCallResultNotification + * @description Result of calling a function. + */ + FunctionCallResultNotification: { + function_call_id: string; + /** @enum {unknown} */ + op: "function-call-result"; + return_value: unknown; + status: components["schemas"]["HumanReadableStatus"]; + }; + /** + * GetCacheInfoCommand + * @description Retrieve cache statistics. + * + * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). + */ + GetCacheInfoCommand: { + /** @enum {unknown} */ + type: "get-cache-info"; + }; + /** GetCacheInfoRequest */ + GetCacheInfoRequest: Record; + /** + * GitHubConfig + * @description Configuration options for GitHub. + * + * **Keys.** + * + * - `api_key`: the GitHub API token + * - `base_url`: the base URL for the API + * - `copilot_settings`: configuration settings for GitHub Copilot LSP. + * Supports settings like `http` (proxy configuration), `telemetry`, + * and `github-enterprise` (enterprise URI). + */ + GitHubConfig: { + api_key?: string; + base_url?: string; + copilot_settings?: Record; + }; + /** + * GoogleAiConfig + * @description Configuration options for Google AI. + * + * **Keys.** + * + * - `api_key`: the Google AI API key + */ + GoogleAiConfig: { + api_key?: string; + }; + /** + * HTTPRequest + * @description Serializable HTTP request representation. + * + * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe + * subset of data. Excludes session and auth to prevent exposing sensitive data. + * + * Attributes: + * url: Serialized URL with path, port, scheme, netloc, query, hostname. + * base_url: Serialized base URL. + * headers: Request headers (marimo-specific headers excluded). + * query_params: Query parameters mapped to lists of values. + * path_params: Path parameters from the URL route. + * cookies: Request cookies. + * meta: User-defined storage for custom data. + * user: User info from authentication middleware (e.g., is_authenticated, username). + */ + HTTPRequest: { + base_url: Record; + cookies: { + [key: string]: string; + }; + headers: { + [key: string]: string; + }; + meta: Record; + path_params: Record; + query_params: { + [key: string]: string[]; + }; + url: Record; + user: unknown; + }; + /** + * HumanReadableStatus + * @description Human-readable status. + */ + HumanReadableStatus: { + /** @enum {unknown} */ + code: "error" | "ok"; + /** @default null */ + message?: string | null; + /** @default null */ + title?: string | null; + }; + /** ImportStarError */ + ImportStarError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "import-star"; + }; + /** + * InstallPackagesCommand + * @description Install Python packages. + * + * Installs missing packages using the specified package manager. Triggered + * automatically on import errors or manually by the user. + * + * Attributes: + * manager: Package manager to use ('pip', 'conda', 'uv', etc.). + * versions: Package names mapped to version specifiers. Empty version + * means install latest. + */ + InstallPackagesCommand: { + manager: string; + /** @enum {unknown} */ + type: "install-packages"; + versions: { + [key: string]: string; + }; + }; + /** InstallPackagesRequest */ + InstallPackagesRequest: { + manager: string; + versions: { + [key: string]: string; + }; + }; + /** InstallingPackageAlertNotification */ + InstallingPackageAlertNotification: { + /** @default null */ + log_status?: ("append" | "done" | "start") | null; + /** @default null */ + logs?: { + [key: string]: string; + } | null; + /** @enum {unknown} */ + op: "installing-package-alert"; + packages: { + [key: string]: "failed" | "installed" | "installing" | "queued"; + }; + }; + /** InstantiateNotebookRequest */ + InstantiateNotebookRequest: { + /** @default true */ + autoRun?: boolean; + objectIds: string[]; + values: unknown[]; + }; + /** + * InterruptedNotification + * @description Written when the kernel is interrupted by the user. + */ + InterruptedNotification: { + /** @enum {unknown} */ + op: "interrupted"; + }; + /** InvokeAiToolRequest */ + InvokeAiToolRequest: { + arguments: Record; + toolName: string; + }; + /** InvokeAiToolResponse */ + InvokeAiToolResponse: { + /** @default null */ + error?: string | null; + result: unknown; + success: boolean; + toolName: string; + }; + /** + * InvokeFunctionCommand + * @description Invoke a function from a UI element. + * + * Called when a UI element needs to invoke a Python function. + * + * Attributes: + * function_call_id: Unique identifier for this call. + * namespace: Namespace where the function is registered. + * function_name: Function to invoke. + * args: Keyword arguments for the function. + */ + InvokeFunctionCommand: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + /** @enum {unknown} */ + type: "invoke-function"; + }; + /** InvokeFunctionRequest */ + InvokeFunctionRequest: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + }; + /** KernelCapabilitiesNotification */ + KernelCapabilitiesNotification: { + /** @default false */ + basedpyright?: boolean; + /** @default false */ + pylsp?: boolean; + /** @default false */ + terminal?: boolean; + /** @default false */ + ty?: boolean; + }; + /** + * KernelReadyNotification + * @description Kernel is ready for execution. + */ + KernelReadyNotification: { + app_config: components["schemas"]["_AppConfig"]; + capabilities: components["schemas"]["KernelCapabilitiesNotification"]; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code: { + [key: string]: string; + } | null; + last_execution_time: { + [key: string]: number; + } | null; + layout: components["schemas"]["LayoutConfig"] | null; + names: string[]; + /** @enum {unknown} */ + op: "kernel-ready"; + resumed: boolean; + ui_values: Record | null; + }; + /** + * KeymapConfig + * @description Configuration for keymaps. + * + * **Keys.** + * + * - `preset`: one of `"default"` or `"vim"` + * - `overrides`: a dict of keymap actions to their keymap override + * - `vimrc`: path to a vimrc file to load keymaps from + * - `destructive_delete`: if `True`, allows deleting cells with content. + */ + KeymapConfig: { + destructive_delete?: boolean; + overrides?: { + [key: string]: string; + }; + /** @enum {unknown} */ + preset: "default" | "vim"; + vimrc?: string | null; + }; + /** KnownUnions */ + KnownUnions: { + command: + | components["schemas"]["CreateNotebookCommand"] + | components["schemas"]["RenameNotebookCommand"] + | components["schemas"]["ExecuteCellsCommand"] + | components["schemas"]["ExecuteScratchpadCommand"] + | components["schemas"]["ExecuteStaleCellsCommand"] + | components["schemas"]["DebugCellCommand"] + | components["schemas"]["DeleteCellCommand"] + | components["schemas"]["SyncGraphCommand"] + | components["schemas"]["UpdateCellConfigCommand"] + | components["schemas"]["InstallPackagesCommand"] + | components["schemas"]["UpdateUIElementCommand"] + | components["schemas"]["UpdateWidgetModelCommand"] + | components["schemas"]["InvokeFunctionCommand"] + | components["schemas"]["UpdateUserConfigCommand"] + | components["schemas"]["PreviewDatasetColumnCommand"] + | components["schemas"]["PreviewSQLTableCommand"] + | components["schemas"]["ListSQLTablesCommand"] + | components["schemas"]["ValidateSQLCommand"] + | components["schemas"]["ListDataSourceConnectionCommand"] + | components["schemas"]["ListSecretKeysCommand"] + | components["schemas"]["RefreshSecretsCommand"] + | components["schemas"]["ClearCacheCommand"] + | components["schemas"]["GetCacheInfoCommand"] + | components["schemas"]["StopKernelCommand"]; + /** @enum {unknown} */ + data_type: + | "boolean" + | "date" + | "datetime" + | "integer" + | "number" + | "string" + | "time" + | "unknown"; + error: + | components["schemas"]["SetupRootError"] + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["ImportStarError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["MarimoInternalError"] + | components["schemas"]["MarimoSQLError"] + | components["schemas"]["UnknownError"]; + notification: + | components["schemas"]["CellNotification"] + | components["schemas"]["FunctionCallResultNotification"] + | components["schemas"]["UIElementMessageNotification"] + | components["schemas"]["RemoveUIElementsNotification"] + | components["schemas"]["ReloadNotification"] + | components["schemas"]["ReconnectedNotification"] + | components["schemas"]["InterruptedNotification"] + | components["schemas"]["CompletedRunNotification"] + | components["schemas"]["KernelReadyNotification"] + | components["schemas"]["CompletionResultNotification"] + | components["schemas"]["AlertNotification"] + | components["schemas"]["BannerNotification"] + | components["schemas"]["MissingPackageAlertNotification"] + | components["schemas"]["InstallingPackageAlertNotification"] + | components["schemas"]["StartupLogsNotification"] + | components["schemas"]["VariablesNotification"] + | components["schemas"]["VariableValuesNotification"] + | components["schemas"]["QueryParamsSetNotification"] + | components["schemas"]["QueryParamsAppendNotification"] + | components["schemas"]["QueryParamsDeleteNotification"] + | components["schemas"]["QueryParamsClearNotification"] + | components["schemas"]["DatasetsNotification"] + | components["schemas"]["DataColumnPreviewNotification"] + | components["schemas"]["SQLTablePreviewNotification"] + | components["schemas"]["SQLTableListPreviewNotification"] + | components["schemas"]["DataSourceConnectionsNotification"] + | components["schemas"]["ValidateSQLResultNotification"] + | components["schemas"]["SecretKeysResultNotification"] + | components["schemas"]["CacheClearedNotification"] + | components["schemas"]["CacheInfoNotification"] + | components["schemas"]["FocusCellNotification"] + | components["schemas"]["UpdateCellCodesNotification"] + | components["schemas"]["UpdateCellIdsNotification"]; + }; + /** + * LanguageServersConfig + * @description Configuration options for language servers. + * + * **Keys.** + * + * - `pylsp`: the pylsp config + */ + LanguageServersConfig: { + basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; + pylsp?: components["schemas"]["PythonLanguageServerConfig"]; + ty?: components["schemas"]["TyLanguageServerConfig"]; + }; + /** LayoutConfig */ + LayoutConfig: { + data: Record; + type: string; + }; + /** + * ListDataSourceConnectionCommand + * @description List data source schemas. + * + * Retrieves available schemas for a data source engine. + * + * Attributes: + * engine: Data source engine identifier. + */ + ListDataSourceConnectionCommand: { + engine: string; + /** @enum {unknown} */ + type: "list-data-source-connection"; + }; + /** ListDataSourceConnectionRequest */ + ListDataSourceConnectionRequest: { + engine: string; + }; + /** ListPackagesResponse */ + ListPackagesResponse: { + packages: components["schemas"]["PackageDescription"][]; + }; + /** + * ListSQLTablesCommand + * @description List tables in an SQL schema. + * + * Retrieves names of all tables and views in a schema. Used by the SQL + * editor for table selection. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database to query. + * schema: Schema to list tables from. + */ + ListSQLTablesCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + /** @enum {unknown} */ + type: "list-sql-tables"; + }; + /** ListSQLTablesRequest */ + ListSQLTablesRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + }; + /** + * ListSecretKeysCommand + * @description List available secret keys. + * + * Retrieves secret names without exposing values. + * + * Attributes: + * request_id: Unique identifier for this request. + */ + ListSecretKeysCommand: { + requestId: string; + /** @enum {unknown} */ + type: "list-secret-keys"; + }; + /** ListSecretKeysRequest */ + ListSecretKeysRequest: { + requestId: string; + }; + /** ListSecretKeysResponse */ + ListSecretKeysResponse: { + keys: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** + * MCPConfig + * @description Configuration for MCP servers + * + * Note: the field name `mcpServers` is camelCased to match MCP server + * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) + */ + MCPConfig: { + mcpServers: { + [key: string]: Record; + }; + presets?: ("context7" | "marimo")[]; + }; + /** MCPRefreshResponse */ + MCPRefreshResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: boolean; + }; + success: boolean; + }; + /** MCPStatusResponse */ + MCPStatusResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: "connected" | "disconnected" | "failed" | "pending"; + }; + /** @enum {unknown} */ + status: "error" | "ok" | "partial"; + }; + /** MarimoAncestorPreventedError */ + MarimoAncestorPreventedError: { + blamed_cell: string | null; + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-prevented"; + }; + /** MarimoAncestorStoppedError */ + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-stopped"; + }; + /** + * MarimoConfig + * @description Configuration for the marimo editor + */ + MarimoConfig: { + ai?: components["schemas"]["AiConfig"]; + completion: components["schemas"]["CompletionConfig"]; + datasources?: components["schemas"]["DatasourcesConfig"]; + diagnostics?: components["schemas"]["DiagnosticsConfig"]; + display: components["schemas"]["DisplayConfig"]; + experimental?: Record; + formatting: components["schemas"]["FormattingConfig"]; + keymap: components["schemas"]["KeymapConfig"]; + language_servers?: components["schemas"]["LanguageServersConfig"]; + mcp?: components["schemas"]["MCPConfig"]; + package_management: components["schemas"]["PackageManagementConfig"]; + runtime: components["schemas"]["RuntimeConfig"]; + save: components["schemas"]["SaveConfig"]; + server: components["schemas"]["ServerConfig"]; + sharing?: components["schemas"]["SharingConfig"]; + snippets?: components["schemas"]["SnippetsConfig"]; + }; + /** MarimoExceptionRaisedError */ + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell: string | null; + /** @enum {unknown} */ + type: "exception"; + }; + /** MarimoFile */ + MarimoFile: { + /** @default null */ + initializationId?: string | null; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + /** @default null */ + sessionId?: string | null; + }; + /** + * 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. + */ + MarimoInternalError: { + error_id: string; + /** @default */ + msg?: string; + /** @enum {unknown} */ + type: "internal"; + }; + /** MarimoInterruptionError */ + MarimoInterruptionError: { + /** @enum {unknown} */ + type: "interruption"; + }; + /** + * MarimoSQLError + * @description SQL-specific error with enhanced metadata for debugging. + */ + MarimoSQLError: { + /** @default null */ + hint?: string | null; + msg: string; + /** @default 0 */ + node_col_offset?: number; + /** @default 0 */ + node_lineno?: number; + /** @default null */ + sql_col?: number | null; + /** @default null */ + sql_line?: number | null; + sql_statement: string; + /** @enum {unknown} */ + type: "sql-error"; + }; + /** MarimoStrictExecutionError */ + MarimoStrictExecutionError: { + blamed_cell: string | null; + msg: string; + ref: string; + /** @enum {unknown} */ + type: "strict-exception"; + }; + /** MarimoSyntaxError */ + MarimoSyntaxError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "syntax"; + }; + /** MissingPackageAlertNotification */ + MissingPackageAlertNotification: { + isolated: boolean; + /** @enum {unknown} */ + op: "missing-package-alert"; + packages: string[]; + }; + /** + * ModelMessage + * @description Widget model state update message. + * + * State changes for anywidget models, including state dict and binary buffer paths. + * + * Attributes: + * state: Model state updates. + * buffer_paths: Paths within state dict pointing to binary buffers. + */ + ModelMessage: { + bufferPaths: (string | number)[][]; + state: Record; + }; + /** MultipleDefinitionError */ + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {unknown} */ + type: "multiple-defs"; + }; + /** + * OpenAiConfig + * @description Configuration options for OpenAI or OpenAI-compatible services. + * + * **Keys.** + * + * - `api_key`: the OpenAI API key + * - `base_url`: the base URL for the API + * - `project`: the project ID for the OpenAI API + * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios + * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client + * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server + * - `extra_headers`: extra headers to be passed to the OpenAI client + */ + OpenAiConfig: { + api_key?: string; + base_url?: string; + ca_bundle_path?: string; + client_pem?: string; + extra_headers?: { + [key: string]: string; + }; + model?: string; + project?: string; + ssl_verify?: boolean; + }; + /** OpenTutorialRequest */ + OpenTutorialRequest: { + tutorialId: + | ( + | "dataflow" + | "fileformat" + | "for-jupyter-users" + | "intro" + | "layout" + | "markdown" + | "plots" + | "sql" + | "ui" + ) + | "markdown-format"; + }; + /** PackageDescription */ + PackageDescription: { + name: string; + version: string; + }; + /** + * PackageManagementConfig + * @description Configuration options for package management. + * + * **Keys.** + * + * - `manager`: the package manager to use + */ + PackageManagementConfig: { + /** @enum {unknown} */ + manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; + }; + /** PackageOperationResponse */ + PackageOperationResponse: { + /** @default null */ + error?: string | null; + success: boolean; + }; + /** + * PreviewDatasetColumnCommand + * @description Preview a dataset column. + * + * Retrieves and displays data from a single column (dataframe or SQL table). + * Used by the data explorer UI. + * + * Attributes: + * source_type: Data source type ('dataframe', 'sql', etc.). + * source: Source identifier (connection string or variable name). + * table_name: Table or dataframe variable name. + * column_name: Column to preview. + * fully_qualified_table_name: Full database.schema.table name for SQL. + */ + PreviewDatasetColumnCommand: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + /** @enum {unknown} */ + type: "preview-dataset-column"; + }; + /** PreviewDatasetColumnRequest */ + PreviewDatasetColumnRequest: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + }; + /** + * PreviewSQLTableCommand + * @description Preview SQL table details. + * + * Retrieves metadata and sample data for a table. Used by the SQL editor + * and data explorer. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database containing the table. + * schema: Schema containing the table. + * table_name: Table to preview. + */ + PreviewSQLTableCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + /** @enum {unknown} */ + type: "preview-sql-table"; + }; + /** PreviewSQLTableRequest */ + PreviewSQLTableRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + }; + /** + * PythonLanguageServerConfig + * @description Configuration options for Python Language Server. + * + * pylsp handles completion, hover, go-to-definition, and diagnostics. + */ + PythonLanguageServerConfig: { + enable_flake8?: boolean; + enable_mypy?: boolean; + enable_pydocstyle?: boolean; + enable_pyflakes?: boolean; + enable_pylint?: boolean; + enable_ruff?: boolean; + enabled?: boolean; + }; + /** QueryParamsAppendNotification */ + QueryParamsAppendNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-append"; + value: string; + }; + /** QueryParamsClearNotification */ + QueryParamsClearNotification: { + /** @enum {unknown} */ + op: "query-params-clear"; + }; + /** QueryParamsDeleteNotification */ + QueryParamsDeleteNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-delete"; + value: string | null; + }; + /** + * QueryParamsSetNotification + * @description Set query parameters. + */ + QueryParamsSetNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-set"; + value: string | string[]; + }; + /** ReadCodeResponse */ + ReadCodeResponse: { + contents: string; + }; + /** RecentFilesResponse */ + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** ReconnectedNotification */ + ReconnectedNotification: { + /** @enum {unknown} */ + op: "reconnected"; + }; + /** + * RefreshSecretsCommand + * @description Refresh secrets from the secrets store. + * + * Reloads secrets from the provider without restarting the kernel. + */ + RefreshSecretsCommand: { + /** @enum {unknown} */ + type: "refresh-secrets"; + }; + /** RefreshSecretsRequest */ + RefreshSecretsRequest: Record; + /** ReloadNotification */ + ReloadNotification: { + /** @enum {unknown} */ + op: "reload"; + }; + /** RemovePackageRequest */ + RemovePackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + }; + /** + * RemoveUIElementsNotification + * @description Invalidate UI elements for a given cell. + */ + RemoveUIElementsNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "remove-ui-elements"; + }; + /** + * RenameNotebookCommand + * @description Rename or move the notebook file. + * + * Updates the notebook's filename in the kernel metadata. + * + * Attributes: + * filename: New filename or path for the notebook. + */ + RenameNotebookCommand: { + filename: string; + /** @enum {unknown} */ + type: "rename-notebook"; + }; + /** RenameNotebookRequest */ + RenameNotebookRequest: { + filename: string; + }; + /** RunningNotebooksResponse */ + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** + * RuntimeConfig + * @description Configuration for runtime. + * + * **Keys.** + * + * - `auto_instantiate`: if `False`, cells won't automatically + * run on startup. This only applies when editing a notebook, + * and not when running as an application. + * The default is `True`. + * - `auto_reload`: if `lazy`, cells importing modified modules will marked + * as stale; if `autorun`, affected cells will be automatically run. similar + * to IPython's %autoreload extension but with more code intelligence. + * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. + * execution. + * - `on_cell_change`: if `lazy`, cells will be marked stale when their + * ancestors run but won't autorun; if `autorun`, cells will automatically + * run when their ancestors run. + * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; + * if `strict` marimo will clone cell declarations by default, avoiding + * hidden potential state build up. + * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks + * affected cells as stale, `"autorun"` automatically runs affected cells. + * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger + * values may affect frontend performance + * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; + * larger values may affect frontend performance + * - `pythonpath`: a list of directories to add to the Python search path. + * Directories will be added to the head of sys.path. Similar to the + * `PYTHONPATH` environment variable, the directories will be included in + * where Python will look for imported modules. + * - `dotenv`: a list of paths to `.env` files to load. + * If the file does not exist, it will be silently ignored. + * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. + * - `default_sql_output`: the default output format for SQL queries. Can be one of: + * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. + * The default is `"auto"`. + * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: + * `html`, `markdown`, `ipynb`. + * The default is None. + */ + RuntimeConfig: { + auto_instantiate: boolean; + /** @enum {unknown} */ + auto_reload: "autorun" | "lazy" | "off"; + default_auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @enum {unknown} */ + default_sql_output: + | "auto" + | "lazy-polars" + | "native" + | "pandas" + | "polars"; + dotenv?: string[]; + /** @enum {unknown} */ + on_cell_change: "autorun" | "lazy"; + output_max_bytes: number; + pythonpath?: string[]; + reactive_tests: boolean; + std_stream_max_bytes: number; + /** @enum {unknown} */ + watcher_on_save: "autorun" | "lazy"; + }; + /** + * SQLMetadata + * @description Metadata for a SQL database. + */ + SQLMetadata: { + connection: string; + database: string; + schema: string; + /** @enum {unknown} */ + type: "sql-metadata"; + }; + /** + * SQLTableListPreviewNotification + * @description Preview of a list of tables in a schema. + */ + SQLTableListPreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-list-preview"; + request_id: string; + /** @default [] */ + tables?: components["schemas"]["DataTable"][]; + }; + /** + * SQLTablePreviewNotification + * @description Preview of a table in a SQL database. + */ + SQLTablePreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-preview"; + request_id: string; + table: null | components["schemas"]["DataTable"]; + }; + /** SaveAppConfigurationRequest */ + SaveAppConfigurationRequest: { + config: Record; + }; + /** + * SaveConfig + * @description Configuration for saving. + * + * **Keys.** + * + * - `autosave`: one of `"off"` or `"after_delay"` + * - `delay`: number of milliseconds to wait before autosaving + * - `format_on_save`: if `True`, format the code on save + */ + SaveConfig: { + /** @enum {unknown} */ + autosave: "after_delay" | "off"; + autosave_delay: number; + format_on_save: boolean; + }; + /** SaveNotebookRequest */ + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + /** @default null */ + layout?: Record | null; + names: string[]; + /** @default true */ + persist?: boolean; + }; + /** SaveUserConfigurationRequest */ + SaveUserConfigurationRequest: { + config: Record; + }; + /** Schema */ + Schema: { + name: string; + tables: components["schemas"]["DataTable"][]; + }; + /** SchemaColumn */ + SchemaColumn: { + name: string; + sampleValues: unknown[]; + type: string; + }; + /** SchemaTable */ + SchemaTable: { + columns: components["schemas"]["SchemaColumn"][]; + name: string; + }; + /** + * SecretKeysResultNotification + * @description Result of listing secret keys. + */ + SecretKeysResultNotification: { + /** @enum {unknown} */ + op: "secret-keys-result"; + request_id: string; + secrets: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** SecretKeysWithProvider */ + SecretKeysWithProvider: { + keys: string[]; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + }; + /** + * ServerConfig + * @description Configuration for the server. + * + * **Keys.** + * + * - `browser`: the web browser to use. `"default"` or a browser registered + * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) + * - `follow_symlink`: if true, the server will follow symlinks it finds + * inside its static assets directory. + */ + ServerConfig: { + browser: "default" | string; + follow_symlink: boolean; + }; + /** SetupRootError */ + SetupRootError: { + edges_with_vars: [string, string[], string][]; + /** @enum {unknown} */ + type: "setup-refs"; + }; + /** + * SharingConfig + * @description Configuration for sharing features. + * + * **Keys.** + * + * - `html`: if `False`, HTML sharing options will be hidden from the UI + * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI + */ + SharingConfig: { + html?: boolean; + wasm?: boolean; + }; + /** ShutdownSessionRequest */ + ShutdownSessionRequest: { + sessionId: string; + }; + /** Snippet */ + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + /** SnippetSection */ + SnippetSection: { + /** @default null */ + code?: string | null; + /** @default null */ + html?: string | null; + id: string; + }; + /** Snippets */ + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + /** + * SnippetsConfig + * @description Configuration for snippets. + * + * **Keys.** + * + * - `custom_path`: the path to the custom snippets directory + */ + SnippetsConfig: { + custom_paths?: string[]; + include_default_snippets?: boolean; + }; + /** + * SqlCatalogCheckResult + * @description Result of running validation against the database. + */ + SqlCatalogCheckResult: { + error_message: string | null; + success: boolean; + }; + /** + * SqlParseError + * @description Represents a single SQL parse error. + * + * Attributes: + * message (str): Description of the error. + * line (int): Line number where the error occurred (1-based). + * column (int): Column number where the error occurred (1-based). + * severity (Literal["error", "warning"]): Severity of the error. + */ + SqlParseError: { + column: number; + line: number; + message: string; + /** @enum {unknown} */ + severity: "error" | "warning"; + }; + /** + * SqlParseResult + * @description Result of parsing an SQL query. + * + * Attributes: + * success (bool): True if parsing succeeded without errors. + * errors (list[SqlParseError]): List of parse errors (empty if success is True). + */ + SqlParseResult: { + errors: components["schemas"]["SqlParseError"][]; + success: boolean; + }; + /** StartupLogsNotification */ + StartupLogsNotification: { + content: string; + /** @enum {unknown} */ + op: "startup-logs"; + /** @enum {unknown} */ + status: "append" | "done" | "start"; + }; + /** StdinRequest */ + StdinRequest: { + text: string; + }; + /** + * StopKernelCommand + * @description Stop kernel execution. + * + * Signals the kernel to stop processing and shut down gracefully. + * Used when closing a notebook or terminating a session. + */ + StopKernelCommand: { + /** @enum {unknown} */ + type: "stop-kernel"; + }; + /** + * StoreConfig + * @description Configuration for cache stores. + */ + StoreConfig: { + args?: Record; + /** @enum {unknown} */ + type?: "file" | "redis" | "rest" | "tiered"; + }; + /** SuccessResponse */ + SuccessResponse: { + /** @default true */ + success?: boolean; + }; + /** + * SyncGraphCommand + * @description Synchronize the kernel graph with file manager state. + * + * Used when the notebook file changes externally (e.g., file reload or version control). + * Updates changed cells, deletes removed cells, and optionally executes modified cells. + * + * Attributes: + * cells: All cells known to file manager, mapping cell_id to code. + * run_ids: Cells to execute or update. + * delete_ids: Cells to delete from the graph. + * timestamp: Unix timestamp when command was created. + */ + SyncGraphCommand: { + cells: { + [key: string]: string; + }; + deleteIds: string[]; + runIds: string[]; + timestamp?: number; + /** @enum {unknown} */ + type: "sync-graph"; + }; + /** + * ToolDefinition + * @description Tool definition compatible with ai-sdk-ui format. + */ + ToolDefinition: { + description: string; + mode: ("agent" | "ask" | "manual")[]; + name: string; + parameters: Record; + /** @enum {unknown} */ + source: "backend" | "frontend" | "mcp"; + }; + /** + * TyLanguageServerConfig + * @description Configuration options for Ty Language Server. + * + * ty handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + TyLanguageServerConfig: { + enabled?: boolean; + }; + /** + * UIElementMessageNotification + * @description Send a message to a UI element. + */ + UIElementMessageNotification: { + /** @default null */ + buffers?: string[] | null; + message: Record; + model_id: string | null; + /** @enum {unknown} */ + op: "send-ui-element-message"; + ui_element: string | null; + }; + /** UnknownError */ + UnknownError: { + /** @default null */ + error_type?: string | null; + msg: string; + /** @enum {unknown} */ + type: "unknown"; + }; + /** UpdateCellCodesNotification */ + UpdateCellCodesNotification: { + cell_ids: string[]; + code_is_stale: boolean; + codes: string[]; + /** @enum {unknown} */ + op: "update-cell-codes"; + }; + /** + * UpdateCellConfigCommand + * @description Update cell configuration. + * + * Updates cell-level settings like disabled state, hide code, etc. + * + * Attributes: + * configs: Cell IDs mapped to their config updates. Each config dict + * can contain partial updates. + */ + UpdateCellConfigCommand: { + configs: { + [key: string]: Record; + }; + /** @enum {unknown} */ + type: "update-cell-config"; + }; + /** UpdateCellConfigRequest */ + UpdateCellConfigRequest: { + configs: { + [key: string]: Record; + }; + }; + /** + * UpdateCellIdsNotification + * @description Update the cell ID ordering of the cells in the notebook. + * + * Right now we send the entire list of cell IDs, + * but in the future we might want to send change-deltas. + */ + UpdateCellIdsNotification: { + cell_ids: string[]; + /** @enum {unknown} */ + op: "update-cell-ids"; + }; + /** UpdateCellIdsRequest */ + UpdateCellIdsRequest: { + cellIds: string[]; + }; + /** + * UpdateUIElementCommand + * @description Update UI element values. + * + * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). + * Updates element values and re-executes dependent cells. + * + * Attributes: + * object_ids: UI elements to update. + * values: New values for the elements. Must match length of object_ids. + * request: HTTP request context if available. + * token: Unique request identifier for deduplication. + */ + UpdateUIElementCommand: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + /** @enum {unknown} */ + type: "update-ui-element"; + values: unknown[]; + }; + /** UpdateUIElementRequest */ + UpdateUIElementRequest: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + values: unknown[]; + }; + /** UpdateUIElementValuesRequest */ + UpdateUIElementValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + /** + * UpdateUserConfigCommand + * @description Update user configuration. + * + * Updates global marimo configuration (runtime settings, display options, editor preferences). + * + * Attributes: + * config: Complete user configuration. + */ + UpdateUserConfigCommand: { + config: components["schemas"]["MarimoConfig"]; + /** @enum {unknown} */ + type: "update-user-config"; + }; + /** UpdateUserConfigRequest */ + UpdateUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + /** + * UpdateWidgetModelCommand + * @description Update anywidget model state. + * + * Updates widget model state for bidirectional Python-JavaScript communication. + * + * Attributes: + * model_id: Widget model identifier. + * message: Model message with state updates and buffer paths. + * buffers: Base64-encoded binary buffers referenced by buffer_paths. + */ + UpdateWidgetModelCommand: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + /** @enum {unknown} */ + type: "update-widget-model"; + }; + /** UpdateWidgetModelRequest */ + UpdateWidgetModelRequest: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + }; + /** + * ValidateSQLCommand + * @description Validate an SQL query. + * + * Checks if an SQL query is valid by parsing against a dialect (no DB connection) + * or validating against an actual database. + * + * Attributes: + * request_id: Unique identifier for this request. + * query: SQL query to validate. + * only_parse: If True, only parse using dialect. If False, validate against DB. + * engine: SQL engine (required if only_parse is False). + * dialect: SQL dialect for parsing (required if only_parse is True). + */ + ValidateSQLCommand: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + /** @enum {unknown} */ + type: "validate-sql"; + }; + /** ValidateSQLRequest */ + ValidateSQLRequest: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + }; + /** ValidateSQLResultNotification */ + ValidateSQLResultNotification: { + /** @default null */ + error?: string | null; + /** @enum {unknown} */ + op: "validate-sql-result"; + /** @default null */ + parse_result?: null | components["schemas"]["SqlParseResult"]; + request_id: string; + /** @default null */ + validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; + }; + /** VariableContext */ + VariableContext: { + name: string; + previewValue: unknown; + valueType: string; + }; + /** VariableDeclarationNotification */ + VariableDeclarationNotification: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + /** VariableValue */ + VariableValue: { + datatype: string | null; + name: string; + value: string | null; + }; + /** + * VariableValuesNotification + * @description List of variables and their types/values. + */ + VariableValuesNotification: { + /** @enum {unknown} */ + op: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + /** + * VariablesNotification + * @description List of variable declarations. + */ + VariablesNotification: { + /** @enum {unknown} */ + op: "variables"; + variables: components["schemas"]["VariableDeclarationNotification"][]; + }; + /** WorkspaceFilesRequest */ + WorkspaceFilesRequest: { + /** @default false */ + includeMarkdown?: boolean; + }; + /** WorkspaceFilesResponse */ + WorkspaceFilesResponse: { + /** @default 0 */ + fileCount?: number; + files: components["schemas"]["FileInfo"][]; + /** @default false */ + hasMore?: boolean; + root: string; + }; + /** + * _AppConfig + * @description Program-specific configuration. + * + * Configuration for frontends or runtimes that is specific to + * a single marimo program. + */ + _AppConfig: { + /** @default null */ + app_title?: string | null; + auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @default null */ + css_file?: string | null; + /** @default null */ + html_head_file?: string | null; + /** @default null */ + layout_file?: string | null; + /** + * @default auto + * @enum {unknown} + */ + sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + /** + * @default compact + * @enum {unknown} + */ + width?: "columns" | "compact" | "full" | "medium" | "normal"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; From 16ea07be97958a4365da878096c5bc39f124c507 Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 26 Dec 2025 21:37:40 +0000 Subject: [PATCH 06/16] regenerate: update OpenAPI schema with cgroup memory limit detection --- packages/openapi/api.yaml | 3 - packages/openapi/src/api.ts | 10394 +++++++++++++++++----------------- 2 files changed, 5125 insertions(+), 5272 deletions(-) diff --git a/packages/openapi/api.yaml b/packages/openapi/api.yaml index b1e492fc243..4a02508bf7c 100644 --- a/packages/openapi/api.yaml +++ b/packages/openapi/api.yaml @@ -5300,13 +5300,10 @@ paths: properties: cpu: properties: - has_cgroup_cpu_limit: - type: boolean percent: type: number required: - percent - - has_cgroup_cpu_limit type: object gpu: items: diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index 3ea8d1bbaec..853f8a1a9d8 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -4,5279 +4,5135 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI chat */ - requestBody: { - content: { - "application/json": components["schemas"]["ChatRequest"]; - }; - }; - responses: never; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/inline_completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI inline completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiInlineCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI inline completion for code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/invoke_tool": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for tool invocation */ - requestBody: { - content: { - "application/json": components["schemas"]["InvokeAiToolRequest"]; - }; - }; - responses: { - /** @description Tool invocation result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["InvokeAiToolResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Refresh MCP server configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPRefreshResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get MCP server status */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPStatusResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/clear": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ClearCacheRequest"]; - }; - }; - responses: { - /** @description Clear all caches */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["GetCacheInfoRequest"]; - }; - }; - responses: { - /** @description Get cache statistics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_datasource_connection": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; - }; - }; - responses: { - /** @description Broadcasts a datasource connection */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableRequest"]; - }; - }; - responses: { - /** @description Preview a SQL table */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table_list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListSQLTablesRequest"]; - }; - }; - responses: { - /** @description Preview a list of tables in an SQL schema */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/ipynb": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsIPYNBRequest"]; - }; - }; - responses: { - /** @description Export the notebook as IPYNB */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileOpenRequest"]; - }; - }; - responses: { - /** @description Open a file in the system editor */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileSearchRequest"]; - }; - }; - responses: { - /** @description Search for files and directories matching a query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileSearchResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/tutorial/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenTutorialRequest"]; - }; - }; - responses: { - /** @description Open a new tutorial */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MarimoFile"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/copy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CopyNotebookRequest"]; - }; - }; - responses: { - /** @description Copy notebook */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatCellsRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InvokeFunctionRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateNotebookRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/pdb/pm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DebugCellRequest"]; - }; - }; - responses: { - /** @description Run a post mortem on the most recent failed cell. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameNotebookRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteCellsRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_model_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateWidgetModelRequest"]; - }; - }; - responses: { - /** @description Set model value */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/takeover": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully closed existing sessions */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status?: string; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/add": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["AddPackageRequest"]; - }; - }; - responses: { - /** @description Install package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List installed packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListPackagesResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/remove": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RemovePackageRequest"]; - }; - }; - responses: { - /** @description Uninstall package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List dependency tree */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DependencyTreeResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSecretRequest"]; - }; - }; - responses: { - /** @description Create a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Delete a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ListSecretKeysRequest"]; - }; - }; - responses: { - /** @description List all secret keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListSecretKeysResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/sql/validate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ValidateSQLRequest"]; - }; - }; - responses: { - /** @description Validate an SQL query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status/connections": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the number of active websocket connections */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - active?: number; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - has_cgroup_cpu_limit: boolean; - percent: number; - }; - gpu?: { - index: number; - memory: { - free: number; - percent: number; - total: number; - used: number; - }; - name: string; - }[]; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - has_cgroup_mem_limit: boolean; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI chat */ + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: never; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/inline_completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI inline completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiInlineCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI inline completion for code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/invoke_tool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for tool invocation */ + requestBody: { + content: { + "application/json": components["schemas"]["InvokeAiToolRequest"]; + }; + }; + responses: { + /** @description Tool invocation result */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InvokeAiToolResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Refresh MCP server configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPRefreshResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get MCP server status */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPStatusResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/clear": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ClearCacheRequest"]; + }; + }; + responses: { + /** @description Clear all caches */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["GetCacheInfoRequest"]; + }; + }; + responses: { + /** @description Get cache statistics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_datasource_connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; + }; + }; + responses: { + /** @description Broadcasts a datasource connection */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableRequest"]; + }; + }; + responses: { + /** @description Preview a SQL table */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table_list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListSQLTablesRequest"]; + }; + }; + responses: { + /** @description Preview a list of tables in an SQL schema */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/ipynb": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsIPYNBRequest"]; + }; + }; + responses: { + /** @description Export the notebook as IPYNB */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileOpenRequest"]; + }; + }; + responses: { + /** @description Open a file in the system editor */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileSearchRequest"]; + }; + }; + responses: { + /** @description Search for files and directories matching a query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileSearchResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/tutorial/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenTutorialRequest"]; + }; + }; + responses: { + /** @description Open a new tutorial */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MarimoFile"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/copy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CopyNotebookRequest"]; + }; + }; + responses: { + /** @description Copy notebook */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatCellsRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InvokeFunctionRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateNotebookRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/pdb/pm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DebugCellRequest"]; + }; + }; + responses: { + /** @description Run a post mortem on the most recent failed cell. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameNotebookRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteCellsRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_model_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateWidgetModelRequest"]; + }; + }; + responses: { + /** @description Set model value */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/takeover": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully closed existing sessions */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status?: string; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/add": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPackageRequest"]; + }; + }; + responses: { + /** @description Install package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List installed packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListPackagesResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/remove": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePackageRequest"]; + }; + }; + responses: { + /** @description Uninstall package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/tree": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List dependency tree */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DependencyTreeResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateSecretRequest"]; + }; + }; + responses: { + /** @description Create a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Delete a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ListSecretKeysRequest"]; + }; + }; + responses: { + /** @description List all secret keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListSecretKeysResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/sql/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ValidateSQLRequest"]; + }; + }; + responses: { + /** @description Validate an SQL query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status/connections": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the number of active websocket connections */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + active?: number; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + percent: number; + }; + gpu?: { + index: number; + memory: { + free: number; + percent: number; + total: number; + used: number; + }; + name: string; + }[]; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + has_cgroup_mem_limit: boolean; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AddPackageRequest - * @description This can be a remove package or a local package. - * - * Supported formats: - * - * httpx - * httpx==0.27.0 - * httpx>=0.27.0 - * git+https://github.com/encode/httpx - * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz - * /example/foo-0.1.0-py3-none-any.whl - */ - AddPackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - /** @default false */ - upgrade?: boolean | null; - }; - /** AiCompletionContext */ - AiCompletionContext: { - /** @default */ - plainText?: string; - /** @default [] */ - schema?: components["schemas"]["SchemaTable"][]; - /** @default [] */ - variables?: (string | components["schemas"]["VariableContext"])[]; - }; - /** AiCompletionRequest */ - AiCompletionRequest: { - code: string; - /** @default null */ - context?: null | components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - /** @default [] */ - messages?: components["schemas"]["ChatMessage"][]; - prompt: string; - /** @default null */ - selectedText?: string | null; - }; - /** - * AiConfig - * @description Configuration options for AI. - * - * **Keys.** - * - * - `rules`: custom rules to include in all AI completion prompts - * - `max_tokens`: the maximum number of tokens to use in AI completions - * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` - * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions - * - `models`: the models to use for AI completions - * - `open_ai`: the OpenAI config - * - `anthropic`: the Anthropic config - * - `google`: the Google AI config - * - `bedrock`: the Bedrock config - * - `azure`: the Azure config - * - `ollama`: the Ollama config - * - `github`: the GitHub config - * - `openrouter`: the OpenRouter config - * - `wandb`: the Weights & Biases config - * - `open_ai_compatible`: the OpenAI-compatible config - */ - AiConfig: { - anthropic?: components["schemas"]["AnthropicConfig"]; - azure?: components["schemas"]["OpenAiConfig"]; - bedrock?: components["schemas"]["BedrockConfig"]; - github?: components["schemas"]["GitHubConfig"]; - google?: components["schemas"]["GoogleAiConfig"]; - inline_tooltip?: boolean; - max_tokens?: number; - /** @enum {unknown} */ - mode?: "agent" | "ask" | "manual"; - models?: components["schemas"]["AiModelConfig"]; - ollama?: components["schemas"]["OpenAiConfig"]; - open_ai?: components["schemas"]["OpenAiConfig"]; - open_ai_compatible?: components["schemas"]["OpenAiConfig"]; - openrouter?: components["schemas"]["OpenAiConfig"]; - rules?: string; - wandb?: components["schemas"]["OpenAiConfig"]; - }; - /** AiInlineCompletionRequest */ - AiInlineCompletionRequest: { - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - prefix: string; - suffix: string; - }; - /** - * AiModelConfig - * @description Configuration options for an AI model. - * - * **Keys.** - * - * - `chat_model`: the model to use for chat completions - * - `edit_model`: the model to use for edit completions - * - `autocomplete_model`: the model to use for code completion/autocomplete - * - `displayed_models`: a list of models to display in the UI - * - `custom_models`: a list of custom models to use that are not from the default list - */ - AiModelConfig: { - autocomplete_model?: string; - chat_model?: string; - custom_models: string[]; - displayed_models: string[]; - edit_model?: string; - }; - /** AlertNotification */ - AlertNotification: { - description: string; - /** @enum {unknown} */ - op: "alert"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** - * AnthropicConfig - * @description Configuration options for Anthropic. - * - * **Keys.** - * - * - `api_key`: the Anthropic API key - */ - AnthropicConfig: { - api_key?: string; - }; - /** BannerNotification */ - BannerNotification: { - /** @default null */ - action?: "restart" | null; - description: string; - /** @enum {unknown} */ - op: "banner"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** BaseResponse */ - BaseResponse: { - success: boolean; - }; - /** - * BasedpyrightServerConfig - * @description Configuration options for basedpyright Language Server. - * - * basedpyright handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - BasedpyrightServerConfig: { - enabled?: boolean; - }; - /** - * BedrockConfig - * @description Configuration options for Bedrock. - * - * **Keys.** - * - * - `profile_name`: the AWS profile to use - * - `region_name`: the AWS region to use - * - `aws_access_key_id`: the AWS access key ID - * - `aws_secret_access_key`: the AWS secret access key - */ - BedrockConfig: { - aws_access_key_id?: string; - aws_secret_access_key?: string; - profile_name?: string; - region_name?: string; - }; - /** - * CacheClearedNotification - * @description Result of clearing cache. - */ - CacheClearedNotification: { - bytes_freed: number; - /** @enum {unknown} */ - op: "cache-cleared"; - }; - /** - * CacheInfoNotification - * @description Cache statistics information. - */ - CacheInfoNotification: { - disk_to_free: number; - disk_total: number; - hits: number; - misses: number; - /** @enum {unknown} */ - op: "cache-info"; - time: number; - }; - /** - * CellChannel - * @description The channel of a cell's output. - * @enum {unknown} - */ - CellChannel: - | "marimo-error" - | "media" - | "output" - | "pdb" - | "stderr" - | "stdin" - | "stdout"; - /** - * CellConfig - * @description Internal representation of a cell's configuration. - * This is not part of the public API. - */ - CellConfig: { - /** @default null */ - column?: number | null; - /** @default false */ - disabled?: boolean; - /** @default false */ - hide_code?: boolean; - }; - /** - * CellNotification - * @description Op to transition a cell. - * - * A CellNotification's data has some optional fields: - * - * output - a CellOutput - * console - a CellOutput (console msg to append), or a list of - * CellOutputs - * status - execution status - * stale_inputs - whether the cell has stale inputs (variables, modules, ...) - * run_id - the run associated with this cell. - * serialization - the serialization status of the cell - * - * Omitting a field means that its value should be unchanged! - * - * And one required field: - * - * cell_id - the cell id - */ - CellNotification: { - cell_id: string; - /** @default null */ - console?: - | components["schemas"]["CellOutput"][] - | null - | components["schemas"]["CellOutput"]; - /** @enum {unknown} */ - op: "cell-op"; - /** @default null */ - output?: null | components["schemas"]["CellOutput"]; - /** @default null */ - run_id?: string | null; - /** @default null */ - serialization?: string | null; - /** @default null */ - stale_inputs?: boolean | null; - /** @default null */ - status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; - timestamp?: number; - }; - /** CellOutput */ - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: - | string - | ( - | components["schemas"]["SetupRootError"] - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["ImportStarError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["MarimoInternalError"] - | components["schemas"]["MarimoSQLError"] - | components["schemas"]["UnknownError"] - )[] - | Record; - /** @enum {unknown} */ - mimetype: - | "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.vegalite.v5+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/plain" - | "video/mp4" - | "video/mpeg"; - timestamp?: number; - }; - /** ChatAttachment */ - ChatAttachment: { - /** @default null */ - content_type?: string | null; - /** @default attachment */ - name?: string; - url: string; - }; - /** - * ChatMessage - * @description A message in a chat. - */ - ChatMessage: { - /** @default null */ - attachments?: components["schemas"]["ChatAttachment"][] | null; - content: unknown; - /** @default null */ - parts?: Record[] | null; - /** @enum {unknown} */ - role: "assistant" | "system" | "user"; - }; - /** ChatRequest */ - ChatRequest: { - context: components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - messages: components["schemas"]["ChatMessage"][]; - /** @default null */ - model?: string | null; - /** @default null */ - tools?: components["schemas"]["ToolDefinition"][] | null; - /** @default null */ - variables?: (string | components["schemas"]["VariableContext"])[] | null; - }; - /** - * ClearCacheCommand - * @description Clear all cached data. - * - * Clears all cache contexts, freeing memory and disk space. - * Affects all cells using the @cache decorator. - */ - ClearCacheCommand: { - /** @enum {unknown} */ - type: "clear-cache"; - }; - /** ClearCacheRequest */ - ClearCacheRequest: Record; - /** - * CodeCompletionCommand - * @description Request code completion suggestions. - * - * Sent when the user requests autocomplete. Provides code context up to - * the cursor position for the language server. - * - * Attributes: - * id: Unique identifier for this request. - * document: Source code up to the cursor position. - * cell_id: Cell where completion is requested. - */ - CodeCompletionCommand: { - cellId: string; - document: string; - id: string; - /** @enum {unknown} */ - type: "code-completion"; - }; - /** CodeCompletionRequest */ - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - /** - * ColumnStats - * @description Represents stats for a column in a data table. - */ - ColumnStats: { - /** @default null */ - false?: number | null; - /** @default null */ - max?: unknown | null; - /** @default null */ - mean?: unknown | null; - /** @default null */ - median?: unknown | null; - /** @default null */ - min?: unknown | null; - /** @default null */ - nulls?: number | null; - /** @default null */ - p25?: unknown | null; - /** @default null */ - p5?: unknown | null; - /** @default null */ - p75?: unknown | null; - /** @default null */ - p95?: unknown | null; - /** @default null */ - std?: unknown | null; - /** @default null */ - total?: number | null; - /** @default null */ - true?: number | null; - /** @default null */ - unique?: number | null; - }; - /** - * CompletedRunNotification - * @description Written on run completion (of submitted cells and their descendants. - */ - CompletedRunNotification: { - /** @enum {unknown} */ - op: "completed-run"; - }; - /** - * CompletionConfig - * @description Configuration for code completion. - * - * A dict with key/value pairs configuring code completion in the marimo - * editor. - * - * **Keys.** - * - * - `activate_on_typing`: if `False`, completion won't activate - * until the completion hotkey is entered - * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing - * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` - * - `codeium_api_key`: the Codeium API key - */ - CompletionConfig: { - activate_on_typing: boolean; - api_key?: string | null; - base_url?: string | null; - codeium_api_key?: string | null; - copilot: boolean | ("codeium" | "custom" | "github"); - model?: string | null; - signature_hint_on_typing: boolean; - }; - /** CompletionOption */ - CompletionOption: { - completion_info: string | null; - name: string; - type: string; - }; - /** - * CompletionResultNotification - * @description Code completion result. - */ - CompletionResultNotification: { - completion_id: string; - /** @enum {unknown} */ - op: "completion-result"; - options: components["schemas"]["CompletionOption"][]; - prefix_length: number; - }; - /** CopyNotebookRequest */ - CopyNotebookRequest: { - destination: string; - source: string; - }; - /** - * CreateNotebookCommand - * @description Instantiate and initialize a notebook. - * - * Sent when a notebook is first loaded. Contains all cells and initial UI element values. - * - * Attributes: - * execution_requests: ExecuteCellCommand for each notebook cell. - * set_ui_element_value_request: Initial UI element values. - * auto_run: Whether to automatically execute cells on instantiation. - * request: HTTP request context if available. - */ - CreateNotebookCommand: { - autoRun: boolean; - executionRequests: components["schemas"]["ExecuteCellCommand"][]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; - /** @enum {unknown} */ - type: "create-notebook"; - }; - /** CreateSecretRequest */ - CreateSecretRequest: { - key: string; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - value: string; - }; - /** CycleError */ - CycleError: { - edges_with_vars: [string, string[], string][]; - /** @enum {unknown} */ - type: "cycle"; - }; - /** - * DataColumnPreviewNotification - * @description Preview of a column in a dataset. - */ - DataColumnPreviewNotification: { - /** @default null */ - chart_code?: string | null; - /** @default null */ - chart_spec?: string | null; - column_name: string; - /** @default null */ - error?: string | null; - /** @default null */ - missing_packages?: string[] | null; - /** @enum {unknown} */ - op: "data-column-preview"; - /** @default null */ - stats?: null | components["schemas"]["ColumnStats"]; - table_name: string; - }; - /** - * DataSourceConnection - * @description Represents a data source connection. - * - * Attributes: - * source (str): The source of the data source connection. E.g 'postgres'. - * dialect (str): The dialect of the data source connection. E.g 'postgresql'. - * name (str): The name of the data source connection. E.g 'engine'. - * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. - * databases (List[Database]): The databases in the data source connection. - * default_database (Optional[str]): The default database in the data source connection. - * default_schema (Optional[str]): The default schema in the data source connection. - */ - DataSourceConnection: { - databases: components["schemas"]["Database"][]; - /** @default null */ - default_database?: string | null; - /** @default null */ - default_schema?: string | null; - dialect: string; - display_name: string; - name: string; - source: string; - }; - /** DataSourceConnectionsNotification */ - DataSourceConnectionsNotification: { - connections: components["schemas"]["DataSourceConnection"][]; - /** @enum {unknown} */ - op: "data-source-connections"; - }; - /** - * DataTable - * @description Represents a data table. - * - * Attributes: - * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). - * source (str): Can be dialect, or source db name. - * name (str): Name of the data table. - * num_rows (Optional[int]): Total number of rows in the table, if known. - * num_columns (Optional[int]): Total number of columns in the table, if known. - * variable_name (Optional[VariableName]): Variable name referencing this table in code. - * columns (List[DataTableColumn]): List of column definitions and metadata. - * engine (Optional[VariableName]): Database engine or connection handler, if any. - * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. - * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. - * indexes (Optional[List[str]]): Column names used as indexes, if any. - */ - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - /** @default null */ - engine?: string | null; - /** @default null */ - indexes?: string[] | null; - name: string; - num_columns: number | null; - num_rows: number | null; - /** @default null */ - primary_keys?: string[] | null; - source: string; - /** @enum {unknown} */ - source_type: "catalog" | "connection" | "duckdb" | "local"; - /** - * @default table - * @enum {unknown} - */ - type?: "table" | "view"; - variable_name: string | null; - }; - /** - * DataTableColumn - * @description Represents a column in a data table. - * - * Attributes: - * name (str): The name of the column. - * type (DataType): The data type of the column. - * external_type (ExternalDataType): The raw data type of the column. - * sample_values (List[Any]): The sample values of the column. - */ - DataTableColumn: { - external_type: string; - name: string; - sample_values: unknown[]; - /** @enum {unknown} */ - type: - | "boolean" - | "date" - | "datetime" - | "integer" - | "number" - | "string" - | "time" - | "unknown"; - }; - /** - * Database - * @description Represents a collection of schemas. - * - * Attributes: - * name (str): The name of the database - * dialect (str): The dialect of the database - * schemas (List[Schema]): List of schemas in the database - * engine (Optional[VariableName]): Database engine or connection handler, if any. - */ - Database: { - dialect: string; - /** @default null */ - engine?: string | null; - name: string; - schemas: components["schemas"]["Schema"][]; - }; - /** - * DatasetsNotification - * @description List of datasets. - */ - DatasetsNotification: { - /** @default null */ - clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; - /** @enum {unknown} */ - op: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - /** - * DatasourcesConfig - * @description Configuration for datasources panel. - * - * **Keys.** - * - * - `auto_discover_schemas`: if `True`, include schemas in the datasource - * - `auto_discover_tables`: if `True`, include tables in the datasource - * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource - */ - DatasourcesConfig: { - auto_discover_columns?: boolean | "auto"; - auto_discover_schemas?: boolean | "auto"; - auto_discover_tables?: boolean | "auto"; - }; - /** - * DebugCellCommand - * @description Enter debugger mode for a cell. - * - * Starts the Python debugger (pdb) for the specified cell. - * - * Attributes: - * cell_id: Cell to debug. - * request: HTTP request context if available. - */ - DebugCellCommand: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "debug-cell"; - }; - /** DebugCellRequest */ - DebugCellRequest: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * DeleteCellCommand - * @description Delete a cell from the notebook. - * - * Removes cell from the dependency graph and cleans up its variables. - * Dependent cells may become stale. - * - * Attributes: - * cell_id: Cell to delete. - */ - DeleteCellCommand: { - cellId: string; - /** @enum {unknown} */ - type: "delete-cell"; - }; - /** DeleteCellRequest */ - DeleteCellRequest: { - cellId: string; - }; - /** DeleteSecretRequest */ - DeleteSecretRequest: { - key: string; - }; - /** DependencyTreeNode */ - DependencyTreeNode: { - dependencies: components["schemas"]["DependencyTreeNode"][]; - name: string; - tags: { - [key: string]: string; - }[]; - version: string | null; - }; - /** DependencyTreeResponse */ - DependencyTreeResponse: { - tree: null | components["schemas"]["DependencyTreeNode"]; - }; - /** - * DiagnosticsConfig - * @description Configuration options for diagnostics. - * - * **Keys.** - * - * - `enabled`: if `True`, diagnostics will be shown in the editor - * - `sql_linter`: if `True`, SQL cells will have linting enabled - */ - DiagnosticsConfig: { - enabled?: boolean; - sql_linter?: boolean; - }; - /** - * DisplayConfig - * @description Configuration for display. - * - * **Keys.** - * - * - `theme`: `"light"`, `"dark"`, or `"system"` - * - `code_editor_font_size`: font size for the code editor - * - `cell_output`: `"above"` or `"below"` - * - `dataframes`: `"rich"` or `"plain"` - * - `custom_css`: list of paths to custom CSS files - * - `default_table_page_size`: default number of rows to display in tables - * - `default_table_max_columns`: default maximum number of columns to display in tables - * - `reference_highlighting`: if `True`, highlight reactive variable references - * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") - */ - DisplayConfig: { - /** @enum {unknown} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - custom_css?: string[]; - /** @enum {unknown} */ - dataframes: "plain" | "rich"; - default_table_max_columns: number; - default_table_page_size: number; - /** @enum {unknown} */ - default_width: "columns" | "compact" | "full" | "medium" | "normal"; - locale?: string | null; - reference_highlighting?: boolean; - /** @enum {unknown} */ - theme: "dark" | "light" | "system"; - }; - /** - * ExecuteCellCommand - * @description Execute a single cell. - * - * Executes a cell with the provided code. Dependent cells may be - * re-executed based on the reactive execution mode. - * - * Attributes: - * cell_id: Cell to execute. - * code: Python code to execute. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellCommand: { - cellId: string; - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cell"; - }; - /** - * ExecuteCellsCommand - * @description Execute multiple cells in a batch. - * - * Executes multiple cells with their corresponding code. The kernel manages - * dependency tracking and reactive execution. - * - * Attributes: - * cell_ids: Cells to execute. - * codes: Python code for each cell. Must match length of cell_ids. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellsCommand: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cells"; - }; - /** ExecuteCellsRequest */ - ExecuteCellsRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteScratchpadCommand - * @description Execute code in the scratchpad. - * - * The scratchpad is a temporary execution environment that doesn't affect - * the notebook's cells or dependencies. Runs in an isolated cell with a copy - * of the global namespace, useful for experimentation. - * - * Attributes: - * code: Python code to execute. - * request: HTTP request context if available. - */ - ExecuteScratchpadCommand: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-scratchpad"; - }; - /** ExecuteScratchpadRequest */ - ExecuteScratchpadRequest: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteStaleCellsCommand - * @description Execute all stale cells. - * - * Cells become stale when their dependencies change but haven't been - * re-executed yet. Brings the notebook to a consistent state. - * - * Attributes: - * request: HTTP request context if available. - */ - ExecuteStaleCellsCommand: { - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-stale-cells"; - }; - /** ExportAsHTMLRequest */ - ExportAsHTMLRequest: { - /** @default null */ - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - /** ExportAsIPYNBRequest */ - ExportAsIPYNBRequest: { - download: boolean; - }; - /** ExportAsMarkdownRequest */ - ExportAsMarkdownRequest: { - download: boolean; - }; - /** ExportAsScriptRequest */ - ExportAsScriptRequest: { - download: boolean; - }; - /** FileCreateRequest */ - FileCreateRequest: { - /** @default null */ - contents?: string | null; - name: string; - path: string; - /** @enum {unknown} */ - type: "directory" | "file"; - }; - /** FileCreateResponse */ - FileCreateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDeleteRequest */ - FileDeleteRequest: { - path: string; - }; - /** FileDeleteResponse */ - FileDeleteResponse: { - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDetailsRequest */ - FileDetailsRequest: { - path: string; - }; - /** FileDetailsResponse */ - FileDetailsResponse: { - /** @default null */ - contents?: string | null; - file: components["schemas"]["FileInfo"]; - /** @default null */ - mimeType?: string | null; - }; - /** FileInfo */ - FileInfo: { - /** @default [] */ - children?: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - }; - /** FileListRequest */ - FileListRequest: { - /** @default null */ - path?: string | null; - }; - /** FileListResponse */ - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - /** FileMoveRequest */ - FileMoveRequest: { - newPath: string; - path: string; - }; - /** FileMoveResponse */ - FileMoveResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileOpenRequest */ - FileOpenRequest: { - /** @default null */ - lineNumber?: number | null; - path: string; - }; - /** FileSearchRequest */ - FileSearchRequest: { - /** @default 3 */ - depth?: number; - /** @default true */ - includeDirectories?: boolean; - /** @default true */ - includeFiles?: boolean; - /** @default 100 */ - limit?: number; - /** @default null */ - path?: string | null; - query: string; - }; - /** FileSearchResponse */ - FileSearchResponse: { - files: components["schemas"]["FileInfo"][]; - query: string; - totalFound: number; - }; - /** FileUpdateRequest */ - FileUpdateRequest: { - contents: string; - path: string; - }; - /** FileUpdateResponse */ - FileUpdateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FocusCellNotification */ - FocusCellNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "focus-cell"; - }; - /** FormatCellsRequest */ - FormatCellsRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - /** FormatResponse */ - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - /** - * FormattingConfig - * @description Configuration for code formatting. - * - * **Keys.** - * - * - `line_length`: max line length - */ - FormattingConfig: { - line_length: number; - }; - /** - * FunctionCallResultNotification - * @description Result of calling a function. - */ - FunctionCallResultNotification: { - function_call_id: string; - /** @enum {unknown} */ - op: "function-call-result"; - return_value: unknown; - status: components["schemas"]["HumanReadableStatus"]; - }; - /** - * GetCacheInfoCommand - * @description Retrieve cache statistics. - * - * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). - */ - GetCacheInfoCommand: { - /** @enum {unknown} */ - type: "get-cache-info"; - }; - /** GetCacheInfoRequest */ - GetCacheInfoRequest: Record; - /** - * GitHubConfig - * @description Configuration options for GitHub. - * - * **Keys.** - * - * - `api_key`: the GitHub API token - * - `base_url`: the base URL for the API - * - `copilot_settings`: configuration settings for GitHub Copilot LSP. - * Supports settings like `http` (proxy configuration), `telemetry`, - * and `github-enterprise` (enterprise URI). - */ - GitHubConfig: { - api_key?: string; - base_url?: string; - copilot_settings?: Record; - }; - /** - * GoogleAiConfig - * @description Configuration options for Google AI. - * - * **Keys.** - * - * - `api_key`: the Google AI API key - */ - GoogleAiConfig: { - api_key?: string; - }; - /** - * HTTPRequest - * @description Serializable HTTP request representation. - * - * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe - * subset of data. Excludes session and auth to prevent exposing sensitive data. - * - * Attributes: - * url: Serialized URL with path, port, scheme, netloc, query, hostname. - * base_url: Serialized base URL. - * headers: Request headers (marimo-specific headers excluded). - * query_params: Query parameters mapped to lists of values. - * path_params: Path parameters from the URL route. - * cookies: Request cookies. - * meta: User-defined storage for custom data. - * user: User info from authentication middleware (e.g., is_authenticated, username). - */ - HTTPRequest: { - base_url: Record; - cookies: { - [key: string]: string; - }; - headers: { - [key: string]: string; - }; - meta: Record; - path_params: Record; - query_params: { - [key: string]: string[]; - }; - url: Record; - user: unknown; - }; - /** - * HumanReadableStatus - * @description Human-readable status. - */ - HumanReadableStatus: { - /** @enum {unknown} */ - code: "error" | "ok"; - /** @default null */ - message?: string | null; - /** @default null */ - title?: string | null; - }; - /** ImportStarError */ - ImportStarError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "import-star"; - }; - /** - * InstallPackagesCommand - * @description Install Python packages. - * - * Installs missing packages using the specified package manager. Triggered - * automatically on import errors or manually by the user. - * - * Attributes: - * manager: Package manager to use ('pip', 'conda', 'uv', etc.). - * versions: Package names mapped to version specifiers. Empty version - * means install latest. - */ - InstallPackagesCommand: { - manager: string; - /** @enum {unknown} */ - type: "install-packages"; - versions: { - [key: string]: string; - }; - }; - /** InstallPackagesRequest */ - InstallPackagesRequest: { - manager: string; - versions: { - [key: string]: string; - }; - }; - /** InstallingPackageAlertNotification */ - InstallingPackageAlertNotification: { - /** @default null */ - log_status?: ("append" | "done" | "start") | null; - /** @default null */ - logs?: { - [key: string]: string; - } | null; - /** @enum {unknown} */ - op: "installing-package-alert"; - packages: { - [key: string]: "failed" | "installed" | "installing" | "queued"; - }; - }; - /** InstantiateNotebookRequest */ - InstantiateNotebookRequest: { - /** @default true */ - autoRun?: boolean; - objectIds: string[]; - values: unknown[]; - }; - /** - * InterruptedNotification - * @description Written when the kernel is interrupted by the user. - */ - InterruptedNotification: { - /** @enum {unknown} */ - op: "interrupted"; - }; - /** InvokeAiToolRequest */ - InvokeAiToolRequest: { - arguments: Record; - toolName: string; - }; - /** InvokeAiToolResponse */ - InvokeAiToolResponse: { - /** @default null */ - error?: string | null; - result: unknown; - success: boolean; - toolName: string; - }; - /** - * InvokeFunctionCommand - * @description Invoke a function from a UI element. - * - * Called when a UI element needs to invoke a Python function. - * - * Attributes: - * function_call_id: Unique identifier for this call. - * namespace: Namespace where the function is registered. - * function_name: Function to invoke. - * args: Keyword arguments for the function. - */ - InvokeFunctionCommand: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - /** @enum {unknown} */ - type: "invoke-function"; - }; - /** InvokeFunctionRequest */ - InvokeFunctionRequest: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - }; - /** KernelCapabilitiesNotification */ - KernelCapabilitiesNotification: { - /** @default false */ - basedpyright?: boolean; - /** @default false */ - pylsp?: boolean; - /** @default false */ - terminal?: boolean; - /** @default false */ - ty?: boolean; - }; - /** - * KernelReadyNotification - * @description Kernel is ready for execution. - */ - KernelReadyNotification: { - app_config: components["schemas"]["_AppConfig"]; - capabilities: components["schemas"]["KernelCapabilitiesNotification"]; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code: { - [key: string]: string; - } | null; - last_execution_time: { - [key: string]: number; - } | null; - layout: components["schemas"]["LayoutConfig"] | null; - names: string[]; - /** @enum {unknown} */ - op: "kernel-ready"; - resumed: boolean; - ui_values: Record | null; - }; - /** - * KeymapConfig - * @description Configuration for keymaps. - * - * **Keys.** - * - * - `preset`: one of `"default"` or `"vim"` - * - `overrides`: a dict of keymap actions to their keymap override - * - `vimrc`: path to a vimrc file to load keymaps from - * - `destructive_delete`: if `True`, allows deleting cells with content. - */ - KeymapConfig: { - destructive_delete?: boolean; - overrides?: { - [key: string]: string; - }; - /** @enum {unknown} */ - preset: "default" | "vim"; - vimrc?: string | null; - }; - /** KnownUnions */ - KnownUnions: { - command: - | components["schemas"]["CreateNotebookCommand"] - | components["schemas"]["RenameNotebookCommand"] - | components["schemas"]["ExecuteCellsCommand"] - | components["schemas"]["ExecuteScratchpadCommand"] - | components["schemas"]["ExecuteStaleCellsCommand"] - | components["schemas"]["DebugCellCommand"] - | components["schemas"]["DeleteCellCommand"] - | components["schemas"]["SyncGraphCommand"] - | components["schemas"]["UpdateCellConfigCommand"] - | components["schemas"]["InstallPackagesCommand"] - | components["schemas"]["UpdateUIElementCommand"] - | components["schemas"]["UpdateWidgetModelCommand"] - | components["schemas"]["InvokeFunctionCommand"] - | components["schemas"]["UpdateUserConfigCommand"] - | components["schemas"]["PreviewDatasetColumnCommand"] - | components["schemas"]["PreviewSQLTableCommand"] - | components["schemas"]["ListSQLTablesCommand"] - | components["schemas"]["ValidateSQLCommand"] - | components["schemas"]["ListDataSourceConnectionCommand"] - | components["schemas"]["ListSecretKeysCommand"] - | components["schemas"]["RefreshSecretsCommand"] - | components["schemas"]["ClearCacheCommand"] - | components["schemas"]["GetCacheInfoCommand"] - | components["schemas"]["StopKernelCommand"]; - /** @enum {unknown} */ - data_type: - | "boolean" - | "date" - | "datetime" - | "integer" - | "number" - | "string" - | "time" - | "unknown"; - error: - | components["schemas"]["SetupRootError"] - | components["schemas"]["CycleError"] - | components["schemas"]["MultipleDefinitionError"] - | components["schemas"]["ImportStarError"] - | components["schemas"]["MarimoAncestorStoppedError"] - | components["schemas"]["MarimoAncestorPreventedError"] - | components["schemas"]["MarimoExceptionRaisedError"] - | components["schemas"]["MarimoStrictExecutionError"] - | components["schemas"]["MarimoInterruptionError"] - | components["schemas"]["MarimoSyntaxError"] - | components["schemas"]["MarimoInternalError"] - | components["schemas"]["MarimoSQLError"] - | components["schemas"]["UnknownError"]; - notification: - | components["schemas"]["CellNotification"] - | components["schemas"]["FunctionCallResultNotification"] - | components["schemas"]["UIElementMessageNotification"] - | components["schemas"]["RemoveUIElementsNotification"] - | components["schemas"]["ReloadNotification"] - | components["schemas"]["ReconnectedNotification"] - | components["schemas"]["InterruptedNotification"] - | components["schemas"]["CompletedRunNotification"] - | components["schemas"]["KernelReadyNotification"] - | components["schemas"]["CompletionResultNotification"] - | components["schemas"]["AlertNotification"] - | components["schemas"]["BannerNotification"] - | components["schemas"]["MissingPackageAlertNotification"] - | components["schemas"]["InstallingPackageAlertNotification"] - | components["schemas"]["StartupLogsNotification"] - | components["schemas"]["VariablesNotification"] - | components["schemas"]["VariableValuesNotification"] - | components["schemas"]["QueryParamsSetNotification"] - | components["schemas"]["QueryParamsAppendNotification"] - | components["schemas"]["QueryParamsDeleteNotification"] - | components["schemas"]["QueryParamsClearNotification"] - | components["schemas"]["DatasetsNotification"] - | components["schemas"]["DataColumnPreviewNotification"] - | components["schemas"]["SQLTablePreviewNotification"] - | components["schemas"]["SQLTableListPreviewNotification"] - | components["schemas"]["DataSourceConnectionsNotification"] - | components["schemas"]["ValidateSQLResultNotification"] - | components["schemas"]["SecretKeysResultNotification"] - | components["schemas"]["CacheClearedNotification"] - | components["schemas"]["CacheInfoNotification"] - | components["schemas"]["FocusCellNotification"] - | components["schemas"]["UpdateCellCodesNotification"] - | components["schemas"]["UpdateCellIdsNotification"]; - }; - /** - * LanguageServersConfig - * @description Configuration options for language servers. - * - * **Keys.** - * - * - `pylsp`: the pylsp config - */ - LanguageServersConfig: { - basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; - pylsp?: components["schemas"]["PythonLanguageServerConfig"]; - ty?: components["schemas"]["TyLanguageServerConfig"]; - }; - /** LayoutConfig */ - LayoutConfig: { - data: Record; - type: string; - }; - /** - * ListDataSourceConnectionCommand - * @description List data source schemas. - * - * Retrieves available schemas for a data source engine. - * - * Attributes: - * engine: Data source engine identifier. - */ - ListDataSourceConnectionCommand: { - engine: string; - /** @enum {unknown} */ - type: "list-data-source-connection"; - }; - /** ListDataSourceConnectionRequest */ - ListDataSourceConnectionRequest: { - engine: string; - }; - /** ListPackagesResponse */ - ListPackagesResponse: { - packages: components["schemas"]["PackageDescription"][]; - }; - /** - * ListSQLTablesCommand - * @description List tables in an SQL schema. - * - * Retrieves names of all tables and views in a schema. Used by the SQL - * editor for table selection. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database to query. - * schema: Schema to list tables from. - */ - ListSQLTablesCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - /** @enum {unknown} */ - type: "list-sql-tables"; - }; - /** ListSQLTablesRequest */ - ListSQLTablesRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - }; - /** - * ListSecretKeysCommand - * @description List available secret keys. - * - * Retrieves secret names without exposing values. - * - * Attributes: - * request_id: Unique identifier for this request. - */ - ListSecretKeysCommand: { - requestId: string; - /** @enum {unknown} */ - type: "list-secret-keys"; - }; - /** ListSecretKeysRequest */ - ListSecretKeysRequest: { - requestId: string; - }; - /** ListSecretKeysResponse */ - ListSecretKeysResponse: { - keys: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** - * MCPConfig - * @description Configuration for MCP servers - * - * Note: the field name `mcpServers` is camelCased to match MCP server - * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) - */ - MCPConfig: { - mcpServers: { - [key: string]: Record; - }; - presets?: ("context7" | "marimo")[]; - }; - /** MCPRefreshResponse */ - MCPRefreshResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: boolean; - }; - success: boolean; - }; - /** MCPStatusResponse */ - MCPStatusResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: "connected" | "disconnected" | "failed" | "pending"; - }; - /** @enum {unknown} */ - status: "error" | "ok" | "partial"; - }; - /** MarimoAncestorPreventedError */ - MarimoAncestorPreventedError: { - blamed_cell: string | null; - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-prevented"; - }; - /** MarimoAncestorStoppedError */ - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-stopped"; - }; - /** - * MarimoConfig - * @description Configuration for the marimo editor - */ - MarimoConfig: { - ai?: components["schemas"]["AiConfig"]; - completion: components["schemas"]["CompletionConfig"]; - datasources?: components["schemas"]["DatasourcesConfig"]; - diagnostics?: components["schemas"]["DiagnosticsConfig"]; - display: components["schemas"]["DisplayConfig"]; - experimental?: Record; - formatting: components["schemas"]["FormattingConfig"]; - keymap: components["schemas"]["KeymapConfig"]; - language_servers?: components["schemas"]["LanguageServersConfig"]; - mcp?: components["schemas"]["MCPConfig"]; - package_management: components["schemas"]["PackageManagementConfig"]; - runtime: components["schemas"]["RuntimeConfig"]; - save: components["schemas"]["SaveConfig"]; - server: components["schemas"]["ServerConfig"]; - sharing?: components["schemas"]["SharingConfig"]; - snippets?: components["schemas"]["SnippetsConfig"]; - }; - /** MarimoExceptionRaisedError */ - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell: string | null; - /** @enum {unknown} */ - type: "exception"; - }; - /** MarimoFile */ - MarimoFile: { - /** @default null */ - initializationId?: string | null; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - /** @default null */ - sessionId?: string | null; - }; - /** - * 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. - */ - MarimoInternalError: { - error_id: string; - /** @default */ - msg?: string; - /** @enum {unknown} */ - type: "internal"; - }; - /** MarimoInterruptionError */ - MarimoInterruptionError: { - /** @enum {unknown} */ - type: "interruption"; - }; - /** - * MarimoSQLError - * @description SQL-specific error with enhanced metadata for debugging. - */ - MarimoSQLError: { - /** @default null */ - hint?: string | null; - msg: string; - /** @default 0 */ - node_col_offset?: number; - /** @default 0 */ - node_lineno?: number; - /** @default null */ - sql_col?: number | null; - /** @default null */ - sql_line?: number | null; - sql_statement: string; - /** @enum {unknown} */ - type: "sql-error"; - }; - /** MarimoStrictExecutionError */ - MarimoStrictExecutionError: { - blamed_cell: string | null; - msg: string; - ref: string; - /** @enum {unknown} */ - type: "strict-exception"; - }; - /** MarimoSyntaxError */ - MarimoSyntaxError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "syntax"; - }; - /** MissingPackageAlertNotification */ - MissingPackageAlertNotification: { - isolated: boolean; - /** @enum {unknown} */ - op: "missing-package-alert"; - packages: string[]; - }; - /** - * ModelMessage - * @description Widget model state update message. - * - * State changes for anywidget models, including state dict and binary buffer paths. - * - * Attributes: - * state: Model state updates. - * buffer_paths: Paths within state dict pointing to binary buffers. - */ - ModelMessage: { - bufferPaths: (string | number)[][]; - state: Record; - }; - /** MultipleDefinitionError */ - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {unknown} */ - type: "multiple-defs"; - }; - /** - * OpenAiConfig - * @description Configuration options for OpenAI or OpenAI-compatible services. - * - * **Keys.** - * - * - `api_key`: the OpenAI API key - * - `base_url`: the base URL for the API - * - `project`: the project ID for the OpenAI API - * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios - * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client - * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server - * - `extra_headers`: extra headers to be passed to the OpenAI client - */ - OpenAiConfig: { - api_key?: string; - base_url?: string; - ca_bundle_path?: string; - client_pem?: string; - extra_headers?: { - [key: string]: string; - }; - model?: string; - project?: string; - ssl_verify?: boolean; - }; - /** OpenTutorialRequest */ - OpenTutorialRequest: { - tutorialId: - | ( - | "dataflow" - | "fileformat" - | "for-jupyter-users" - | "intro" - | "layout" - | "markdown" - | "plots" - | "sql" - | "ui" - ) - | "markdown-format"; - }; - /** PackageDescription */ - PackageDescription: { - name: string; - version: string; - }; - /** - * PackageManagementConfig - * @description Configuration options for package management. - * - * **Keys.** - * - * - `manager`: the package manager to use - */ - PackageManagementConfig: { - /** @enum {unknown} */ - manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; - }; - /** PackageOperationResponse */ - PackageOperationResponse: { - /** @default null */ - error?: string | null; - success: boolean; - }; - /** - * PreviewDatasetColumnCommand - * @description Preview a dataset column. - * - * Retrieves and displays data from a single column (dataframe or SQL table). - * Used by the data explorer UI. - * - * Attributes: - * source_type: Data source type ('dataframe', 'sql', etc.). - * source: Source identifier (connection string or variable name). - * table_name: Table or dataframe variable name. - * column_name: Column to preview. - * fully_qualified_table_name: Full database.schema.table name for SQL. - */ - PreviewDatasetColumnCommand: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - /** @enum {unknown} */ - type: "preview-dataset-column"; - }; - /** PreviewDatasetColumnRequest */ - PreviewDatasetColumnRequest: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - }; - /** - * PreviewSQLTableCommand - * @description Preview SQL table details. - * - * Retrieves metadata and sample data for a table. Used by the SQL editor - * and data explorer. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database containing the table. - * schema: Schema containing the table. - * table_name: Table to preview. - */ - PreviewSQLTableCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - /** @enum {unknown} */ - type: "preview-sql-table"; - }; - /** PreviewSQLTableRequest */ - PreviewSQLTableRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - }; - /** - * PythonLanguageServerConfig - * @description Configuration options for Python Language Server. - * - * pylsp handles completion, hover, go-to-definition, and diagnostics. - */ - PythonLanguageServerConfig: { - enable_flake8?: boolean; - enable_mypy?: boolean; - enable_pydocstyle?: boolean; - enable_pyflakes?: boolean; - enable_pylint?: boolean; - enable_ruff?: boolean; - enabled?: boolean; - }; - /** QueryParamsAppendNotification */ - QueryParamsAppendNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-append"; - value: string; - }; - /** QueryParamsClearNotification */ - QueryParamsClearNotification: { - /** @enum {unknown} */ - op: "query-params-clear"; - }; - /** QueryParamsDeleteNotification */ - QueryParamsDeleteNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-delete"; - value: string | null; - }; - /** - * QueryParamsSetNotification - * @description Set query parameters. - */ - QueryParamsSetNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-set"; - value: string | string[]; - }; - /** ReadCodeResponse */ - ReadCodeResponse: { - contents: string; - }; - /** RecentFilesResponse */ - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** ReconnectedNotification */ - ReconnectedNotification: { - /** @enum {unknown} */ - op: "reconnected"; - }; - /** - * RefreshSecretsCommand - * @description Refresh secrets from the secrets store. - * - * Reloads secrets from the provider without restarting the kernel. - */ - RefreshSecretsCommand: { - /** @enum {unknown} */ - type: "refresh-secrets"; - }; - /** RefreshSecretsRequest */ - RefreshSecretsRequest: Record; - /** ReloadNotification */ - ReloadNotification: { - /** @enum {unknown} */ - op: "reload"; - }; - /** RemovePackageRequest */ - RemovePackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - }; - /** - * RemoveUIElementsNotification - * @description Invalidate UI elements for a given cell. - */ - RemoveUIElementsNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "remove-ui-elements"; - }; - /** - * RenameNotebookCommand - * @description Rename or move the notebook file. - * - * Updates the notebook's filename in the kernel metadata. - * - * Attributes: - * filename: New filename or path for the notebook. - */ - RenameNotebookCommand: { - filename: string; - /** @enum {unknown} */ - type: "rename-notebook"; - }; - /** RenameNotebookRequest */ - RenameNotebookRequest: { - filename: string; - }; - /** RunningNotebooksResponse */ - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** - * RuntimeConfig - * @description Configuration for runtime. - * - * **Keys.** - * - * - `auto_instantiate`: if `False`, cells won't automatically - * run on startup. This only applies when editing a notebook, - * and not when running as an application. - * The default is `True`. - * - `auto_reload`: if `lazy`, cells importing modified modules will marked - * as stale; if `autorun`, affected cells will be automatically run. similar - * to IPython's %autoreload extension but with more code intelligence. - * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. - * execution. - * - `on_cell_change`: if `lazy`, cells will be marked stale when their - * ancestors run but won't autorun; if `autorun`, cells will automatically - * run when their ancestors run. - * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; - * if `strict` marimo will clone cell declarations by default, avoiding - * hidden potential state build up. - * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks - * affected cells as stale, `"autorun"` automatically runs affected cells. - * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger - * values may affect frontend performance - * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; - * larger values may affect frontend performance - * - `pythonpath`: a list of directories to add to the Python search path. - * Directories will be added to the head of sys.path. Similar to the - * `PYTHONPATH` environment variable, the directories will be included in - * where Python will look for imported modules. - * - `dotenv`: a list of paths to `.env` files to load. - * If the file does not exist, it will be silently ignored. - * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. - * - `default_sql_output`: the default output format for SQL queries. Can be one of: - * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. - * The default is `"auto"`. - * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: - * `html`, `markdown`, `ipynb`. - * The default is None. - */ - RuntimeConfig: { - auto_instantiate: boolean; - /** @enum {unknown} */ - auto_reload: "autorun" | "lazy" | "off"; - default_auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @enum {unknown} */ - default_sql_output: - | "auto" - | "lazy-polars" - | "native" - | "pandas" - | "polars"; - dotenv?: string[]; - /** @enum {unknown} */ - on_cell_change: "autorun" | "lazy"; - output_max_bytes: number; - pythonpath?: string[]; - reactive_tests: boolean; - std_stream_max_bytes: number; - /** @enum {unknown} */ - watcher_on_save: "autorun" | "lazy"; - }; - /** - * SQLMetadata - * @description Metadata for a SQL database. - */ - SQLMetadata: { - connection: string; - database: string; - schema: string; - /** @enum {unknown} */ - type: "sql-metadata"; - }; - /** - * SQLTableListPreviewNotification - * @description Preview of a list of tables in a schema. - */ - SQLTableListPreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-list-preview"; - request_id: string; - /** @default [] */ - tables?: components["schemas"]["DataTable"][]; - }; - /** - * SQLTablePreviewNotification - * @description Preview of a table in a SQL database. - */ - SQLTablePreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-preview"; - request_id: string; - table: null | components["schemas"]["DataTable"]; - }; - /** SaveAppConfigurationRequest */ - SaveAppConfigurationRequest: { - config: Record; - }; - /** - * SaveConfig - * @description Configuration for saving. - * - * **Keys.** - * - * - `autosave`: one of `"off"` or `"after_delay"` - * - `delay`: number of milliseconds to wait before autosaving - * - `format_on_save`: if `True`, format the code on save - */ - SaveConfig: { - /** @enum {unknown} */ - autosave: "after_delay" | "off"; - autosave_delay: number; - format_on_save: boolean; - }; - /** SaveNotebookRequest */ - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - /** @default null */ - layout?: Record | null; - names: string[]; - /** @default true */ - persist?: boolean; - }; - /** SaveUserConfigurationRequest */ - SaveUserConfigurationRequest: { - config: Record; - }; - /** Schema */ - Schema: { - name: string; - tables: components["schemas"]["DataTable"][]; - }; - /** SchemaColumn */ - SchemaColumn: { - name: string; - sampleValues: unknown[]; - type: string; - }; - /** SchemaTable */ - SchemaTable: { - columns: components["schemas"]["SchemaColumn"][]; - name: string; - }; - /** - * SecretKeysResultNotification - * @description Result of listing secret keys. - */ - SecretKeysResultNotification: { - /** @enum {unknown} */ - op: "secret-keys-result"; - request_id: string; - secrets: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** SecretKeysWithProvider */ - SecretKeysWithProvider: { - keys: string[]; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - }; - /** - * ServerConfig - * @description Configuration for the server. - * - * **Keys.** - * - * - `browser`: the web browser to use. `"default"` or a browser registered - * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) - * - `follow_symlink`: if true, the server will follow symlinks it finds - * inside its static assets directory. - */ - ServerConfig: { - browser: "default" | string; - follow_symlink: boolean; - }; - /** SetupRootError */ - SetupRootError: { - edges_with_vars: [string, string[], string][]; - /** @enum {unknown} */ - type: "setup-refs"; - }; - /** - * SharingConfig - * @description Configuration for sharing features. - * - * **Keys.** - * - * - `html`: if `False`, HTML sharing options will be hidden from the UI - * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI - */ - SharingConfig: { - html?: boolean; - wasm?: boolean; - }; - /** ShutdownSessionRequest */ - ShutdownSessionRequest: { - sessionId: string; - }; - /** Snippet */ - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - /** SnippetSection */ - SnippetSection: { - /** @default null */ - code?: string | null; - /** @default null */ - html?: string | null; - id: string; - }; - /** Snippets */ - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - /** - * SnippetsConfig - * @description Configuration for snippets. - * - * **Keys.** - * - * - `custom_path`: the path to the custom snippets directory - */ - SnippetsConfig: { - custom_paths?: string[]; - include_default_snippets?: boolean; - }; - /** - * SqlCatalogCheckResult - * @description Result of running validation against the database. - */ - SqlCatalogCheckResult: { - error_message: string | null; - success: boolean; - }; - /** - * SqlParseError - * @description Represents a single SQL parse error. - * - * Attributes: - * message (str): Description of the error. - * line (int): Line number where the error occurred (1-based). - * column (int): Column number where the error occurred (1-based). - * severity (Literal["error", "warning"]): Severity of the error. - */ - SqlParseError: { - column: number; - line: number; - message: string; - /** @enum {unknown} */ - severity: "error" | "warning"; - }; - /** - * SqlParseResult - * @description Result of parsing an SQL query. - * - * Attributes: - * success (bool): True if parsing succeeded without errors. - * errors (list[SqlParseError]): List of parse errors (empty if success is True). - */ - SqlParseResult: { - errors: components["schemas"]["SqlParseError"][]; - success: boolean; - }; - /** StartupLogsNotification */ - StartupLogsNotification: { - content: string; - /** @enum {unknown} */ - op: "startup-logs"; - /** @enum {unknown} */ - status: "append" | "done" | "start"; - }; - /** StdinRequest */ - StdinRequest: { - text: string; - }; - /** - * StopKernelCommand - * @description Stop kernel execution. - * - * Signals the kernel to stop processing and shut down gracefully. - * Used when closing a notebook or terminating a session. - */ - StopKernelCommand: { - /** @enum {unknown} */ - type: "stop-kernel"; - }; - /** - * StoreConfig - * @description Configuration for cache stores. - */ - StoreConfig: { - args?: Record; - /** @enum {unknown} */ - type?: "file" | "redis" | "rest" | "tiered"; - }; - /** SuccessResponse */ - SuccessResponse: { - /** @default true */ - success?: boolean; - }; - /** - * SyncGraphCommand - * @description Synchronize the kernel graph with file manager state. - * - * Used when the notebook file changes externally (e.g., file reload or version control). - * Updates changed cells, deletes removed cells, and optionally executes modified cells. - * - * Attributes: - * cells: All cells known to file manager, mapping cell_id to code. - * run_ids: Cells to execute or update. - * delete_ids: Cells to delete from the graph. - * timestamp: Unix timestamp when command was created. - */ - SyncGraphCommand: { - cells: { - [key: string]: string; - }; - deleteIds: string[]; - runIds: string[]; - timestamp?: number; - /** @enum {unknown} */ - type: "sync-graph"; - }; - /** - * ToolDefinition - * @description Tool definition compatible with ai-sdk-ui format. - */ - ToolDefinition: { - description: string; - mode: ("agent" | "ask" | "manual")[]; - name: string; - parameters: Record; - /** @enum {unknown} */ - source: "backend" | "frontend" | "mcp"; - }; - /** - * TyLanguageServerConfig - * @description Configuration options for Ty Language Server. - * - * ty handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - TyLanguageServerConfig: { - enabled?: boolean; - }; - /** - * UIElementMessageNotification - * @description Send a message to a UI element. - */ - UIElementMessageNotification: { - /** @default null */ - buffers?: string[] | null; - message: Record; - model_id: string | null; - /** @enum {unknown} */ - op: "send-ui-element-message"; - ui_element: string | null; - }; - /** UnknownError */ - UnknownError: { - /** @default null */ - error_type?: string | null; - msg: string; - /** @enum {unknown} */ - type: "unknown"; - }; - /** UpdateCellCodesNotification */ - UpdateCellCodesNotification: { - cell_ids: string[]; - code_is_stale: boolean; - codes: string[]; - /** @enum {unknown} */ - op: "update-cell-codes"; - }; - /** - * UpdateCellConfigCommand - * @description Update cell configuration. - * - * Updates cell-level settings like disabled state, hide code, etc. - * - * Attributes: - * configs: Cell IDs mapped to their config updates. Each config dict - * can contain partial updates. - */ - UpdateCellConfigCommand: { - configs: { - [key: string]: Record; - }; - /** @enum {unknown} */ - type: "update-cell-config"; - }; - /** UpdateCellConfigRequest */ - UpdateCellConfigRequest: { - configs: { - [key: string]: Record; - }; - }; - /** - * UpdateCellIdsNotification - * @description Update the cell ID ordering of the cells in the notebook. - * - * Right now we send the entire list of cell IDs, - * but in the future we might want to send change-deltas. - */ - UpdateCellIdsNotification: { - cell_ids: string[]; - /** @enum {unknown} */ - op: "update-cell-ids"; - }; - /** UpdateCellIdsRequest */ - UpdateCellIdsRequest: { - cellIds: string[]; - }; - /** - * UpdateUIElementCommand - * @description Update UI element values. - * - * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). - * Updates element values and re-executes dependent cells. - * - * Attributes: - * object_ids: UI elements to update. - * values: New values for the elements. Must match length of object_ids. - * request: HTTP request context if available. - * token: Unique request identifier for deduplication. - */ - UpdateUIElementCommand: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - /** @enum {unknown} */ - type: "update-ui-element"; - values: unknown[]; - }; - /** UpdateUIElementRequest */ - UpdateUIElementRequest: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - values: unknown[]; - }; - /** UpdateUIElementValuesRequest */ - UpdateUIElementValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - /** - * UpdateUserConfigCommand - * @description Update user configuration. - * - * Updates global marimo configuration (runtime settings, display options, editor preferences). - * - * Attributes: - * config: Complete user configuration. - */ - UpdateUserConfigCommand: { - config: components["schemas"]["MarimoConfig"]; - /** @enum {unknown} */ - type: "update-user-config"; - }; - /** UpdateUserConfigRequest */ - UpdateUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - /** - * UpdateWidgetModelCommand - * @description Update anywidget model state. - * - * Updates widget model state for bidirectional Python-JavaScript communication. - * - * Attributes: - * model_id: Widget model identifier. - * message: Model message with state updates and buffer paths. - * buffers: Base64-encoded binary buffers referenced by buffer_paths. - */ - UpdateWidgetModelCommand: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - /** @enum {unknown} */ - type: "update-widget-model"; - }; - /** UpdateWidgetModelRequest */ - UpdateWidgetModelRequest: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - }; - /** - * ValidateSQLCommand - * @description Validate an SQL query. - * - * Checks if an SQL query is valid by parsing against a dialect (no DB connection) - * or validating against an actual database. - * - * Attributes: - * request_id: Unique identifier for this request. - * query: SQL query to validate. - * only_parse: If True, only parse using dialect. If False, validate against DB. - * engine: SQL engine (required if only_parse is False). - * dialect: SQL dialect for parsing (required if only_parse is True). - */ - ValidateSQLCommand: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - /** @enum {unknown} */ - type: "validate-sql"; - }; - /** ValidateSQLRequest */ - ValidateSQLRequest: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - }; - /** ValidateSQLResultNotification */ - ValidateSQLResultNotification: { - /** @default null */ - error?: string | null; - /** @enum {unknown} */ - op: "validate-sql-result"; - /** @default null */ - parse_result?: null | components["schemas"]["SqlParseResult"]; - request_id: string; - /** @default null */ - validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; - }; - /** VariableContext */ - VariableContext: { - name: string; - previewValue: unknown; - valueType: string; - }; - /** VariableDeclarationNotification */ - VariableDeclarationNotification: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - /** VariableValue */ - VariableValue: { - datatype: string | null; - name: string; - value: string | null; - }; - /** - * VariableValuesNotification - * @description List of variables and their types/values. - */ - VariableValuesNotification: { - /** @enum {unknown} */ - op: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - /** - * VariablesNotification - * @description List of variable declarations. - */ - VariablesNotification: { - /** @enum {unknown} */ - op: "variables"; - variables: components["schemas"]["VariableDeclarationNotification"][]; - }; - /** WorkspaceFilesRequest */ - WorkspaceFilesRequest: { - /** @default false */ - includeMarkdown?: boolean; - }; - /** WorkspaceFilesResponse */ - WorkspaceFilesResponse: { - /** @default 0 */ - fileCount?: number; - files: components["schemas"]["FileInfo"][]; - /** @default false */ - hasMore?: boolean; - root: string; - }; - /** - * _AppConfig - * @description Program-specific configuration. - * - * Configuration for frontends or runtimes that is specific to - * a single marimo program. - */ - _AppConfig: { - /** @default null */ - app_title?: string | null; - auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @default null */ - css_file?: string | null; - /** @default null */ - html_head_file?: string | null; - /** @default null */ - layout_file?: string | null; - /** - * @default auto - * @enum {unknown} - */ - sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - /** - * @default compact - * @enum {unknown} - */ - width?: "columns" | "compact" | "full" | "medium" | "normal"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AddPackageRequest + * @description This can be a remove package or a local package. + * + * Supported formats: + * + * httpx + * httpx==0.27.0 + * httpx>=0.27.0 + * git+https://github.com/encode/httpx + * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz + * /example/foo-0.1.0-py3-none-any.whl + */ + AddPackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + /** @default false */ + upgrade?: boolean | null; + }; + /** AiCompletionContext */ + AiCompletionContext: { + /** @default */ + plainText?: string; + /** @default [] */ + schema?: components["schemas"]["SchemaTable"][]; + /** @default [] */ + variables?: (string | components["schemas"]["VariableContext"])[]; + }; + /** AiCompletionRequest */ + AiCompletionRequest: { + code: string; + /** @default null */ + context?: null | components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + /** @default [] */ + messages?: components["schemas"]["ChatMessage"][]; + prompt: string; + /** @default null */ + selectedText?: string | null; + }; + /** + * AiConfig + * @description Configuration options for AI. + * + * **Keys.** + * + * - `rules`: custom rules to include in all AI completion prompts + * - `max_tokens`: the maximum number of tokens to use in AI completions + * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` + * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions + * - `models`: the models to use for AI completions + * - `open_ai`: the OpenAI config + * - `anthropic`: the Anthropic config + * - `google`: the Google AI config + * - `bedrock`: the Bedrock config + * - `azure`: the Azure config + * - `ollama`: the Ollama config + * - `github`: the GitHub config + * - `openrouter`: the OpenRouter config + * - `wandb`: the Weights & Biases config + * - `open_ai_compatible`: the OpenAI-compatible config + */ + AiConfig: { + anthropic?: components["schemas"]["AnthropicConfig"]; + azure?: components["schemas"]["OpenAiConfig"]; + bedrock?: components["schemas"]["BedrockConfig"]; + github?: components["schemas"]["GitHubConfig"]; + google?: components["schemas"]["GoogleAiConfig"]; + inline_tooltip?: boolean; + max_tokens?: number; + /** @enum {unknown} */ + mode?: "agent" | "ask" | "manual"; + models?: components["schemas"]["AiModelConfig"]; + ollama?: components["schemas"]["OpenAiConfig"]; + open_ai?: components["schemas"]["OpenAiConfig"]; + open_ai_compatible?: components["schemas"]["OpenAiConfig"]; + openrouter?: components["schemas"]["OpenAiConfig"]; + rules?: string; + wandb?: components["schemas"]["OpenAiConfig"]; + }; + /** AiInlineCompletionRequest */ + AiInlineCompletionRequest: { + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + prefix: string; + suffix: string; + }; + /** + * AiModelConfig + * @description Configuration options for an AI model. + * + * **Keys.** + * + * - `chat_model`: the model to use for chat completions + * - `edit_model`: the model to use for edit completions + * - `autocomplete_model`: the model to use for code completion/autocomplete + * - `displayed_models`: a list of models to display in the UI + * - `custom_models`: a list of custom models to use that are not from the default list + */ + AiModelConfig: { + autocomplete_model?: string; + chat_model?: string; + custom_models: string[]; + displayed_models: string[]; + edit_model?: string; + }; + /** AlertNotification */ + AlertNotification: { + description: string; + /** @enum {unknown} */ + op: "alert"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** + * AnthropicConfig + * @description Configuration options for Anthropic. + * + * **Keys.** + * + * - `api_key`: the Anthropic API key + */ + AnthropicConfig: { + api_key?: string; + }; + /** BannerNotification */ + BannerNotification: { + /** @default null */ + action?: "restart" | null; + description: string; + /** @enum {unknown} */ + op: "banner"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** BaseResponse */ + BaseResponse: { + success: boolean; + }; + /** + * BasedpyrightServerConfig + * @description Configuration options for basedpyright Language Server. + * + * basedpyright handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + BasedpyrightServerConfig: { + enabled?: boolean; + }; + /** + * BedrockConfig + * @description Configuration options for Bedrock. + * + * **Keys.** + * + * - `profile_name`: the AWS profile to use + * - `region_name`: the AWS region to use + * - `aws_access_key_id`: the AWS access key ID + * - `aws_secret_access_key`: the AWS secret access key + */ + BedrockConfig: { + aws_access_key_id?: string; + aws_secret_access_key?: string; + profile_name?: string; + region_name?: string; + }; + /** + * CacheClearedNotification + * @description Result of clearing cache. + */ + CacheClearedNotification: { + bytes_freed: number; + /** @enum {unknown} */ + op: "cache-cleared"; + }; + /** + * CacheInfoNotification + * @description Cache statistics information. + */ + CacheInfoNotification: { + disk_to_free: number; + disk_total: number; + hits: number; + misses: number; + /** @enum {unknown} */ + op: "cache-info"; + time: number; + }; + /** + * CellChannel + * @description The channel of a cell's output. + * @enum {unknown} + */ + CellChannel: "marimo-error" | "media" | "output" | "pdb" | "stderr" | "stdin" | "stdout"; + /** + * CellConfig + * @description Internal representation of a cell's configuration. + * This is not part of the public API. + */ + CellConfig: { + /** @default null */ + column?: number | null; + /** @default false */ + disabled?: boolean; + /** @default false */ + hide_code?: boolean; + }; + /** + * CellNotification + * @description Op to transition a cell. + * + * A CellNotification's data has some optional fields: + * + * output - a CellOutput + * console - a CellOutput (console msg to append), or a list of + * CellOutputs + * status - execution status + * stale_inputs - whether the cell has stale inputs (variables, modules, ...) + * run_id - the run associated with this cell. + * serialization - the serialization status of the cell + * + * Omitting a field means that its value should be unchanged! + * + * And one required field: + * + * cell_id - the cell id + */ + CellNotification: { + cell_id: string; + /** @default null */ + console?: components["schemas"]["CellOutput"][] | null | components["schemas"]["CellOutput"]; + /** @enum {unknown} */ + op: "cell-op"; + /** @default null */ + output?: null | components["schemas"]["CellOutput"]; + /** @default null */ + run_id?: string | null; + /** @default null */ + serialization?: string | null; + /** @default null */ + stale_inputs?: boolean | null; + /** @default null */ + status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; + timestamp?: number; + }; + /** CellOutput */ + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: string | (components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"])[] | Record; + /** @enum {unknown} */ + mimetype: "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.vegalite.v5+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/plain" | "video/mp4" | "video/mpeg"; + timestamp?: number; + }; + /** ChatAttachment */ + ChatAttachment: { + /** @default null */ + content_type?: string | null; + /** @default attachment */ + name?: string; + url: string; + }; + /** + * ChatMessage + * @description A message in a chat. + */ + ChatMessage: { + /** @default null */ + attachments?: components["schemas"]["ChatAttachment"][] | null; + content: unknown; + /** @default null */ + parts?: Record[] | null; + /** @enum {unknown} */ + role: "assistant" | "system" | "user"; + }; + /** ChatRequest */ + ChatRequest: { + context: components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + messages: components["schemas"]["ChatMessage"][]; + /** @default null */ + model?: string | null; + /** @default null */ + tools?: components["schemas"]["ToolDefinition"][] | null; + /** @default null */ + variables?: (string | components["schemas"]["VariableContext"])[] | null; + }; + /** + * ClearCacheCommand + * @description Clear all cached data. + * + * Clears all cache contexts, freeing memory and disk space. + * Affects all cells using the @cache decorator. + */ + ClearCacheCommand: { + /** @enum {unknown} */ + type: "clear-cache"; + }; + /** ClearCacheRequest */ + ClearCacheRequest: Record; + /** + * CodeCompletionCommand + * @description Request code completion suggestions. + * + * Sent when the user requests autocomplete. Provides code context up to + * the cursor position for the language server. + * + * Attributes: + * id: Unique identifier for this request. + * document: Source code up to the cursor position. + * cell_id: Cell where completion is requested. + */ + CodeCompletionCommand: { + cellId: string; + document: string; + id: string; + /** @enum {unknown} */ + type: "code-completion"; + }; + /** CodeCompletionRequest */ + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + /** + * ColumnStats + * @description Represents stats for a column in a data table. + */ + ColumnStats: { + /** @default null */ + false?: number | null; + /** @default null */ + max?: unknown | null; + /** @default null */ + mean?: unknown | null; + /** @default null */ + median?: unknown | null; + /** @default null */ + min?: unknown | null; + /** @default null */ + nulls?: number | null; + /** @default null */ + p25?: unknown | null; + /** @default null */ + p5?: unknown | null; + /** @default null */ + p75?: unknown | null; + /** @default null */ + p95?: unknown | null; + /** @default null */ + std?: unknown | null; + /** @default null */ + total?: number | null; + /** @default null */ + true?: number | null; + /** @default null */ + unique?: number | null; + }; + /** + * CompletedRunNotification + * @description Written on run completion (of submitted cells and their descendants. + */ + CompletedRunNotification: { + /** @enum {unknown} */ + op: "completed-run"; + }; + /** + * CompletionConfig + * @description Configuration for code completion. + * + * A dict with key/value pairs configuring code completion in the marimo + * editor. + * + * **Keys.** + * + * - `activate_on_typing`: if `False`, completion won't activate + * until the completion hotkey is entered + * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing + * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` + * - `codeium_api_key`: the Codeium API key + */ + CompletionConfig: { + activate_on_typing: boolean; + api_key?: string | null; + base_url?: string | null; + codeium_api_key?: string | null; + copilot: boolean | ("codeium" | "custom" | "github"); + model?: string | null; + signature_hint_on_typing: boolean; + }; + /** CompletionOption */ + CompletionOption: { + completion_info: string | null; + name: string; + type: string; + }; + /** + * CompletionResultNotification + * @description Code completion result. + */ + CompletionResultNotification: { + completion_id: string; + /** @enum {unknown} */ + op: "completion-result"; + options: components["schemas"]["CompletionOption"][]; + prefix_length: number; + }; + /** CopyNotebookRequest */ + CopyNotebookRequest: { + destination: string; + source: string; + }; + /** + * CreateNotebookCommand + * @description Instantiate and initialize a notebook. + * + * Sent when a notebook is first loaded. Contains all cells and initial UI element values. + * + * Attributes: + * execution_requests: ExecuteCellCommand for each notebook cell. + * set_ui_element_value_request: Initial UI element values. + * auto_run: Whether to automatically execute cells on instantiation. + * request: HTTP request context if available. + */ + CreateNotebookCommand: { + autoRun: boolean; + executionRequests: components["schemas"]["ExecuteCellCommand"][]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; + /** @enum {unknown} */ + type: "create-notebook"; + }; + /** CreateSecretRequest */ + CreateSecretRequest: { + key: string; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + value: string; + }; + /** CycleError */ + CycleError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {unknown} */ + type: "cycle"; + }; + /** + * DataColumnPreviewNotification + * @description Preview of a column in a dataset. + */ + DataColumnPreviewNotification: { + /** @default null */ + chart_code?: string | null; + /** @default null */ + chart_spec?: string | null; + column_name: string; + /** @default null */ + error?: string | null; + /** @default null */ + missing_packages?: string[] | null; + /** @enum {unknown} */ + op: "data-column-preview"; + /** @default null */ + stats?: null | components["schemas"]["ColumnStats"]; + table_name: string; + }; + /** + * DataSourceConnection + * @description Represents a data source connection. + * + * Attributes: + * source (str): The source of the data source connection. E.g 'postgres'. + * dialect (str): The dialect of the data source connection. E.g 'postgresql'. + * name (str): The name of the data source connection. E.g 'engine'. + * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. + * databases (List[Database]): The databases in the data source connection. + * default_database (Optional[str]): The default database in the data source connection. + * default_schema (Optional[str]): The default schema in the data source connection. + */ + DataSourceConnection: { + databases: components["schemas"]["Database"][]; + /** @default null */ + default_database?: string | null; + /** @default null */ + default_schema?: string | null; + dialect: string; + display_name: string; + name: string; + source: string; + }; + /** DataSourceConnectionsNotification */ + DataSourceConnectionsNotification: { + connections: components["schemas"]["DataSourceConnection"][]; + /** @enum {unknown} */ + op: "data-source-connections"; + }; + /** + * DataTable + * @description Represents a data table. + * + * Attributes: + * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). + * source (str): Can be dialect, or source db name. + * name (str): Name of the data table. + * num_rows (Optional[int]): Total number of rows in the table, if known. + * num_columns (Optional[int]): Total number of columns in the table, if known. + * variable_name (Optional[VariableName]): Variable name referencing this table in code. + * columns (List[DataTableColumn]): List of column definitions and metadata. + * engine (Optional[VariableName]): Database engine or connection handler, if any. + * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. + * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. + * indexes (Optional[List[str]]): Column names used as indexes, if any. + */ + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + /** @default null */ + engine?: string | null; + /** @default null */ + indexes?: string[] | null; + name: string; + num_columns: number | null; + num_rows: number | null; + /** @default null */ + primary_keys?: string[] | null; + source: string; + /** @enum {unknown} */ + source_type: "catalog" | "connection" | "duckdb" | "local"; + /** + * @default table + * @enum {unknown} + */ + type?: "table" | "view"; + variable_name: string | null; + }; + /** + * DataTableColumn + * @description Represents a column in a data table. + * + * Attributes: + * name (str): The name of the column. + * type (DataType): The data type of the column. + * external_type (ExternalDataType): The raw data type of the column. + * sample_values (List[Any]): The sample values of the column. + */ + DataTableColumn: { + external_type: string; + name: string; + sample_values: unknown[]; + /** @enum {unknown} */ + type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; + }; + /** + * Database + * @description Represents a collection of schemas. + * + * Attributes: + * name (str): The name of the database + * dialect (str): The dialect of the database + * schemas (List[Schema]): List of schemas in the database + * engine (Optional[VariableName]): Database engine or connection handler, if any. + */ + Database: { + dialect: string; + /** @default null */ + engine?: string | null; + name: string; + schemas: components["schemas"]["Schema"][]; + }; + /** + * DatasetsNotification + * @description List of datasets. + */ + DatasetsNotification: { + /** @default null */ + clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; + /** @enum {unknown} */ + op: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + /** + * DatasourcesConfig + * @description Configuration for datasources panel. + * + * **Keys.** + * + * - `auto_discover_schemas`: if `True`, include schemas in the datasource + * - `auto_discover_tables`: if `True`, include tables in the datasource + * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource + */ + DatasourcesConfig: { + auto_discover_columns?: boolean | "auto"; + auto_discover_schemas?: boolean | "auto"; + auto_discover_tables?: boolean | "auto"; + }; + /** + * DebugCellCommand + * @description Enter debugger mode for a cell. + * + * Starts the Python debugger (pdb) for the specified cell. + * + * Attributes: + * cell_id: Cell to debug. + * request: HTTP request context if available. + */ + DebugCellCommand: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "debug-cell"; + }; + /** DebugCellRequest */ + DebugCellRequest: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * DeleteCellCommand + * @description Delete a cell from the notebook. + * + * Removes cell from the dependency graph and cleans up its variables. + * Dependent cells may become stale. + * + * Attributes: + * cell_id: Cell to delete. + */ + DeleteCellCommand: { + cellId: string; + /** @enum {unknown} */ + type: "delete-cell"; + }; + /** DeleteCellRequest */ + DeleteCellRequest: { + cellId: string; + }; + /** DeleteSecretRequest */ + DeleteSecretRequest: { + key: string; + }; + /** DependencyTreeNode */ + DependencyTreeNode: { + dependencies: components["schemas"]["DependencyTreeNode"][]; + name: string; + tags: { + [key: string]: string; + }[]; + version: string | null; + }; + /** DependencyTreeResponse */ + DependencyTreeResponse: { + tree: null | components["schemas"]["DependencyTreeNode"]; + }; + /** + * DiagnosticsConfig + * @description Configuration options for diagnostics. + * + * **Keys.** + * + * - `enabled`: if `True`, diagnostics will be shown in the editor + * - `sql_linter`: if `True`, SQL cells will have linting enabled + */ + DiagnosticsConfig: { + enabled?: boolean; + sql_linter?: boolean; + }; + /** + * DisplayConfig + * @description Configuration for display. + * + * **Keys.** + * + * - `theme`: `"light"`, `"dark"`, or `"system"` + * - `code_editor_font_size`: font size for the code editor + * - `cell_output`: `"above"` or `"below"` + * - `dataframes`: `"rich"` or `"plain"` + * - `custom_css`: list of paths to custom CSS files + * - `default_table_page_size`: default number of rows to display in tables + * - `default_table_max_columns`: default maximum number of columns to display in tables + * - `reference_highlighting`: if `True`, highlight reactive variable references + * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") + */ + DisplayConfig: { + /** @enum {unknown} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + custom_css?: string[]; + /** @enum {unknown} */ + dataframes: "plain" | "rich"; + default_table_max_columns: number; + default_table_page_size: number; + /** @enum {unknown} */ + default_width: "columns" | "compact" | "full" | "medium" | "normal"; + locale?: string | null; + reference_highlighting?: boolean; + /** @enum {unknown} */ + theme: "dark" | "light" | "system"; + }; + /** + * ExecuteCellCommand + * @description Execute a single cell. + * + * Executes a cell with the provided code. Dependent cells may be + * re-executed based on the reactive execution mode. + * + * Attributes: + * cell_id: Cell to execute. + * code: Python code to execute. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellCommand: { + cellId: string; + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cell"; + }; + /** + * ExecuteCellsCommand + * @description Execute multiple cells in a batch. + * + * Executes multiple cells with their corresponding code. The kernel manages + * dependency tracking and reactive execution. + * + * Attributes: + * cell_ids: Cells to execute. + * codes: Python code for each cell. Must match length of cell_ids. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellsCommand: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cells"; + }; + /** ExecuteCellsRequest */ + ExecuteCellsRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteScratchpadCommand + * @description Execute code in the scratchpad. + * + * The scratchpad is a temporary execution environment that doesn't affect + * the notebook's cells or dependencies. Runs in an isolated cell with a copy + * of the global namespace, useful for experimentation. + * + * Attributes: + * code: Python code to execute. + * request: HTTP request context if available. + */ + ExecuteScratchpadCommand: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-scratchpad"; + }; + /** ExecuteScratchpadRequest */ + ExecuteScratchpadRequest: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteStaleCellsCommand + * @description Execute all stale cells. + * + * Cells become stale when their dependencies change but haven't been + * re-executed yet. Brings the notebook to a consistent state. + * + * Attributes: + * request: HTTP request context if available. + */ + ExecuteStaleCellsCommand: { + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-stale-cells"; + }; + /** ExportAsHTMLRequest */ + ExportAsHTMLRequest: { + /** @default null */ + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + /** ExportAsIPYNBRequest */ + ExportAsIPYNBRequest: { + download: boolean; + }; + /** ExportAsMarkdownRequest */ + ExportAsMarkdownRequest: { + download: boolean; + }; + /** ExportAsScriptRequest */ + ExportAsScriptRequest: { + download: boolean; + }; + /** FileCreateRequest */ + FileCreateRequest: { + /** @default null */ + contents?: string | null; + name: string; + path: string; + /** @enum {unknown} */ + type: "directory" | "file"; + }; + /** FileCreateResponse */ + FileCreateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDeleteRequest */ + FileDeleteRequest: { + path: string; + }; + /** FileDeleteResponse */ + FileDeleteResponse: { + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDetailsRequest */ + FileDetailsRequest: { + path: string; + }; + /** FileDetailsResponse */ + FileDetailsResponse: { + /** @default null */ + contents?: string | null; + file: components["schemas"]["FileInfo"]; + /** @default null */ + mimeType?: string | null; + }; + /** FileInfo */ + FileInfo: { + /** @default [] */ + children?: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + }; + /** FileListRequest */ + FileListRequest: { + /** @default null */ + path?: string | null; + }; + /** FileListResponse */ + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + /** FileMoveRequest */ + FileMoveRequest: { + newPath: string; + path: string; + }; + /** FileMoveResponse */ + FileMoveResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileOpenRequest */ + FileOpenRequest: { + /** @default null */ + lineNumber?: number | null; + path: string; + }; + /** FileSearchRequest */ + FileSearchRequest: { + /** @default 3 */ + depth?: number; + /** @default true */ + includeDirectories?: boolean; + /** @default true */ + includeFiles?: boolean; + /** @default 100 */ + limit?: number; + /** @default null */ + path?: string | null; + query: string; + }; + /** FileSearchResponse */ + FileSearchResponse: { + files: components["schemas"]["FileInfo"][]; + query: string; + totalFound: number; + }; + /** FileUpdateRequest */ + FileUpdateRequest: { + contents: string; + path: string; + }; + /** FileUpdateResponse */ + FileUpdateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FocusCellNotification */ + FocusCellNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "focus-cell"; + }; + /** FormatCellsRequest */ + FormatCellsRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + /** FormatResponse */ + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + /** + * FormattingConfig + * @description Configuration for code formatting. + * + * **Keys.** + * + * - `line_length`: max line length + */ + FormattingConfig: { + line_length: number; + }; + /** + * FunctionCallResultNotification + * @description Result of calling a function. + */ + FunctionCallResultNotification: { + function_call_id: string; + /** @enum {unknown} */ + op: "function-call-result"; + return_value: unknown; + status: components["schemas"]["HumanReadableStatus"]; + }; + /** + * GetCacheInfoCommand + * @description Retrieve cache statistics. + * + * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). + */ + GetCacheInfoCommand: { + /** @enum {unknown} */ + type: "get-cache-info"; + }; + /** GetCacheInfoRequest */ + GetCacheInfoRequest: Record; + /** + * GitHubConfig + * @description Configuration options for GitHub. + * + * **Keys.** + * + * - `api_key`: the GitHub API token + * - `base_url`: the base URL for the API + * - `copilot_settings`: configuration settings for GitHub Copilot LSP. + * Supports settings like `http` (proxy configuration), `telemetry`, + * and `github-enterprise` (enterprise URI). + */ + GitHubConfig: { + api_key?: string; + base_url?: string; + copilot_settings?: Record; + }; + /** + * GoogleAiConfig + * @description Configuration options for Google AI. + * + * **Keys.** + * + * - `api_key`: the Google AI API key + */ + GoogleAiConfig: { + api_key?: string; + }; + /** + * HTTPRequest + * @description Serializable HTTP request representation. + * + * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe + * subset of data. Excludes session and auth to prevent exposing sensitive data. + * + * Attributes: + * url: Serialized URL with path, port, scheme, netloc, query, hostname. + * base_url: Serialized base URL. + * headers: Request headers (marimo-specific headers excluded). + * query_params: Query parameters mapped to lists of values. + * path_params: Path parameters from the URL route. + * cookies: Request cookies. + * meta: User-defined storage for custom data. + * user: User info from authentication middleware (e.g., is_authenticated, username). + */ + HTTPRequest: { + base_url: Record; + cookies: { + [key: string]: string; + }; + headers: { + [key: string]: string; + }; + meta: Record; + path_params: Record; + query_params: { + [key: string]: string[]; + }; + url: Record; + user: unknown; + }; + /** + * HumanReadableStatus + * @description Human-readable status. + */ + HumanReadableStatus: { + /** @enum {unknown} */ + code: "error" | "ok"; + /** @default null */ + message?: string | null; + /** @default null */ + title?: string | null; + }; + /** ImportStarError */ + ImportStarError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "import-star"; + }; + /** + * InstallPackagesCommand + * @description Install Python packages. + * + * Installs missing packages using the specified package manager. Triggered + * automatically on import errors or manually by the user. + * + * Attributes: + * manager: Package manager to use ('pip', 'conda', 'uv', etc.). + * versions: Package names mapped to version specifiers. Empty version + * means install latest. + */ + InstallPackagesCommand: { + manager: string; + /** @enum {unknown} */ + type: "install-packages"; + versions: { + [key: string]: string; + }; + }; + /** InstallPackagesRequest */ + InstallPackagesRequest: { + manager: string; + versions: { + [key: string]: string; + }; + }; + /** InstallingPackageAlertNotification */ + InstallingPackageAlertNotification: { + /** @default null */ + log_status?: ("append" | "done" | "start") | null; + /** @default null */ + logs?: { + [key: string]: string; + } | null; + /** @enum {unknown} */ + op: "installing-package-alert"; + packages: { + [key: string]: "failed" | "installed" | "installing" | "queued"; + }; + }; + /** InstantiateNotebookRequest */ + InstantiateNotebookRequest: { + /** @default true */ + autoRun?: boolean; + objectIds: string[]; + values: unknown[]; + }; + /** + * InterruptedNotification + * @description Written when the kernel is interrupted by the user. + */ + InterruptedNotification: { + /** @enum {unknown} */ + op: "interrupted"; + }; + /** InvokeAiToolRequest */ + InvokeAiToolRequest: { + arguments: Record; + toolName: string; + }; + /** InvokeAiToolResponse */ + InvokeAiToolResponse: { + /** @default null */ + error?: string | null; + result: unknown; + success: boolean; + toolName: string; + }; + /** + * InvokeFunctionCommand + * @description Invoke a function from a UI element. + * + * Called when a UI element needs to invoke a Python function. + * + * Attributes: + * function_call_id: Unique identifier for this call. + * namespace: Namespace where the function is registered. + * function_name: Function to invoke. + * args: Keyword arguments for the function. + */ + InvokeFunctionCommand: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + /** @enum {unknown} */ + type: "invoke-function"; + }; + /** InvokeFunctionRequest */ + InvokeFunctionRequest: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + }; + /** KernelCapabilitiesNotification */ + KernelCapabilitiesNotification: { + /** @default false */ + basedpyright?: boolean; + /** @default false */ + pylsp?: boolean; + /** @default false */ + terminal?: boolean; + /** @default false */ + ty?: boolean; + }; + /** + * KernelReadyNotification + * @description Kernel is ready for execution. + */ + KernelReadyNotification: { + app_config: components["schemas"]["_AppConfig"]; + capabilities: components["schemas"]["KernelCapabilitiesNotification"]; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code: { + [key: string]: string; + } | null; + last_execution_time: { + [key: string]: number; + } | null; + layout: components["schemas"]["LayoutConfig"] | null; + names: string[]; + /** @enum {unknown} */ + op: "kernel-ready"; + resumed: boolean; + ui_values: Record | null; + }; + /** + * KeymapConfig + * @description Configuration for keymaps. + * + * **Keys.** + * + * - `preset`: one of `"default"` or `"vim"` + * - `overrides`: a dict of keymap actions to their keymap override + * - `vimrc`: path to a vimrc file to load keymaps from + * - `destructive_delete`: if `True`, allows deleting cells with content. + */ + KeymapConfig: { + destructive_delete?: boolean; + overrides?: { + [key: string]: string; + }; + /** @enum {unknown} */ + preset: "default" | "vim"; + vimrc?: string | null; + }; + /** KnownUnions */ + KnownUnions: { + command: components["schemas"]["CreateNotebookCommand"] | components["schemas"]["RenameNotebookCommand"] | components["schemas"]["CodeCompletionCommand"] | components["schemas"]["ExecuteCellsCommand"] | components["schemas"]["ExecuteScratchpadCommand"] | components["schemas"]["ExecuteStaleCellsCommand"] | components["schemas"]["DebugCellCommand"] | components["schemas"]["DeleteCellCommand"] | components["schemas"]["SyncGraphCommand"] | components["schemas"]["UpdateCellConfigCommand"] | components["schemas"]["InstallPackagesCommand"] | components["schemas"]["UpdateUIElementCommand"] | components["schemas"]["UpdateWidgetModelCommand"] | components["schemas"]["InvokeFunctionCommand"] | components["schemas"]["UpdateUserConfigCommand"] | components["schemas"]["PreviewDatasetColumnCommand"] | components["schemas"]["PreviewSQLTableCommand"] | components["schemas"]["ListSQLTablesCommand"] | components["schemas"]["ValidateSQLCommand"] | components["schemas"]["ListDataSourceConnectionCommand"] | components["schemas"]["ListSecretKeysCommand"] | components["schemas"]["RefreshSecretsCommand"] | components["schemas"]["ClearCacheCommand"] | components["schemas"]["GetCacheInfoCommand"] | components["schemas"]["StopKernelCommand"]; + /** @enum {unknown} */ + data_type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; + error: components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"]; + notification: components["schemas"]["CellNotification"] | components["schemas"]["FunctionCallResultNotification"] | components["schemas"]["UIElementMessageNotification"] | components["schemas"]["RemoveUIElementsNotification"] | components["schemas"]["ReloadNotification"] | components["schemas"]["ReconnectedNotification"] | components["schemas"]["InterruptedNotification"] | components["schemas"]["CompletedRunNotification"] | components["schemas"]["KernelReadyNotification"] | components["schemas"]["CompletionResultNotification"] | components["schemas"]["AlertNotification"] | components["schemas"]["BannerNotification"] | components["schemas"]["MissingPackageAlertNotification"] | components["schemas"]["InstallingPackageAlertNotification"] | components["schemas"]["StartupLogsNotification"] | components["schemas"]["VariablesNotification"] | components["schemas"]["VariableValuesNotification"] | components["schemas"]["QueryParamsSetNotification"] | components["schemas"]["QueryParamsAppendNotification"] | components["schemas"]["QueryParamsDeleteNotification"] | components["schemas"]["QueryParamsClearNotification"] | components["schemas"]["DatasetsNotification"] | components["schemas"]["DataColumnPreviewNotification"] | components["schemas"]["SQLTablePreviewNotification"] | components["schemas"]["SQLTableListPreviewNotification"] | components["schemas"]["DataSourceConnectionsNotification"] | components["schemas"]["ValidateSQLResultNotification"] | components["schemas"]["SecretKeysResultNotification"] | components["schemas"]["CacheClearedNotification"] | components["schemas"]["CacheInfoNotification"] | components["schemas"]["FocusCellNotification"] | components["schemas"]["UpdateCellCodesNotification"] | components["schemas"]["UpdateCellIdsNotification"]; + }; + /** + * LanguageServersConfig + * @description Configuration options for language servers. + * + * **Keys.** + * + * - `pylsp`: the pylsp config + */ + LanguageServersConfig: { + basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; + pylsp?: components["schemas"]["PythonLanguageServerConfig"]; + ty?: components["schemas"]["TyLanguageServerConfig"]; + }; + /** LayoutConfig */ + LayoutConfig: { + data: Record; + type: string; + }; + /** + * ListDataSourceConnectionCommand + * @description List data source schemas. + * + * Retrieves available schemas for a data source engine. + * + * Attributes: + * engine: Data source engine identifier. + */ + ListDataSourceConnectionCommand: { + engine: string; + /** @enum {unknown} */ + type: "list-data-source-connection"; + }; + /** ListDataSourceConnectionRequest */ + ListDataSourceConnectionRequest: { + engine: string; + }; + /** ListPackagesResponse */ + ListPackagesResponse: { + packages: components["schemas"]["PackageDescription"][]; + }; + /** + * ListSQLTablesCommand + * @description List tables in an SQL schema. + * + * Retrieves names of all tables and views in a schema. Used by the SQL + * editor for table selection. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database to query. + * schema: Schema to list tables from. + */ + ListSQLTablesCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + /** @enum {unknown} */ + type: "list-sql-tables"; + }; + /** ListSQLTablesRequest */ + ListSQLTablesRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + }; + /** + * ListSecretKeysCommand + * @description List available secret keys. + * + * Retrieves secret names without exposing values. + * + * Attributes: + * request_id: Unique identifier for this request. + */ + ListSecretKeysCommand: { + requestId: string; + /** @enum {unknown} */ + type: "list-secret-keys"; + }; + /** ListSecretKeysRequest */ + ListSecretKeysRequest: { + requestId: string; + }; + /** ListSecretKeysResponse */ + ListSecretKeysResponse: { + keys: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** + * MCPConfig + * @description Configuration for MCP servers + * + * Note: the field name `mcpServers` is camelCased to match MCP server + * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) + */ + MCPConfig: { + mcpServers: { + [key: string]: Record; + }; + presets?: ("context7" | "marimo")[]; + }; + /** MCPRefreshResponse */ + MCPRefreshResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: boolean; + }; + success: boolean; + }; + /** MCPStatusResponse */ + MCPStatusResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: "connected" | "disconnected" | "failed" | "pending"; + }; + /** @enum {unknown} */ + status: "error" | "ok" | "partial"; + }; + /** MarimoAncestorPreventedError */ + MarimoAncestorPreventedError: { + blamed_cell: string | null; + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-prevented"; + }; + /** MarimoAncestorStoppedError */ + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-stopped"; + }; + /** + * MarimoConfig + * @description Configuration for the marimo editor + */ + MarimoConfig: { + ai?: components["schemas"]["AiConfig"]; + completion: components["schemas"]["CompletionConfig"]; + datasources?: components["schemas"]["DatasourcesConfig"]; + diagnostics?: components["schemas"]["DiagnosticsConfig"]; + display: components["schemas"]["DisplayConfig"]; + experimental?: Record; + formatting: components["schemas"]["FormattingConfig"]; + keymap: components["schemas"]["KeymapConfig"]; + language_servers?: components["schemas"]["LanguageServersConfig"]; + mcp?: components["schemas"]["MCPConfig"]; + package_management: components["schemas"]["PackageManagementConfig"]; + runtime: components["schemas"]["RuntimeConfig"]; + save: components["schemas"]["SaveConfig"]; + server: components["schemas"]["ServerConfig"]; + sharing?: components["schemas"]["SharingConfig"]; + snippets?: components["schemas"]["SnippetsConfig"]; + }; + /** MarimoExceptionRaisedError */ + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell: string | null; + /** @enum {unknown} */ + type: "exception"; + }; + /** MarimoFile */ + MarimoFile: { + /** @default null */ + initializationId?: string | null; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + /** @default null */ + sessionId?: string | null; + }; + /** + * 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. + */ + MarimoInternalError: { + error_id: string; + /** @default */ + msg?: string; + /** @enum {unknown} */ + type: "internal"; + }; + /** MarimoInterruptionError */ + MarimoInterruptionError: { + /** @enum {unknown} */ + type: "interruption"; + }; + /** + * MarimoSQLError + * @description SQL-specific error with enhanced metadata for debugging. + */ + MarimoSQLError: { + /** @default null */ + hint?: string | null; + msg: string; + /** @default 0 */ + node_col_offset?: number; + /** @default 0 */ + node_lineno?: number; + /** @default null */ + sql_col?: number | null; + /** @default null */ + sql_line?: number | null; + sql_statement: string; + /** @enum {unknown} */ + type: "sql-error"; + }; + /** MarimoStrictExecutionError */ + MarimoStrictExecutionError: { + blamed_cell: string | null; + msg: string; + ref: string; + /** @enum {unknown} */ + type: "strict-exception"; + }; + /** MarimoSyntaxError */ + MarimoSyntaxError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "syntax"; + }; + /** MissingPackageAlertNotification */ + MissingPackageAlertNotification: { + isolated: boolean; + /** @enum {unknown} */ + op: "missing-package-alert"; + packages: string[]; + }; + /** + * ModelMessage + * @description Widget model state update message. + * + * State changes for anywidget models, including state dict and binary buffer paths. + * + * Attributes: + * state: Model state updates. + * buffer_paths: Paths within state dict pointing to binary buffers. + */ + ModelMessage: { + bufferPaths: (string | number)[][]; + state: Record; + }; + /** MultipleDefinitionError */ + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {unknown} */ + type: "multiple-defs"; + }; + /** + * OpenAiConfig + * @description Configuration options for OpenAI or OpenAI-compatible services. + * + * **Keys.** + * + * - `api_key`: the OpenAI API key + * - `base_url`: the base URL for the API + * - `project`: the project ID for the OpenAI API + * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios + * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client + * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server + * - `extra_headers`: extra headers to be passed to the OpenAI client + */ + OpenAiConfig: { + api_key?: string; + base_url?: string; + ca_bundle_path?: string; + client_pem?: string; + extra_headers?: { + [key: string]: string; + }; + model?: string; + project?: string; + ssl_verify?: boolean; + }; + /** OpenTutorialRequest */ + OpenTutorialRequest: { + tutorialId: ("dataflow" | "fileformat" | "for-jupyter-users" | "intro" | "layout" | "markdown" | "plots" | "sql" | "ui") | "markdown-format"; + }; + /** PackageDescription */ + PackageDescription: { + name: string; + version: string; + }; + /** + * PackageManagementConfig + * @description Configuration options for package management. + * + * **Keys.** + * + * - `manager`: the package manager to use + */ + PackageManagementConfig: { + /** @enum {unknown} */ + manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; + }; + /** PackageOperationResponse */ + PackageOperationResponse: { + /** @default null */ + error?: string | null; + success: boolean; + }; + /** + * PreviewDatasetColumnCommand + * @description Preview a dataset column. + * + * Retrieves and displays data from a single column (dataframe or SQL table). + * Used by the data explorer UI. + * + * Attributes: + * source_type: Data source type ('dataframe', 'sql', etc.). + * source: Source identifier (connection string or variable name). + * table_name: Table or dataframe variable name. + * column_name: Column to preview. + * fully_qualified_table_name: Full database.schema.table name for SQL. + */ + PreviewDatasetColumnCommand: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + /** @enum {unknown} */ + type: "preview-dataset-column"; + }; + /** PreviewDatasetColumnRequest */ + PreviewDatasetColumnRequest: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + }; + /** + * PreviewSQLTableCommand + * @description Preview SQL table details. + * + * Retrieves metadata and sample data for a table. Used by the SQL editor + * and data explorer. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database containing the table. + * schema: Schema containing the table. + * table_name: Table to preview. + */ + PreviewSQLTableCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + /** @enum {unknown} */ + type: "preview-sql-table"; + }; + /** PreviewSQLTableRequest */ + PreviewSQLTableRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + }; + /** + * PythonLanguageServerConfig + * @description Configuration options for Python Language Server. + * + * pylsp handles completion, hover, go-to-definition, and diagnostics. + */ + PythonLanguageServerConfig: { + enable_flake8?: boolean; + enable_mypy?: boolean; + enable_pydocstyle?: boolean; + enable_pyflakes?: boolean; + enable_pylint?: boolean; + enable_ruff?: boolean; + enabled?: boolean; + }; + /** QueryParamsAppendNotification */ + QueryParamsAppendNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-append"; + value: string; + }; + /** QueryParamsClearNotification */ + QueryParamsClearNotification: { + /** @enum {unknown} */ + op: "query-params-clear"; + }; + /** QueryParamsDeleteNotification */ + QueryParamsDeleteNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-delete"; + value: string | null; + }; + /** + * QueryParamsSetNotification + * @description Set query parameters. + */ + QueryParamsSetNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-set"; + value: string | string[]; + }; + /** ReadCodeResponse */ + ReadCodeResponse: { + contents: string; + }; + /** RecentFilesResponse */ + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** ReconnectedNotification */ + ReconnectedNotification: { + /** @enum {unknown} */ + op: "reconnected"; + }; + /** + * RefreshSecretsCommand + * @description Refresh secrets from the secrets store. + * + * Reloads secrets from the provider without restarting the kernel. + */ + RefreshSecretsCommand: { + /** @enum {unknown} */ + type: "refresh-secrets"; + }; + /** RefreshSecretsRequest */ + RefreshSecretsRequest: Record; + /** ReloadNotification */ + ReloadNotification: { + /** @enum {unknown} */ + op: "reload"; + }; + /** RemovePackageRequest */ + RemovePackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + }; + /** + * RemoveUIElementsNotification + * @description Invalidate UI elements for a given cell. + */ + RemoveUIElementsNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "remove-ui-elements"; + }; + /** + * RenameNotebookCommand + * @description Rename or move the notebook file. + * + * Updates the notebook's filename in the kernel metadata. + * + * Attributes: + * filename: New filename or path for the notebook. + */ + RenameNotebookCommand: { + filename: string; + /** @enum {unknown} */ + type: "rename-notebook"; + }; + /** RenameNotebookRequest */ + RenameNotebookRequest: { + filename: string; + }; + /** RunningNotebooksResponse */ + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** + * RuntimeConfig + * @description Configuration for runtime. + * + * **Keys.** + * + * - `auto_instantiate`: if `False`, cells won't automatically + * run on startup. This only applies when editing a notebook, + * and not when running as an application. + * The default is `True`. + * - `auto_reload`: if `lazy`, cells importing modified modules will marked + * as stale; if `autorun`, affected cells will be automatically run. similar + * to IPython's %autoreload extension but with more code intelligence. + * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. + * execution. + * - `on_cell_change`: if `lazy`, cells will be marked stale when their + * ancestors run but won't autorun; if `autorun`, cells will automatically + * run when their ancestors run. + * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; + * if `strict` marimo will clone cell declarations by default, avoiding + * hidden potential state build up. + * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks + * affected cells as stale, `"autorun"` automatically runs affected cells. + * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger + * values may affect frontend performance + * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; + * larger values may affect frontend performance + * - `pythonpath`: a list of directories to add to the Python search path. + * Directories will be added to the head of sys.path. Similar to the + * `PYTHONPATH` environment variable, the directories will be included in + * where Python will look for imported modules. + * - `dotenv`: a list of paths to `.env` files to load. + * If the file does not exist, it will be silently ignored. + * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. + * - `default_sql_output`: the default output format for SQL queries. Can be one of: + * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. + * The default is `"auto"`. + * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: + * `html`, `markdown`, `ipynb`. + * The default is None. + */ + RuntimeConfig: { + auto_instantiate: boolean; + /** @enum {unknown} */ + auto_reload: "autorun" | "lazy" | "off"; + default_auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @enum {unknown} */ + default_sql_output: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + dotenv?: string[]; + /** @enum {unknown} */ + on_cell_change: "autorun" | "lazy"; + output_max_bytes: number; + pythonpath?: string[]; + reactive_tests: boolean; + std_stream_max_bytes: number; + /** @enum {unknown} */ + watcher_on_save: "autorun" | "lazy"; + }; + /** + * SQLMetadata + * @description Metadata for a SQL database. + */ + SQLMetadata: { + connection: string; + database: string; + schema: string; + /** @enum {unknown} */ + type: "sql-metadata"; + }; + /** + * SQLTableListPreviewNotification + * @description Preview of a list of tables in a schema. + */ + SQLTableListPreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-list-preview"; + request_id: string; + /** @default [] */ + tables?: components["schemas"]["DataTable"][]; + }; + /** + * SQLTablePreviewNotification + * @description Preview of a table in a SQL database. + */ + SQLTablePreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-preview"; + request_id: string; + table: null | components["schemas"]["DataTable"]; + }; + /** SaveAppConfigurationRequest */ + SaveAppConfigurationRequest: { + config: Record; + }; + /** + * SaveConfig + * @description Configuration for saving. + * + * **Keys.** + * + * - `autosave`: one of `"off"` or `"after_delay"` + * - `delay`: number of milliseconds to wait before autosaving + * - `format_on_save`: if `True`, format the code on save + */ + SaveConfig: { + /** @enum {unknown} */ + autosave: "after_delay" | "off"; + autosave_delay: number; + format_on_save: boolean; + }; + /** SaveNotebookRequest */ + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + /** @default null */ + layout?: Record | null; + names: string[]; + /** @default true */ + persist?: boolean; + }; + /** SaveUserConfigurationRequest */ + SaveUserConfigurationRequest: { + config: Record; + }; + /** Schema */ + Schema: { + name: string; + tables: components["schemas"]["DataTable"][]; + }; + /** SchemaColumn */ + SchemaColumn: { + name: string; + sampleValues: unknown[]; + type: string; + }; + /** SchemaTable */ + SchemaTable: { + columns: components["schemas"]["SchemaColumn"][]; + name: string; + }; + /** + * SecretKeysResultNotification + * @description Result of listing secret keys. + */ + SecretKeysResultNotification: { + /** @enum {unknown} */ + op: "secret-keys-result"; + request_id: string; + secrets: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** SecretKeysWithProvider */ + SecretKeysWithProvider: { + keys: string[]; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + }; + /** + * ServerConfig + * @description Configuration for the server. + * + * **Keys.** + * + * - `browser`: the web browser to use. `"default"` or a browser registered + * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) + * - `follow_symlink`: if true, the server will follow symlinks it finds + * inside its static assets directory. + */ + ServerConfig: { + browser: "default" | string; + follow_symlink: boolean; + }; + /** SetupRootError */ + SetupRootError: { + edges_with_vars: [ + string, + string[], + string + ][]; + /** @enum {unknown} */ + type: "setup-refs"; + }; + /** + * SharingConfig + * @description Configuration for sharing features. + * + * **Keys.** + * + * - `html`: if `False`, HTML sharing options will be hidden from the UI + * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI + */ + SharingConfig: { + html?: boolean; + wasm?: boolean; + }; + /** ShutdownSessionRequest */ + ShutdownSessionRequest: { + sessionId: string; + }; + /** Snippet */ + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + /** SnippetSection */ + SnippetSection: { + /** @default null */ + code?: string | null; + /** @default null */ + html?: string | null; + id: string; + }; + /** Snippets */ + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + /** + * SnippetsConfig + * @description Configuration for snippets. + * + * **Keys.** + * + * - `custom_path`: the path to the custom snippets directory + */ + SnippetsConfig: { + custom_paths?: string[]; + include_default_snippets?: boolean; + }; + /** + * SqlCatalogCheckResult + * @description Result of running validation against the database. + */ + SqlCatalogCheckResult: { + error_message: string | null; + success: boolean; + }; + /** + * SqlParseError + * @description Represents a single SQL parse error. + * + * Attributes: + * message (str): Description of the error. + * line (int): Line number where the error occurred (1-based). + * column (int): Column number where the error occurred (1-based). + * severity (Literal["error", "warning"]): Severity of the error. + */ + SqlParseError: { + column: number; + line: number; + message: string; + /** @enum {unknown} */ + severity: "error" | "warning"; + }; + /** + * SqlParseResult + * @description Result of parsing an SQL query. + * + * Attributes: + * success (bool): True if parsing succeeded without errors. + * errors (list[SqlParseError]): List of parse errors (empty if success is True). + */ + SqlParseResult: { + errors: components["schemas"]["SqlParseError"][]; + success: boolean; + }; + /** StartupLogsNotification */ + StartupLogsNotification: { + content: string; + /** @enum {unknown} */ + op: "startup-logs"; + /** @enum {unknown} */ + status: "append" | "done" | "start"; + }; + /** StdinRequest */ + StdinRequest: { + text: string; + }; + /** + * StopKernelCommand + * @description Stop kernel execution. + * + * Signals the kernel to stop processing and shut down gracefully. + * Used when closing a notebook or terminating a session. + */ + StopKernelCommand: { + /** @enum {unknown} */ + type: "stop-kernel"; + }; + /** + * StoreConfig + * @description Configuration for cache stores. + */ + StoreConfig: { + args?: Record; + /** @enum {unknown} */ + type?: "file" | "redis" | "rest" | "tiered"; + }; + /** SuccessResponse */ + SuccessResponse: { + /** @default true */ + success?: boolean; + }; + /** + * SyncGraphCommand + * @description Synchronize the kernel graph with file manager state. + * + * Used when the notebook file changes externally (e.g., file reload or version control). + * Updates changed cells, deletes removed cells, and optionally executes modified cells. + * + * Attributes: + * cells: All cells known to file manager, mapping cell_id to code. + * run_ids: Cells to execute or update. + * delete_ids: Cells to delete from the graph. + * timestamp: Unix timestamp when command was created. + */ + SyncGraphCommand: { + cells: { + [key: string]: string; + }; + deleteIds: string[]; + runIds: string[]; + timestamp?: number; + /** @enum {unknown} */ + type: "sync-graph"; + }; + /** + * ToolDefinition + * @description Tool definition compatible with ai-sdk-ui format. + */ + ToolDefinition: { + description: string; + mode: ("agent" | "ask" | "manual")[]; + name: string; + parameters: Record; + /** @enum {unknown} */ + source: "backend" | "frontend" | "mcp"; + }; + /** + * TyLanguageServerConfig + * @description Configuration options for Ty Language Server. + * + * ty handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + TyLanguageServerConfig: { + enabled?: boolean; + }; + /** + * UIElementMessageNotification + * @description Send a message to a UI element. + */ + UIElementMessageNotification: { + /** @default null */ + buffers?: string[] | null; + message: Record; + model_id: string | null; + /** @enum {unknown} */ + op: "send-ui-element-message"; + ui_element: string | null; + }; + /** UnknownError */ + UnknownError: { + /** @default null */ + error_type?: string | null; + msg: string; + /** @enum {unknown} */ + type: "unknown"; + }; + /** UpdateCellCodesNotification */ + UpdateCellCodesNotification: { + cell_ids: string[]; + code_is_stale: boolean; + codes: string[]; + /** @enum {unknown} */ + op: "update-cell-codes"; + }; + /** + * UpdateCellConfigCommand + * @description Update cell configuration. + * + * Updates cell-level settings like disabled state, hide code, etc. + * + * Attributes: + * configs: Cell IDs mapped to their config updates. Each config dict + * can contain partial updates. + */ + UpdateCellConfigCommand: { + configs: { + [key: string]: Record; + }; + /** @enum {unknown} */ + type: "update-cell-config"; + }; + /** UpdateCellConfigRequest */ + UpdateCellConfigRequest: { + configs: { + [key: string]: Record; + }; + }; + /** + * UpdateCellIdsNotification + * @description Update the cell ID ordering of the cells in the notebook. + * + * Right now we send the entire list of cell IDs, + * but in the future we might want to send change-deltas. + */ + UpdateCellIdsNotification: { + cell_ids: string[]; + /** @enum {unknown} */ + op: "update-cell-ids"; + }; + /** UpdateCellIdsRequest */ + UpdateCellIdsRequest: { + cellIds: string[]; + }; + /** + * UpdateUIElementCommand + * @description Update UI element values. + * + * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). + * Updates element values and re-executes dependent cells. + * + * Attributes: + * object_ids: UI elements to update. + * values: New values for the elements. Must match length of object_ids. + * request: HTTP request context if available. + * token: Unique request identifier for deduplication. + */ + UpdateUIElementCommand: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + /** @enum {unknown} */ + type: "update-ui-element"; + values: unknown[]; + }; + /** UpdateUIElementRequest */ + UpdateUIElementRequest: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + values: unknown[]; + }; + /** UpdateUIElementValuesRequest */ + UpdateUIElementValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + /** + * UpdateUserConfigCommand + * @description Update user configuration. + * + * Updates global marimo configuration (runtime settings, display options, editor preferences). + * + * Attributes: + * config: Complete user configuration. + */ + UpdateUserConfigCommand: { + config: components["schemas"]["MarimoConfig"]; + /** @enum {unknown} */ + type: "update-user-config"; + }; + /** UpdateUserConfigRequest */ + UpdateUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + /** + * UpdateWidgetModelCommand + * @description Update anywidget model state. + * + * Updates widget model state for bidirectional Python-JavaScript communication. + * + * Attributes: + * model_id: Widget model identifier. + * message: Model message with state updates and buffer paths. + * buffers: Base64-encoded binary buffers referenced by buffer_paths. + */ + UpdateWidgetModelCommand: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + /** @enum {unknown} */ + type: "update-widget-model"; + }; + /** UpdateWidgetModelRequest */ + UpdateWidgetModelRequest: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + }; + /** + * ValidateSQLCommand + * @description Validate an SQL query. + * + * Checks if an SQL query is valid by parsing against a dialect (no DB connection) + * or validating against an actual database. + * + * Attributes: + * request_id: Unique identifier for this request. + * query: SQL query to validate. + * only_parse: If True, only parse using dialect. If False, validate against DB. + * engine: SQL engine (required if only_parse is False). + * dialect: SQL dialect for parsing (required if only_parse is True). + */ + ValidateSQLCommand: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + /** @enum {unknown} */ + type: "validate-sql"; + }; + /** ValidateSQLRequest */ + ValidateSQLRequest: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + }; + /** ValidateSQLResultNotification */ + ValidateSQLResultNotification: { + /** @default null */ + error?: string | null; + /** @enum {unknown} */ + op: "validate-sql-result"; + /** @default null */ + parse_result?: null | components["schemas"]["SqlParseResult"]; + request_id: string; + /** @default null */ + validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; + }; + /** VariableContext */ + VariableContext: { + name: string; + previewValue: unknown; + valueType: string; + }; + /** VariableDeclarationNotification */ + VariableDeclarationNotification: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + /** VariableValue */ + VariableValue: { + datatype: string | null; + name: string; + value: string | null; + }; + /** + * VariableValuesNotification + * @description List of variables and their types/values. + */ + VariableValuesNotification: { + /** @enum {unknown} */ + op: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + /** + * VariablesNotification + * @description List of variable declarations. + */ + VariablesNotification: { + /** @enum {unknown} */ + op: "variables"; + variables: components["schemas"]["VariableDeclarationNotification"][]; + }; + /** WorkspaceFilesRequest */ + WorkspaceFilesRequest: { + /** @default false */ + includeMarkdown?: boolean; + }; + /** WorkspaceFilesResponse */ + WorkspaceFilesResponse: { + /** @default 0 */ + fileCount?: number; + files: components["schemas"]["FileInfo"][]; + /** @default false */ + hasMore?: boolean; + root: string; + }; + /** + * _AppConfig + * @description Program-specific configuration. + * + * Configuration for frontends or runtimes that is specific to + * a single marimo program. + */ + _AppConfig: { + /** @default null */ + app_title?: string | null; + auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @default null */ + css_file?: string | null; + /** @default null */ + html_head_file?: string | null; + /** @default null */ + layout_file?: string | null; + /** + * @default auto + * @enum {unknown} + */ + sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + /** + * @default compact + * @enum {unknown} + */ + width?: "columns" | "compact" | "full" | "medium" | "normal"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; From 8fa0f39b43188180490058a253103c77ad8cc26b Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 26 Dec 2025 21:46:25 +0000 Subject: [PATCH 07/16] revert: remove accidental linting changes to json-parser.ts --- frontend/src/utils/json/json-parser.ts | 6 +++--- marimo/_server/api/endpoints/health.py | 8 ++++---- marimo/_utils/health.py | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/src/utils/json/json-parser.ts b/frontend/src/utils/json/json-parser.ts index 20024a1ae04..5fe34d60a48 100644 --- a/frontend/src/utils/json/json-parser.ts +++ b/frontend/src/utils/json/json-parser.ts @@ -144,13 +144,13 @@ function formatValueForMarkdown(value: unknown): string { let stringValue = String(value); // Regex to match existing markdown links: [text](url) - const markdownLinkRegex = /\[([^\]]+)]\((https?:\/\/[^)]+)\)/g; + const markdownLinkRegex = /\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g; // Temporarily replace existing markdown links with placeholders const placeholders = new Map(); let placeholderIndex = 0; - stringValue = stringValue.replaceAll(markdownLinkRegex, (match) => { + stringValue = stringValue.replace(markdownLinkRegex, (match) => { const placeholder = `__MDLINK_${placeholderIndex++}__`; placeholders.set(placeholder, match); return placeholder; @@ -158,7 +158,7 @@ function formatValueForMarkdown(value: unknown): string { // Convert plain URLs to markdown links const urlRegex = /(https?:\/\/\S+)/g; - stringValue = stringValue.replaceAll(urlRegex, "[$1]($1)"); + stringValue = stringValue.replace(urlRegex, "[$1]($1)"); // Restore markdown links from placeholders for (const [placeholder, original] of placeholders) { diff --git a/marimo/_server/api/endpoints/health.py b/marimo/_server/api/endpoints/health.py index b3510e08748..f06255763c0 100644 --- a/marimo/_server/api/endpoints/health.py +++ b/marimo/_server/api/endpoints/health.py @@ -215,11 +215,11 @@ async def usage(request: Request) -> JSONResponse: "has_cgroup_mem_limit": False, } - cpu_percent = get_cgroup_cpu_percent() - if cpu_percent is None: + cpu = get_cgroup_cpu_percent() + if cpu is None: # interval=None is nonblocking; first call returns meaningless value # subsequent calls return delta since last call - cpu_percent = psutil.cpu_percent(interval=None) + cpu = psutil.cpu_percent(interval=None) # Server memory (and children) main_process = psutil.Process() @@ -301,7 +301,7 @@ async def usage(request: Request) -> JSONResponse: "memory": kernel_memory, }, "cpu": { - "percent": cpu_percent, + "percent": cpu, }, "gpu": gpu_stats, } diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index a51001fd64e..0608e71c95a 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -216,7 +216,6 @@ def _has_cgroup_cpu_limit() -> bool: Returns True/False whether the container has a CPU limit set. This function checks for both cgroups v1 and v2. """ - # TODO Constants # cgroups v2 if os.path.exists(CGROUP_V2_CPU_MAX_FILE): with open(CGROUP_V2_CPU_MAX_FILE, encoding="utf-8") as f: From 25f492431dd820032a6ff7ddb3c1980adb44a8bb Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 26 Dec 2025 21:56:43 +0000 Subject: [PATCH 08/16] fix: revert api.ts to two-space indentation --- packages/openapi/src/api.ts | 10394 +++++++++++++++++----------------- 1 file changed, 5269 insertions(+), 5125 deletions(-) diff --git a/packages/openapi/src/api.ts b/packages/openapi/src/api.ts index 853f8a1a9d8..58b9fb65e04 100644 --- a/packages/openapi/src/api.ts +++ b/packages/openapi/src/api.ts @@ -4,5135 +4,5279 @@ */ export interface paths { - "/@file/{filename_and_length}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description The filename and byte length of the virtual file */ - filename_and_length: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get a virtual file */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/octet-stream": string; - }; - }; - /** @description Invalid byte length in virtual file request */ - 404: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI chat */ - requestBody: { - content: { - "application/json": components["schemas"]["ChatRequest"]; - }; - }; - responses: never; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI completion for a prompt */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: unknown; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/inline_completion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for AI inline completion */ - requestBody: { - content: { - "application/json": components["schemas"]["AiInlineCompletionRequest"]; - }; - }; - responses: { - /** @description Get AI inline completion for code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/invoke_tool": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** @description The request body for tool invocation */ - requestBody: { - content: { - "application/json": components["schemas"]["InvokeAiToolRequest"]; - }; - }; - responses: { - /** @description Tool invocation result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["InvokeAiToolResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Refresh MCP server configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPRefreshResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/ai/mcp/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get MCP server status */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MCPStatusResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/clear": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ClearCacheRequest"]; - }; - }; - responses: { - /** @description Clear all caches */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/cache/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["GetCacheInfoRequest"]; - }; - }; - responses: { - /** @description Get cache statistics */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_column": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; - }; - }; - responses: { - /** @description Preview a column in a dataset */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_datasource_connection": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; - }; - }; - responses: { - /** @description Broadcasts a datasource connection */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PreviewSQLTableRequest"]; - }; - }; - responses: { - /** @description Preview a SQL table */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/datasources/preview_sql_table_list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ListSQLTablesRequest"]; - }; - }; - responses: { - /** @description Preview a list of tables in an SQL schema */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/documentation/snippets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Load the snippets for the documentation page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Snippets"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/ipynb": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsIPYNBRequest"]; - }; - }; - responses: { - /** @description Export the notebook as IPYNB */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/auto_export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/html": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsHTMLRequest"]; - }; - }; - responses: { - /** @description Export the notebook as HTML */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/markdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsMarkdownRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a markdown */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/export/script": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExportAsScriptRequest"]; - }; - }; - responses: { - /** @description Export the notebook as a script */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileCreateRequest"]; - }; - }; - responses: { - /** @description Create a new file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileCreateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDeleteRequest"]; - }; - }; - responses: { - /** @description Delete a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDeleteResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/file_details": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileDetailsRequest"]; - }; - }; - responses: { - /** @description Get details of a specific file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileDetailsResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/list_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileListRequest"]; - }; - }; - responses: { - /** @description List files and directories in a given path */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileListResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/move": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileMoveRequest"]; - }; - }; - responses: { - /** @description Move a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileMoveResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileOpenRequest"]; - }; - }; - responses: { - /** @description Open a file in the system editor */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileSearchRequest"]; - }; - }; - responses: { - /** @description Search for files and directories matching a query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileSearchResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/files/update": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FileUpdateRequest"]; - }; - }; - responses: { - /** @description Update a file or directory */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FileUpdateResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/recent_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the recent files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RecentFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/running_notebooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the running files */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/shutdown_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ShutdownSessionRequest"]; - }; - }; - responses: { - /** @description Shutdown the current session */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RunningNotebooksResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/tutorial/open": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["OpenTutorialRequest"]; - }; - }; - responses: { - /** @description Open a new tutorial */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["MarimoFile"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/home/workspace_files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceFilesRequest"]; - }; - }; - responses: { - /** @description Get the files in the workspace */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WorkspaceFilesResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/code_autocomplete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CodeCompletionRequest"]; - }; - }; - responses: { - /** @description Complete a code fragment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/copy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["CopyNotebookRequest"]; - }; - }; - responses: { - /** @description Copy notebook */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DeleteCellRequest"]; - }; - }; - responses: { - /** @description Delete a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/format": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["FormatCellsRequest"]; - }; - }; - responses: { - /** @description Format code */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FormatResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/function_call": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InvokeFunctionRequest"]; - }; - }; - responses: { - /** @description Invoke an RPC */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/install_missing_packages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstallPackagesRequest"]; - }; - }; - responses: { - /** @description Install missing packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/instantiate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["InstantiateNotebookRequest"]; - }; - }; - responses: { - /** @description Instantiate a component */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/interrupt": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Interrupt the kernel's execution */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/pdb/pm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["DebugCellRequest"]; - }; - }; - responses: { - /** @description Run a post mortem on the most recent failed cell. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/read_code": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Read the code from the server */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ReadCodeResponse"]; - }; - }; - /** @description File must be saved before downloading */ - 400: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/rename": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RenameNotebookRequest"]; - }; - }; - responses: { - /** @description Rename the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/restart_session": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Restart the current session without affecting other sessions. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteCellsRequest"]; - }; - }; - responses: { - /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveNotebookRequest"]; - }; - }; - responses: { - /** @description Save the current app */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_app_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveAppConfigurationRequest"]; - }; - }; - responses: { - /** @description Save the app configuration */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/save_user_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SaveUserConfigurationRequest"]; - }; - }; - responses: { - /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/scratchpad/run": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ExecuteScratchpadRequest"]; - }; - }; - responses: { - /** @description Run the scratchpad */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_cell_config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellConfigRequest"]; - }; - }; - responses: { - /** @description Set the configuration of a cell */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_model_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateWidgetModelRequest"]; - }; - }; - responses: { - /** @description Set model value */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/set_ui_element_value": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; - }; - }; - responses: { - /** @description Set UI element values */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/shutdown": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Shutdown the kernel */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/stdin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["StdinRequest"]; - }; - }; - responses: { - /** @description Send input to the stdin stream */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/sync/cell_ids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["UpdateCellIdsRequest"]; - }; - }; - responses: { - /** @description Sync cell ids */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/kernel/takeover": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successfully closed existing sessions */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status?: string; - }; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/add": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["AddPackageRequest"]; - }; - }; - responses: { - /** @description Install package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List installed packages */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListPackagesResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/remove": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["RemovePackageRequest"]; - }; - }; - responses: { - /** @description Uninstall package */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PackageOperationResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/packages/tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description List dependency tree */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DependencyTreeResponse"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/create": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSecretRequest"]; - }; - }; - responses: { - /** @description Create a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Delete a secret */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BaseResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/secrets/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ListSecretKeysRequest"]; - }; - }; - responses: { - /** @description List all secret keys */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ListSecretKeysResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/sql/validate": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ValidateSQLRequest"]; - }; - }; - responses: { - /** @description Validate an SQL query */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SuccessResponse"]; - }; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the status of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - filenames?: string[]; - lsp_running?: boolean; - mode?: string; - node_version?: string; - requirements?: string[]; - sessions?: number; - status?: string; - version?: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/status/connections": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the number of active websocket connections */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - active?: number; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/usage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the current memory and CPU usage of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - cpu: { - percent: number; - }; - gpu?: { - index: number; - memory: { - free: number; - percent: number; - total: number; - used: number; - }; - name: string; - }[]; - kernel?: { - memory?: number; - }; - memory: { - available: number; - free: number; - has_cgroup_mem_limit: boolean; - percent: number; - total: number; - used: number; - }; - server?: { - memory: number; - }; - }; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/version": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Get the version of the application */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit login form */ - post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/x-www-form-urlencoded": { - /** @description Access token or password */ - password?: string; - }; - }; - }; - responses: { - /** @description Login page */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/html": string; - }; - }; - /** @description Redirect to the next URL */ - 302: { - headers: { - Location?: string; - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; + "/@file/{filename_and_length}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The filename and byte length of the virtual file */ + filename_and_length: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get a virtual file */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/octet-stream": string; + }; + }; + /** @description Invalid byte length in virtual file request */ + 404: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI chat */ + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: never; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI completion for a prompt */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: unknown; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/inline_completion": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for AI inline completion */ + requestBody: { + content: { + "application/json": components["schemas"]["AiInlineCompletionRequest"]; + }; + }; + responses: { + /** @description Get AI inline completion for code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/invoke_tool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The request body for tool invocation */ + requestBody: { + content: { + "application/json": components["schemas"]["InvokeAiToolRequest"]; + }; + }; + responses: { + /** @description Tool invocation result */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InvokeAiToolResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Refresh MCP server configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPRefreshResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/ai/mcp/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get MCP server status */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MCPStatusResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/clear": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ClearCacheRequest"]; + }; + }; + responses: { + /** @description Clear all caches */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/cache/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["GetCacheInfoRequest"]; + }; + }; + responses: { + /** @description Get cache statistics */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_column": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewDatasetColumnRequest"]; + }; + }; + responses: { + /** @description Preview a column in a dataset */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_datasource_connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListDataSourceConnectionRequest"]; + }; + }; + responses: { + /** @description Broadcasts a datasource connection */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PreviewSQLTableRequest"]; + }; + }; + responses: { + /** @description Preview a SQL table */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/datasources/preview_sql_table_list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ListSQLTablesRequest"]; + }; + }; + responses: { + /** @description Preview a list of tables in an SQL schema */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/documentation/snippets": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load the snippets for the documentation page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Snippets"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/ipynb": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsIPYNBRequest"]; + }; + }; + responses: { + /** @description Export the notebook as IPYNB */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/auto_export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/html": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsHTMLRequest"]; + }; + }; + responses: { + /** @description Export the notebook as HTML */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/markdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsMarkdownRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a markdown */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/export/script": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExportAsScriptRequest"]; + }; + }; + responses: { + /** @description Export the notebook as a script */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileCreateRequest"]; + }; + }; + responses: { + /** @description Create a new file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileCreateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDeleteRequest"]; + }; + }; + responses: { + /** @description Delete a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDeleteResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/file_details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileDetailsRequest"]; + }; + }; + responses: { + /** @description Get details of a specific file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileDetailsResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/list_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileListRequest"]; + }; + }; + responses: { + /** @description List files and directories in a given path */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileListResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/move": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileMoveRequest"]; + }; + }; + responses: { + /** @description Move a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileMoveResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileOpenRequest"]; + }; + }; + responses: { + /** @description Open a file in the system editor */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileSearchRequest"]; + }; + }; + responses: { + /** @description Search for files and directories matching a query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileSearchResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/files/update": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FileUpdateRequest"]; + }; + }; + responses: { + /** @description Update a file or directory */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FileUpdateResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/recent_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the recent files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RecentFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/running_notebooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the running files */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/shutdown_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ShutdownSessionRequest"]; + }; + }; + responses: { + /** @description Shutdown the current session */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RunningNotebooksResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/tutorial/open": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["OpenTutorialRequest"]; + }; + }; + responses: { + /** @description Open a new tutorial */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MarimoFile"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/home/workspace_files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceFilesRequest"]; + }; + }; + responses: { + /** @description Get the files in the workspace */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WorkspaceFilesResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/code_autocomplete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CodeCompletionRequest"]; + }; + }; + responses: { + /** @description Complete a code fragment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/copy": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CopyNotebookRequest"]; + }; + }; + responses: { + /** @description Copy notebook */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DeleteCellRequest"]; + }; + }; + responses: { + /** @description Delete a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/format": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["FormatCellsRequest"]; + }; + }; + responses: { + /** @description Format code */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["FormatResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/function_call": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InvokeFunctionRequest"]; + }; + }; + responses: { + /** @description Invoke an RPC */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/install_missing_packages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstallPackagesRequest"]; + }; + }; + responses: { + /** @description Install missing packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/instantiate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["InstantiateNotebookRequest"]; + }; + }; + responses: { + /** @description Instantiate a component */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/interrupt": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Interrupt the kernel's execution */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/pdb/pm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["DebugCellRequest"]; + }; + }; + responses: { + /** @description Run a post mortem on the most recent failed cell. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/read_code": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Read the code from the server */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ReadCodeResponse"]; + }; + }; + /** @description File must be saved before downloading */ + 400: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/rename": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RenameNotebookRequest"]; + }; + }; + responses: { + /** @description Rename the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/restart_session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Restart the current session without affecting other sessions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteCellsRequest"]; + }; + }; + responses: { + /** @description Run a cell. Updates cell code in the kernel if needed; registers new cells for unseen cell IDs. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveNotebookRequest"]; + }; + }; + responses: { + /** @description Save the current app */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_app_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveAppConfigurationRequest"]; + }; + }; + responses: { + /** @description Save the app configuration */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/save_user_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SaveUserConfigurationRequest"]; + }; + }; + responses: { + /** @description Update the user config on disk and in the kernel. Only allowed in edit mode. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/scratchpad/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ExecuteScratchpadRequest"]; + }; + }; + responses: { + /** @description Run the scratchpad */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_cell_config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellConfigRequest"]; + }; + }; + responses: { + /** @description Set the configuration of a cell */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_model_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateWidgetModelRequest"]; + }; + }; + responses: { + /** @description Set model value */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/set_ui_element_value": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateUIElementValuesRequest"]; + }; + }; + responses: { + /** @description Set UI element values */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Shutdown the kernel */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/stdin": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["StdinRequest"]; + }; + }; + responses: { + /** @description Send input to the stdin stream */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/sync/cell_ids": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["UpdateCellIdsRequest"]; + }; + }; + responses: { + /** @description Sync cell ids */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/kernel/takeover": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully closed existing sessions */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status?: string; + }; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/add": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPackageRequest"]; + }; + }; + responses: { + /** @description Install package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List installed packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListPackagesResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/remove": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePackageRequest"]; + }; + }; + responses: { + /** @description Uninstall package */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PackageOperationResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/packages/tree": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List dependency tree */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DependencyTreeResponse"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/create": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CreateSecretRequest"]; + }; + }; + responses: { + /** @description Create a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/delete": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Delete a secret */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BaseResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/secrets/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ListSecretKeysRequest"]; + }; + }; + responses: { + /** @description List all secret keys */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ListSecretKeysResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/sql/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ValidateSQLRequest"]; + }; + }; + responses: { + /** @description Validate an SQL query */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SuccessResponse"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the status of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + filenames?: string[]; + lsp_running?: boolean; + mode?: string; + node_version?: string; + requirements?: string[]; + sessions?: number; + status?: string; + version?: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/status/connections": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the number of active websocket connections */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + active?: number; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the current memory and CPU usage of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + cpu: { + percent: number; + }; + gpu?: { + index: number; + memory: { + free: number; + percent: number; + total: number; + used: number; + }; + name: string; + }[]; + kernel?: { + memory?: number; + }; + memory: { + available: number; + free: number; + has_cgroup_mem_limit: boolean; + percent: number; + total: number; + used: number; + }; + server?: { + memory: number; + }; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/version": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Get the version of the application */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit login form */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + /** @description Access token or password */ + password?: string; + }; + }; + }; + responses: { + /** @description Login page */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/html": string; + }; + }; + /** @description Redirect to the next URL */ + 302: { + headers: { + Location?: string; + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AddPackageRequest - * @description This can be a remove package or a local package. - * - * Supported formats: - * - * httpx - * httpx==0.27.0 - * httpx>=0.27.0 - * git+https://github.com/encode/httpx - * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz - * /example/foo-0.1.0-py3-none-any.whl - */ - AddPackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - /** @default false */ - upgrade?: boolean | null; - }; - /** AiCompletionContext */ - AiCompletionContext: { - /** @default */ - plainText?: string; - /** @default [] */ - schema?: components["schemas"]["SchemaTable"][]; - /** @default [] */ - variables?: (string | components["schemas"]["VariableContext"])[]; - }; - /** AiCompletionRequest */ - AiCompletionRequest: { - code: string; - /** @default null */ - context?: null | components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - /** @default [] */ - messages?: components["schemas"]["ChatMessage"][]; - prompt: string; - /** @default null */ - selectedText?: string | null; - }; - /** - * AiConfig - * @description Configuration options for AI. - * - * **Keys.** - * - * - `rules`: custom rules to include in all AI completion prompts - * - `max_tokens`: the maximum number of tokens to use in AI completions - * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` - * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions - * - `models`: the models to use for AI completions - * - `open_ai`: the OpenAI config - * - `anthropic`: the Anthropic config - * - `google`: the Google AI config - * - `bedrock`: the Bedrock config - * - `azure`: the Azure config - * - `ollama`: the Ollama config - * - `github`: the GitHub config - * - `openrouter`: the OpenRouter config - * - `wandb`: the Weights & Biases config - * - `open_ai_compatible`: the OpenAI-compatible config - */ - AiConfig: { - anthropic?: components["schemas"]["AnthropicConfig"]; - azure?: components["schemas"]["OpenAiConfig"]; - bedrock?: components["schemas"]["BedrockConfig"]; - github?: components["schemas"]["GitHubConfig"]; - google?: components["schemas"]["GoogleAiConfig"]; - inline_tooltip?: boolean; - max_tokens?: number; - /** @enum {unknown} */ - mode?: "agent" | "ask" | "manual"; - models?: components["schemas"]["AiModelConfig"]; - ollama?: components["schemas"]["OpenAiConfig"]; - open_ai?: components["schemas"]["OpenAiConfig"]; - open_ai_compatible?: components["schemas"]["OpenAiConfig"]; - openrouter?: components["schemas"]["OpenAiConfig"]; - rules?: string; - wandb?: components["schemas"]["OpenAiConfig"]; - }; - /** AiInlineCompletionRequest */ - AiInlineCompletionRequest: { - /** - * @default python - * @enum {unknown} - */ - language?: "markdown" | "python" | "sql"; - prefix: string; - suffix: string; - }; - /** - * AiModelConfig - * @description Configuration options for an AI model. - * - * **Keys.** - * - * - `chat_model`: the model to use for chat completions - * - `edit_model`: the model to use for edit completions - * - `autocomplete_model`: the model to use for code completion/autocomplete - * - `displayed_models`: a list of models to display in the UI - * - `custom_models`: a list of custom models to use that are not from the default list - */ - AiModelConfig: { - autocomplete_model?: string; - chat_model?: string; - custom_models: string[]; - displayed_models: string[]; - edit_model?: string; - }; - /** AlertNotification */ - AlertNotification: { - description: string; - /** @enum {unknown} */ - op: "alert"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** - * AnthropicConfig - * @description Configuration options for Anthropic. - * - * **Keys.** - * - * - `api_key`: the Anthropic API key - */ - AnthropicConfig: { - api_key?: string; - }; - /** BannerNotification */ - BannerNotification: { - /** @default null */ - action?: "restart" | null; - description: string; - /** @enum {unknown} */ - op: "banner"; - title: string; - /** @default null */ - variant?: "danger" | null; - }; - /** BaseResponse */ - BaseResponse: { - success: boolean; - }; - /** - * BasedpyrightServerConfig - * @description Configuration options for basedpyright Language Server. - * - * basedpyright handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - BasedpyrightServerConfig: { - enabled?: boolean; - }; - /** - * BedrockConfig - * @description Configuration options for Bedrock. - * - * **Keys.** - * - * - `profile_name`: the AWS profile to use - * - `region_name`: the AWS region to use - * - `aws_access_key_id`: the AWS access key ID - * - `aws_secret_access_key`: the AWS secret access key - */ - BedrockConfig: { - aws_access_key_id?: string; - aws_secret_access_key?: string; - profile_name?: string; - region_name?: string; - }; - /** - * CacheClearedNotification - * @description Result of clearing cache. - */ - CacheClearedNotification: { - bytes_freed: number; - /** @enum {unknown} */ - op: "cache-cleared"; - }; - /** - * CacheInfoNotification - * @description Cache statistics information. - */ - CacheInfoNotification: { - disk_to_free: number; - disk_total: number; - hits: number; - misses: number; - /** @enum {unknown} */ - op: "cache-info"; - time: number; - }; - /** - * CellChannel - * @description The channel of a cell's output. - * @enum {unknown} - */ - CellChannel: "marimo-error" | "media" | "output" | "pdb" | "stderr" | "stdin" | "stdout"; - /** - * CellConfig - * @description Internal representation of a cell's configuration. - * This is not part of the public API. - */ - CellConfig: { - /** @default null */ - column?: number | null; - /** @default false */ - disabled?: boolean; - /** @default false */ - hide_code?: boolean; - }; - /** - * CellNotification - * @description Op to transition a cell. - * - * A CellNotification's data has some optional fields: - * - * output - a CellOutput - * console - a CellOutput (console msg to append), or a list of - * CellOutputs - * status - execution status - * stale_inputs - whether the cell has stale inputs (variables, modules, ...) - * run_id - the run associated with this cell. - * serialization - the serialization status of the cell - * - * Omitting a field means that its value should be unchanged! - * - * And one required field: - * - * cell_id - the cell id - */ - CellNotification: { - cell_id: string; - /** @default null */ - console?: components["schemas"]["CellOutput"][] | null | components["schemas"]["CellOutput"]; - /** @enum {unknown} */ - op: "cell-op"; - /** @default null */ - output?: null | components["schemas"]["CellOutput"]; - /** @default null */ - run_id?: string | null; - /** @default null */ - serialization?: string | null; - /** @default null */ - stale_inputs?: boolean | null; - /** @default null */ - status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; - timestamp?: number; - }; - /** CellOutput */ - CellOutput: { - channel: components["schemas"]["CellChannel"]; - data: string | (components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"])[] | Record; - /** @enum {unknown} */ - mimetype: "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.vegalite.v5+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/plain" | "video/mp4" | "video/mpeg"; - timestamp?: number; - }; - /** ChatAttachment */ - ChatAttachment: { - /** @default null */ - content_type?: string | null; - /** @default attachment */ - name?: string; - url: string; - }; - /** - * ChatMessage - * @description A message in a chat. - */ - ChatMessage: { - /** @default null */ - attachments?: components["schemas"]["ChatAttachment"][] | null; - content: unknown; - /** @default null */ - parts?: Record[] | null; - /** @enum {unknown} */ - role: "assistant" | "system" | "user"; - }; - /** ChatRequest */ - ChatRequest: { - context: components["schemas"]["AiCompletionContext"]; - includeOtherCode: string; - messages: components["schemas"]["ChatMessage"][]; - /** @default null */ - model?: string | null; - /** @default null */ - tools?: components["schemas"]["ToolDefinition"][] | null; - /** @default null */ - variables?: (string | components["schemas"]["VariableContext"])[] | null; - }; - /** - * ClearCacheCommand - * @description Clear all cached data. - * - * Clears all cache contexts, freeing memory and disk space. - * Affects all cells using the @cache decorator. - */ - ClearCacheCommand: { - /** @enum {unknown} */ - type: "clear-cache"; - }; - /** ClearCacheRequest */ - ClearCacheRequest: Record; - /** - * CodeCompletionCommand - * @description Request code completion suggestions. - * - * Sent when the user requests autocomplete. Provides code context up to - * the cursor position for the language server. - * - * Attributes: - * id: Unique identifier for this request. - * document: Source code up to the cursor position. - * cell_id: Cell where completion is requested. - */ - CodeCompletionCommand: { - cellId: string; - document: string; - id: string; - /** @enum {unknown} */ - type: "code-completion"; - }; - /** CodeCompletionRequest */ - CodeCompletionRequest: { - cellId: string; - document: string; - id: string; - }; - /** - * ColumnStats - * @description Represents stats for a column in a data table. - */ - ColumnStats: { - /** @default null */ - false?: number | null; - /** @default null */ - max?: unknown | null; - /** @default null */ - mean?: unknown | null; - /** @default null */ - median?: unknown | null; - /** @default null */ - min?: unknown | null; - /** @default null */ - nulls?: number | null; - /** @default null */ - p25?: unknown | null; - /** @default null */ - p5?: unknown | null; - /** @default null */ - p75?: unknown | null; - /** @default null */ - p95?: unknown | null; - /** @default null */ - std?: unknown | null; - /** @default null */ - total?: number | null; - /** @default null */ - true?: number | null; - /** @default null */ - unique?: number | null; - }; - /** - * CompletedRunNotification - * @description Written on run completion (of submitted cells and their descendants. - */ - CompletedRunNotification: { - /** @enum {unknown} */ - op: "completed-run"; - }; - /** - * CompletionConfig - * @description Configuration for code completion. - * - * A dict with key/value pairs configuring code completion in the marimo - * editor. - * - * **Keys.** - * - * - `activate_on_typing`: if `False`, completion won't activate - * until the completion hotkey is entered - * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing - * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` - * - `codeium_api_key`: the Codeium API key - */ - CompletionConfig: { - activate_on_typing: boolean; - api_key?: string | null; - base_url?: string | null; - codeium_api_key?: string | null; - copilot: boolean | ("codeium" | "custom" | "github"); - model?: string | null; - signature_hint_on_typing: boolean; - }; - /** CompletionOption */ - CompletionOption: { - completion_info: string | null; - name: string; - type: string; - }; - /** - * CompletionResultNotification - * @description Code completion result. - */ - CompletionResultNotification: { - completion_id: string; - /** @enum {unknown} */ - op: "completion-result"; - options: components["schemas"]["CompletionOption"][]; - prefix_length: number; - }; - /** CopyNotebookRequest */ - CopyNotebookRequest: { - destination: string; - source: string; - }; - /** - * CreateNotebookCommand - * @description Instantiate and initialize a notebook. - * - * Sent when a notebook is first loaded. Contains all cells and initial UI element values. - * - * Attributes: - * execution_requests: ExecuteCellCommand for each notebook cell. - * set_ui_element_value_request: Initial UI element values. - * auto_run: Whether to automatically execute cells on instantiation. - * request: HTTP request context if available. - */ - CreateNotebookCommand: { - autoRun: boolean; - executionRequests: components["schemas"]["ExecuteCellCommand"][]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; - /** @enum {unknown} */ - type: "create-notebook"; - }; - /** CreateSecretRequest */ - CreateSecretRequest: { - key: string; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - value: string; - }; - /** CycleError */ - CycleError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {unknown} */ - type: "cycle"; - }; - /** - * DataColumnPreviewNotification - * @description Preview of a column in a dataset. - */ - DataColumnPreviewNotification: { - /** @default null */ - chart_code?: string | null; - /** @default null */ - chart_spec?: string | null; - column_name: string; - /** @default null */ - error?: string | null; - /** @default null */ - missing_packages?: string[] | null; - /** @enum {unknown} */ - op: "data-column-preview"; - /** @default null */ - stats?: null | components["schemas"]["ColumnStats"]; - table_name: string; - }; - /** - * DataSourceConnection - * @description Represents a data source connection. - * - * Attributes: - * source (str): The source of the data source connection. E.g 'postgres'. - * dialect (str): The dialect of the data source connection. E.g 'postgresql'. - * name (str): The name of the data source connection. E.g 'engine'. - * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. - * databases (List[Database]): The databases in the data source connection. - * default_database (Optional[str]): The default database in the data source connection. - * default_schema (Optional[str]): The default schema in the data source connection. - */ - DataSourceConnection: { - databases: components["schemas"]["Database"][]; - /** @default null */ - default_database?: string | null; - /** @default null */ - default_schema?: string | null; - dialect: string; - display_name: string; - name: string; - source: string; - }; - /** DataSourceConnectionsNotification */ - DataSourceConnectionsNotification: { - connections: components["schemas"]["DataSourceConnection"][]; - /** @enum {unknown} */ - op: "data-source-connections"; - }; - /** - * DataTable - * @description Represents a data table. - * - * Attributes: - * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). - * source (str): Can be dialect, or source db name. - * name (str): Name of the data table. - * num_rows (Optional[int]): Total number of rows in the table, if known. - * num_columns (Optional[int]): Total number of columns in the table, if known. - * variable_name (Optional[VariableName]): Variable name referencing this table in code. - * columns (List[DataTableColumn]): List of column definitions and metadata. - * engine (Optional[VariableName]): Database engine or connection handler, if any. - * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. - * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. - * indexes (Optional[List[str]]): Column names used as indexes, if any. - */ - DataTable: { - columns: components["schemas"]["DataTableColumn"][]; - /** @default null */ - engine?: string | null; - /** @default null */ - indexes?: string[] | null; - name: string; - num_columns: number | null; - num_rows: number | null; - /** @default null */ - primary_keys?: string[] | null; - source: string; - /** @enum {unknown} */ - source_type: "catalog" | "connection" | "duckdb" | "local"; - /** - * @default table - * @enum {unknown} - */ - type?: "table" | "view"; - variable_name: string | null; - }; - /** - * DataTableColumn - * @description Represents a column in a data table. - * - * Attributes: - * name (str): The name of the column. - * type (DataType): The data type of the column. - * external_type (ExternalDataType): The raw data type of the column. - * sample_values (List[Any]): The sample values of the column. - */ - DataTableColumn: { - external_type: string; - name: string; - sample_values: unknown[]; - /** @enum {unknown} */ - type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; - }; - /** - * Database - * @description Represents a collection of schemas. - * - * Attributes: - * name (str): The name of the database - * dialect (str): The dialect of the database - * schemas (List[Schema]): List of schemas in the database - * engine (Optional[VariableName]): Database engine or connection handler, if any. - */ - Database: { - dialect: string; - /** @default null */ - engine?: string | null; - name: string; - schemas: components["schemas"]["Schema"][]; - }; - /** - * DatasetsNotification - * @description List of datasets. - */ - DatasetsNotification: { - /** @default null */ - clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; - /** @enum {unknown} */ - op: "datasets"; - tables: components["schemas"]["DataTable"][]; - }; - /** - * DatasourcesConfig - * @description Configuration for datasources panel. - * - * **Keys.** - * - * - `auto_discover_schemas`: if `True`, include schemas in the datasource - * - `auto_discover_tables`: if `True`, include tables in the datasource - * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource - */ - DatasourcesConfig: { - auto_discover_columns?: boolean | "auto"; - auto_discover_schemas?: boolean | "auto"; - auto_discover_tables?: boolean | "auto"; - }; - /** - * DebugCellCommand - * @description Enter debugger mode for a cell. - * - * Starts the Python debugger (pdb) for the specified cell. - * - * Attributes: - * cell_id: Cell to debug. - * request: HTTP request context if available. - */ - DebugCellCommand: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "debug-cell"; - }; - /** DebugCellRequest */ - DebugCellRequest: { - cellId: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * DeleteCellCommand - * @description Delete a cell from the notebook. - * - * Removes cell from the dependency graph and cleans up its variables. - * Dependent cells may become stale. - * - * Attributes: - * cell_id: Cell to delete. - */ - DeleteCellCommand: { - cellId: string; - /** @enum {unknown} */ - type: "delete-cell"; - }; - /** DeleteCellRequest */ - DeleteCellRequest: { - cellId: string; - }; - /** DeleteSecretRequest */ - DeleteSecretRequest: { - key: string; - }; - /** DependencyTreeNode */ - DependencyTreeNode: { - dependencies: components["schemas"]["DependencyTreeNode"][]; - name: string; - tags: { - [key: string]: string; - }[]; - version: string | null; - }; - /** DependencyTreeResponse */ - DependencyTreeResponse: { - tree: null | components["schemas"]["DependencyTreeNode"]; - }; - /** - * DiagnosticsConfig - * @description Configuration options for diagnostics. - * - * **Keys.** - * - * - `enabled`: if `True`, diagnostics will be shown in the editor - * - `sql_linter`: if `True`, SQL cells will have linting enabled - */ - DiagnosticsConfig: { - enabled?: boolean; - sql_linter?: boolean; - }; - /** - * DisplayConfig - * @description Configuration for display. - * - * **Keys.** - * - * - `theme`: `"light"`, `"dark"`, or `"system"` - * - `code_editor_font_size`: font size for the code editor - * - `cell_output`: `"above"` or `"below"` - * - `dataframes`: `"rich"` or `"plain"` - * - `custom_css`: list of paths to custom CSS files - * - `default_table_page_size`: default number of rows to display in tables - * - `default_table_max_columns`: default maximum number of columns to display in tables - * - `reference_highlighting`: if `True`, highlight reactive variable references - * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") - */ - DisplayConfig: { - /** @enum {unknown} */ - cell_output: "above" | "below"; - code_editor_font_size: number; - custom_css?: string[]; - /** @enum {unknown} */ - dataframes: "plain" | "rich"; - default_table_max_columns: number; - default_table_page_size: number; - /** @enum {unknown} */ - default_width: "columns" | "compact" | "full" | "medium" | "normal"; - locale?: string | null; - reference_highlighting?: boolean; - /** @enum {unknown} */ - theme: "dark" | "light" | "system"; - }; - /** - * ExecuteCellCommand - * @description Execute a single cell. - * - * Executes a cell with the provided code. Dependent cells may be - * re-executed based on the reactive execution mode. - * - * Attributes: - * cell_id: Cell to execute. - * code: Python code to execute. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellCommand: { - cellId: string; - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cell"; - }; - /** - * ExecuteCellsCommand - * @description Execute multiple cells in a batch. - * - * Executes multiple cells with their corresponding code. The kernel manages - * dependency tracking and reactive execution. - * - * Attributes: - * cell_ids: Cells to execute. - * codes: Python code for each cell. Must match length of cell_ids. - * request: HTTP request context if available. - * timestamp: Unix timestamp when command was created. - */ - ExecuteCellsCommand: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - timestamp?: number; - /** @enum {unknown} */ - type: "execute-cells"; - }; - /** ExecuteCellsRequest */ - ExecuteCellsRequest: { - cellIds: string[]; - codes: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteScratchpadCommand - * @description Execute code in the scratchpad. - * - * The scratchpad is a temporary execution environment that doesn't affect - * the notebook's cells or dependencies. Runs in an isolated cell with a copy - * of the global namespace, useful for experimentation. - * - * Attributes: - * code: Python code to execute. - * request: HTTP request context if available. - */ - ExecuteScratchpadCommand: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-scratchpad"; - }; - /** ExecuteScratchpadRequest */ - ExecuteScratchpadRequest: { - code: string; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - }; - /** - * ExecuteStaleCellsCommand - * @description Execute all stale cells. - * - * Cells become stale when their dependencies change but haven't been - * re-executed yet. Brings the notebook to a consistent state. - * - * Attributes: - * request: HTTP request context if available. - */ - ExecuteStaleCellsCommand: { - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - /** @enum {unknown} */ - type: "execute-stale-cells"; - }; - /** ExportAsHTMLRequest */ - ExportAsHTMLRequest: { - /** @default null */ - assetUrl?: string | null; - download: boolean; - files: string[]; - includeCode: boolean; - }; - /** ExportAsIPYNBRequest */ - ExportAsIPYNBRequest: { - download: boolean; - }; - /** ExportAsMarkdownRequest */ - ExportAsMarkdownRequest: { - download: boolean; - }; - /** ExportAsScriptRequest */ - ExportAsScriptRequest: { - download: boolean; - }; - /** FileCreateRequest */ - FileCreateRequest: { - /** @default null */ - contents?: string | null; - name: string; - path: string; - /** @enum {unknown} */ - type: "directory" | "file"; - }; - /** FileCreateResponse */ - FileCreateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDeleteRequest */ - FileDeleteRequest: { - path: string; - }; - /** FileDeleteResponse */ - FileDeleteResponse: { - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileDetailsRequest */ - FileDetailsRequest: { - path: string; - }; - /** FileDetailsResponse */ - FileDetailsResponse: { - /** @default null */ - contents?: string | null; - file: components["schemas"]["FileInfo"]; - /** @default null */ - mimeType?: string | null; - }; - /** FileInfo */ - FileInfo: { - /** @default [] */ - children?: components["schemas"]["FileInfo"][]; - id: string; - isDirectory: boolean; - isMarimoFile: boolean; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - }; - /** FileListRequest */ - FileListRequest: { - /** @default null */ - path?: string | null; - }; - /** FileListResponse */ - FileListResponse: { - files: components["schemas"]["FileInfo"][]; - root: string; - }; - /** FileMoveRequest */ - FileMoveRequest: { - newPath: string; - path: string; - }; - /** FileMoveResponse */ - FileMoveResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FileOpenRequest */ - FileOpenRequest: { - /** @default null */ - lineNumber?: number | null; - path: string; - }; - /** FileSearchRequest */ - FileSearchRequest: { - /** @default 3 */ - depth?: number; - /** @default true */ - includeDirectories?: boolean; - /** @default true */ - includeFiles?: boolean; - /** @default 100 */ - limit?: number; - /** @default null */ - path?: string | null; - query: string; - }; - /** FileSearchResponse */ - FileSearchResponse: { - files: components["schemas"]["FileInfo"][]; - query: string; - totalFound: number; - }; - /** FileUpdateRequest */ - FileUpdateRequest: { - contents: string; - path: string; - }; - /** FileUpdateResponse */ - FileUpdateResponse: { - /** @default null */ - info?: null | components["schemas"]["FileInfo"]; - /** @default null */ - message?: string | null; - success: boolean; - }; - /** FocusCellNotification */ - FocusCellNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "focus-cell"; - }; - /** FormatCellsRequest */ - FormatCellsRequest: { - codes: { - [key: string]: string; - }; - lineLength: number; - }; - /** FormatResponse */ - FormatResponse: { - codes: { - [key: string]: string; - }; - }; - /** - * FormattingConfig - * @description Configuration for code formatting. - * - * **Keys.** - * - * - `line_length`: max line length - */ - FormattingConfig: { - line_length: number; - }; - /** - * FunctionCallResultNotification - * @description Result of calling a function. - */ - FunctionCallResultNotification: { - function_call_id: string; - /** @enum {unknown} */ - op: "function-call-result"; - return_value: unknown; - status: components["schemas"]["HumanReadableStatus"]; - }; - /** - * GetCacheInfoCommand - * @description Retrieve cache statistics. - * - * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). - */ - GetCacheInfoCommand: { - /** @enum {unknown} */ - type: "get-cache-info"; - }; - /** GetCacheInfoRequest */ - GetCacheInfoRequest: Record; - /** - * GitHubConfig - * @description Configuration options for GitHub. - * - * **Keys.** - * - * - `api_key`: the GitHub API token - * - `base_url`: the base URL for the API - * - `copilot_settings`: configuration settings for GitHub Copilot LSP. - * Supports settings like `http` (proxy configuration), `telemetry`, - * and `github-enterprise` (enterprise URI). - */ - GitHubConfig: { - api_key?: string; - base_url?: string; - copilot_settings?: Record; - }; - /** - * GoogleAiConfig - * @description Configuration options for Google AI. - * - * **Keys.** - * - * - `api_key`: the Google AI API key - */ - GoogleAiConfig: { - api_key?: string; - }; - /** - * HTTPRequest - * @description Serializable HTTP request representation. - * - * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe - * subset of data. Excludes session and auth to prevent exposing sensitive data. - * - * Attributes: - * url: Serialized URL with path, port, scheme, netloc, query, hostname. - * base_url: Serialized base URL. - * headers: Request headers (marimo-specific headers excluded). - * query_params: Query parameters mapped to lists of values. - * path_params: Path parameters from the URL route. - * cookies: Request cookies. - * meta: User-defined storage for custom data. - * user: User info from authentication middleware (e.g., is_authenticated, username). - */ - HTTPRequest: { - base_url: Record; - cookies: { - [key: string]: string; - }; - headers: { - [key: string]: string; - }; - meta: Record; - path_params: Record; - query_params: { - [key: string]: string[]; - }; - url: Record; - user: unknown; - }; - /** - * HumanReadableStatus - * @description Human-readable status. - */ - HumanReadableStatus: { - /** @enum {unknown} */ - code: "error" | "ok"; - /** @default null */ - message?: string | null; - /** @default null */ - title?: string | null; - }; - /** ImportStarError */ - ImportStarError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "import-star"; - }; - /** - * InstallPackagesCommand - * @description Install Python packages. - * - * Installs missing packages using the specified package manager. Triggered - * automatically on import errors or manually by the user. - * - * Attributes: - * manager: Package manager to use ('pip', 'conda', 'uv', etc.). - * versions: Package names mapped to version specifiers. Empty version - * means install latest. - */ - InstallPackagesCommand: { - manager: string; - /** @enum {unknown} */ - type: "install-packages"; - versions: { - [key: string]: string; - }; - }; - /** InstallPackagesRequest */ - InstallPackagesRequest: { - manager: string; - versions: { - [key: string]: string; - }; - }; - /** InstallingPackageAlertNotification */ - InstallingPackageAlertNotification: { - /** @default null */ - log_status?: ("append" | "done" | "start") | null; - /** @default null */ - logs?: { - [key: string]: string; - } | null; - /** @enum {unknown} */ - op: "installing-package-alert"; - packages: { - [key: string]: "failed" | "installed" | "installing" | "queued"; - }; - }; - /** InstantiateNotebookRequest */ - InstantiateNotebookRequest: { - /** @default true */ - autoRun?: boolean; - objectIds: string[]; - values: unknown[]; - }; - /** - * InterruptedNotification - * @description Written when the kernel is interrupted by the user. - */ - InterruptedNotification: { - /** @enum {unknown} */ - op: "interrupted"; - }; - /** InvokeAiToolRequest */ - InvokeAiToolRequest: { - arguments: Record; - toolName: string; - }; - /** InvokeAiToolResponse */ - InvokeAiToolResponse: { - /** @default null */ - error?: string | null; - result: unknown; - success: boolean; - toolName: string; - }; - /** - * InvokeFunctionCommand - * @description Invoke a function from a UI element. - * - * Called when a UI element needs to invoke a Python function. - * - * Attributes: - * function_call_id: Unique identifier for this call. - * namespace: Namespace where the function is registered. - * function_name: Function to invoke. - * args: Keyword arguments for the function. - */ - InvokeFunctionCommand: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - /** @enum {unknown} */ - type: "invoke-function"; - }; - /** InvokeFunctionRequest */ - InvokeFunctionRequest: { - args: Record; - functionCallId: string; - functionName: string; - namespace: string; - }; - /** KernelCapabilitiesNotification */ - KernelCapabilitiesNotification: { - /** @default false */ - basedpyright?: boolean; - /** @default false */ - pylsp?: boolean; - /** @default false */ - terminal?: boolean; - /** @default false */ - ty?: boolean; - }; - /** - * KernelReadyNotification - * @description Kernel is ready for execution. - */ - KernelReadyNotification: { - app_config: components["schemas"]["_AppConfig"]; - capabilities: components["schemas"]["KernelCapabilitiesNotification"]; - cell_ids: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - kiosk: boolean; - last_executed_code: { - [key: string]: string; - } | null; - last_execution_time: { - [key: string]: number; - } | null; - layout: components["schemas"]["LayoutConfig"] | null; - names: string[]; - /** @enum {unknown} */ - op: "kernel-ready"; - resumed: boolean; - ui_values: Record | null; - }; - /** - * KeymapConfig - * @description Configuration for keymaps. - * - * **Keys.** - * - * - `preset`: one of `"default"` or `"vim"` - * - `overrides`: a dict of keymap actions to their keymap override - * - `vimrc`: path to a vimrc file to load keymaps from - * - `destructive_delete`: if `True`, allows deleting cells with content. - */ - KeymapConfig: { - destructive_delete?: boolean; - overrides?: { - [key: string]: string; - }; - /** @enum {unknown} */ - preset: "default" | "vim"; - vimrc?: string | null; - }; - /** KnownUnions */ - KnownUnions: { - command: components["schemas"]["CreateNotebookCommand"] | components["schemas"]["RenameNotebookCommand"] | components["schemas"]["CodeCompletionCommand"] | components["schemas"]["ExecuteCellsCommand"] | components["schemas"]["ExecuteScratchpadCommand"] | components["schemas"]["ExecuteStaleCellsCommand"] | components["schemas"]["DebugCellCommand"] | components["schemas"]["DeleteCellCommand"] | components["schemas"]["SyncGraphCommand"] | components["schemas"]["UpdateCellConfigCommand"] | components["schemas"]["InstallPackagesCommand"] | components["schemas"]["UpdateUIElementCommand"] | components["schemas"]["UpdateWidgetModelCommand"] | components["schemas"]["InvokeFunctionCommand"] | components["schemas"]["UpdateUserConfigCommand"] | components["schemas"]["PreviewDatasetColumnCommand"] | components["schemas"]["PreviewSQLTableCommand"] | components["schemas"]["ListSQLTablesCommand"] | components["schemas"]["ValidateSQLCommand"] | components["schemas"]["ListDataSourceConnectionCommand"] | components["schemas"]["ListSecretKeysCommand"] | components["schemas"]["RefreshSecretsCommand"] | components["schemas"]["ClearCacheCommand"] | components["schemas"]["GetCacheInfoCommand"] | components["schemas"]["StopKernelCommand"]; - /** @enum {unknown} */ - data_type: "boolean" | "date" | "datetime" | "integer" | "number" | "string" | "time" | "unknown"; - error: components["schemas"]["SetupRootError"] | components["schemas"]["CycleError"] | components["schemas"]["MultipleDefinitionError"] | components["schemas"]["ImportStarError"] | components["schemas"]["MarimoAncestorStoppedError"] | components["schemas"]["MarimoAncestorPreventedError"] | components["schemas"]["MarimoExceptionRaisedError"] | components["schemas"]["MarimoStrictExecutionError"] | components["schemas"]["MarimoInterruptionError"] | components["schemas"]["MarimoSyntaxError"] | components["schemas"]["MarimoInternalError"] | components["schemas"]["MarimoSQLError"] | components["schemas"]["UnknownError"]; - notification: components["schemas"]["CellNotification"] | components["schemas"]["FunctionCallResultNotification"] | components["schemas"]["UIElementMessageNotification"] | components["schemas"]["RemoveUIElementsNotification"] | components["schemas"]["ReloadNotification"] | components["schemas"]["ReconnectedNotification"] | components["schemas"]["InterruptedNotification"] | components["schemas"]["CompletedRunNotification"] | components["schemas"]["KernelReadyNotification"] | components["schemas"]["CompletionResultNotification"] | components["schemas"]["AlertNotification"] | components["schemas"]["BannerNotification"] | components["schemas"]["MissingPackageAlertNotification"] | components["schemas"]["InstallingPackageAlertNotification"] | components["schemas"]["StartupLogsNotification"] | components["schemas"]["VariablesNotification"] | components["schemas"]["VariableValuesNotification"] | components["schemas"]["QueryParamsSetNotification"] | components["schemas"]["QueryParamsAppendNotification"] | components["schemas"]["QueryParamsDeleteNotification"] | components["schemas"]["QueryParamsClearNotification"] | components["schemas"]["DatasetsNotification"] | components["schemas"]["DataColumnPreviewNotification"] | components["schemas"]["SQLTablePreviewNotification"] | components["schemas"]["SQLTableListPreviewNotification"] | components["schemas"]["DataSourceConnectionsNotification"] | components["schemas"]["ValidateSQLResultNotification"] | components["schemas"]["SecretKeysResultNotification"] | components["schemas"]["CacheClearedNotification"] | components["schemas"]["CacheInfoNotification"] | components["schemas"]["FocusCellNotification"] | components["schemas"]["UpdateCellCodesNotification"] | components["schemas"]["UpdateCellIdsNotification"]; - }; - /** - * LanguageServersConfig - * @description Configuration options for language servers. - * - * **Keys.** - * - * - `pylsp`: the pylsp config - */ - LanguageServersConfig: { - basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; - pylsp?: components["schemas"]["PythonLanguageServerConfig"]; - ty?: components["schemas"]["TyLanguageServerConfig"]; - }; - /** LayoutConfig */ - LayoutConfig: { - data: Record; - type: string; - }; - /** - * ListDataSourceConnectionCommand - * @description List data source schemas. - * - * Retrieves available schemas for a data source engine. - * - * Attributes: - * engine: Data source engine identifier. - */ - ListDataSourceConnectionCommand: { - engine: string; - /** @enum {unknown} */ - type: "list-data-source-connection"; - }; - /** ListDataSourceConnectionRequest */ - ListDataSourceConnectionRequest: { - engine: string; - }; - /** ListPackagesResponse */ - ListPackagesResponse: { - packages: components["schemas"]["PackageDescription"][]; - }; - /** - * ListSQLTablesCommand - * @description List tables in an SQL schema. - * - * Retrieves names of all tables and views in a schema. Used by the SQL - * editor for table selection. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database to query. - * schema: Schema to list tables from. - */ - ListSQLTablesCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - /** @enum {unknown} */ - type: "list-sql-tables"; - }; - /** ListSQLTablesRequest */ - ListSQLTablesRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - }; - /** - * ListSecretKeysCommand - * @description List available secret keys. - * - * Retrieves secret names without exposing values. - * - * Attributes: - * request_id: Unique identifier for this request. - */ - ListSecretKeysCommand: { - requestId: string; - /** @enum {unknown} */ - type: "list-secret-keys"; - }; - /** ListSecretKeysRequest */ - ListSecretKeysRequest: { - requestId: string; - }; - /** ListSecretKeysResponse */ - ListSecretKeysResponse: { - keys: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** - * MCPConfig - * @description Configuration for MCP servers - * - * Note: the field name `mcpServers` is camelCased to match MCP server - * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) - */ - MCPConfig: { - mcpServers: { - [key: string]: Record; - }; - presets?: ("context7" | "marimo")[]; - }; - /** MCPRefreshResponse */ - MCPRefreshResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: boolean; - }; - success: boolean; - }; - /** MCPStatusResponse */ - MCPStatusResponse: { - /** @default null */ - error?: string | null; - /** @default {} */ - servers?: { - [key: string]: "connected" | "disconnected" | "failed" | "pending"; - }; - /** @enum {unknown} */ - status: "error" | "ok" | "partial"; - }; - /** MarimoAncestorPreventedError */ - MarimoAncestorPreventedError: { - blamed_cell: string | null; - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-prevented"; - }; - /** MarimoAncestorStoppedError */ - MarimoAncestorStoppedError: { - msg: string; - raising_cell: string; - /** @enum {unknown} */ - type: "ancestor-stopped"; - }; - /** - * MarimoConfig - * @description Configuration for the marimo editor - */ - MarimoConfig: { - ai?: components["schemas"]["AiConfig"]; - completion: components["schemas"]["CompletionConfig"]; - datasources?: components["schemas"]["DatasourcesConfig"]; - diagnostics?: components["schemas"]["DiagnosticsConfig"]; - display: components["schemas"]["DisplayConfig"]; - experimental?: Record; - formatting: components["schemas"]["FormattingConfig"]; - keymap: components["schemas"]["KeymapConfig"]; - language_servers?: components["schemas"]["LanguageServersConfig"]; - mcp?: components["schemas"]["MCPConfig"]; - package_management: components["schemas"]["PackageManagementConfig"]; - runtime: components["schemas"]["RuntimeConfig"]; - save: components["schemas"]["SaveConfig"]; - server: components["schemas"]["ServerConfig"]; - sharing?: components["schemas"]["SharingConfig"]; - snippets?: components["schemas"]["SnippetsConfig"]; - }; - /** MarimoExceptionRaisedError */ - MarimoExceptionRaisedError: { - exception_type: string; - msg: string; - raising_cell: string | null; - /** @enum {unknown} */ - type: "exception"; - }; - /** MarimoFile */ - MarimoFile: { - /** @default null */ - initializationId?: string | null; - /** @default null */ - lastModified?: number | null; - name: string; - path: string; - /** @default null */ - sessionId?: string | null; - }; - /** - * 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. - */ - MarimoInternalError: { - error_id: string; - /** @default */ - msg?: string; - /** @enum {unknown} */ - type: "internal"; - }; - /** MarimoInterruptionError */ - MarimoInterruptionError: { - /** @enum {unknown} */ - type: "interruption"; - }; - /** - * MarimoSQLError - * @description SQL-specific error with enhanced metadata for debugging. - */ - MarimoSQLError: { - /** @default null */ - hint?: string | null; - msg: string; - /** @default 0 */ - node_col_offset?: number; - /** @default 0 */ - node_lineno?: number; - /** @default null */ - sql_col?: number | null; - /** @default null */ - sql_line?: number | null; - sql_statement: string; - /** @enum {unknown} */ - type: "sql-error"; - }; - /** MarimoStrictExecutionError */ - MarimoStrictExecutionError: { - blamed_cell: string | null; - msg: string; - ref: string; - /** @enum {unknown} */ - type: "strict-exception"; - }; - /** MarimoSyntaxError */ - MarimoSyntaxError: { - /** @default null */ - lineno?: number | null; - msg: string; - /** @enum {unknown} */ - type: "syntax"; - }; - /** MissingPackageAlertNotification */ - MissingPackageAlertNotification: { - isolated: boolean; - /** @enum {unknown} */ - op: "missing-package-alert"; - packages: string[]; - }; - /** - * ModelMessage - * @description Widget model state update message. - * - * State changes for anywidget models, including state dict and binary buffer paths. - * - * Attributes: - * state: Model state updates. - * buffer_paths: Paths within state dict pointing to binary buffers. - */ - ModelMessage: { - bufferPaths: (string | number)[][]; - state: Record; - }; - /** MultipleDefinitionError */ - MultipleDefinitionError: { - cells: string[]; - name: string; - /** @enum {unknown} */ - type: "multiple-defs"; - }; - /** - * OpenAiConfig - * @description Configuration options for OpenAI or OpenAI-compatible services. - * - * **Keys.** - * - * - `api_key`: the OpenAI API key - * - `base_url`: the base URL for the API - * - `project`: the project ID for the OpenAI API - * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios - * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client - * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server - * - `extra_headers`: extra headers to be passed to the OpenAI client - */ - OpenAiConfig: { - api_key?: string; - base_url?: string; - ca_bundle_path?: string; - client_pem?: string; - extra_headers?: { - [key: string]: string; - }; - model?: string; - project?: string; - ssl_verify?: boolean; - }; - /** OpenTutorialRequest */ - OpenTutorialRequest: { - tutorialId: ("dataflow" | "fileformat" | "for-jupyter-users" | "intro" | "layout" | "markdown" | "plots" | "sql" | "ui") | "markdown-format"; - }; - /** PackageDescription */ - PackageDescription: { - name: string; - version: string; - }; - /** - * PackageManagementConfig - * @description Configuration options for package management. - * - * **Keys.** - * - * - `manager`: the package manager to use - */ - PackageManagementConfig: { - /** @enum {unknown} */ - manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; - }; - /** PackageOperationResponse */ - PackageOperationResponse: { - /** @default null */ - error?: string | null; - success: boolean; - }; - /** - * PreviewDatasetColumnCommand - * @description Preview a dataset column. - * - * Retrieves and displays data from a single column (dataframe or SQL table). - * Used by the data explorer UI. - * - * Attributes: - * source_type: Data source type ('dataframe', 'sql', etc.). - * source: Source identifier (connection string or variable name). - * table_name: Table or dataframe variable name. - * column_name: Column to preview. - * fully_qualified_table_name: Full database.schema.table name for SQL. - */ - PreviewDatasetColumnCommand: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - /** @enum {unknown} */ - type: "preview-dataset-column"; - }; - /** PreviewDatasetColumnRequest */ - PreviewDatasetColumnRequest: { - columnName: string; - /** @default null */ - fullyQualifiedTableName?: string | null; - source: string; - /** @enum {unknown} */ - sourceType: "catalog" | "connection" | "duckdb" | "local"; - tableName: string; - }; - /** - * PreviewSQLTableCommand - * @description Preview SQL table details. - * - * Retrieves metadata and sample data for a table. Used by the SQL editor - * and data explorer. - * - * Attributes: - * request_id: Unique identifier for this request. - * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). - * database: Database containing the table. - * schema: Schema containing the table. - * table_name: Table to preview. - */ - PreviewSQLTableCommand: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - /** @enum {unknown} */ - type: "preview-sql-table"; - }; - /** PreviewSQLTableRequest */ - PreviewSQLTableRequest: { - database: string; - engine: string; - requestId: string; - schema: string; - tableName: string; - }; - /** - * PythonLanguageServerConfig - * @description Configuration options for Python Language Server. - * - * pylsp handles completion, hover, go-to-definition, and diagnostics. - */ - PythonLanguageServerConfig: { - enable_flake8?: boolean; - enable_mypy?: boolean; - enable_pydocstyle?: boolean; - enable_pyflakes?: boolean; - enable_pylint?: boolean; - enable_ruff?: boolean; - enabled?: boolean; - }; - /** QueryParamsAppendNotification */ - QueryParamsAppendNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-append"; - value: string; - }; - /** QueryParamsClearNotification */ - QueryParamsClearNotification: { - /** @enum {unknown} */ - op: "query-params-clear"; - }; - /** QueryParamsDeleteNotification */ - QueryParamsDeleteNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-delete"; - value: string | null; - }; - /** - * QueryParamsSetNotification - * @description Set query parameters. - */ - QueryParamsSetNotification: { - key: string; - /** @enum {unknown} */ - op: "query-params-set"; - value: string | string[]; - }; - /** ReadCodeResponse */ - ReadCodeResponse: { - contents: string; - }; - /** RecentFilesResponse */ - RecentFilesResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** ReconnectedNotification */ - ReconnectedNotification: { - /** @enum {unknown} */ - op: "reconnected"; - }; - /** - * RefreshSecretsCommand - * @description Refresh secrets from the secrets store. - * - * Reloads secrets from the provider without restarting the kernel. - */ - RefreshSecretsCommand: { - /** @enum {unknown} */ - type: "refresh-secrets"; - }; - /** RefreshSecretsRequest */ - RefreshSecretsRequest: Record; - /** ReloadNotification */ - ReloadNotification: { - /** @enum {unknown} */ - op: "reload"; - }; - /** RemovePackageRequest */ - RemovePackageRequest: { - /** @default false */ - dev?: boolean | null; - package: string; - }; - /** - * RemoveUIElementsNotification - * @description Invalidate UI elements for a given cell. - */ - RemoveUIElementsNotification: { - cell_id: string; - /** @enum {unknown} */ - op: "remove-ui-elements"; - }; - /** - * RenameNotebookCommand - * @description Rename or move the notebook file. - * - * Updates the notebook's filename in the kernel metadata. - * - * Attributes: - * filename: New filename or path for the notebook. - */ - RenameNotebookCommand: { - filename: string; - /** @enum {unknown} */ - type: "rename-notebook"; - }; - /** RenameNotebookRequest */ - RenameNotebookRequest: { - filename: string; - }; - /** RunningNotebooksResponse */ - RunningNotebooksResponse: { - files: components["schemas"]["MarimoFile"][]; - }; - /** - * RuntimeConfig - * @description Configuration for runtime. - * - * **Keys.** - * - * - `auto_instantiate`: if `False`, cells won't automatically - * run on startup. This only applies when editing a notebook, - * and not when running as an application. - * The default is `True`. - * - `auto_reload`: if `lazy`, cells importing modified modules will marked - * as stale; if `autorun`, affected cells will be automatically run. similar - * to IPython's %autoreload extension but with more code intelligence. - * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. - * execution. - * - `on_cell_change`: if `lazy`, cells will be marked stale when their - * ancestors run but won't autorun; if `autorun`, cells will automatically - * run when their ancestors run. - * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; - * if `strict` marimo will clone cell declarations by default, avoiding - * hidden potential state build up. - * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks - * affected cells as stale, `"autorun"` automatically runs affected cells. - * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger - * values may affect frontend performance - * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; - * larger values may affect frontend performance - * - `pythonpath`: a list of directories to add to the Python search path. - * Directories will be added to the head of sys.path. Similar to the - * `PYTHONPATH` environment variable, the directories will be included in - * where Python will look for imported modules. - * - `dotenv`: a list of paths to `.env` files to load. - * If the file does not exist, it will be silently ignored. - * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. - * - `default_sql_output`: the default output format for SQL queries. Can be one of: - * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. - * The default is `"auto"`. - * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: - * `html`, `markdown`, `ipynb`. - * The default is None. - */ - RuntimeConfig: { - auto_instantiate: boolean; - /** @enum {unknown} */ - auto_reload: "autorun" | "lazy" | "off"; - default_auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @enum {unknown} */ - default_sql_output: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - dotenv?: string[]; - /** @enum {unknown} */ - on_cell_change: "autorun" | "lazy"; - output_max_bytes: number; - pythonpath?: string[]; - reactive_tests: boolean; - std_stream_max_bytes: number; - /** @enum {unknown} */ - watcher_on_save: "autorun" | "lazy"; - }; - /** - * SQLMetadata - * @description Metadata for a SQL database. - */ - SQLMetadata: { - connection: string; - database: string; - schema: string; - /** @enum {unknown} */ - type: "sql-metadata"; - }; - /** - * SQLTableListPreviewNotification - * @description Preview of a list of tables in a schema. - */ - SQLTableListPreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-list-preview"; - request_id: string; - /** @default [] */ - tables?: components["schemas"]["DataTable"][]; - }; - /** - * SQLTablePreviewNotification - * @description Preview of a table in a SQL database. - */ - SQLTablePreviewNotification: { - /** @default null */ - error?: string | null; - metadata: components["schemas"]["SQLMetadata"]; - /** @enum {unknown} */ - op: "sql-table-preview"; - request_id: string; - table: null | components["schemas"]["DataTable"]; - }; - /** SaveAppConfigurationRequest */ - SaveAppConfigurationRequest: { - config: Record; - }; - /** - * SaveConfig - * @description Configuration for saving. - * - * **Keys.** - * - * - `autosave`: one of `"off"` or `"after_delay"` - * - `delay`: number of milliseconds to wait before autosaving - * - `format_on_save`: if `True`, format the code on save - */ - SaveConfig: { - /** @enum {unknown} */ - autosave: "after_delay" | "off"; - autosave_delay: number; - format_on_save: boolean; - }; - /** SaveNotebookRequest */ - SaveNotebookRequest: { - cellIds: string[]; - codes: string[]; - configs: components["schemas"]["CellConfig"][]; - filename: string; - /** @default null */ - layout?: Record | null; - names: string[]; - /** @default true */ - persist?: boolean; - }; - /** SaveUserConfigurationRequest */ - SaveUserConfigurationRequest: { - config: Record; - }; - /** Schema */ - Schema: { - name: string; - tables: components["schemas"]["DataTable"][]; - }; - /** SchemaColumn */ - SchemaColumn: { - name: string; - sampleValues: unknown[]; - type: string; - }; - /** SchemaTable */ - SchemaTable: { - columns: components["schemas"]["SchemaColumn"][]; - name: string; - }; - /** - * SecretKeysResultNotification - * @description Result of listing secret keys. - */ - SecretKeysResultNotification: { - /** @enum {unknown} */ - op: "secret-keys-result"; - request_id: string; - secrets: components["schemas"]["SecretKeysWithProvider"][]; - }; - /** SecretKeysWithProvider */ - SecretKeysWithProvider: { - keys: string[]; - name: string; - /** @enum {unknown} */ - provider: "dotenv" | "env"; - }; - /** - * ServerConfig - * @description Configuration for the server. - * - * **Keys.** - * - * - `browser`: the web browser to use. `"default"` or a browser registered - * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) - * - `follow_symlink`: if true, the server will follow symlinks it finds - * inside its static assets directory. - */ - ServerConfig: { - browser: "default" | string; - follow_symlink: boolean; - }; - /** SetupRootError */ - SetupRootError: { - edges_with_vars: [ - string, - string[], - string - ][]; - /** @enum {unknown} */ - type: "setup-refs"; - }; - /** - * SharingConfig - * @description Configuration for sharing features. - * - * **Keys.** - * - * - `html`: if `False`, HTML sharing options will be hidden from the UI - * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI - */ - SharingConfig: { - html?: boolean; - wasm?: boolean; - }; - /** ShutdownSessionRequest */ - ShutdownSessionRequest: { - sessionId: string; - }; - /** Snippet */ - Snippet: { - sections: components["schemas"]["SnippetSection"][]; - title: string; - }; - /** SnippetSection */ - SnippetSection: { - /** @default null */ - code?: string | null; - /** @default null */ - html?: string | null; - id: string; - }; - /** Snippets */ - Snippets: { - snippets: components["schemas"]["Snippet"][]; - }; - /** - * SnippetsConfig - * @description Configuration for snippets. - * - * **Keys.** - * - * - `custom_path`: the path to the custom snippets directory - */ - SnippetsConfig: { - custom_paths?: string[]; - include_default_snippets?: boolean; - }; - /** - * SqlCatalogCheckResult - * @description Result of running validation against the database. - */ - SqlCatalogCheckResult: { - error_message: string | null; - success: boolean; - }; - /** - * SqlParseError - * @description Represents a single SQL parse error. - * - * Attributes: - * message (str): Description of the error. - * line (int): Line number where the error occurred (1-based). - * column (int): Column number where the error occurred (1-based). - * severity (Literal["error", "warning"]): Severity of the error. - */ - SqlParseError: { - column: number; - line: number; - message: string; - /** @enum {unknown} */ - severity: "error" | "warning"; - }; - /** - * SqlParseResult - * @description Result of parsing an SQL query. - * - * Attributes: - * success (bool): True if parsing succeeded without errors. - * errors (list[SqlParseError]): List of parse errors (empty if success is True). - */ - SqlParseResult: { - errors: components["schemas"]["SqlParseError"][]; - success: boolean; - }; - /** StartupLogsNotification */ - StartupLogsNotification: { - content: string; - /** @enum {unknown} */ - op: "startup-logs"; - /** @enum {unknown} */ - status: "append" | "done" | "start"; - }; - /** StdinRequest */ - StdinRequest: { - text: string; - }; - /** - * StopKernelCommand - * @description Stop kernel execution. - * - * Signals the kernel to stop processing and shut down gracefully. - * Used when closing a notebook or terminating a session. - */ - StopKernelCommand: { - /** @enum {unknown} */ - type: "stop-kernel"; - }; - /** - * StoreConfig - * @description Configuration for cache stores. - */ - StoreConfig: { - args?: Record; - /** @enum {unknown} */ - type?: "file" | "redis" | "rest" | "tiered"; - }; - /** SuccessResponse */ - SuccessResponse: { - /** @default true */ - success?: boolean; - }; - /** - * SyncGraphCommand - * @description Synchronize the kernel graph with file manager state. - * - * Used when the notebook file changes externally (e.g., file reload or version control). - * Updates changed cells, deletes removed cells, and optionally executes modified cells. - * - * Attributes: - * cells: All cells known to file manager, mapping cell_id to code. - * run_ids: Cells to execute or update. - * delete_ids: Cells to delete from the graph. - * timestamp: Unix timestamp when command was created. - */ - SyncGraphCommand: { - cells: { - [key: string]: string; - }; - deleteIds: string[]; - runIds: string[]; - timestamp?: number; - /** @enum {unknown} */ - type: "sync-graph"; - }; - /** - * ToolDefinition - * @description Tool definition compatible with ai-sdk-ui format. - */ - ToolDefinition: { - description: string; - mode: ("agent" | "ask" | "manual")[]; - name: string; - parameters: Record; - /** @enum {unknown} */ - source: "backend" | "frontend" | "mcp"; - }; - /** - * TyLanguageServerConfig - * @description Configuration options for Ty Language Server. - * - * ty handles completion, hover, go-to-definition, and diagnostics, - * but we only use it for diagnostics. - */ - TyLanguageServerConfig: { - enabled?: boolean; - }; - /** - * UIElementMessageNotification - * @description Send a message to a UI element. - */ - UIElementMessageNotification: { - /** @default null */ - buffers?: string[] | null; - message: Record; - model_id: string | null; - /** @enum {unknown} */ - op: "send-ui-element-message"; - ui_element: string | null; - }; - /** UnknownError */ - UnknownError: { - /** @default null */ - error_type?: string | null; - msg: string; - /** @enum {unknown} */ - type: "unknown"; - }; - /** UpdateCellCodesNotification */ - UpdateCellCodesNotification: { - cell_ids: string[]; - code_is_stale: boolean; - codes: string[]; - /** @enum {unknown} */ - op: "update-cell-codes"; - }; - /** - * UpdateCellConfigCommand - * @description Update cell configuration. - * - * Updates cell-level settings like disabled state, hide code, etc. - * - * Attributes: - * configs: Cell IDs mapped to their config updates. Each config dict - * can contain partial updates. - */ - UpdateCellConfigCommand: { - configs: { - [key: string]: Record; - }; - /** @enum {unknown} */ - type: "update-cell-config"; - }; - /** UpdateCellConfigRequest */ - UpdateCellConfigRequest: { - configs: { - [key: string]: Record; - }; - }; - /** - * UpdateCellIdsNotification - * @description Update the cell ID ordering of the cells in the notebook. - * - * Right now we send the entire list of cell IDs, - * but in the future we might want to send change-deltas. - */ - UpdateCellIdsNotification: { - cell_ids: string[]; - /** @enum {unknown} */ - op: "update-cell-ids"; - }; - /** UpdateCellIdsRequest */ - UpdateCellIdsRequest: { - cellIds: string[]; - }; - /** - * UpdateUIElementCommand - * @description Update UI element values. - * - * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). - * Updates element values and re-executes dependent cells. - * - * Attributes: - * object_ids: UI elements to update. - * values: New values for the elements. Must match length of object_ids. - * request: HTTP request context if available. - * token: Unique request identifier for deduplication. - */ - UpdateUIElementCommand: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - /** @enum {unknown} */ - type: "update-ui-element"; - values: unknown[]; - }; - /** UpdateUIElementRequest */ - UpdateUIElementRequest: { - objectIds: string[]; - /** @default null */ - request?: components["schemas"]["HTTPRequest"] | null; - token?: string; - values: unknown[]; - }; - /** UpdateUIElementValuesRequest */ - UpdateUIElementValuesRequest: { - objectIds: string[]; - values: unknown[]; - }; - /** - * UpdateUserConfigCommand - * @description Update user configuration. - * - * Updates global marimo configuration (runtime settings, display options, editor preferences). - * - * Attributes: - * config: Complete user configuration. - */ - UpdateUserConfigCommand: { - config: components["schemas"]["MarimoConfig"]; - /** @enum {unknown} */ - type: "update-user-config"; - }; - /** UpdateUserConfigRequest */ - UpdateUserConfigRequest: { - config: components["schemas"]["MarimoConfig"]; - }; - /** - * UpdateWidgetModelCommand - * @description Update anywidget model state. - * - * Updates widget model state for bidirectional Python-JavaScript communication. - * - * Attributes: - * model_id: Widget model identifier. - * message: Model message with state updates and buffer paths. - * buffers: Base64-encoded binary buffers referenced by buffer_paths. - */ - UpdateWidgetModelCommand: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - /** @enum {unknown} */ - type: "update-widget-model"; - }; - /** UpdateWidgetModelRequest */ - UpdateWidgetModelRequest: { - /** @default null */ - buffers?: string[] | null; - message: components["schemas"]["ModelMessage"]; - modelId: string; - }; - /** - * ValidateSQLCommand - * @description Validate an SQL query. - * - * Checks if an SQL query is valid by parsing against a dialect (no DB connection) - * or validating against an actual database. - * - * Attributes: - * request_id: Unique identifier for this request. - * query: SQL query to validate. - * only_parse: If True, only parse using dialect. If False, validate against DB. - * engine: SQL engine (required if only_parse is False). - * dialect: SQL dialect for parsing (required if only_parse is True). - */ - ValidateSQLCommand: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - /** @enum {unknown} */ - type: "validate-sql"; - }; - /** ValidateSQLRequest */ - ValidateSQLRequest: { - /** @default null */ - dialect?: string | null; - /** @default null */ - engine?: string | null; - onlyParse: boolean; - query: string; - requestId: string; - }; - /** ValidateSQLResultNotification */ - ValidateSQLResultNotification: { - /** @default null */ - error?: string | null; - /** @enum {unknown} */ - op: "validate-sql-result"; - /** @default null */ - parse_result?: null | components["schemas"]["SqlParseResult"]; - request_id: string; - /** @default null */ - validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; - }; - /** VariableContext */ - VariableContext: { - name: string; - previewValue: unknown; - valueType: string; - }; - /** VariableDeclarationNotification */ - VariableDeclarationNotification: { - declared_by: string[]; - name: string; - used_by: string[]; - }; - /** VariableValue */ - VariableValue: { - datatype: string | null; - name: string; - value: string | null; - }; - /** - * VariableValuesNotification - * @description List of variables and their types/values. - */ - VariableValuesNotification: { - /** @enum {unknown} */ - op: "variable-values"; - variables: components["schemas"]["VariableValue"][]; - }; - /** - * VariablesNotification - * @description List of variable declarations. - */ - VariablesNotification: { - /** @enum {unknown} */ - op: "variables"; - variables: components["schemas"]["VariableDeclarationNotification"][]; - }; - /** WorkspaceFilesRequest */ - WorkspaceFilesRequest: { - /** @default false */ - includeMarkdown?: boolean; - }; - /** WorkspaceFilesResponse */ - WorkspaceFilesResponse: { - /** @default 0 */ - fileCount?: number; - files: components["schemas"]["FileInfo"][]; - /** @default false */ - hasMore?: boolean; - root: string; - }; - /** - * _AppConfig - * @description Program-specific configuration. - * - * Configuration for frontends or runtimes that is specific to - * a single marimo program. - */ - _AppConfig: { - /** @default null */ - app_title?: string | null; - auto_download?: ("html" | "ipynb" | "markdown")[]; - /** @default null */ - css_file?: string | null; - /** @default null */ - html_head_file?: string | null; - /** @default null */ - layout_file?: string | null; - /** - * @default auto - * @enum {unknown} - */ - sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; - /** - * @default compact - * @enum {unknown} - */ - width?: "columns" | "compact" | "full" | "medium" | "normal"; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AddPackageRequest + * @description This can be a remove package or a local package. + * + * Supported formats: + * + * httpx + * httpx==0.27.0 + * httpx>=0.27.0 + * git+https://github.com/encode/httpx + * https://files.pythonhosted.org/packages/5c/2d/3da5bdf4408b8b2800061c339f240c1802f2e82d55e50bd39c5a881f47f0/httpx-0.27.0.tar.gz + * /example/foo-0.1.0-py3-none-any.whl + */ + AddPackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + /** @default false */ + upgrade?: boolean | null; + }; + /** AiCompletionContext */ + AiCompletionContext: { + /** @default */ + plainText?: string; + /** @default [] */ + schema?: components["schemas"]["SchemaTable"][]; + /** @default [] */ + variables?: (string | components["schemas"]["VariableContext"])[]; + }; + /** AiCompletionRequest */ + AiCompletionRequest: { + code: string; + /** @default null */ + context?: null | components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + /** @default [] */ + messages?: components["schemas"]["ChatMessage"][]; + prompt: string; + /** @default null */ + selectedText?: string | null; + }; + /** + * AiConfig + * @description Configuration options for AI. + * + * **Keys.** + * + * - `rules`: custom rules to include in all AI completion prompts + * - `max_tokens`: the maximum number of tokens to use in AI completions + * - `mode`: the mode to use for AI completions. Can be one of: `"ask"` or `"manual"` + * - `inline_tooltip`: if `True`, enable inline AI tooltip suggestions + * - `models`: the models to use for AI completions + * - `open_ai`: the OpenAI config + * - `anthropic`: the Anthropic config + * - `google`: the Google AI config + * - `bedrock`: the Bedrock config + * - `azure`: the Azure config + * - `ollama`: the Ollama config + * - `github`: the GitHub config + * - `openrouter`: the OpenRouter config + * - `wandb`: the Weights & Biases config + * - `open_ai_compatible`: the OpenAI-compatible config + */ + AiConfig: { + anthropic?: components["schemas"]["AnthropicConfig"]; + azure?: components["schemas"]["OpenAiConfig"]; + bedrock?: components["schemas"]["BedrockConfig"]; + github?: components["schemas"]["GitHubConfig"]; + google?: components["schemas"]["GoogleAiConfig"]; + inline_tooltip?: boolean; + max_tokens?: number; + /** @enum {unknown} */ + mode?: "agent" | "ask" | "manual"; + models?: components["schemas"]["AiModelConfig"]; + ollama?: components["schemas"]["OpenAiConfig"]; + open_ai?: components["schemas"]["OpenAiConfig"]; + open_ai_compatible?: components["schemas"]["OpenAiConfig"]; + openrouter?: components["schemas"]["OpenAiConfig"]; + rules?: string; + wandb?: components["schemas"]["OpenAiConfig"]; + }; + /** AiInlineCompletionRequest */ + AiInlineCompletionRequest: { + /** + * @default python + * @enum {unknown} + */ + language?: "markdown" | "python" | "sql"; + prefix: string; + suffix: string; + }; + /** + * AiModelConfig + * @description Configuration options for an AI model. + * + * **Keys.** + * + * - `chat_model`: the model to use for chat completions + * - `edit_model`: the model to use for edit completions + * - `autocomplete_model`: the model to use for code completion/autocomplete + * - `displayed_models`: a list of models to display in the UI + * - `custom_models`: a list of custom models to use that are not from the default list + */ + AiModelConfig: { + autocomplete_model?: string; + chat_model?: string; + custom_models: string[]; + displayed_models: string[]; + edit_model?: string; + }; + /** AlertNotification */ + AlertNotification: { + description: string; + /** @enum {unknown} */ + op: "alert"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** + * AnthropicConfig + * @description Configuration options for Anthropic. + * + * **Keys.** + * + * - `api_key`: the Anthropic API key + */ + AnthropicConfig: { + api_key?: string; + }; + /** BannerNotification */ + BannerNotification: { + /** @default null */ + action?: "restart" | null; + description: string; + /** @enum {unknown} */ + op: "banner"; + title: string; + /** @default null */ + variant?: "danger" | null; + }; + /** BaseResponse */ + BaseResponse: { + success: boolean; + }; + /** + * BasedpyrightServerConfig + * @description Configuration options for basedpyright Language Server. + * + * basedpyright handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + BasedpyrightServerConfig: { + enabled?: boolean; + }; + /** + * BedrockConfig + * @description Configuration options for Bedrock. + * + * **Keys.** + * + * - `profile_name`: the AWS profile to use + * - `region_name`: the AWS region to use + * - `aws_access_key_id`: the AWS access key ID + * - `aws_secret_access_key`: the AWS secret access key + */ + BedrockConfig: { + aws_access_key_id?: string; + aws_secret_access_key?: string; + profile_name?: string; + region_name?: string; + }; + /** + * CacheClearedNotification + * @description Result of clearing cache. + */ + CacheClearedNotification: { + bytes_freed: number; + /** @enum {unknown} */ + op: "cache-cleared"; + }; + /** + * CacheInfoNotification + * @description Cache statistics information. + */ + CacheInfoNotification: { + disk_to_free: number; + disk_total: number; + hits: number; + misses: number; + /** @enum {unknown} */ + op: "cache-info"; + time: number; + }; + /** + * CellChannel + * @description The channel of a cell's output. + * @enum {unknown} + */ + CellChannel: + | "marimo-error" + | "media" + | "output" + | "pdb" + | "stderr" + | "stdin" + | "stdout"; + /** + * CellConfig + * @description Internal representation of a cell's configuration. + * This is not part of the public API. + */ + CellConfig: { + /** @default null */ + column?: number | null; + /** @default false */ + disabled?: boolean; + /** @default false */ + hide_code?: boolean; + }; + /** + * CellNotification + * @description Op to transition a cell. + * + * A CellNotification's data has some optional fields: + * + * output - a CellOutput + * console - a CellOutput (console msg to append), or a list of + * CellOutputs + * status - execution status + * stale_inputs - whether the cell has stale inputs (variables, modules, ...) + * run_id - the run associated with this cell. + * serialization - the serialization status of the cell + * + * Omitting a field means that its value should be unchanged! + * + * And one required field: + * + * cell_id - the cell id + */ + CellNotification: { + cell_id: string; + /** @default null */ + console?: + | components["schemas"]["CellOutput"][] + | null + | components["schemas"]["CellOutput"]; + /** @enum {unknown} */ + op: "cell-op"; + /** @default null */ + output?: null | components["schemas"]["CellOutput"]; + /** @default null */ + run_id?: string | null; + /** @default null */ + serialization?: string | null; + /** @default null */ + stale_inputs?: boolean | null; + /** @default null */ + status?: ("disabled-transitively" | "idle" | "queued" | "running") | null; + timestamp?: number; + }; + /** CellOutput */ + CellOutput: { + channel: components["schemas"]["CellChannel"]; + data: + | string + | ( + | components["schemas"]["SetupRootError"] + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["ImportStarError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["MarimoInternalError"] + | components["schemas"]["MarimoSQLError"] + | components["schemas"]["UnknownError"] + )[] + | Record; + /** @enum {unknown} */ + mimetype: + | "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.vegalite.v5+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/plain" + | "video/mp4" + | "video/mpeg"; + timestamp?: number; + }; + /** ChatAttachment */ + ChatAttachment: { + /** @default null */ + content_type?: string | null; + /** @default attachment */ + name?: string; + url: string; + }; + /** + * ChatMessage + * @description A message in a chat. + */ + ChatMessage: { + /** @default null */ + attachments?: components["schemas"]["ChatAttachment"][] | null; + content: unknown; + /** @default null */ + parts?: Record[] | null; + /** @enum {unknown} */ + role: "assistant" | "system" | "user"; + }; + /** ChatRequest */ + ChatRequest: { + context: components["schemas"]["AiCompletionContext"]; + includeOtherCode: string; + messages: components["schemas"]["ChatMessage"][]; + /** @default null */ + model?: string | null; + /** @default null */ + tools?: components["schemas"]["ToolDefinition"][] | null; + /** @default null */ + variables?: (string | components["schemas"]["VariableContext"])[] | null; + }; + /** + * ClearCacheCommand + * @description Clear all cached data. + * + * Clears all cache contexts, freeing memory and disk space. + * Affects all cells using the @cache decorator. + */ + ClearCacheCommand: { + /** @enum {unknown} */ + type: "clear-cache"; + }; + /** ClearCacheRequest */ + ClearCacheRequest: Record; + /** + * CodeCompletionCommand + * @description Request code completion suggestions. + * + * Sent when the user requests autocomplete. Provides code context up to + * the cursor position for the language server. + * + * Attributes: + * id: Unique identifier for this request. + * document: Source code up to the cursor position. + * cell_id: Cell where completion is requested. + */ + CodeCompletionCommand: { + cellId: string; + document: string; + id: string; + /** @enum {unknown} */ + type: "code-completion"; + }; + /** CodeCompletionRequest */ + CodeCompletionRequest: { + cellId: string; + document: string; + id: string; + }; + /** + * ColumnStats + * @description Represents stats for a column in a data table. + */ + ColumnStats: { + /** @default null */ + false?: number | null; + /** @default null */ + max?: unknown | null; + /** @default null */ + mean?: unknown | null; + /** @default null */ + median?: unknown | null; + /** @default null */ + min?: unknown | null; + /** @default null */ + nulls?: number | null; + /** @default null */ + p25?: unknown | null; + /** @default null */ + p5?: unknown | null; + /** @default null */ + p75?: unknown | null; + /** @default null */ + p95?: unknown | null; + /** @default null */ + std?: unknown | null; + /** @default null */ + total?: number | null; + /** @default null */ + true?: number | null; + /** @default null */ + unique?: number | null; + }; + /** + * CompletedRunNotification + * @description Written on run completion (of submitted cells and their descendants. + */ + CompletedRunNotification: { + /** @enum {unknown} */ + op: "completed-run"; + }; + /** + * CompletionConfig + * @description Configuration for code completion. + * + * A dict with key/value pairs configuring code completion in the marimo + * editor. + * + * **Keys.** + * + * - `activate_on_typing`: if `False`, completion won't activate + * until the completion hotkey is entered + * - `signature_hint_on_typing`: if `False`, signature hint won't be shown when typing + * - `copilot`: one of `"github"`, `"codeium"`, or `"custom"` + * - `codeium_api_key`: the Codeium API key + */ + CompletionConfig: { + activate_on_typing: boolean; + api_key?: string | null; + base_url?: string | null; + codeium_api_key?: string | null; + copilot: boolean | ("codeium" | "custom" | "github"); + model?: string | null; + signature_hint_on_typing: boolean; + }; + /** CompletionOption */ + CompletionOption: { + completion_info: string | null; + name: string; + type: string; + }; + /** + * CompletionResultNotification + * @description Code completion result. + */ + CompletionResultNotification: { + completion_id: string; + /** @enum {unknown} */ + op: "completion-result"; + options: components["schemas"]["CompletionOption"][]; + prefix_length: number; + }; + /** CopyNotebookRequest */ + CopyNotebookRequest: { + destination: string; + source: string; + }; + /** + * CreateNotebookCommand + * @description Instantiate and initialize a notebook. + * + * Sent when a notebook is first loaded. Contains all cells and initial UI element values. + * + * Attributes: + * execution_requests: ExecuteCellCommand for each notebook cell. + * set_ui_element_value_request: Initial UI element values. + * auto_run: Whether to automatically execute cells on instantiation. + * request: HTTP request context if available. + */ + CreateNotebookCommand: { + autoRun: boolean; + executionRequests: components["schemas"]["ExecuteCellCommand"][]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + setUiElementValueRequest: components["schemas"]["UpdateUIElementCommand"]; + /** @enum {unknown} */ + type: "create-notebook"; + }; + /** CreateSecretRequest */ + CreateSecretRequest: { + key: string; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + value: string; + }; + /** CycleError */ + CycleError: { + edges_with_vars: [string, string[], string][]; + /** @enum {unknown} */ + type: "cycle"; + }; + /** + * DataColumnPreviewNotification + * @description Preview of a column in a dataset. + */ + DataColumnPreviewNotification: { + /** @default null */ + chart_code?: string | null; + /** @default null */ + chart_spec?: string | null; + column_name: string; + /** @default null */ + error?: string | null; + /** @default null */ + missing_packages?: string[] | null; + /** @enum {unknown} */ + op: "data-column-preview"; + /** @default null */ + stats?: null | components["schemas"]["ColumnStats"]; + table_name: string; + }; + /** + * DataSourceConnection + * @description Represents a data source connection. + * + * Attributes: + * source (str): The source of the data source connection. E.g 'postgres'. + * dialect (str): The dialect of the data source connection. E.g 'postgresql'. + * name (str): The name of the data source connection. E.g 'engine'. + * display_name (str): The display name of the data source connection. E.g 'PostgresQL (engine)'. + * databases (List[Database]): The databases in the data source connection. + * default_database (Optional[str]): The default database in the data source connection. + * default_schema (Optional[str]): The default schema in the data source connection. + */ + DataSourceConnection: { + databases: components["schemas"]["Database"][]; + /** @default null */ + default_database?: string | null; + /** @default null */ + default_schema?: string | null; + dialect: string; + display_name: string; + name: string; + source: string; + }; + /** DataSourceConnectionsNotification */ + DataSourceConnectionsNotification: { + connections: components["schemas"]["DataSourceConnection"][]; + /** @enum {unknown} */ + op: "data-source-connections"; + }; + /** + * DataTable + * @description Represents a data table. + * + * Attributes: + * source_type (DataTableSource): Type of data source ('local', 'duckdb', 'connection'). + * source (str): Can be dialect, or source db name. + * name (str): Name of the data table. + * num_rows (Optional[int]): Total number of rows in the table, if known. + * num_columns (Optional[int]): Total number of columns in the table, if known. + * variable_name (Optional[VariableName]): Variable name referencing this table in code. + * columns (List[DataTableColumn]): List of column definitions and metadata. + * engine (Optional[VariableName]): Database engine or connection handler, if any. + * type (DataTableType): Table type, either 'table' or 'view'. Defaults to 'table'. + * primary_keys (Optional[List[str]]): Column names used as primary keys, if any. + * indexes (Optional[List[str]]): Column names used as indexes, if any. + */ + DataTable: { + columns: components["schemas"]["DataTableColumn"][]; + /** @default null */ + engine?: string | null; + /** @default null */ + indexes?: string[] | null; + name: string; + num_columns: number | null; + num_rows: number | null; + /** @default null */ + primary_keys?: string[] | null; + source: string; + /** @enum {unknown} */ + source_type: "catalog" | "connection" | "duckdb" | "local"; + /** + * @default table + * @enum {unknown} + */ + type?: "table" | "view"; + variable_name: string | null; + }; + /** + * DataTableColumn + * @description Represents a column in a data table. + * + * Attributes: + * name (str): The name of the column. + * type (DataType): The data type of the column. + * external_type (ExternalDataType): The raw data type of the column. + * sample_values (List[Any]): The sample values of the column. + */ + DataTableColumn: { + external_type: string; + name: string; + sample_values: unknown[]; + /** @enum {unknown} */ + type: + | "boolean" + | "date" + | "datetime" + | "integer" + | "number" + | "string" + | "time" + | "unknown"; + }; + /** + * Database + * @description Represents a collection of schemas. + * + * Attributes: + * name (str): The name of the database + * dialect (str): The dialect of the database + * schemas (List[Schema]): List of schemas in the database + * engine (Optional[VariableName]): Database engine or connection handler, if any. + */ + Database: { + dialect: string; + /** @default null */ + engine?: string | null; + name: string; + schemas: components["schemas"]["Schema"][]; + }; + /** + * DatasetsNotification + * @description List of datasets. + */ + DatasetsNotification: { + /** @default null */ + clear_channel?: ("catalog" | "connection" | "duckdb" | "local") | null; + /** @enum {unknown} */ + op: "datasets"; + tables: components["schemas"]["DataTable"][]; + }; + /** + * DatasourcesConfig + * @description Configuration for datasources panel. + * + * **Keys.** + * + * - `auto_discover_schemas`: if `True`, include schemas in the datasource + * - `auto_discover_tables`: if `True`, include tables in the datasource + * - `auto_discover_columns`: if `True`, include columns & table metadata in the datasource + */ + DatasourcesConfig: { + auto_discover_columns?: boolean | "auto"; + auto_discover_schemas?: boolean | "auto"; + auto_discover_tables?: boolean | "auto"; + }; + /** + * DebugCellCommand + * @description Enter debugger mode for a cell. + * + * Starts the Python debugger (pdb) for the specified cell. + * + * Attributes: + * cell_id: Cell to debug. + * request: HTTP request context if available. + */ + DebugCellCommand: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "debug-cell"; + }; + /** DebugCellRequest */ + DebugCellRequest: { + cellId: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * DeleteCellCommand + * @description Delete a cell from the notebook. + * + * Removes cell from the dependency graph and cleans up its variables. + * Dependent cells may become stale. + * + * Attributes: + * cell_id: Cell to delete. + */ + DeleteCellCommand: { + cellId: string; + /** @enum {unknown} */ + type: "delete-cell"; + }; + /** DeleteCellRequest */ + DeleteCellRequest: { + cellId: string; + }; + /** DeleteSecretRequest */ + DeleteSecretRequest: { + key: string; + }; + /** DependencyTreeNode */ + DependencyTreeNode: { + dependencies: components["schemas"]["DependencyTreeNode"][]; + name: string; + tags: { + [key: string]: string; + }[]; + version: string | null; + }; + /** DependencyTreeResponse */ + DependencyTreeResponse: { + tree: null | components["schemas"]["DependencyTreeNode"]; + }; + /** + * DiagnosticsConfig + * @description Configuration options for diagnostics. + * + * **Keys.** + * + * - `enabled`: if `True`, diagnostics will be shown in the editor + * - `sql_linter`: if `True`, SQL cells will have linting enabled + */ + DiagnosticsConfig: { + enabled?: boolean; + sql_linter?: boolean; + }; + /** + * DisplayConfig + * @description Configuration for display. + * + * **Keys.** + * + * - `theme`: `"light"`, `"dark"`, or `"system"` + * - `code_editor_font_size`: font size for the code editor + * - `cell_output`: `"above"` or `"below"` + * - `dataframes`: `"rich"` or `"plain"` + * - `custom_css`: list of paths to custom CSS files + * - `default_table_page_size`: default number of rows to display in tables + * - `default_table_max_columns`: default maximum number of columns to display in tables + * - `reference_highlighting`: if `True`, highlight reactive variable references + * - `locale`: locale for date formatting and internationalization (e.g., "en-US", "en-GB", "de-DE") + */ + DisplayConfig: { + /** @enum {unknown} */ + cell_output: "above" | "below"; + code_editor_font_size: number; + custom_css?: string[]; + /** @enum {unknown} */ + dataframes: "plain" | "rich"; + default_table_max_columns: number; + default_table_page_size: number; + /** @enum {unknown} */ + default_width: "columns" | "compact" | "full" | "medium" | "normal"; + locale?: string | null; + reference_highlighting?: boolean; + /** @enum {unknown} */ + theme: "dark" | "light" | "system"; + }; + /** + * ExecuteCellCommand + * @description Execute a single cell. + * + * Executes a cell with the provided code. Dependent cells may be + * re-executed based on the reactive execution mode. + * + * Attributes: + * cell_id: Cell to execute. + * code: Python code to execute. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellCommand: { + cellId: string; + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cell"; + }; + /** + * ExecuteCellsCommand + * @description Execute multiple cells in a batch. + * + * Executes multiple cells with their corresponding code. The kernel manages + * dependency tracking and reactive execution. + * + * Attributes: + * cell_ids: Cells to execute. + * codes: Python code for each cell. Must match length of cell_ids. + * request: HTTP request context if available. + * timestamp: Unix timestamp when command was created. + */ + ExecuteCellsCommand: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + timestamp?: number; + /** @enum {unknown} */ + type: "execute-cells"; + }; + /** ExecuteCellsRequest */ + ExecuteCellsRequest: { + cellIds: string[]; + codes: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteScratchpadCommand + * @description Execute code in the scratchpad. + * + * The scratchpad is a temporary execution environment that doesn't affect + * the notebook's cells or dependencies. Runs in an isolated cell with a copy + * of the global namespace, useful for experimentation. + * + * Attributes: + * code: Python code to execute. + * request: HTTP request context if available. + */ + ExecuteScratchpadCommand: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-scratchpad"; + }; + /** ExecuteScratchpadRequest */ + ExecuteScratchpadRequest: { + code: string; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + }; + /** + * ExecuteStaleCellsCommand + * @description Execute all stale cells. + * + * Cells become stale when their dependencies change but haven't been + * re-executed yet. Brings the notebook to a consistent state. + * + * Attributes: + * request: HTTP request context if available. + */ + ExecuteStaleCellsCommand: { + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + /** @enum {unknown} */ + type: "execute-stale-cells"; + }; + /** ExportAsHTMLRequest */ + ExportAsHTMLRequest: { + /** @default null */ + assetUrl?: string | null; + download: boolean; + files: string[]; + includeCode: boolean; + }; + /** ExportAsIPYNBRequest */ + ExportAsIPYNBRequest: { + download: boolean; + }; + /** ExportAsMarkdownRequest */ + ExportAsMarkdownRequest: { + download: boolean; + }; + /** ExportAsScriptRequest */ + ExportAsScriptRequest: { + download: boolean; + }; + /** FileCreateRequest */ + FileCreateRequest: { + /** @default null */ + contents?: string | null; + name: string; + path: string; + /** @enum {unknown} */ + type: "directory" | "file"; + }; + /** FileCreateResponse */ + FileCreateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDeleteRequest */ + FileDeleteRequest: { + path: string; + }; + /** FileDeleteResponse */ + FileDeleteResponse: { + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileDetailsRequest */ + FileDetailsRequest: { + path: string; + }; + /** FileDetailsResponse */ + FileDetailsResponse: { + /** @default null */ + contents?: string | null; + file: components["schemas"]["FileInfo"]; + /** @default null */ + mimeType?: string | null; + }; + /** FileInfo */ + FileInfo: { + /** @default [] */ + children?: components["schemas"]["FileInfo"][]; + id: string; + isDirectory: boolean; + isMarimoFile: boolean; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + }; + /** FileListRequest */ + FileListRequest: { + /** @default null */ + path?: string | null; + }; + /** FileListResponse */ + FileListResponse: { + files: components["schemas"]["FileInfo"][]; + root: string; + }; + /** FileMoveRequest */ + FileMoveRequest: { + newPath: string; + path: string; + }; + /** FileMoveResponse */ + FileMoveResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FileOpenRequest */ + FileOpenRequest: { + /** @default null */ + lineNumber?: number | null; + path: string; + }; + /** FileSearchRequest */ + FileSearchRequest: { + /** @default 3 */ + depth?: number; + /** @default true */ + includeDirectories?: boolean; + /** @default true */ + includeFiles?: boolean; + /** @default 100 */ + limit?: number; + /** @default null */ + path?: string | null; + query: string; + }; + /** FileSearchResponse */ + FileSearchResponse: { + files: components["schemas"]["FileInfo"][]; + query: string; + totalFound: number; + }; + /** FileUpdateRequest */ + FileUpdateRequest: { + contents: string; + path: string; + }; + /** FileUpdateResponse */ + FileUpdateResponse: { + /** @default null */ + info?: null | components["schemas"]["FileInfo"]; + /** @default null */ + message?: string | null; + success: boolean; + }; + /** FocusCellNotification */ + FocusCellNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "focus-cell"; + }; + /** FormatCellsRequest */ + FormatCellsRequest: { + codes: { + [key: string]: string; + }; + lineLength: number; + }; + /** FormatResponse */ + FormatResponse: { + codes: { + [key: string]: string; + }; + }; + /** + * FormattingConfig + * @description Configuration for code formatting. + * + * **Keys.** + * + * - `line_length`: max line length + */ + FormattingConfig: { + line_length: number; + }; + /** + * FunctionCallResultNotification + * @description Result of calling a function. + */ + FunctionCallResultNotification: { + function_call_id: string; + /** @enum {unknown} */ + op: "function-call-result"; + return_value: unknown; + status: components["schemas"]["HumanReadableStatus"]; + }; + /** + * GetCacheInfoCommand + * @description Retrieve cache statistics. + * + * Collects cache usage info across all contexts (hit/miss rates, time saved, disk usage). + */ + GetCacheInfoCommand: { + /** @enum {unknown} */ + type: "get-cache-info"; + }; + /** GetCacheInfoRequest */ + GetCacheInfoRequest: Record; + /** + * GitHubConfig + * @description Configuration options for GitHub. + * + * **Keys.** + * + * - `api_key`: the GitHub API token + * - `base_url`: the base URL for the API + * - `copilot_settings`: configuration settings for GitHub Copilot LSP. + * Supports settings like `http` (proxy configuration), `telemetry`, + * and `github-enterprise` (enterprise URI). + */ + GitHubConfig: { + api_key?: string; + base_url?: string; + copilot_settings?: Record; + }; + /** + * GoogleAiConfig + * @description Configuration options for Google AI. + * + * **Keys.** + * + * - `api_key`: the Google AI API key + */ + GoogleAiConfig: { + api_key?: string; + }; + /** + * HTTPRequest + * @description Serializable HTTP request representation. + * + * Mimics Starlette/FastAPI Request but is pickle-able and contains only a safe + * subset of data. Excludes session and auth to prevent exposing sensitive data. + * + * Attributes: + * url: Serialized URL with path, port, scheme, netloc, query, hostname. + * base_url: Serialized base URL. + * headers: Request headers (marimo-specific headers excluded). + * query_params: Query parameters mapped to lists of values. + * path_params: Path parameters from the URL route. + * cookies: Request cookies. + * meta: User-defined storage for custom data. + * user: User info from authentication middleware (e.g., is_authenticated, username). + */ + HTTPRequest: { + base_url: Record; + cookies: { + [key: string]: string; + }; + headers: { + [key: string]: string; + }; + meta: Record; + path_params: Record; + query_params: { + [key: string]: string[]; + }; + url: Record; + user: unknown; + }; + /** + * HumanReadableStatus + * @description Human-readable status. + */ + HumanReadableStatus: { + /** @enum {unknown} */ + code: "error" | "ok"; + /** @default null */ + message?: string | null; + /** @default null */ + title?: string | null; + }; + /** ImportStarError */ + ImportStarError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "import-star"; + }; + /** + * InstallPackagesCommand + * @description Install Python packages. + * + * Installs missing packages using the specified package manager. Triggered + * automatically on import errors or manually by the user. + * + * Attributes: + * manager: Package manager to use ('pip', 'conda', 'uv', etc.). + * versions: Package names mapped to version specifiers. Empty version + * means install latest. + */ + InstallPackagesCommand: { + manager: string; + /** @enum {unknown} */ + type: "install-packages"; + versions: { + [key: string]: string; + }; + }; + /** InstallPackagesRequest */ + InstallPackagesRequest: { + manager: string; + versions: { + [key: string]: string; + }; + }; + /** InstallingPackageAlertNotification */ + InstallingPackageAlertNotification: { + /** @default null */ + log_status?: ("append" | "done" | "start") | null; + /** @default null */ + logs?: { + [key: string]: string; + } | null; + /** @enum {unknown} */ + op: "installing-package-alert"; + packages: { + [key: string]: "failed" | "installed" | "installing" | "queued"; + }; + }; + /** InstantiateNotebookRequest */ + InstantiateNotebookRequest: { + /** @default true */ + autoRun?: boolean; + objectIds: string[]; + values: unknown[]; + }; + /** + * InterruptedNotification + * @description Written when the kernel is interrupted by the user. + */ + InterruptedNotification: { + /** @enum {unknown} */ + op: "interrupted"; + }; + /** InvokeAiToolRequest */ + InvokeAiToolRequest: { + arguments: Record; + toolName: string; + }; + /** InvokeAiToolResponse */ + InvokeAiToolResponse: { + /** @default null */ + error?: string | null; + result: unknown; + success: boolean; + toolName: string; + }; + /** + * InvokeFunctionCommand + * @description Invoke a function from a UI element. + * + * Called when a UI element needs to invoke a Python function. + * + * Attributes: + * function_call_id: Unique identifier for this call. + * namespace: Namespace where the function is registered. + * function_name: Function to invoke. + * args: Keyword arguments for the function. + */ + InvokeFunctionCommand: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + /** @enum {unknown} */ + type: "invoke-function"; + }; + /** InvokeFunctionRequest */ + InvokeFunctionRequest: { + args: Record; + functionCallId: string; + functionName: string; + namespace: string; + }; + /** KernelCapabilitiesNotification */ + KernelCapabilitiesNotification: { + /** @default false */ + basedpyright?: boolean; + /** @default false */ + pylsp?: boolean; + /** @default false */ + terminal?: boolean; + /** @default false */ + ty?: boolean; + }; + /** + * KernelReadyNotification + * @description Kernel is ready for execution. + */ + KernelReadyNotification: { + app_config: components["schemas"]["_AppConfig"]; + capabilities: components["schemas"]["KernelCapabilitiesNotification"]; + cell_ids: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + kiosk: boolean; + last_executed_code: { + [key: string]: string; + } | null; + last_execution_time: { + [key: string]: number; + } | null; + layout: components["schemas"]["LayoutConfig"] | null; + names: string[]; + /** @enum {unknown} */ + op: "kernel-ready"; + resumed: boolean; + ui_values: Record | null; + }; + /** + * KeymapConfig + * @description Configuration for keymaps. + * + * **Keys.** + * + * - `preset`: one of `"default"` or `"vim"` + * - `overrides`: a dict of keymap actions to their keymap override + * - `vimrc`: path to a vimrc file to load keymaps from + * - `destructive_delete`: if `True`, allows deleting cells with content. + */ + KeymapConfig: { + destructive_delete?: boolean; + overrides?: { + [key: string]: string; + }; + /** @enum {unknown} */ + preset: "default" | "vim"; + vimrc?: string | null; + }; + /** KnownUnions */ + KnownUnions: { + command: + | components["schemas"]["CreateNotebookCommand"] + | components["schemas"]["RenameNotebookCommand"] + | components["schemas"]["CodeCompletionCommand"] + | components["schemas"]["ExecuteCellsCommand"] + | components["schemas"]["ExecuteScratchpadCommand"] + | components["schemas"]["ExecuteStaleCellsCommand"] + | components["schemas"]["DebugCellCommand"] + | components["schemas"]["DeleteCellCommand"] + | components["schemas"]["SyncGraphCommand"] + | components["schemas"]["UpdateCellConfigCommand"] + | components["schemas"]["InstallPackagesCommand"] + | components["schemas"]["UpdateUIElementCommand"] + | components["schemas"]["UpdateWidgetModelCommand"] + | components["schemas"]["InvokeFunctionCommand"] + | components["schemas"]["UpdateUserConfigCommand"] + | components["schemas"]["PreviewDatasetColumnCommand"] + | components["schemas"]["PreviewSQLTableCommand"] + | components["schemas"]["ListSQLTablesCommand"] + | components["schemas"]["ValidateSQLCommand"] + | components["schemas"]["ListDataSourceConnectionCommand"] + | components["schemas"]["ListSecretKeysCommand"] + | components["schemas"]["RefreshSecretsCommand"] + | components["schemas"]["ClearCacheCommand"] + | components["schemas"]["GetCacheInfoCommand"] + | components["schemas"]["StopKernelCommand"]; + /** @enum {unknown} */ + data_type: + | "boolean" + | "date" + | "datetime" + | "integer" + | "number" + | "string" + | "time" + | "unknown"; + error: + | components["schemas"]["SetupRootError"] + | components["schemas"]["CycleError"] + | components["schemas"]["MultipleDefinitionError"] + | components["schemas"]["ImportStarError"] + | components["schemas"]["MarimoAncestorStoppedError"] + | components["schemas"]["MarimoAncestorPreventedError"] + | components["schemas"]["MarimoExceptionRaisedError"] + | components["schemas"]["MarimoStrictExecutionError"] + | components["schemas"]["MarimoInterruptionError"] + | components["schemas"]["MarimoSyntaxError"] + | components["schemas"]["MarimoInternalError"] + | components["schemas"]["MarimoSQLError"] + | components["schemas"]["UnknownError"]; + notification: + | components["schemas"]["CellNotification"] + | components["schemas"]["FunctionCallResultNotification"] + | components["schemas"]["UIElementMessageNotification"] + | components["schemas"]["RemoveUIElementsNotification"] + | components["schemas"]["ReloadNotification"] + | components["schemas"]["ReconnectedNotification"] + | components["schemas"]["InterruptedNotification"] + | components["schemas"]["CompletedRunNotification"] + | components["schemas"]["KernelReadyNotification"] + | components["schemas"]["CompletionResultNotification"] + | components["schemas"]["AlertNotification"] + | components["schemas"]["BannerNotification"] + | components["schemas"]["MissingPackageAlertNotification"] + | components["schemas"]["InstallingPackageAlertNotification"] + | components["schemas"]["StartupLogsNotification"] + | components["schemas"]["VariablesNotification"] + | components["schemas"]["VariableValuesNotification"] + | components["schemas"]["QueryParamsSetNotification"] + | components["schemas"]["QueryParamsAppendNotification"] + | components["schemas"]["QueryParamsDeleteNotification"] + | components["schemas"]["QueryParamsClearNotification"] + | components["schemas"]["DatasetsNotification"] + | components["schemas"]["DataColumnPreviewNotification"] + | components["schemas"]["SQLTablePreviewNotification"] + | components["schemas"]["SQLTableListPreviewNotification"] + | components["schemas"]["DataSourceConnectionsNotification"] + | components["schemas"]["ValidateSQLResultNotification"] + | components["schemas"]["SecretKeysResultNotification"] + | components["schemas"]["CacheClearedNotification"] + | components["schemas"]["CacheInfoNotification"] + | components["schemas"]["FocusCellNotification"] + | components["schemas"]["UpdateCellCodesNotification"] + | components["schemas"]["UpdateCellIdsNotification"]; + }; + /** + * LanguageServersConfig + * @description Configuration options for language servers. + * + * **Keys.** + * + * - `pylsp`: the pylsp config + */ + LanguageServersConfig: { + basedpyright?: components["schemas"]["BasedpyrightServerConfig"]; + pylsp?: components["schemas"]["PythonLanguageServerConfig"]; + ty?: components["schemas"]["TyLanguageServerConfig"]; + }; + /** LayoutConfig */ + LayoutConfig: { + data: Record; + type: string; + }; + /** + * ListDataSourceConnectionCommand + * @description List data source schemas. + * + * Retrieves available schemas for a data source engine. + * + * Attributes: + * engine: Data source engine identifier. + */ + ListDataSourceConnectionCommand: { + engine: string; + /** @enum {unknown} */ + type: "list-data-source-connection"; + }; + /** ListDataSourceConnectionRequest */ + ListDataSourceConnectionRequest: { + engine: string; + }; + /** ListPackagesResponse */ + ListPackagesResponse: { + packages: components["schemas"]["PackageDescription"][]; + }; + /** + * ListSQLTablesCommand + * @description List tables in an SQL schema. + * + * Retrieves names of all tables and views in a schema. Used by the SQL + * editor for table selection. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database to query. + * schema: Schema to list tables from. + */ + ListSQLTablesCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + /** @enum {unknown} */ + type: "list-sql-tables"; + }; + /** ListSQLTablesRequest */ + ListSQLTablesRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + }; + /** + * ListSecretKeysCommand + * @description List available secret keys. + * + * Retrieves secret names without exposing values. + * + * Attributes: + * request_id: Unique identifier for this request. + */ + ListSecretKeysCommand: { + requestId: string; + /** @enum {unknown} */ + type: "list-secret-keys"; + }; + /** ListSecretKeysRequest */ + ListSecretKeysRequest: { + requestId: string; + }; + /** ListSecretKeysResponse */ + ListSecretKeysResponse: { + keys: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** + * MCPConfig + * @description Configuration for MCP servers + * + * Note: the field name `mcpServers` is camelCased to match MCP server + * config conventions used by popular AI applications (e.g. Cursor, Claude Desktop, etc.) + */ + MCPConfig: { + mcpServers: { + [key: string]: Record; + }; + presets?: ("context7" | "marimo")[]; + }; + /** MCPRefreshResponse */ + MCPRefreshResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: boolean; + }; + success: boolean; + }; + /** MCPStatusResponse */ + MCPStatusResponse: { + /** @default null */ + error?: string | null; + /** @default {} */ + servers?: { + [key: string]: "connected" | "disconnected" | "failed" | "pending"; + }; + /** @enum {unknown} */ + status: "error" | "ok" | "partial"; + }; + /** MarimoAncestorPreventedError */ + MarimoAncestorPreventedError: { + blamed_cell: string | null; + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-prevented"; + }; + /** MarimoAncestorStoppedError */ + MarimoAncestorStoppedError: { + msg: string; + raising_cell: string; + /** @enum {unknown} */ + type: "ancestor-stopped"; + }; + /** + * MarimoConfig + * @description Configuration for the marimo editor + */ + MarimoConfig: { + ai?: components["schemas"]["AiConfig"]; + completion: components["schemas"]["CompletionConfig"]; + datasources?: components["schemas"]["DatasourcesConfig"]; + diagnostics?: components["schemas"]["DiagnosticsConfig"]; + display: components["schemas"]["DisplayConfig"]; + experimental?: Record; + formatting: components["schemas"]["FormattingConfig"]; + keymap: components["schemas"]["KeymapConfig"]; + language_servers?: components["schemas"]["LanguageServersConfig"]; + mcp?: components["schemas"]["MCPConfig"]; + package_management: components["schemas"]["PackageManagementConfig"]; + runtime: components["schemas"]["RuntimeConfig"]; + save: components["schemas"]["SaveConfig"]; + server: components["schemas"]["ServerConfig"]; + sharing?: components["schemas"]["SharingConfig"]; + snippets?: components["schemas"]["SnippetsConfig"]; + }; + /** MarimoExceptionRaisedError */ + MarimoExceptionRaisedError: { + exception_type: string; + msg: string; + raising_cell: string | null; + /** @enum {unknown} */ + type: "exception"; + }; + /** MarimoFile */ + MarimoFile: { + /** @default null */ + initializationId?: string | null; + /** @default null */ + lastModified?: number | null; + name: string; + path: string; + /** @default null */ + sessionId?: string | null; + }; + /** + * 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. + */ + MarimoInternalError: { + error_id: string; + /** @default */ + msg?: string; + /** @enum {unknown} */ + type: "internal"; + }; + /** MarimoInterruptionError */ + MarimoInterruptionError: { + /** @enum {unknown} */ + type: "interruption"; + }; + /** + * MarimoSQLError + * @description SQL-specific error with enhanced metadata for debugging. + */ + MarimoSQLError: { + /** @default null */ + hint?: string | null; + msg: string; + /** @default 0 */ + node_col_offset?: number; + /** @default 0 */ + node_lineno?: number; + /** @default null */ + sql_col?: number | null; + /** @default null */ + sql_line?: number | null; + sql_statement: string; + /** @enum {unknown} */ + type: "sql-error"; + }; + /** MarimoStrictExecutionError */ + MarimoStrictExecutionError: { + blamed_cell: string | null; + msg: string; + ref: string; + /** @enum {unknown} */ + type: "strict-exception"; + }; + /** MarimoSyntaxError */ + MarimoSyntaxError: { + /** @default null */ + lineno?: number | null; + msg: string; + /** @enum {unknown} */ + type: "syntax"; + }; + /** MissingPackageAlertNotification */ + MissingPackageAlertNotification: { + isolated: boolean; + /** @enum {unknown} */ + op: "missing-package-alert"; + packages: string[]; + }; + /** + * ModelMessage + * @description Widget model state update message. + * + * State changes for anywidget models, including state dict and binary buffer paths. + * + * Attributes: + * state: Model state updates. + * buffer_paths: Paths within state dict pointing to binary buffers. + */ + ModelMessage: { + bufferPaths: (string | number)[][]; + state: Record; + }; + /** MultipleDefinitionError */ + MultipleDefinitionError: { + cells: string[]; + name: string; + /** @enum {unknown} */ + type: "multiple-defs"; + }; + /** + * OpenAiConfig + * @description Configuration options for OpenAI or OpenAI-compatible services. + * + * **Keys.** + * + * - `api_key`: the OpenAI API key + * - `base_url`: the base URL for the API + * - `project`: the project ID for the OpenAI API + * - `ssl_verify` : Boolean argument for httpx passed to open ai client. httpx defaults to true, but some use cases to let users override to False in some testing scenarios + * - `ca_bundle_path`: custom ca bundle to be used for verifying SSL certificates. Used to create custom SSL context for httpx client + * - `client_pem` : custom path of a client .pem cert used for verifying identity of client server + * - `extra_headers`: extra headers to be passed to the OpenAI client + */ + OpenAiConfig: { + api_key?: string; + base_url?: string; + ca_bundle_path?: string; + client_pem?: string; + extra_headers?: { + [key: string]: string; + }; + model?: string; + project?: string; + ssl_verify?: boolean; + }; + /** OpenTutorialRequest */ + OpenTutorialRequest: { + tutorialId: + | ( + | "dataflow" + | "fileformat" + | "for-jupyter-users" + | "intro" + | "layout" + | "markdown" + | "plots" + | "sql" + | "ui" + ) + | "markdown-format"; + }; + /** PackageDescription */ + PackageDescription: { + name: string; + version: string; + }; + /** + * PackageManagementConfig + * @description Configuration options for package management. + * + * **Keys.** + * + * - `manager`: the package manager to use + */ + PackageManagementConfig: { + /** @enum {unknown} */ + manager: "pip" | "pixi" | "poetry" | "rye" | "uv"; + }; + /** PackageOperationResponse */ + PackageOperationResponse: { + /** @default null */ + error?: string | null; + success: boolean; + }; + /** + * PreviewDatasetColumnCommand + * @description Preview a dataset column. + * + * Retrieves and displays data from a single column (dataframe or SQL table). + * Used by the data explorer UI. + * + * Attributes: + * source_type: Data source type ('dataframe', 'sql', etc.). + * source: Source identifier (connection string or variable name). + * table_name: Table or dataframe variable name. + * column_name: Column to preview. + * fully_qualified_table_name: Full database.schema.table name for SQL. + */ + PreviewDatasetColumnCommand: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + /** @enum {unknown} */ + type: "preview-dataset-column"; + }; + /** PreviewDatasetColumnRequest */ + PreviewDatasetColumnRequest: { + columnName: string; + /** @default null */ + fullyQualifiedTableName?: string | null; + source: string; + /** @enum {unknown} */ + sourceType: "catalog" | "connection" | "duckdb" | "local"; + tableName: string; + }; + /** + * PreviewSQLTableCommand + * @description Preview SQL table details. + * + * Retrieves metadata and sample data for a table. Used by the SQL editor + * and data explorer. + * + * Attributes: + * request_id: Unique identifier for this request. + * engine: SQL engine ('postgresql', 'mysql', 'duckdb', etc.). + * database: Database containing the table. + * schema: Schema containing the table. + * table_name: Table to preview. + */ + PreviewSQLTableCommand: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + /** @enum {unknown} */ + type: "preview-sql-table"; + }; + /** PreviewSQLTableRequest */ + PreviewSQLTableRequest: { + database: string; + engine: string; + requestId: string; + schema: string; + tableName: string; + }; + /** + * PythonLanguageServerConfig + * @description Configuration options for Python Language Server. + * + * pylsp handles completion, hover, go-to-definition, and diagnostics. + */ + PythonLanguageServerConfig: { + enable_flake8?: boolean; + enable_mypy?: boolean; + enable_pydocstyle?: boolean; + enable_pyflakes?: boolean; + enable_pylint?: boolean; + enable_ruff?: boolean; + enabled?: boolean; + }; + /** QueryParamsAppendNotification */ + QueryParamsAppendNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-append"; + value: string; + }; + /** QueryParamsClearNotification */ + QueryParamsClearNotification: { + /** @enum {unknown} */ + op: "query-params-clear"; + }; + /** QueryParamsDeleteNotification */ + QueryParamsDeleteNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-delete"; + value: string | null; + }; + /** + * QueryParamsSetNotification + * @description Set query parameters. + */ + QueryParamsSetNotification: { + key: string; + /** @enum {unknown} */ + op: "query-params-set"; + value: string | string[]; + }; + /** ReadCodeResponse */ + ReadCodeResponse: { + contents: string; + }; + /** RecentFilesResponse */ + RecentFilesResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** ReconnectedNotification */ + ReconnectedNotification: { + /** @enum {unknown} */ + op: "reconnected"; + }; + /** + * RefreshSecretsCommand + * @description Refresh secrets from the secrets store. + * + * Reloads secrets from the provider without restarting the kernel. + */ + RefreshSecretsCommand: { + /** @enum {unknown} */ + type: "refresh-secrets"; + }; + /** RefreshSecretsRequest */ + RefreshSecretsRequest: Record; + /** ReloadNotification */ + ReloadNotification: { + /** @enum {unknown} */ + op: "reload"; + }; + /** RemovePackageRequest */ + RemovePackageRequest: { + /** @default false */ + dev?: boolean | null; + package: string; + }; + /** + * RemoveUIElementsNotification + * @description Invalidate UI elements for a given cell. + */ + RemoveUIElementsNotification: { + cell_id: string; + /** @enum {unknown} */ + op: "remove-ui-elements"; + }; + /** + * RenameNotebookCommand + * @description Rename or move the notebook file. + * + * Updates the notebook's filename in the kernel metadata. + * + * Attributes: + * filename: New filename or path for the notebook. + */ + RenameNotebookCommand: { + filename: string; + /** @enum {unknown} */ + type: "rename-notebook"; + }; + /** RenameNotebookRequest */ + RenameNotebookRequest: { + filename: string; + }; + /** RunningNotebooksResponse */ + RunningNotebooksResponse: { + files: components["schemas"]["MarimoFile"][]; + }; + /** + * RuntimeConfig + * @description Configuration for runtime. + * + * **Keys.** + * + * - `auto_instantiate`: if `False`, cells won't automatically + * run on startup. This only applies when editing a notebook, + * and not when running as an application. + * The default is `True`. + * - `auto_reload`: if `lazy`, cells importing modified modules will marked + * as stale; if `autorun`, affected cells will be automatically run. similar + * to IPython's %autoreload extension but with more code intelligence. + * - `reactive_tests`: if `True`, marimo will automatically run pytest on cells containing only test functions and test classes. + * execution. + * - `on_cell_change`: if `lazy`, cells will be marked stale when their + * ancestors run but won't autorun; if `autorun`, cells will automatically + * run when their ancestors run. + * - `execution_type`: if `relaxed`, marimo will not clone cell declarations; + * if `strict` marimo will clone cell declarations by default, avoiding + * hidden potential state build up. + * - `watcher_on_save`: how to handle file changes when saving. `"lazy"` marks + * affected cells as stale, `"autorun"` automatically runs affected cells. + * - `output_max_bytes`: the maximum size in bytes of cell outputs; larger + * values may affect frontend performance + * - `std_stream_max_bytes`: the maximum size in bytes of console outputs; + * larger values may affect frontend performance + * - `pythonpath`: a list of directories to add to the Python search path. + * Directories will be added to the head of sys.path. Similar to the + * `PYTHONPATH` environment variable, the directories will be included in + * where Python will look for imported modules. + * - `dotenv`: a list of paths to `.env` files to load. + * If the file does not exist, it will be silently ignored. + * The default is `[".env"]` if a pyproject.toml is found, otherwise `[]`. + * - `default_sql_output`: the default output format for SQL queries. Can be one of: + * `"auto"`, `"native"`, `"polars"`, `"lazy-polars"`, or `"pandas"`. + * The default is `"auto"`. + * - `default_auto_download`: an Optional list of export types to automatically snapshot your notebook as: + * `html`, `markdown`, `ipynb`. + * The default is None. + */ + RuntimeConfig: { + auto_instantiate: boolean; + /** @enum {unknown} */ + auto_reload: "autorun" | "lazy" | "off"; + default_auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @enum {unknown} */ + default_sql_output: + | "auto" + | "lazy-polars" + | "native" + | "pandas" + | "polars"; + dotenv?: string[]; + /** @enum {unknown} */ + on_cell_change: "autorun" | "lazy"; + output_max_bytes: number; + pythonpath?: string[]; + reactive_tests: boolean; + std_stream_max_bytes: number; + /** @enum {unknown} */ + watcher_on_save: "autorun" | "lazy"; + }; + /** + * SQLMetadata + * @description Metadata for a SQL database. + */ + SQLMetadata: { + connection: string; + database: string; + schema: string; + /** @enum {unknown} */ + type: "sql-metadata"; + }; + /** + * SQLTableListPreviewNotification + * @description Preview of a list of tables in a schema. + */ + SQLTableListPreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-list-preview"; + request_id: string; + /** @default [] */ + tables?: components["schemas"]["DataTable"][]; + }; + /** + * SQLTablePreviewNotification + * @description Preview of a table in a SQL database. + */ + SQLTablePreviewNotification: { + /** @default null */ + error?: string | null; + metadata: components["schemas"]["SQLMetadata"]; + /** @enum {unknown} */ + op: "sql-table-preview"; + request_id: string; + table: null | components["schemas"]["DataTable"]; + }; + /** SaveAppConfigurationRequest */ + SaveAppConfigurationRequest: { + config: Record; + }; + /** + * SaveConfig + * @description Configuration for saving. + * + * **Keys.** + * + * - `autosave`: one of `"off"` or `"after_delay"` + * - `delay`: number of milliseconds to wait before autosaving + * - `format_on_save`: if `True`, format the code on save + */ + SaveConfig: { + /** @enum {unknown} */ + autosave: "after_delay" | "off"; + autosave_delay: number; + format_on_save: boolean; + }; + /** SaveNotebookRequest */ + SaveNotebookRequest: { + cellIds: string[]; + codes: string[]; + configs: components["schemas"]["CellConfig"][]; + filename: string; + /** @default null */ + layout?: Record | null; + names: string[]; + /** @default true */ + persist?: boolean; + }; + /** SaveUserConfigurationRequest */ + SaveUserConfigurationRequest: { + config: Record; + }; + /** Schema */ + Schema: { + name: string; + tables: components["schemas"]["DataTable"][]; + }; + /** SchemaColumn */ + SchemaColumn: { + name: string; + sampleValues: unknown[]; + type: string; + }; + /** SchemaTable */ + SchemaTable: { + columns: components["schemas"]["SchemaColumn"][]; + name: string; + }; + /** + * SecretKeysResultNotification + * @description Result of listing secret keys. + */ + SecretKeysResultNotification: { + /** @enum {unknown} */ + op: "secret-keys-result"; + request_id: string; + secrets: components["schemas"]["SecretKeysWithProvider"][]; + }; + /** SecretKeysWithProvider */ + SecretKeysWithProvider: { + keys: string[]; + name: string; + /** @enum {unknown} */ + provider: "dotenv" | "env"; + }; + /** + * ServerConfig + * @description Configuration for the server. + * + * **Keys.** + * + * - `browser`: the web browser to use. `"default"` or a browser registered + * with Python's webbrowser module (eg, `"firefox"` or `"chrome"`) + * - `follow_symlink`: if true, the server will follow symlinks it finds + * inside its static assets directory. + */ + ServerConfig: { + browser: "default" | string; + follow_symlink: boolean; + }; + /** SetupRootError */ + SetupRootError: { + edges_with_vars: [string, string[], string][]; + /** @enum {unknown} */ + type: "setup-refs"; + }; + /** + * SharingConfig + * @description Configuration for sharing features. + * + * **Keys.** + * + * - `html`: if `False`, HTML sharing options will be hidden from the UI + * - `wasm`: if `False`, WebAssembly sharing options will be hidden from the UI + */ + SharingConfig: { + html?: boolean; + wasm?: boolean; + }; + /** ShutdownSessionRequest */ + ShutdownSessionRequest: { + sessionId: string; + }; + /** Snippet */ + Snippet: { + sections: components["schemas"]["SnippetSection"][]; + title: string; + }; + /** SnippetSection */ + SnippetSection: { + /** @default null */ + code?: string | null; + /** @default null */ + html?: string | null; + id: string; + }; + /** Snippets */ + Snippets: { + snippets: components["schemas"]["Snippet"][]; + }; + /** + * SnippetsConfig + * @description Configuration for snippets. + * + * **Keys.** + * + * - `custom_path`: the path to the custom snippets directory + */ + SnippetsConfig: { + custom_paths?: string[]; + include_default_snippets?: boolean; + }; + /** + * SqlCatalogCheckResult + * @description Result of running validation against the database. + */ + SqlCatalogCheckResult: { + error_message: string | null; + success: boolean; + }; + /** + * SqlParseError + * @description Represents a single SQL parse error. + * + * Attributes: + * message (str): Description of the error. + * line (int): Line number where the error occurred (1-based). + * column (int): Column number where the error occurred (1-based). + * severity (Literal["error", "warning"]): Severity of the error. + */ + SqlParseError: { + column: number; + line: number; + message: string; + /** @enum {unknown} */ + severity: "error" | "warning"; + }; + /** + * SqlParseResult + * @description Result of parsing an SQL query. + * + * Attributes: + * success (bool): True if parsing succeeded without errors. + * errors (list[SqlParseError]): List of parse errors (empty if success is True). + */ + SqlParseResult: { + errors: components["schemas"]["SqlParseError"][]; + success: boolean; + }; + /** StartupLogsNotification */ + StartupLogsNotification: { + content: string; + /** @enum {unknown} */ + op: "startup-logs"; + /** @enum {unknown} */ + status: "append" | "done" | "start"; + }; + /** StdinRequest */ + StdinRequest: { + text: string; + }; + /** + * StopKernelCommand + * @description Stop kernel execution. + * + * Signals the kernel to stop processing and shut down gracefully. + * Used when closing a notebook or terminating a session. + */ + StopKernelCommand: { + /** @enum {unknown} */ + type: "stop-kernel"; + }; + /** + * StoreConfig + * @description Configuration for cache stores. + */ + StoreConfig: { + args?: Record; + /** @enum {unknown} */ + type?: "file" | "redis" | "rest" | "tiered"; + }; + /** SuccessResponse */ + SuccessResponse: { + /** @default true */ + success?: boolean; + }; + /** + * SyncGraphCommand + * @description Synchronize the kernel graph with file manager state. + * + * Used when the notebook file changes externally (e.g., file reload or version control). + * Updates changed cells, deletes removed cells, and optionally executes modified cells. + * + * Attributes: + * cells: All cells known to file manager, mapping cell_id to code. + * run_ids: Cells to execute or update. + * delete_ids: Cells to delete from the graph. + * timestamp: Unix timestamp when command was created. + */ + SyncGraphCommand: { + cells: { + [key: string]: string; + }; + deleteIds: string[]; + runIds: string[]; + timestamp?: number; + /** @enum {unknown} */ + type: "sync-graph"; + }; + /** + * ToolDefinition + * @description Tool definition compatible with ai-sdk-ui format. + */ + ToolDefinition: { + description: string; + mode: ("agent" | "ask" | "manual")[]; + name: string; + parameters: Record; + /** @enum {unknown} */ + source: "backend" | "frontend" | "mcp"; + }; + /** + * TyLanguageServerConfig + * @description Configuration options for Ty Language Server. + * + * ty handles completion, hover, go-to-definition, and diagnostics, + * but we only use it for diagnostics. + */ + TyLanguageServerConfig: { + enabled?: boolean; + }; + /** + * UIElementMessageNotification + * @description Send a message to a UI element. + */ + UIElementMessageNotification: { + /** @default null */ + buffers?: string[] | null; + message: Record; + model_id: string | null; + /** @enum {unknown} */ + op: "send-ui-element-message"; + ui_element: string | null; + }; + /** UnknownError */ + UnknownError: { + /** @default null */ + error_type?: string | null; + msg: string; + /** @enum {unknown} */ + type: "unknown"; + }; + /** UpdateCellCodesNotification */ + UpdateCellCodesNotification: { + cell_ids: string[]; + code_is_stale: boolean; + codes: string[]; + /** @enum {unknown} */ + op: "update-cell-codes"; + }; + /** + * UpdateCellConfigCommand + * @description Update cell configuration. + * + * Updates cell-level settings like disabled state, hide code, etc. + * + * Attributes: + * configs: Cell IDs mapped to their config updates. Each config dict + * can contain partial updates. + */ + UpdateCellConfigCommand: { + configs: { + [key: string]: Record; + }; + /** @enum {unknown} */ + type: "update-cell-config"; + }; + /** UpdateCellConfigRequest */ + UpdateCellConfigRequest: { + configs: { + [key: string]: Record; + }; + }; + /** + * UpdateCellIdsNotification + * @description Update the cell ID ordering of the cells in the notebook. + * + * Right now we send the entire list of cell IDs, + * but in the future we might want to send change-deltas. + */ + UpdateCellIdsNotification: { + cell_ids: string[]; + /** @enum {unknown} */ + op: "update-cell-ids"; + }; + /** UpdateCellIdsRequest */ + UpdateCellIdsRequest: { + cellIds: string[]; + }; + /** + * UpdateUIElementCommand + * @description Update UI element values. + * + * Triggered when users interact with UI elements (sliders, inputs, dropdowns, etc.). + * Updates element values and re-executes dependent cells. + * + * Attributes: + * object_ids: UI elements to update. + * values: New values for the elements. Must match length of object_ids. + * request: HTTP request context if available. + * token: Unique request identifier for deduplication. + */ + UpdateUIElementCommand: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + /** @enum {unknown} */ + type: "update-ui-element"; + values: unknown[]; + }; + /** UpdateUIElementRequest */ + UpdateUIElementRequest: { + objectIds: string[]; + /** @default null */ + request?: components["schemas"]["HTTPRequest"] | null; + token?: string; + values: unknown[]; + }; + /** UpdateUIElementValuesRequest */ + UpdateUIElementValuesRequest: { + objectIds: string[]; + values: unknown[]; + }; + /** + * UpdateUserConfigCommand + * @description Update user configuration. + * + * Updates global marimo configuration (runtime settings, display options, editor preferences). + * + * Attributes: + * config: Complete user configuration. + */ + UpdateUserConfigCommand: { + config: components["schemas"]["MarimoConfig"]; + /** @enum {unknown} */ + type: "update-user-config"; + }; + /** UpdateUserConfigRequest */ + UpdateUserConfigRequest: { + config: components["schemas"]["MarimoConfig"]; + }; + /** + * UpdateWidgetModelCommand + * @description Update anywidget model state. + * + * Updates widget model state for bidirectional Python-JavaScript communication. + * + * Attributes: + * model_id: Widget model identifier. + * message: Model message with state updates and buffer paths. + * buffers: Base64-encoded binary buffers referenced by buffer_paths. + */ + UpdateWidgetModelCommand: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + /** @enum {unknown} */ + type: "update-widget-model"; + }; + /** UpdateWidgetModelRequest */ + UpdateWidgetModelRequest: { + /** @default null */ + buffers?: string[] | null; + message: components["schemas"]["ModelMessage"]; + modelId: string; + }; + /** + * ValidateSQLCommand + * @description Validate an SQL query. + * + * Checks if an SQL query is valid by parsing against a dialect (no DB connection) + * or validating against an actual database. + * + * Attributes: + * request_id: Unique identifier for this request. + * query: SQL query to validate. + * only_parse: If True, only parse using dialect. If False, validate against DB. + * engine: SQL engine (required if only_parse is False). + * dialect: SQL dialect for parsing (required if only_parse is True). + */ + ValidateSQLCommand: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + /** @enum {unknown} */ + type: "validate-sql"; + }; + /** ValidateSQLRequest */ + ValidateSQLRequest: { + /** @default null */ + dialect?: string | null; + /** @default null */ + engine?: string | null; + onlyParse: boolean; + query: string; + requestId: string; + }; + /** ValidateSQLResultNotification */ + ValidateSQLResultNotification: { + /** @default null */ + error?: string | null; + /** @enum {unknown} */ + op: "validate-sql-result"; + /** @default null */ + parse_result?: null | components["schemas"]["SqlParseResult"]; + request_id: string; + /** @default null */ + validate_result?: null | components["schemas"]["SqlCatalogCheckResult"]; + }; + /** VariableContext */ + VariableContext: { + name: string; + previewValue: unknown; + valueType: string; + }; + /** VariableDeclarationNotification */ + VariableDeclarationNotification: { + declared_by: string[]; + name: string; + used_by: string[]; + }; + /** VariableValue */ + VariableValue: { + datatype: string | null; + name: string; + value: string | null; + }; + /** + * VariableValuesNotification + * @description List of variables and their types/values. + */ + VariableValuesNotification: { + /** @enum {unknown} */ + op: "variable-values"; + variables: components["schemas"]["VariableValue"][]; + }; + /** + * VariablesNotification + * @description List of variable declarations. + */ + VariablesNotification: { + /** @enum {unknown} */ + op: "variables"; + variables: components["schemas"]["VariableDeclarationNotification"][]; + }; + /** WorkspaceFilesRequest */ + WorkspaceFilesRequest: { + /** @default false */ + includeMarkdown?: boolean; + }; + /** WorkspaceFilesResponse */ + WorkspaceFilesResponse: { + /** @default 0 */ + fileCount?: number; + files: components["schemas"]["FileInfo"][]; + /** @default false */ + hasMore?: boolean; + root: string; + }; + /** + * _AppConfig + * @description Program-specific configuration. + * + * Configuration for frontends or runtimes that is specific to + * a single marimo program. + */ + _AppConfig: { + /** @default null */ + app_title?: string | null; + auto_download?: ("html" | "ipynb" | "markdown")[]; + /** @default null */ + css_file?: string | null; + /** @default null */ + html_head_file?: string | null; + /** @default null */ + layout_file?: string | null; + /** + * @default auto + * @enum {unknown} + */ + sql_output?: "auto" | "lazy-polars" | "native" | "pandas" | "polars"; + /** + * @default compact + * @enum {unknown} + */ + width?: "columns" | "compact" | "full" | "medium" | "normal"; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export type operations = Record; From ae236659658153270f3e0dfcadf26fec20b99b58 Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 26 Dec 2025 22:11:14 +0000 Subject: [PATCH 09/16] refactor: clean up cgroup health utility code Remove redundant file closes, use helper function for early return, and fix docstring accuracy. --- marimo/_utils/health.py | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 0608e71c95a..f1f7736d610 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -28,6 +28,7 @@ class MemoryStats(TypedDict): free: int +# Constants for cgroup file locations CGROUP_V2_MEMORY_MAX_FILE = "/sys/fs/cgroup/memory.max" CGROUP_V2_MEMORY_CURRENT_FILE = "/sys/fs/cgroup/memory.current" CGROUP_V1_MEMORY_LIMIT_FILE = "/sys/fs/cgroup/memory/memory.limit_in_bytes" @@ -246,54 +247,41 @@ def get_cgroup_mem_stats() -> Optional[MemoryStats]: 'percent': 50.0, # percentage } """ - try: # Try cgroup v2 first if os.path.exists(CGROUP_V2_MEMORY_MAX_FILE): with open(CGROUP_V2_MEMORY_MAX_FILE, encoding="utf-8") as f: memory_max = f.read().strip() - f.close() with open(CGROUP_V2_MEMORY_CURRENT_FILE, encoding="utf-8") as f: memory_current = f.read().strip() - f.close() if memory_max != "max": total = int(memory_max) used = int(memory_current) available = total - used percent = (used / total) * 100 if total > 0 else 0 - free = total - used return MemoryStats( total=total, used=used, available=available, percent=percent, - free=free, + free=available, # free == available for cgroup memory ) # Fallback to cgroup v1 elif os.path.exists(CGROUP_V1_MEMORY_LIMIT_FILE): - with open( - CGROUP_V1_MEMORY_LIMIT_FILE, - encoding="utf-8", - ) as f: + with open(CGROUP_V1_MEMORY_LIMIT_FILE, encoding="utf-8") as f: total = int(f.read().strip()) - f.close() - with open( - CGROUP_V1_MEMORY_USAGE_FILE, - encoding="utf-8", - ) as f: + with open(CGROUP_V1_MEMORY_USAGE_FILE, encoding="utf-8") as f: used = int(f.read().strip()) - f.close() available = total - used percent = (used / total) * 100 if total > 0 else 0 - free = total - used return MemoryStats( total=total, used=used, available=available, percent=percent, - free=free, + free=available, # free == available for cgroup memory ) except (FileNotFoundError, PermissionError, ValueError) as e: LOGGER.debug(f"Error reading container memory stats: {e}") @@ -328,16 +316,21 @@ def get_cgroup_cpu_percent() -> Optional[float]: Get CPU usage percentage for a cgroup-limited container. Works like psutil.cpu_percent(interval=None): - - First call stores the current reading and returns None + - First call stores the current reading and returns 0.0 - Subsequent calls return the CPU percent since the last call Returns: CPU usage as a percentage (0-100). - 0.0 if cgroup limits are configured but unable to read current usage (ie on the first call) + 0.0 if cgroup limits are configured but unable to read current usage + (e.g., on the first call) None if cgroup limits are not configured or unable to read. """ global _last_cgroup_cpu_sample + # Early return if no CPU limit is configured + if not _has_cgroup_cpu_limit(): + return None + try: # Read current usage (microseconds) current_usage: Optional[int] = None @@ -355,10 +348,6 @@ def get_cgroup_cpu_percent() -> Optional[float]: with open(CGROUP_V1_CPU_USAGE_FILE, encoding="utf-8") as f: current_usage = int(f.read().strip()) // 1_000_000 # ns -> μs - else: - # No cgroup files exist - return None - if current_usage is None: return 0.0 @@ -369,7 +358,7 @@ def get_cgroup_cpu_percent() -> Optional[float]: current_time = time.time() if _last_cgroup_cpu_sample is None: - # First call - store reading, return None (like psutil's first call) + # First call - store reading, return 0.0 (like psutil's first call) _last_cgroup_cpu_sample = (current_usage, current_time) return 0.0 From 92c7f65d3b58c1fba337f6cd8ca5b48e01e34249 Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 26 Dec 2025 23:04:02 +0000 Subject: [PATCH 10/16] lint: import nit on marimo/_utils/health.py --- marimo/_utils/health.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index f1f7736d610..4a92041a04f 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -6,7 +6,7 @@ import subprocess import sys import time -from typing import Any, Optional, TypedDict +from typing import Optional, TypedDict from marimo import _loggers From e52fd85ab0169cc6c80afacf1be1ed6a2d9e7195 Mon Sep 17 00:00:00 2001 From: ddfulton Date: Tue, 30 Dec 2025 19:03:59 -0500 Subject: [PATCH 11/16] fix: removed spurious comments + added cgroup documentation + specified units of microseconds when applicable --- marimo/_utils/health.py | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 4a92041a04f..548100db3eb 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -15,7 +15,7 @@ TIMEOUT = 10 # seconds # Module-level state for cgroup CPU percent calculation (like psutil does) -_last_cgroup_cpu_sample: Optional[tuple[int, float]] = ( +_LAST_CGROUP_CPU_SAMPLE: Optional[tuple[int, float]] = ( None # (usage_usec, timestamp) ) @@ -28,16 +28,20 @@ class MemoryStats(TypedDict): free: int -# Constants for cgroup file locations +# Constants for cgroup v2 file locations +# Reference: https://www.kernel.org/doc/Documentation/cgroup-v2.txt CGROUP_V2_MEMORY_MAX_FILE = "/sys/fs/cgroup/memory.max" CGROUP_V2_MEMORY_CURRENT_FILE = "/sys/fs/cgroup/memory.current" -CGROUP_V1_MEMORY_LIMIT_FILE = "/sys/fs/cgroup/memory/memory.limit_in_bytes" -CGROUP_V1_MEMORY_USAGE_FILE = "/sys/fs/cgroup/memory/memory.usage_in_bytes" CGROUP_V2_CPU_STAT_FILE = "/sys/fs/cgroup/cpu.stat" -CGROUP_V1_CPU_USAGE_FILE = "/sys/fs/cgroup/cpuacct/cpuacct.usage" CGROUP_V2_CPU_MAX_FILE = "/sys/fs/cgroup/cpu.max" + +# cgroup v1 file locations (legacy hierarchy) +# Reference: https://www.kernel.org/doc/Documentation/cgroup-v1/ +CGROUP_V1_CPU_USAGE_FILE = "/sys/fs/cgroup/cpuacct/cpuacct.usage" CGROUP_V1_CPU_CFS_QUOTA_US_FILE = "/sys/fs/cgroup/cpu/cpu.cfs_quota_us" CGROUP_V1_CPU_CFS_PERIOD_US_FILE = "/sys/fs/cgroup/cpu/cpu.cfs_period_us" +CGROUP_V1_MEMORY_LIMIT_FILE = "/sys/fs/cgroup/memory/memory.limit_in_bytes" +CGROUP_V1_MEMORY_USAGE_FILE = "/sys/fs/cgroup/memory/memory.usage_in_bytes" def get_node_version() -> Optional[str]: @@ -217,7 +221,6 @@ def _has_cgroup_cpu_limit() -> bool: Returns True/False whether the container has a CPU limit set. This function checks for both cgroups v1 and v2. """ - # cgroups v2 if os.path.exists(CGROUP_V2_CPU_MAX_FILE): with open(CGROUP_V2_CPU_MAX_FILE, encoding="utf-8") as f: cpu_max = f.read().strip() @@ -248,7 +251,6 @@ def get_cgroup_mem_stats() -> Optional[MemoryStats]: } """ try: - # Try cgroup v2 first if os.path.exists(CGROUP_V2_MEMORY_MAX_FILE): with open(CGROUP_V2_MEMORY_MAX_FILE, encoding="utf-8") as f: memory_max = f.read().strip() @@ -267,7 +269,6 @@ def get_cgroup_mem_stats() -> Optional[MemoryStats]: percent=percent, free=available, # free == available for cgroup memory ) - # Fallback to cgroup v1 elif os.path.exists(CGROUP_V1_MEMORY_LIMIT_FILE): with open(CGROUP_V1_MEMORY_LIMIT_FILE, encoding="utf-8") as f: total = int(f.read().strip()) @@ -293,13 +294,11 @@ def _get_cgroup_allocated_cores() -> Optional[float]: """Get the number of CPU cores allocated to this cgroup (quota / period).""" try: if os.path.exists(CGROUP_V2_CPU_MAX_FILE): - # cgroups v2 with open(CGROUP_V2_CPU_MAX_FILE, encoding="utf-8") as f: parts = f.read().strip().split() if len(parts) == 2 and parts[0] != "max": return int(parts[0]) / int(parts[1]) elif os.path.exists(CGROUP_V1_CPU_CFS_QUOTA_US_FILE): - # cgroups v1 with open(CGROUP_V1_CPU_CFS_QUOTA_US_FILE, encoding="utf-8") as f: quota = int(f.read().strip()) with open(CGROUP_V1_CPU_CFS_PERIOD_US_FILE, encoding="utf-8") as f: @@ -333,22 +332,20 @@ def get_cgroup_cpu_percent() -> Optional[float]: try: # Read current usage (microseconds) - current_usage: Optional[int] = None + current_usage_microseconds: Optional[int] = None if os.path.exists(CGROUP_V2_CPU_STAT_FILE): - # cgroups v2 with open(CGROUP_V2_CPU_STAT_FILE, encoding="utf-8") as f: for line in f: if line.startswith("usage_usec"): - current_usage = int(line.split()[1]) + current_usage_microseconds = int(line.split()[1]) break elif os.path.exists(CGROUP_V1_CPU_USAGE_FILE): - # cgroups v1 with open(CGROUP_V1_CPU_USAGE_FILE, encoding="utf-8") as f: - current_usage = int(f.read().strip()) // 1_000_000 # ns -> μs + current_usage_microseconds = int(f.read().strip()) // 1_000_000 # ns -> μs - if current_usage is None: + if current_usage_microseconds is None: return 0.0 allocated_cores = _get_cgroup_allocated_cores() @@ -359,20 +356,20 @@ def get_cgroup_cpu_percent() -> Optional[float]: if _last_cgroup_cpu_sample is None: # First call - store reading, return 0.0 (like psutil's first call) - _last_cgroup_cpu_sample = (current_usage, current_time) + _last_cgroup_cpu_sample = (current_usage_microseconds, current_time) return 0.0 last_usage, last_time = _last_cgroup_cpu_sample - _last_cgroup_cpu_sample = (current_usage, current_time) + _last_cgroup_cpu_sample = (current_usage_microseconds, current_time) delta_time = current_time - last_time if delta_time <= 0: return 0.0 - delta_usage_usec = current_usage - last_usage - # percent = (usage_usec / (time_sec * 1_000_000 * cores)) * 100 + delta_usage_microseconds = current_usage_microseconds - last_usage + delta_time_microseconds = delta_time * 1_000_000 percent = ( - delta_usage_usec / (delta_time * 1_000_000 * allocated_cores) + delta_usage_microseconds / (delta_time_microseconds * 1_000_000 * allocated_cores) ) * 100 return min(100.0, max(0.0, percent)) From ae415be5268dc765ac31bb9b03916057a764f40a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 31 Dec 2025 00:05:32 +0000 Subject: [PATCH 12/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- marimo/_utils/health.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 548100db3eb..4d014d74eb1 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -343,7 +343,9 @@ def get_cgroup_cpu_percent() -> Optional[float]: elif os.path.exists(CGROUP_V1_CPU_USAGE_FILE): with open(CGROUP_V1_CPU_USAGE_FILE, encoding="utf-8") as f: - current_usage_microseconds = int(f.read().strip()) // 1_000_000 # ns -> μs + current_usage_microseconds = ( + int(f.read().strip()) // 1_000_000 + ) # ns -> μs if current_usage_microseconds is None: return 0.0 @@ -356,7 +358,10 @@ def get_cgroup_cpu_percent() -> Optional[float]: if _last_cgroup_cpu_sample is None: # First call - store reading, return 0.0 (like psutil's first call) - _last_cgroup_cpu_sample = (current_usage_microseconds, current_time) + _last_cgroup_cpu_sample = ( + current_usage_microseconds, + current_time, + ) return 0.0 last_usage, last_time = _last_cgroup_cpu_sample @@ -369,7 +374,8 @@ def get_cgroup_cpu_percent() -> Optional[float]: delta_usage_microseconds = current_usage_microseconds - last_usage delta_time_microseconds = delta_time * 1_000_000 percent = ( - delta_usage_microseconds / (delta_time_microseconds * 1_000_000 * allocated_cores) + delta_usage_microseconds + / (delta_time_microseconds * 1_000_000 * allocated_cores) ) * 100 return min(100.0, max(0.0, percent)) From 08d049a60bebed33455e1e0f54440a041c238d92 Mon Sep 17 00:00:00 2001 From: ddfulton Date: Wed, 31 Dec 2025 00:22:55 +0000 Subject: [PATCH 13/16] fix: typeo with _LAST_CGROUP_CPU_SAMPLE constant --- marimo/_utils/health.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/marimo/_utils/health.py b/marimo/_utils/health.py index 4d014d74eb1..6eea27d51f8 100644 --- a/marimo/_utils/health.py +++ b/marimo/_utils/health.py @@ -324,7 +324,7 @@ def get_cgroup_cpu_percent() -> Optional[float]: (e.g., on the first call) None if cgroup limits are not configured or unable to read. """ - global _last_cgroup_cpu_sample + global _LAST_CGROUP_CPU_SAMPLE # Early return if no CPU limit is configured if not _has_cgroup_cpu_limit(): @@ -356,16 +356,16 @@ def get_cgroup_cpu_percent() -> Optional[float]: current_time = time.time() - if _last_cgroup_cpu_sample is None: + if _LAST_CGROUP_CPU_SAMPLE is None: # First call - store reading, return 0.0 (like psutil's first call) - _last_cgroup_cpu_sample = ( + _LAST_CGROUP_CPU_SAMPLE = ( current_usage_microseconds, current_time, ) return 0.0 - last_usage, last_time = _last_cgroup_cpu_sample - _last_cgroup_cpu_sample = (current_usage_microseconds, current_time) + last_usage, last_time = _LAST_CGROUP_CPU_SAMPLE + _LAST_CGROUP_CPU_SAMPLE = (current_usage_microseconds, current_time) delta_time = current_time - last_time if delta_time <= 0: From 00d5a2f1e15be34209c8d7f9933068cd9800f47d Mon Sep 17 00:00:00 2001 From: ddfulton Date: Wed, 31 Dec 2025 11:45:56 +0000 Subject: [PATCH 14/16] fix: updated imports to health utils smoke test --- tests/_utils/test_health_utils.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tests/_utils/test_health_utils.py b/tests/_utils/test_health_utils.py index a7794ecf90a..7de6ac0868e 100644 --- a/tests/_utils/test_health_utils.py +++ b/tests/_utils/test_health_utils.py @@ -1,14 +1,16 @@ from __future__ import annotations from marimo._utils.health import ( + MemoryStats, _get_versions, + _has_cgroup_cpu_limit, + get_cgroup_cpu_percent, + get_cgroup_mem_stats, get_chrome_version, - get_container_resources, get_node_version, get_optional_modules_list, get_python_version, get_required_modules_list, - has_cgroup_limits, ) @@ -36,19 +38,21 @@ def test_get_python_version(): assert isinstance(get_python_version(), str) -def test_has_cgroup_limits(): +def test_has_cgroup_cpu_limits(): """Test that has_cgroup_limits returns a tuple of bools and doesn't crash""" - memory_limit, cpu_limit = has_cgroup_limits() - assert isinstance(memory_limit, bool) + memory_limit, cpu_limit = _has_cgroup_cpu_limit() assert isinstance(cpu_limit, bool) def test_get_container_resources(): """Test that get_container_resources returns None or a dict and doesn't crash""" - result = get_container_resources() - assert result is None or isinstance(result, dict) - if isinstance(result, dict): + cpu_result = get_cgroup_cpu_percent() + memory_result = get_cgroup_mem_stats() + assert memory_result is None or isinstance(memory_result, MemoryStats) + assert cpu_result is None or isinstance(cpu_result, float) + if isinstance(memory_result, MemoryStats): # If we happen to be in a container, verify structure - if "memory" in result: - assert "total" in result["memory"] - assert "used" in result["memory"] + assert "total" in memory_result["memory"] + assert "used" in memory_result["memory"] + assert "free" in memory_result["memory"] + assert "percent" in memory_result["memory"] From 6dc1701d3a3759fab10d81ca3bbfe9caadb85f2d Mon Sep 17 00:00:00 2001 From: ddfulton Date: Wed, 31 Dec 2025 12:38:58 +0000 Subject: [PATCH 15/16] fix: changed smoke test isinstance to dict, not TypedDict, which is unsupported --- tests/_utils/test_health_utils.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/_utils/test_health_utils.py b/tests/_utils/test_health_utils.py index 7de6ac0868e..8ad4493e9de 100644 --- a/tests/_utils/test_health_utils.py +++ b/tests/_utils/test_health_utils.py @@ -1,7 +1,6 @@ from __future__ import annotations from marimo._utils.health import ( - MemoryStats, _get_versions, _has_cgroup_cpu_limit, get_cgroup_cpu_percent, @@ -40,19 +39,19 @@ def test_get_python_version(): def test_has_cgroup_cpu_limits(): """Test that has_cgroup_limits returns a tuple of bools and doesn't crash""" - memory_limit, cpu_limit = _has_cgroup_cpu_limit() - assert isinstance(cpu_limit, bool) + has_cgroup_cpu_limit = _has_cgroup_cpu_limit() + assert isinstance(has_cgroup_cpu_limit, bool) def test_get_container_resources(): """Test that get_container_resources returns None or a dict and doesn't crash""" cpu_result = get_cgroup_cpu_percent() memory_result = get_cgroup_mem_stats() - assert memory_result is None or isinstance(memory_result, MemoryStats) assert cpu_result is None or isinstance(cpu_result, float) - if isinstance(memory_result, MemoryStats): + assert memory_result is None or isinstance(memory_result, dict) + if isinstance(memory_result, dict): # If we happen to be in a container, verify structure - assert "total" in memory_result["memory"] - assert "used" in memory_result["memory"] - assert "free" in memory_result["memory"] - assert "percent" in memory_result["memory"] + assert "total" in memory_result + assert "used" in memory_result + assert "free" in memory_result + assert "percent" in memory_result From 3cdea1c17e86f33d55b83dd7bdeffcfbb96e937a Mon Sep 17 00:00:00 2001 From: ddfulton Date: Fri, 2 Jan 2026 19:54:12 +0000 Subject: [PATCH 16/16] fix: rename is_container to has_cgroup_mem_limit in test_health.py --- tests/_server/api/endpoints/test_health.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/_server/api/endpoints/test_health.py b/tests/_server/api/endpoints/test_health.py index 0ead7068457..50b42733b56 100644 --- a/tests/_server/api/endpoints/test_health.py +++ b/tests/_server/api/endpoints/test_health.py @@ -60,8 +60,8 @@ def test_memory(client: TestClient) -> None: assert memory["available"] > 0 assert memory["used"] > 0 assert memory["free"] > 0 - assert "is_container" in memory - assert isinstance(memory["is_container"], bool) + assert "has_cgroup_mem_limit" in memory + assert isinstance(memory["has_cgroup_mem_limit"], bool) cpu = response.json()["cpu"] assert cpu["percent"] >= 0 computer = response.json()["server"]