{
  "components": {
    "schemas": {
      "AccountCreateSchema": {
        "description": "Schema for directly connecting a credential-managed native account.",
        "properties": {
          "allowed_scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Scopes"
          },
          "auth_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Auth config ID to connect",
            "title": "Auth Config Id"
          },
          "auth_config_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Auth config name to connect",
            "title": "Auth Config Name"
          },
          "credentials": {
            "additionalProperties": true,
            "title": "Credentials",
            "type": "object"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "preferences": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferences"
          },
          "provider_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Account Id"
          }
        },
        "title": "AccountCreateSchema",
        "type": "object"
      },
      "AccountListResponseSchema": {
        "description": "Schema for account list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AccountResponseSchema"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "AccountListResponseSchema",
        "type": "object"
      },
      "AccountResponseSchema": {
        "description": "Schema for account response.",
        "properties": {
          "allowed_scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Scopes"
          },
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "connector": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectorResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "preferences": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferences"
          },
          "provider_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Account Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "organization_id",
          "auth_config_id",
          "connector_id",
          "status",
          "email",
          "preferences",
          "allowed_scopes",
          "created_at",
          "updated_at"
        ],
        "title": "AccountResponseSchema",
        "type": "object"
      },
      "AddColumnRequest": {
        "description": "Schema for adding a column to a table.",
        "properties": {
          "column": {
            "$ref": "#/components/schemas/ColumnSchema",
            "description": "Column definition to append to the table. Existing column names cannot be reused."
          }
        },
        "required": [
          "column"
        ],
        "title": "AddColumnRequest",
        "type": "object"
      },
      "AgentActionResponse": {
        "properties": {
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "instruction": {
            "title": "Instruction",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "toolsets": {
            "items": {
              "$ref": "#/components/schemas/AgentToolset"
            },
            "title": "Toolsets",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "instruction",
          "created_at",
          "updated_at"
        ],
        "title": "AgentActionResponse",
        "type": "object"
      },
      "AgentDetailResponse": {
        "properties": {
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "instruction": {
            "title": "Instruction",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema"
          },
          "permissions": {
            "$ref": "#/components/schemas/AgentPermissionsResponse"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "toolsets": {
            "items": {
              "$ref": "#/components/schemas/AgentToolset"
            },
            "title": "Toolsets",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "instruction",
          "created_at",
          "updated_at",
          "permissions"
        ],
        "title": "AgentDetailResponse",
        "type": "object"
      },
      "AgentHostCapacity": {
        "properties": {
          "active_runs": {
            "default": 0,
            "maximum": 128,
            "minimum": 0,
            "title": "Active Runs",
            "type": "integer"
          },
          "available_runs": {
            "default": 1,
            "maximum": 128,
            "minimum": 0,
            "title": "Available Runs",
            "type": "integer"
          },
          "max_runs": {
            "default": 1,
            "maximum": 128,
            "minimum": 0,
            "title": "Max Runs",
            "type": "integer"
          }
        },
        "title": "AgentHostCapacity",
        "type": "object"
      },
      "AgentHostCommand": {
        "properties": {
          "command_id": {
            "format": "uuid",
            "title": "Command Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentHostCommandKind"
          },
          "lease_epoch": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lease Epoch"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          }
        },
        "required": [
          "command_id",
          "kind",
          "created_at",
          "expires_at"
        ],
        "title": "AgentHostCommand",
        "type": "object"
      },
      "AgentHostCommandKind": {
        "enum": [
          "START_RUN",
          "CANCEL_RUN",
          "RESOLVE_PERMISSION",
          "REFRESH_CREDENTIAL"
        ],
        "title": "AgentHostCommandKind",
        "type": "string"
      },
      "AgentHostCommandRejection": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/AgentHostRejectionCode"
          },
          "command_id": {
            "format": "uuid",
            "title": "Command Id",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "lease_epoch": {
            "minimum": 1,
            "title": "Lease Epoch",
            "type": "integer"
          },
          "retryable": {
            "title": "Retryable",
            "type": "boolean"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "command_id",
          "run_id",
          "lease_epoch",
          "code",
          "retryable"
        ],
        "title": "AgentHostCommandRejection",
        "type": "object"
      },
      "AgentHostConfigOption": {
        "properties": {
          "category": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Category",
            "type": "string"
          },
          "current_value": {
            "title": "Current Value"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "options": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Options",
            "type": "array"
          }
        },
        "required": [
          "id",
          "category",
          "name"
        ],
        "title": "AgentHostConfigOption",
        "type": "object"
      },
      "AgentHostEvent": {
        "description": "One run event on its way to the run's Redis Stream.\n\nThere is no event id: events are deduplicated by ``sequence`` against the\nstream's watermark, which is what a resend after a Redis flush relies on.\nThere is no host timestamp either -- a Redis stream id already embeds the\nmillisecond it was appended.",
        "properties": {
          "lease_epoch": {
            "minimum": 1,
            "title": "Lease Epoch",
            "type": "integer"
          },
          "object_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Object Id"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "sequence": {
            "minimum": 1,
            "title": "Sequence",
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/AgentHostEventType"
          }
        },
        "required": [
          "run_id",
          "lease_epoch",
          "sequence",
          "type"
        ],
        "title": "AgentHostEvent",
        "type": "object"
      },
      "AgentHostEventAck": {
        "properties": {
          "acked_through": {
            "minimum": 0,
            "title": "Acked Through",
            "type": "integer"
          },
          "lease_epoch": {
            "title": "Lease Epoch",
            "type": "integer"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "lease_epoch",
          "acked_through"
        ],
        "title": "AgentHostEventAck",
        "type": "object"
      },
      "AgentHostEventBatch": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/AgentHostEvent"
            },
            "maxItems": 256,
            "minItems": 1,
            "title": "Events",
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "title": "AgentHostEventBatch",
        "type": "object"
      },
      "AgentHostEventType": {
        "enum": [
          "run_state",
          "user_message",
          "agent_message_chunk",
          "agent_message_upsert",
          "agent_thought_chunk",
          "agent_thought_upsert",
          "plan_upsert",
          "tool_call_upsert",
          "tool_call_update",
          "usage_update",
          "config_update",
          "permission_request",
          "terminal"
        ],
        "title": "AgentHostEventType",
        "type": "string"
      },
      "AgentHostHarnessCapabilities": {
        "additionalProperties": true,
        "description": "Harness capabilities the server actually branches on.\n\n``images`` adds the vision capability to the runtime picker;\n``load_session`` is what lets a conversation keep one provider session\nacross turns, so it decides whether a run is dispatched with a\n``resume_session_id``. Anything else a host reports is kept verbatim by\n``extra: allow`` rather than typed here, so the wire format stays open\nwithout inventing fields no code reads.",
        "properties": {
          "images": {
            "default": false,
            "title": "Images",
            "type": "boolean"
          },
          "load_session": {
            "default": false,
            "title": "Load Session",
            "type": "boolean"
          }
        },
        "title": "AgentHostHarnessCapabilities",
        "type": "object"
      },
      "AgentHostHarnessHealth": {
        "enum": [
          "READY",
          "AUTH_REQUIRED",
          "UNSUPPORTED_VERSION",
          "CONFIG_INVALID",
          "PROBE_FAILED",
          "INSTALLING",
          "DISABLED"
        ],
        "title": "AgentHostHarnessHealth",
        "type": "string"
      },
      "AgentHostHarnessListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentHostHarnessResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AgentHostHarnessListResponse",
        "type": "object"
      },
      "AgentHostHarnessPublishRequest": {
        "properties": {
          "harnesses": {
            "items": {
              "$ref": "#/components/schemas/AgentHostHarnessSnapshot"
            },
            "maxItems": 32,
            "minItems": 1,
            "title": "Harnesses",
            "type": "array"
          }
        },
        "required": [
          "harnesses"
        ],
        "title": "AgentHostHarnessPublishRequest",
        "type": "object"
      },
      "AgentHostHarnessPublishResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentHostHarnessResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AgentHostHarnessPublishResponse",
        "type": "object"
      },
      "AgentHostHarnessResponse": {
        "properties": {
          "adapter_version": {
            "title": "Adapter Version",
            "type": "string"
          },
          "capabilities": {
            "additionalProperties": true,
            "title": "Capabilities",
            "type": "object"
          },
          "config_options": {
            "items": {},
            "title": "Config Options",
            "type": "array"
          },
          "config_revision": {
            "title": "Config Revision",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "harness_key": {
            "title": "Harness Key",
            "type": "string"
          },
          "health": {
            "title": "Health",
            "type": "string"
          },
          "host_id": {
            "format": "uuid",
            "title": "Host Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "stale_after": {
            "format": "date-time",
            "title": "Stale After",
            "type": "string"
          },
          "stale_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stale Reason"
          },
          "upstream_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upstream Version"
          }
        },
        "required": [
          "id",
          "host_id",
          "harness_key",
          "display_name",
          "adapter_version",
          "upstream_version",
          "health",
          "capabilities",
          "config_revision",
          "config_options",
          "stale_after",
          "stale_reason"
        ],
        "title": "AgentHostHarnessResponse",
        "type": "object"
      },
      "AgentHostHarnessSnapshot": {
        "properties": {
          "adapter_version": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Adapter Version",
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/AgentHostHarnessCapabilities"
          },
          "config_options": {
            "items": {
              "$ref": "#/components/schemas/AgentHostConfigOption"
            },
            "title": "Config Options",
            "type": "array"
          },
          "config_revision": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Config Revision",
            "type": "string"
          },
          "display_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Display Name",
            "type": "string"
          },
          "harness_key": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Harness Key",
            "type": "string"
          },
          "health": {
            "$ref": "#/components/schemas/AgentHostHarnessHealth"
          },
          "stale_after": {
            "format": "date-time",
            "title": "Stale After",
            "type": "string"
          },
          "stale_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stale Reason"
          },
          "upstream_version": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upstream Version"
          }
        },
        "required": [
          "harness_key",
          "display_name",
          "adapter_version",
          "health",
          "config_revision",
          "stale_after"
        ],
        "title": "AgentHostHarnessSnapshot",
        "type": "object"
      },
      "AgentHostListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentHostResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AgentHostListResponse",
        "type": "object"
      },
      "AgentHostPairingComplete": {
        "properties": {
          "display_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Display Name",
            "type": "string"
          },
          "hello": {
            "$ref": "#/components/schemas/HostHello"
          },
          "pairing_code": {
            "maxLength": 512,
            "minLength": 16,
            "title": "Pairing Code",
            "type": "string"
          }
        },
        "required": [
          "pairing_code",
          "display_name",
          "hello"
        ],
        "title": "AgentHostPairingComplete",
        "type": "object"
      },
      "AgentHostPairingCompleted": {
        "properties": {
          "host_id": {
            "format": "uuid",
            "title": "Host Id",
            "type": "string"
          },
          "host_secret": {
            "title": "Host Secret",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "host_id",
          "user_id",
          "host_secret"
        ],
        "title": "AgentHostPairingCompleted",
        "type": "object"
      },
      "AgentHostPairingCreate": {
        "properties": {
          "display_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Display Name",
            "type": "string"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "AgentHostPairingCreate",
        "type": "object"
      },
      "AgentHostPairingCreated": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "pairing_code": {
            "title": "Pairing Code",
            "type": "string"
          },
          "pairing_id": {
            "format": "uuid",
            "title": "Pairing Id",
            "type": "string"
          }
        },
        "required": [
          "pairing_id",
          "pairing_code",
          "expires_at"
        ],
        "title": "AgentHostPairingCreated",
        "type": "object"
      },
      "AgentHostPollRequest": {
        "properties": {
          "acknowledged_command_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 256,
            "title": "Acknowledged Command Ids",
            "type": "array"
          },
          "capacity": {
            "$ref": "#/components/schemas/AgentHostCapacity"
          },
          "checkpoints": {
            "items": {
              "$ref": "#/components/schemas/AgentHostRunCheckpoint"
            },
            "maxItems": 256,
            "title": "Checkpoints",
            "type": "array"
          },
          "hello": {
            "$ref": "#/components/schemas/HostHello"
          },
          "rejections": {
            "items": {
              "$ref": "#/components/schemas/AgentHostCommandRejection"
            },
            "maxItems": 256,
            "title": "Rejections",
            "type": "array"
          }
        },
        "required": [
          "hello"
        ],
        "title": "AgentHostPollRequest",
        "type": "object"
      },
      "AgentHostPollResponse": {
        "properties": {
          "commands": {
            "items": {
              "$ref": "#/components/schemas/AgentHostCommand"
            },
            "title": "Commands",
            "type": "array"
          },
          "host_status": {
            "$ref": "#/components/schemas/AgentHostStatus"
          },
          "poll_after_ms": {
            "default": 0,
            "maximum": 60000,
            "minimum": 0,
            "title": "Poll After Ms",
            "type": "integer"
          },
          "protocol_version": {
            "default": 2,
            "title": "Protocol Version",
            "type": "integer"
          }
        },
        "required": [
          "host_status"
        ],
        "title": "AgentHostPollResponse",
        "type": "object"
      },
      "AgentHostRejectionCode": {
        "enum": [
          "DRAINING",
          "COMMAND_EXPIRED",
          "HARNESS_NOT_FOUND",
          "CONFIG_REVISION_STALE",
          "CAPACITY_LOST",
          "ADAPTER_UNAVAILABLE",
          "INVALID_COMMAND"
        ],
        "title": "AgentHostRejectionCode",
        "type": "string"
      },
      "AgentHostResponse": {
        "properties": {
          "capacity": {
            "additionalProperties": true,
            "title": "Capacity",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "host_release": {
            "title": "Host Release",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "installation_id": {
            "title": "Installation Id",
            "type": "string"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "protocol_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Protocol Version"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "status": {
            "$ref": "#/components/schemas/AgentHostStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "installation_id",
          "display_name",
          "status",
          "protocol_version",
          "host_release",
          "capacity",
          "last_seen_at",
          "revoked_at",
          "created_at",
          "updated_at"
        ],
        "title": "AgentHostResponse",
        "type": "object"
      },
      "AgentHostRunCheckpoint": {
        "properties": {
          "detail": {
            "additionalProperties": true,
            "title": "Detail",
            "type": "object"
          },
          "lease_epoch": {
            "minimum": 1,
            "title": "Lease Epoch",
            "type": "integer"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/AgentHostRunState"
          }
        },
        "required": [
          "run_id",
          "lease_epoch",
          "state"
        ],
        "title": "AgentHostRunCheckpoint",
        "type": "object"
      },
      "AgentHostRunState": {
        "enum": [
          "QUEUED_FOR_HOST",
          "LEASED",
          "ACCEPTED",
          "DISPATCHING",
          "RUNNING",
          "RECOVERING",
          "WAITING_INPUT",
          "SUCCEEDED",
          "FAILED",
          "CANCELLED",
          "DISPATCH_UNKNOWN"
        ],
        "title": "AgentHostRunState",
        "type": "string"
      },
      "AgentHostStatus": {
        "enum": [
          "ONLINE",
          "OFFLINE",
          "DRAINING",
          "UPGRADE_REQUIRED",
          "REVOKED"
        ],
        "title": "AgentHostStatus",
        "type": "string"
      },
      "AgentListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "AgentListResponse",
        "type": "object"
      },
      "AgentMessageResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "AgentMessageResponse",
        "type": "object"
      },
      "AgentNode": {
        "description": "Agent node. The run waits on the agent conversation to complete.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/AgentNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "AGENT",
            "default": "AGENT",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "AgentNode",
        "type": "object"
      },
      "AgentNodeConfig": {
        "description": "Configuration for Agent node.",
        "properties": {
          "agent_name": {
            "description": "Agent resource name to execute.",
            "examples": [
              "expense-parser"
            ],
            "minLength": 1,
            "title": "Agent Name",
            "type": "string"
          },
          "input_mapping": {
            "additionalProperties": {
              "discriminator": {
                "mapping": {
                  "expression": "#/components/schemas/ExpressionInputBinding",
                  "literal": "#/components/schemas/LiteralInputBinding"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ExpressionInputBinding"
                },
                {
                  "$ref": "#/components/schemas/LiteralInputBinding"
                }
              ]
            },
            "description": "Explicit mapping from agent input key to either an expression or a literal JSON value. Strings are never auto-interpreted.",
            "example": {
              "channel": {
                "type": "literal",
                "value": "finance"
              },
              "issue_key": {
                "type": "expression",
                "value": "start.payload.issue.key"
              }
            },
            "title": "Input Mapping",
            "type": "object"
          }
        },
        "required": [
          "agent_name"
        ],
        "title": "AgentNodeConfig",
        "type": "object"
      },
      "AgentNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/AgentNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "AGENT",
            "default": "AGENT",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "AgentNodeResponse",
        "type": "object"
      },
      "AgentPermissionsReplaceRequest": {
        "properties": {
          "grants": {
            "items": {
              "$ref": "#/components/schemas/AgentResourcePermissionRequest"
            },
            "title": "Grants",
            "type": "array"
          }
        },
        "title": "AgentPermissionsReplaceRequest",
        "type": "object"
      },
      "AgentPermissionsResponse": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_name": {
            "title": "Agent Name",
            "type": "string"
          },
          "grants": {
            "items": {
              "$ref": "#/components/schemas/AgentResourcePermissionResponse"
            },
            "title": "Grants",
            "type": "array"
          }
        },
        "required": [
          "agent_id",
          "agent_name"
        ],
        "title": "AgentPermissionsResponse",
        "type": "object"
      },
      "AgentResourcePermissionRequest": {
        "properties": {
          "permission_ids": {
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "AgentResourcePermissionRequest",
        "type": "object"
      },
      "AgentResourcePermissionResponse": {
        "properties": {
          "permission_ids": {
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "AgentResourcePermissionResponse",
        "type": "object"
      },
      "AgentRunApprovalDecision": {
        "description": "User decision scope for a run approval.",
        "enum": [
          "APPROVE_ONCE",
          "APPROVE_FOR_SESSION",
          "DENY"
        ],
        "title": "AgentRunApprovalDecision",
        "type": "string"
      },
      "AgentRunStartResponse": {
        "properties": {
          "agent_run_id": {
            "format": "uuid",
            "title": "Agent Run Id",
            "type": "string"
          },
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "started_new_run": {
            "title": "Started New Run",
            "type": "boolean"
          }
        },
        "required": [
          "conversation_id",
          "agent_run_id",
          "started_new_run"
        ],
        "title": "AgentRunStartResponse",
        "type": "object"
      },
      "AgentRunStatus": {
        "description": "Internal lifecycle for one harness execution.",
        "enum": [
          "RUNNING",
          "STOP_REQUESTED",
          "COMPLETED",
          "FAILED",
          "STOPPED"
        ],
        "title": "AgentRunStatus",
        "type": "string"
      },
      "AgentRuntimeConfig": {
        "description": "Select an agent runtime profile and optional catalog model.",
        "properties": {
          "model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "profile_id": {
            "minLength": 1,
            "title": "Profile Id",
            "type": "string"
          }
        },
        "required": [
          "profile_id"
        ],
        "title": "AgentRuntimeConfig",
        "type": "object"
      },
      "AgentRuntimeProfileDetailResponse": {
        "description": "One profile plus the live harness it is bound to.\n\nAn editor has to render the harness's *current* config options, not the ones\nthe profile was saved against - those are what the edit will be validated\nand re-pinned to.",
        "properties": {
          "availability_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability Status"
          },
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "default_model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "derived_harness_kind": {
            "$ref": "#/components/schemas/HarnessKind"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "harness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentHostHarnessResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "harness_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Harness Id"
          },
          "has_credentials": {
            "default": false,
            "title": "Has Credentials",
            "type": "boolean"
          },
          "host_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentHostStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/RuntimeProfileKind"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "model_catalog": {
            "items": {
              "$ref": "#/components/schemas/RuntimeModelCatalogEntry"
            },
            "title": "Model Catalog",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "protocol": {
            "$ref": "#/components/schemas/RuntimeProfileProtocol"
          },
          "scope": {
            "$ref": "#/components/schemas/RuntimeProfileScope"
          },
          "status": {
            "$ref": "#/components/schemas/RuntimeProfileStatus"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "scope",
          "kind",
          "protocol",
          "name",
          "status",
          "derived_harness_kind"
        ],
        "title": "AgentRuntimeProfileDetailResponse",
        "type": "object"
      },
      "AgentRuntimeProfileListResponse": {
        "properties": {
          "default_runtime": {
            "$ref": "#/components/schemas/AgentRuntimeConfig"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentRuntimeProfileResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items",
          "default_runtime"
        ],
        "title": "AgentRuntimeProfileListResponse",
        "type": "object"
      },
      "AgentRuntimeProfileResponse": {
        "properties": {
          "availability_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability Status"
          },
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "default_model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "derived_harness_kind": {
            "$ref": "#/components/schemas/HarnessKind"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "harness_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Harness Id"
          },
          "has_credentials": {
            "default": false,
            "title": "Has Credentials",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/RuntimeProfileKind"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "model_catalog": {
            "items": {
              "$ref": "#/components/schemas/RuntimeModelCatalogEntry"
            },
            "title": "Model Catalog",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "protocol": {
            "$ref": "#/components/schemas/RuntimeProfileProtocol"
          },
          "scope": {
            "$ref": "#/components/schemas/RuntimeProfileScope"
          },
          "status": {
            "$ref": "#/components/schemas/RuntimeProfileStatus"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "scope",
          "kind",
          "protocol",
          "name",
          "status",
          "derived_harness_kind"
        ],
        "title": "AgentRuntimeProfileResponse",
        "type": "object"
      },
      "AgentSummaryResponse": {
        "description": "Lean agent shape for list responses.\n\nOmits the heavy single-resource fields (`instruction`, `input_schema`,\n`output_schema`, `agent_runtime`) — fetch those from `agent.get`. Keeps\n`toolsets` so list cards can show a connection count.",
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "grants": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentResourcePermissionResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grants"
          },
          "has_pinned_runtime": {
            "default": false,
            "title": "Has Pinned Runtime",
            "type": "boolean"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "takes_input": {
            "default": false,
            "title": "Takes Input",
            "type": "boolean"
          },
          "toolsets": {
            "items": {
              "$ref": "#/components/schemas/AgentToolset"
            },
            "title": "Toolsets",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "created_at",
          "updated_at"
        ],
        "title": "AgentSummaryResponse",
        "type": "object"
      },
      "AgentSurfaceListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentSurfaceResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "AgentSurfaceListResponse",
        "type": "object"
      },
      "AgentSurfaceResponse": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "config": {
            "$ref": "#/components/schemas/SurfaceConfigResponse"
          },
          "connection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceConnection"
              },
              {
                "type": "null"
              }
            ]
          },
          "credential_mode": {
            "$ref": "#/components/schemas/SurfaceCredentialMode",
            "default": "SYSTEM"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "reach": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceReach"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AgentSurfaceStatus",
            "default": "ACTIVE"
          },
          "surface_identity_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface Identity Email"
          },
          "surface_identity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface Identity Id"
          },
          "surface_identity_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface Identity Username"
          },
          "uses_default_agent": {
            "default": false,
            "title": "Uses Default Agent",
            "type": "boolean"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          }
        },
        "required": [
          "id",
          "pod_id",
          "name",
          "platform",
          "config"
        ],
        "title": "AgentSurfaceResponse",
        "type": "object"
      },
      "AgentSurfaceStatus": {
        "enum": [
          "ACTIVE",
          "PENDING_ADMIN_CONSENT",
          "INACTIVE",
          "NEEDS_SETUP",
          "ERROR"
        ],
        "title": "AgentSurfaceStatus",
        "type": "string"
      },
      "AgentToolset": {
        "description": "Known tool bundles an agent may request.",
        "enum": [
          "WORKSPACE_CLI",
          "SKILLS",
          "WEB_SEARCH",
          "USER_INTERACTION",
          "SPEECH",
          "POD",
          "SUBAGENTS",
          "TODO",
          "CONNECTORS",
          "SNOOZE",
          "MESSAGING",
          "MEMORY",
          "VIEW_IMAGE"
        ],
        "title": "AgentToolset",
        "type": "string"
      },
      "AppBundleUploadRequest": {
        "properties": {
          "dist_archive": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dist Archive"
          },
          "source_archive": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Archive"
          }
        },
        "title": "AppBundleUploadRequest",
        "type": "object"
      },
      "AppBundleUploadResponse": {
        "properties": {
          "app": {
            "$ref": "#/components/schemas/AppDetailResponse"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message",
          "app"
        ],
        "title": "AppBundleUploadResponse",
        "type": "object"
      },
      "AppDetailResponse": {
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "title": "Created At"
          },
          "current_release_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Release Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "public_slug": {
            "title": "Public Slug",
            "type": "string"
          },
          "source_archive_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Archive Path"
          },
          "status": {
            "$ref": "#/components/schemas/AppStatus"
          },
          "updated_at": {
            "title": "Updated At"
          },
          "url": {
            "readOnly": true,
            "title": "Url",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "PUBLIC",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "public_slug",
          "status",
          "created_at",
          "updated_at",
          "url"
        ],
        "title": "AppDetailResponse",
        "type": "object"
      },
      "AppListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AppDetailResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "AppListResponse",
        "type": "object"
      },
      "AppMessageResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "AppMessageResponse",
        "type": "object"
      },
      "AppStatus": {
        "enum": [
          "DRAFT",
          "READY"
        ],
        "title": "AppStatus",
        "type": "string"
      },
      "AppTriggerListResponseSchema": {
        "description": "Schema for trigger list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AppTriggerSummaryResponseSchema"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "AppTriggerListResponseSchema",
        "type": "object"
      },
      "AppTriggerResponseSchema": {
        "description": "Schema for trigger response.",
        "properties": {
          "config_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config Schema"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectorKind"
          },
          "payload_example": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload Example"
          },
          "payload_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload Schema"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "connector_id",
          "kind",
          "description",
          "config_schema",
          "payload_schema",
          "payload_example",
          "created_at",
          "updated_at"
        ],
        "title": "AppTriggerResponseSchema",
        "type": "object"
      },
      "AppTriggerSummaryResponseSchema": {
        "description": "Lean trigger shape for list responses.\n\nOmits the heavy `config_schema` / `payload_schema` / `payload_example` JSON\nblobs — fetch those from `connector.trigger.get`.",
        "properties": {
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectorKind"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "connector_id",
          "kind",
          "description",
          "created_at",
          "updated_at"
        ],
        "title": "AppTriggerSummaryResponseSchema",
        "type": "object"
      },
      "ApplyImportRequest": {
        "description": "Body for applying a planned import.",
        "properties": {
          "confirm_destructive": {
            "default": false,
            "description": "Required to proceed when the plan has destructive steps.",
            "title": "Confirm Destructive",
            "type": "boolean"
          },
          "variables": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Resolved values for the plan's ${var} placeholders.",
            "title": "Variables",
            "type": "object"
          }
        },
        "title": "ApplyImportRequest",
        "type": "object"
      },
      "ApprovalDecisionResponse": {
        "properties": {
          "approval_id": {
            "title": "Approval Id",
            "type": "string"
          },
          "decision": {
            "$ref": "#/components/schemas/AgentRunApprovalDecision"
          },
          "status": {
            "default": "resolved",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "approval_id",
          "decision"
        ],
        "title": "ApprovalDecisionResponse",
        "type": "object"
      },
      "AuthConfigCreateSchema": {
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "config_source": {
            "default": "SYSTEM_DEFAULT",
            "title": "Config Source",
            "type": "string"
          },
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which of the connector's kinds to install. Optional when the connector offers only one.",
            "title": "Kind"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "required": [
          "connector_id"
        ],
        "title": "AuthConfigCreateSchema",
        "type": "object"
      },
      "AuthConfigListResponseSchema": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuthConfigResponseSchema"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "AuthConfigListResponseSchema",
        "type": "object"
      },
      "AuthConfigResponseSchema": {
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "config_source": {
            "title": "Config Source",
            "type": "string"
          },
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "connector_id",
          "kind",
          "config_source",
          "status",
          "name",
          "created_at",
          "updated_at"
        ],
        "title": "AuthConfigResponseSchema",
        "type": "object"
      },
      "AuthConfigUpdateResponseSchema": {
        "properties": {
          "accounts_marked_for_reauth": {
            "default": 0,
            "description": "Connected accounts flagged for reconnect because the change invalidated their stored credentials. They are never deleted: the account keeps its id and grants, and reconnecting updates it in place, so anything referencing it keeps working.",
            "title": "Accounts Marked For Reauth",
            "type": "integer"
          },
          "auth_config": {
            "$ref": "#/components/schemas/AuthConfigResponseSchema"
          },
          "operations_discovered": {
            "default": 0,
            "description": "Operations re-discovered because the change altered where they come from. Zero for a connector whose operations are static.",
            "title": "Operations Discovered",
            "type": "integer"
          }
        },
        "required": [
          "auth_config"
        ],
        "title": "AuthConfigUpdateResponseSchema",
        "type": "object"
      },
      "AuthConfigUpdateSchema": {
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Replacement configuration. Re-validated against the connector's schema, and re-checked against the network-target guard.",
            "title": "Config"
          },
          "is_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Make this the install that a bare connector_id resolves to. Demotes whichever install currently holds that role.",
            "title": "Is Default"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New name for this install. Accounts follow the rename, since they reference the install by id.",
            "title": "Name"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ACTIVE or DISABLED.",
            "title": "Status"
          }
        },
        "title": "AuthConfigUpdateSchema",
        "type": "object"
      },
      "AuthScheme": {
        "enum": [
          "OAUTH2",
          "API_KEY",
          "NOAUTH"
        ],
        "title": "AuthScheme",
        "type": "string"
      },
      "AvailableSurface": {
        "description": "One connectable surface platform. ``supported_credential_modes`` is the\nsingle source of truth for how it can be set up: ``[CUSTOM]`` means an account\nmust be connected; ``[CUSTOM, SYSTEM]`` means a Lemma-managed bot can also run\nwith no account. The frontend derives ``account_needed = SYSTEM not in modes``\nand ``system_bot_available = SYSTEM in modes``.",
        "properties": {
          "connect": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceConnectDescriptor"
              },
              {
                "type": "null"
              }
            ]
          },
          "connector_available": {
            "default": true,
            "title": "Connector Available",
            "type": "boolean"
          },
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "email_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Domain"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "managed_setup_available": {
            "default": false,
            "title": "Managed Setup Available",
            "type": "boolean"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "supported_credential_modes": {
            "items": {
              "$ref": "#/components/schemas/SurfaceCredentialMode"
            },
            "title": "Supported Credential Modes",
            "type": "array"
          },
          "system_claim": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceSystemClaim"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "platform",
          "connector_id",
          "kind",
          "supported_credential_modes"
        ],
        "title": "AvailableSurface",
        "type": "object"
      },
      "AvailableSurfaceChannelResponse": {
        "description": "A channel/group the surface bot can be configured to respond in.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_member": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Member"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "required": [
          "id"
        ],
        "title": "AvailableSurfaceChannelResponse",
        "type": "object"
      },
      "AvailableSurfaceChannelsResponse": {
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/AvailableSurfaceChannelResponse"
            },
            "title": "Channels",
            "type": "array"
          }
        },
        "title": "AvailableSurfaceChannelsResponse",
        "type": "object"
      },
      "AvailableSurfacesResponse": {
        "properties": {
          "surfaces": {
            "items": {
              "$ref": "#/components/schemas/AvailableSurface"
            },
            "title": "Surfaces",
            "type": "array"
          }
        },
        "title": "AvailableSurfacesResponse",
        "type": "object"
      },
      "BulkCreateRecordsRequest": {
        "description": "Schema for bulk creating records.",
        "properties": {
          "records": {
            "description": "List of record payload objects to insert.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Records",
            "type": "array"
          },
          "upsert": {
            "default": false,
            "description": "When true, insert records and update existing rows that conflict on the table primary key.",
            "title": "Upsert",
            "type": "boolean"
          }
        },
        "required": [
          "records"
        ],
        "title": "BulkCreateRecordsRequest",
        "type": "object"
      },
      "BulkDeleteRecordsRequest": {
        "description": "Schema for bulk deleting records.",
        "properties": {
          "record_ids": {
            "description": "Primary key values to delete.",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "format": "uuid",
                  "type": "string"
                }
              ]
            },
            "title": "Record Ids",
            "type": "array"
          }
        },
        "required": [
          "record_ids"
        ],
        "title": "BulkDeleteRecordsRequest",
        "type": "object"
      },
      "BulkUpdateRecordsRequest": {
        "description": "Schema for bulk updating records.",
        "properties": {
          "records": {
            "description": "List of record updates. Each item must include the table primary key field.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Records",
            "type": "array"
          }
        },
        "required": [
          "records"
        ],
        "title": "BulkUpdateRecordsRequest",
        "type": "object"
      },
      "BundleSourceKind": {
        "description": "Where an imported bundle comes from — a CAPS wire enum.\n\n``URL`` covers any lemma-origin signed download URL (an export or an\nuploaded ``.zip`` staged into our object storage); ``GITHUB`` is a public\nrepo fetched via the connector path.",
        "enum": [
          "URL",
          "GITHUB"
        ],
        "title": "BundleSourceKind",
        "type": "string"
      },
      "ColumnSchema": {
        "description": "Schema for a datastore table column.",
        "properties": {
          "auto": {
            "default": false,
            "description": "Whether the column is auto-generated",
            "title": "Auto",
            "type": "boolean"
          },
          "computed": {
            "default": false,
            "description": "Whether this is a computed column",
            "title": "Computed",
            "type": "boolean"
          },
          "default": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Default value for the column",
            "title": "Default"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Column description",
            "title": "Description"
          },
          "expression": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "SQL expression for computed columns",
            "title": "Expression"
          },
          "foreign_key": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForeignKeySpec"
              },
              {
                "type": "null"
              }
            ],
            "description": "Foreign key specification"
          },
          "max_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Maximum length for TEXT columns",
            "title": "Max Length"
          },
          "name": {
            "description": "Column name",
            "title": "Name",
            "type": "string"
          },
          "options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Allowed options for ENUM columns",
            "title": "Options"
          },
          "required": {
            "default": false,
            "description": "Whether the column is required (NOT NULL)",
            "title": "Required",
            "type": "boolean"
          },
          "system": {
            "default": false,
            "description": "Whether the column is system-managed by the backend.",
            "title": "System",
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/DatastoreDataType",
            "description": "Column data type"
          },
          "type_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Additional type-specific parameters",
            "title": "Type Params"
          },
          "unique": {
            "default": false,
            "description": "Whether the column must have unique values",
            "title": "Unique",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "title": "ColumnSchema",
        "type": "object"
      },
      "ConnectRequestInitiateSchema": {
        "description": "Schema for initiating a connect request.",
        "properties": {
          "auth_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Auth config ID to connect",
            "title": "Auth Config Id"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Connector ID to connect",
            "title": "Connector Id"
          }
        },
        "title": "ConnectRequestInitiateSchema",
        "type": "object"
      },
      "ConnectRequestResponseSchema": {
        "description": "Schema for connect request response.",
        "properties": {
          "attributes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attributes"
          },
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "authorization_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authorization Url"
          },
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "organization_id",
          "auth_config_id",
          "connector_id",
          "authorization_url",
          "status",
          "attributes",
          "created_at",
          "updated_at"
        ],
        "title": "ConnectRequestResponseSchema",
        "type": "object"
      },
      "ConnectedAccountSummary": {
        "properties": {
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "connector_id",
          "status"
        ],
        "title": "ConnectedAccountSummary",
        "type": "object"
      },
      "ConnectorDetailResponseSchema": {
        "description": "Schema for connector details including operation catalog.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "kinds": {
            "items": {
              "$ref": "#/components/schemas/ConnectorKindResponseSchema"
            },
            "title": "Kinds",
            "type": "array"
          },
          "operations": {
            "additionalProperties": {
              "$ref": "#/components/schemas/OperationSummary"
            },
            "title": "Operations",
            "type": "object"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "description",
          "icon",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "ConnectorDetailResponseSchema",
        "type": "object"
      },
      "ConnectorKind": {
        "description": "How an install authenticates, discovers and executes operations.",
        "enum": [
          "composio",
          "http",
          "sql",
          "mcp",
          "package"
        ],
        "title": "ConnectorKind",
        "type": "string"
      },
      "ConnectorKindResponseSchema": {
        "description": "One way a connector can be installed.\n\nFlat rather than a union over the five kinds: a client's job here is to\ndecide what to put in an install's `config`, and for that `kind` plus the\nschemas is the whole answer. The per-kind extras below are populated only\nwhere they apply.",
        "properties": {
          "auth_scheme": {
            "$ref": "#/components/schemas/AuthScheme",
            "default": "OAUTH2"
          },
          "config_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "JSON Schema for an install's `config`.",
            "title": "Config Schema"
          },
          "credential_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Schema"
          },
          "discovery": {
            "default": "none",
            "title": "Discovery",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectorKind"
          },
          "oauth2_defaults": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OAuth2DefaultsResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "package_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Package Name"
          },
          "supports_org_custom_oauth": {
            "default": false,
            "title": "Supports Org Custom Oauth",
            "type": "boolean"
          },
          "system_default_available": {
            "default": false,
            "title": "System Default Available",
            "type": "boolean"
          },
          "toolkit_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Toolkit Slug"
          }
        },
        "required": [
          "kind"
        ],
        "title": "ConnectorKindResponseSchema",
        "type": "object"
      },
      "ConnectorListResponseSchema": {
        "description": "Schema for connector list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectorResponseSchema"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "ConnectorListResponseSchema",
        "type": "object"
      },
      "ConnectorResponseSchema": {
        "description": "Schema for connector response.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "kinds": {
            "items": {
              "$ref": "#/components/schemas/ConnectorKindResponseSchema"
            },
            "title": "Kinds",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "description",
          "icon",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "ConnectorResponseSchema",
        "type": "object"
      },
      "ConnectorSkillResponse": {
        "properties": {
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "markdown": {
            "title": "Markdown",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "connector_id",
          "markdown"
        ],
        "title": "ConnectorSkillResponse",
        "type": "object"
      },
      "ConnectorStatusResponse": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/ConnectedAccountSummary"
            },
            "title": "Accounts",
            "type": "array"
          },
          "installed": {
            "items": {
              "$ref": "#/components/schemas/InstalledAppSummary"
            },
            "title": "Installed",
            "type": "array"
          }
        },
        "required": [
          "installed",
          "accounts"
        ],
        "title": "ConnectorStatusResponse",
        "type": "object"
      },
      "ConversationListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConversationResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "ConversationListResponse",
        "type": "object"
      },
      "ConversationResponse": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "last_run_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Error"
          },
          "last_run_finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Finished At"
          },
          "last_run_retryable": {
            "default": false,
            "title": "Last Run Retryable",
            "type": "boolean"
          },
          "last_run_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRunStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "output": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "type": {
            "$ref": "#/components/schemas/ConversationType",
            "default": "CHAT"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "pod_id",
          "created_at",
          "updated_at"
        ],
        "title": "ConversationResponse",
        "type": "object"
      },
      "ConversationStatus": {
        "description": "User-visible lifecycle for a conversation.",
        "enum": [
          "RUNNING",
          "STOP_REQUESTED",
          "WAITING",
          "COMPLETED",
          "FAILED",
          "STOPPED"
        ],
        "title": "ConversationStatus",
        "type": "string"
      },
      "ConversationType": {
        "description": "User-visible conversation behavior.",
        "enum": [
          "CHAT",
          "TASK",
          "PROJECT"
        ],
        "title": "ConversationType",
        "type": "string"
      },
      "CreateAgentHostRuntimeProfileRequest": {
        "properties": {
          "config_selections": {
            "additionalProperties": true,
            "title": "Config Selections",
            "type": "object"
          },
          "default_model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "harness_id": {
            "format": "uuid",
            "title": "Harness Id",
            "type": "string"
          },
          "host_wait_timeout_seconds": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host Wait Timeout Seconds"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/RuntimeProfileScope",
            "default": "PERSONAL"
          },
          "source": {
            "const": "AGENT_HOST",
            "default": "AGENT_HOST",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "harness_id",
          "name"
        ],
        "title": "CreateAgentHostRuntimeProfileRequest",
        "type": "object"
      },
      "CreateAgentRequest": {
        "properties": {
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "instruction": {
            "minLength": 1,
            "title": "Instruction",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema"
          },
          "permissions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentPermissionsReplaceRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional resource grants to apply to the new agent in the same request. Equivalent to calling the permissions-replace endpoint right after create — grants are keyed by resource_name."
          },
          "toolsets": {
            "description": "Toolsets the agent declares. Omit the field to start with web search and memory; pass an explicit empty list for none.",
            "items": {
              "$ref": "#/components/schemas/AgentToolset"
            },
            "title": "Toolsets",
            "type": "array"
          },
          "visibility": {
            "$ref": "#/components/schemas/ResourceVisibility",
            "default": "POD"
          }
        },
        "required": [
          "name",
          "instruction"
        ],
        "title": "CreateAgentRequest",
        "type": "object"
      },
      "CreateAnthropicCompatibleRuntimeProfileRequest": {
        "properties": {
          "api_key": {
            "minLength": 1,
            "title": "Api Key",
            "type": "string"
          },
          "base_url": {
            "anyOf": [
              {
                "format": "uri",
                "maxLength": 2083,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "default_model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Headers",
            "type": "object"
          },
          "model_names": {
            "items": {
              "type": "string"
            },
            "title": "Model Names",
            "type": "array"
          },
          "model_settings": {
            "additionalProperties": true,
            "title": "Model Settings",
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "source": {
            "const": "ANTHROPIC_COMPATIBLE",
            "default": "ANTHROPIC_COMPATIBLE",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "name",
          "api_key"
        ],
        "title": "CreateAnthropicCompatibleRuntimeProfileRequest",
        "type": "object"
      },
      "CreateAppFromWidgetRequest": {
        "description": "Promote a conversation widget into a persisted app.\n\nThe widget's stored source fragment (addressed by conversation + tool call) is\npreserved, wrapped into a standalone document without embed-only chrome, and\ndeployed as the app's bundle.",
        "properties": {
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "public_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Slug"
          },
          "tool_call_id": {
            "title": "Tool Call Id",
            "type": "string"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "required": [
          "conversation_id",
          "tool_call_id",
          "name"
        ],
        "title": "CreateAppFromWidgetRequest",
        "type": "object"
      },
      "CreateAppRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "public_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Slug"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateAppRequest",
        "type": "object"
      },
      "CreateConversationRequest": {
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "type": {
            "$ref": "#/components/schemas/ConversationType",
            "default": "CHAT"
          }
        },
        "title": "CreateConversationRequest",
        "type": "object"
      },
      "CreateFolderRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "path": {
            "anyOf": [
              {
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "title": "CreateFolderRequest",
        "type": "object"
      },
      "CreateFunctionRequest": {
        "additionalProperties": false,
        "description": "Request to create a function.\n\nInput and output schemas are derived from the submitted code and returned\non the function response. They are not accepted in create requests.",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Python source for the function. When provided, the platform analyzes the code and populates input_schema, output_schema, and config_schema on the returned function.",
            "title": "Code"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionPermissionsReplaceRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional resource grants to REPLACE on this function, in the same request. Equivalent to calling the permissions-replace endpoint right after this call — grants are keyed by resource_name. Omit the key to leave existing grants alone; an empty grant list revokes them."
          },
          "type": {
            "$ref": "#/components/schemas/FunctionType",
            "default": "API"
          },
          "visibility": {
            "$ref": "#/components/schemas/ResourceVisibility",
            "default": "POD"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateFunctionRequest",
        "type": "object"
      },
      "CreateOpenAICompatibleRuntimeProfileRequest": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "base_url": {
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "title": "Base Url",
            "type": "string"
          },
          "default_model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Headers",
            "type": "object"
          },
          "model_names": {
            "items": {
              "type": "string"
            },
            "title": "Model Names",
            "type": "array"
          },
          "model_settings": {
            "additionalProperties": true,
            "title": "Model Settings",
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "source": {
            "const": "OPENAI_COMPATIBLE",
            "default": "OPENAI_COMPATIBLE",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "name",
          "base_url"
        ],
        "title": "CreateOpenAICompatibleRuntimeProfileRequest",
        "type": "object"
      },
      "CreateRecordRequest": {
        "description": "Schema for creating a record.",
        "properties": {
          "data": {
            "additionalProperties": true,
            "description": "Record object keyed by table column names.",
            "title": "Data",
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "title": "CreateRecordRequest",
        "type": "object"
      },
      "CreateScheduleRequest": {
        "description": "Request to create a pod schedule.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Connected connector account used to provision provider-backed webhook schedules.",
            "title": "Account Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "connector_trigger_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Connector trigger id for agent WEBHOOK schedules. Do not provide this for workflow schedules; workflow WEBHOOK schedules derive it from the workflow start configuration.",
            "title": "Connector Trigger Id"
          },
          "filter_instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional schedule-level LLM filter instruction. Filters belong to the schedule, not the workflow start.",
            "title": "Filter Instruction"
          },
          "filter_output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional schema for the schedule-level filter output. Filters belong to the schedule, not the workflow start.",
            "title": "Filter Output Schema"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stable pod-scoped schedule name used for import/export upserts.",
            "title": "Name"
          },
          "schedule_type": {
            "$ref": "#/components/schemas/ScheduleType"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          },
          "workflow_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Name"
          }
        },
        "required": [
          "schedule_type"
        ],
        "title": "CreateScheduleRequest",
        "type": "object"
      },
      "CreateTableRequest": {
        "description": "Schema for creating a new table.",
        "properties": {
          "columns": {
            "description": "Table column definitions. Each column name must be unique. Use `type`, `required`, `default`, `foreign_key`, and `computed` as needed. The backend also materializes physical system columns so table metadata reflects the real schema: `id` when omitted as the primary key, `created_at`, `updated_at`, and `user_id` when RLS is enabled.",
            "items": {
              "$ref": "#/components/schemas/ColumnSchema"
            },
            "minItems": 1,
            "title": "Columns",
            "type": "array"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional table metadata/configuration. This updates table config metadata and does not directly alter physical columns.",
            "title": "Config"
          },
          "enable_rls": {
            "default": true,
            "description": "Enable row-level security for this table. When enabled, API reads/writes are scoped by current user.",
            "title": "Enable Rls",
            "type": "boolean"
          },
          "name": {
            "description": "Table name. Use alphanumeric and underscore only. Names prefixed with `reserved_` are system-managed and should not be user-created.",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "primary_key_column": {
            "default": "id",
            "description": "Primary key column name. If not `id`, it must also be declared in `columns`.",
            "title": "Primary Key Column",
            "type": "string"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "required": [
          "name",
          "columns"
        ],
        "title": "CreateTableRequest",
        "type": "object"
      },
      "DataStoreWorkflowStartConfigInput": {
        "properties": {
          "operations": {
            "description": "Datastore operations that should trigger this flow. One or more of INSERT, UPDATE, DELETE.",
            "items": {
              "$ref": "#/components/schemas/DatastoreOperation"
            },
            "title": "Operations",
            "type": "array"
          },
          "table_name": {
            "description": "Table name inside the datastore to subscribe to.",
            "title": "Table Name",
            "type": "string"
          }
        },
        "required": [
          "table_name"
        ],
        "title": "DataStoreWorkflowStartConfigInput",
        "type": "object"
      },
      "DataStoreWorkflowStartConfigOutput": {
        "properties": {
          "operations": {
            "description": "Datastore operations that should trigger this flow. One or more of INSERT, UPDATE, DELETE.",
            "items": {
              "$ref": "#/components/schemas/DatastoreOperation"
            },
            "title": "Operations",
            "type": "array"
          },
          "table_name": {
            "description": "Table name inside the datastore to subscribe to.",
            "title": "Table Name",
            "type": "string"
          }
        },
        "required": [
          "table_name"
        ],
        "title": "DataStoreWorkflowStartConfigOutput",
        "type": "object"
      },
      "DataStoreWorkflowStartInput": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/DataStoreWorkflowStartConfigInput",
            "description": "Datastore trigger configuration for this workflow."
          },
          "type": {
            "const": "DATASTORE_EVENT",
            "default": "DATASTORE_EVENT",
            "description": "Datastore-event workflow start.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "config"
        ],
        "title": "DataStoreWorkflowStartInput",
        "type": "object"
      },
      "DataStoreWorkflowStartOutput": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/DataStoreWorkflowStartConfigOutput",
            "description": "Datastore trigger configuration for this workflow."
          },
          "type": {
            "const": "DATASTORE_EVENT",
            "default": "DATASTORE_EVENT",
            "description": "Datastore-event workflow start.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "config"
        ],
        "title": "DataStoreWorkflowStartOutput",
        "type": "object"
      },
      "DatastoreCountResponse": {
        "description": "Schema for bulk mutation responses reporting an affected-row count.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "title": "DatastoreCountResponse",
        "type": "object"
      },
      "DatastoreDataType": {
        "description": "Supported data types for datastore columns.",
        "enum": [
          "TEXT",
          "FILE_PATH",
          "INTEGER",
          "FLOAT",
          "BOOLEAN",
          "JSON",
          "DATE",
          "DATETIME",
          "UUID",
          "USER",
          "VECTOR",
          "SERIAL",
          "ENUM"
        ],
        "title": "DatastoreDataType",
        "type": "string"
      },
      "DatastoreFileUploadRequest": {
        "properties": {
          "data": {
            "contentMediaType": "application/octet-stream",
            "format": "binary",
            "title": "Data",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "directory_path": {
            "default": "/",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "search_enabled": {
            "default": true,
            "type": "boolean"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "DatastoreFileUploadRequest",
        "type": "object"
      },
      "DatastoreOperation": {
        "enum": [
          "INSERT",
          "UPDATE",
          "DELETE"
        ],
        "title": "DatastoreOperation",
        "type": "string"
      },
      "DatastoreQueryRequest": {
        "description": "Schema for executing read-only SQL within a datastore.",
        "properties": {
          "query": {
            "description": "Read-only SQL query executed inside this datastore schema. A single SELECT statement only; mutating statements (INSERT, UPDATE, DELETE, ALTER, DROP, CREATE, TRUNCATE, ...) and cross-schema references are rejected. Joins, aggregates, and subqueries across tables are allowed, including RLS-enabled tables — rows of an RLS table are scoped to the caller unless they administer it. Example: `SELECT id, amount FROM expenses WHERE amount > 100 ORDER BY created_at DESC LIMIT 20`.",
            "minLength": 1,
            "title": "Query",
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "title": "DatastoreQueryRequest",
        "type": "object"
      },
      "DatastoreQueryResponse": {
        "description": "Schema for read-only datastore query results.",
        "properties": {
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "DatastoreQueryResponse",
        "type": "object"
      },
      "DecisionNode": {
        "description": "Decision node. Routes to the first rule whose condition is truthy;\nfalls through to the default outgoing edge when no rule matches.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/DecisionNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "DECISION",
            "default": "DECISION",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "DecisionNode",
        "type": "object"
      },
      "DecisionNodeConfig": {
        "description": "Configuration for Decision node.",
        "properties": {
          "rules": {
            "items": {
              "$ref": "#/components/schemas/DecisionRule"
            },
            "title": "Rules",
            "type": "array"
          }
        },
        "title": "DecisionNodeConfig",
        "type": "object"
      },
      "DecisionNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/DecisionNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "DECISION",
            "default": "DECISION",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "DecisionNodeResponse",
        "type": "object"
      },
      "DecisionRule": {
        "properties": {
          "condition": {
            "description": "JMESPath condition evaluated against the run context. The first rule whose condition is truthy selects the next node. Example: `collect_input.decision == 'approved'`.",
            "title": "Condition",
            "type": "string"
          },
          "next_node_id": {
            "title": "Next Node Id",
            "type": "string"
          }
        },
        "required": [
          "condition",
          "next_node_id"
        ],
        "title": "DecisionRule",
        "type": "object"
      },
      "DirectoryTreeNode": {
        "properties": {
          "children": {
            "items": {
              "$ref": "#/components/schemas/DirectoryTreeNode"
            },
            "title": "Children",
            "type": "array"
          },
          "has_markdown": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Has Markdown"
          },
          "has_more_files": {
            "default": false,
            "title": "Has More Files",
            "type": "boolean"
          },
          "indexed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexed"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "required": [
          "path",
          "name",
          "kind"
        ],
        "title": "DirectoryTreeNode",
        "type": "object"
      },
      "DirectoryTreeResponse": {
        "properties": {
          "files_per_directory": {
            "title": "Files Per Directory",
            "type": "integer"
          },
          "root_path": {
            "title": "Root Path",
            "type": "string"
          },
          "tree": {
            "$ref": "#/components/schemas/DirectoryTreeNode"
          }
        },
        "required": [
          "root_path",
          "files_per_directory",
          "tree"
        ],
        "title": "DirectoryTreeResponse",
        "type": "object"
      },
      "EndNode": {
        "description": "End node. Completes the run.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/EndNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "END",
            "default": "END",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "EndNode",
        "type": "object"
      },
      "EndNodeConfig": {
        "description": "Configuration for End node.",
        "properties": {},
        "title": "EndNodeConfig",
        "type": "object"
      },
      "EndNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/EndNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "END",
            "default": "END",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "EndNodeResponse",
        "type": "object"
      },
      "ErrorResponse": {
        "description": "Unified error envelope returned by every error response.\n\nAll error responses (domain errors, HTTP exceptions, request validation\nfailures, and unexpected errors) share this shape. See\n``app.core.api.exception_handlers``.",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Details"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Request Id"
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "EventWorkflowStartConfigInput": {
        "properties": {
          "connector_id": {
            "description": "Connector connector identifier.",
            "title": "Connector Id",
            "type": "string"
          },
          "connector_trigger_id": {
            "description": "Connector trigger identifier to subscribe to.",
            "title": "Connector Trigger Id",
            "type": "string"
          },
          "trigger_config": {
            "additionalProperties": true,
            "title": "Trigger Config",
            "type": "object"
          }
        },
        "required": [
          "connector_trigger_id",
          "connector_id"
        ],
        "title": "EventWorkflowStartConfigInput",
        "type": "object"
      },
      "EventWorkflowStartConfigOutput": {
        "properties": {
          "connector_id": {
            "description": "Connector connector identifier.",
            "title": "Connector Id",
            "type": "string"
          },
          "connector_trigger_id": {
            "description": "Connector trigger identifier to subscribe to.",
            "title": "Connector Trigger Id",
            "type": "string"
          },
          "trigger_config": {
            "additionalProperties": true,
            "title": "Trigger Config",
            "type": "object"
          }
        },
        "required": [
          "connector_trigger_id",
          "connector_id"
        ],
        "title": "EventWorkflowStartConfigOutput",
        "type": "object"
      },
      "EventWorkflowStartInput": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/EventWorkflowStartConfigInput",
            "description": "Connector trigger configuration for this workflow."
          },
          "type": {
            "const": "EVENT",
            "default": "EVENT",
            "description": "Event-triggered workflow start.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "config"
        ],
        "title": "EventWorkflowStartInput",
        "type": "object"
      },
      "EventWorkflowStartOutput": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/EventWorkflowStartConfigOutput",
            "description": "Connector trigger configuration for this workflow."
          },
          "type": {
            "const": "EVENT",
            "default": "EVENT",
            "description": "Event-triggered workflow start.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "config"
        ],
        "title": "EventWorkflowStartOutput",
        "type": "object"
      },
      "ExecuteFunctionRequest": {
        "additionalProperties": false,
        "description": "Request to execute a function.",
        "properties": {
          "input_data": {
            "$ref": "#/components/schemas/JsonObject"
          }
        },
        "title": "ExecuteFunctionRequest",
        "type": "object"
      },
      "ExportProgressResponse": {
        "properties": {
          "done": {
            "default": 0,
            "title": "Done",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "ExportProgressResponse",
        "type": "object"
      },
      "ExportStartRequest": {
        "additionalProperties": false,
        "description": "Body for starting a pod export.",
        "properties": {
          "data_tables": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tables whose rows to seed into the bundle, named one by one. There is deliberately no 'every table' switch: row data is the part of a pod most likely to be private, so it leaves the pod only for tables the caller actually asked for. Omit for a bundle with no row data. A name that is not a table in this pod is skipped with a warning. Row data is capped (per-table and in total) regardless.",
            "title": "Data Tables"
          },
          "file_folders": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Folder paths whose contents to include, named one by one (e.g. ['/reports', '/config']). Each is exported with everything beneath it. As with `data_tables` there is no 'every folder' switch. Omit for a bundle with no files. A path that is not a folder in this pod is skipped with a warning. File bytes share a conservative size budget with table row data.",
            "title": "File Folders"
          },
          "include": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional list of resource types to include (e.g. ['tables', 'agents']). Omit to export every supported resource type.",
            "title": "Include"
          },
          "ttl_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested lifetime (seconds) of the signed download URL + archive retention. Clamped to the configured maximum; omit for the default.",
            "title": "Ttl Seconds"
          }
        },
        "title": "ExportStartRequest",
        "type": "object"
      },
      "ExportStatus": {
        "enum": [
          "QUEUED",
          "EXPORTING",
          "READY",
          "FAILED"
        ],
        "title": "ExportStatus",
        "type": "string"
      },
      "ExportStatusResponse": {
        "description": "Status of a pod export job (pure Redis read).",
        "properties": {
          "bundle_filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bundle Filename"
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Signed, authenticated download URL; present once the export is READY. Requires a logged-in lemma user to fetch.",
            "title": "Download Url"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the download URL (and archive) expires.",
            "title": "Expires At"
          },
          "export_id": {
            "format": "uuid",
            "title": "Export Id",
            "type": "string"
          },
          "progress": {
            "$ref": "#/components/schemas/ExportProgressResponse"
          },
          "status": {
            "$ref": "#/components/schemas/ExportStatus"
          },
          "warnings": {
            "description": "Data/asset-cap notices (e.g. truncated seed rows, skipped files).",
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "export_id",
          "status"
        ],
        "title": "ExportStatusResponse",
        "type": "object"
      },
      "ExpressionInputBinding": {
        "description": "Resolve a value from the run context using a JMESPath expression.",
        "properties": {
          "optional": {
            "default": false,
            "description": "When true, an expression that resolves to nothing yields null instead of failing the run.",
            "title": "Optional",
            "type": "boolean"
          },
          "type": {
            "const": "expression",
            "default": "expression",
            "title": "Type",
            "type": "string"
          },
          "value": {
            "description": "JMESPath expression evaluated against the run context. Example: `start.payload.issue.key` or `collect_input.amount`. Expressions that resolve to nothing fail the run unless `optional` is set.",
            "examples": [
              "start.payload.issue.key",
              "collect_input.amount"
            ],
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "title": "ExpressionInputBinding",
        "type": "object"
      },
      "FeedbackCategory": {
        "description": "Which part of Lemma the report is about.",
        "enum": [
          "cli",
          "skill",
          "platform",
          "docs",
          "other"
        ],
        "title": "FeedbackCategory",
        "type": "string"
      },
      "FileChildSchema": {
        "description": "A derived child artifact of a processed document (converted markdown,\nan extracted figure, or a renderable page). Fetch its bytes from\n``GET …/files/children/content?path=<child path>``.",
        "properties": {
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "page_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Number"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          }
        },
        "required": [
          "name",
          "path",
          "kind"
        ],
        "title": "FileChildSchema",
        "type": "object"
      },
      "FileChildrenResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FileChildSchema"
            },
            "title": "Items",
            "type": "array"
          },
          "path": {
            "title": "Path",
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "title": "FileChildrenResponse",
        "type": "object"
      },
      "FileDetailResponse": {
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "content_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Sha256"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "indexed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexed At"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "last_processing_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Processing Error"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "processing_attempts": {
            "default": 0,
            "title": "Processing Attempts",
            "type": "integer"
          },
          "search_enabled": {
            "default": true,
            "title": "Search Enabled",
            "type": "boolean"
          },
          "size_bytes": {
            "default": 0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "visibility": {
            "default": "PERSONAL",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "path",
          "kind",
          "name",
          "description",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "FileDetailResponse",
        "type": "object"
      },
      "FileListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FileSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "FileListResponse",
        "type": "object"
      },
      "FileSearchRequest": {
        "properties": {
          "limit": {
            "default": 10,
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "query": {
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "scope_mode": {
            "$ref": "#/components/schemas/FileSearchScopeMode",
            "default": "SUBTREE"
          },
          "scope_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional folder path to scope search results.",
            "title": "Scope Path"
          },
          "search_method": {
            "$ref": "#/components/schemas/SearchMethod",
            "default": "HYBRID"
          }
        },
        "required": [
          "query"
        ],
        "title": "FileSearchRequest",
        "type": "object"
      },
      "FileSearchResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FileSearchResultSchema"
            },
            "title": "Items",
            "type": "array"
          },
          "query": {
            "title": "Query",
            "type": "string"
          },
          "search_method": {
            "$ref": "#/components/schemas/SearchMethod"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "query",
          "search_method"
        ],
        "title": "FileSearchResponse",
        "type": "object"
      },
      "FileSearchResultSchema": {
        "properties": {
          "chunk_index": {
            "title": "Chunk Index",
            "type": "integer"
          },
          "content": {
            "title": "Content",
            "type": "string"
          },
          "file_id": {
            "format": "uuid",
            "title": "File Id",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "page_end": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page End"
          },
          "page_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Number"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "score": {
            "title": "Score",
            "type": "number"
          }
        },
        "required": [
          "file_id",
          "path",
          "chunk_index",
          "content",
          "score"
        ],
        "title": "FileSearchResultSchema",
        "type": "object"
      },
      "FileSearchScopeMode": {
        "enum": [
          "DIRECT",
          "SUBTREE"
        ],
        "title": "FileSearchScopeMode",
        "type": "string"
      },
      "FileSignedUrlRequest": {
        "properties": {
          "expires_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires Seconds"
          },
          "max_hits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Hits"
          }
        },
        "title": "FileSignedUrlRequest",
        "type": "object"
      },
      "FileSignedUrlResponse": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "max_hits": {
            "title": "Max Hits",
            "type": "integer"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "signed_url": {
            "title": "Signed Url",
            "type": "string"
          }
        },
        "required": [
          "path",
          "signed_url",
          "expires_at",
          "max_hits"
        ],
        "title": "FileSignedUrlResponse",
        "type": "object"
      },
      "FileSummaryResponse": {
        "description": "Lean file/folder shape for list responses.\n\nOmits the heavy `metadata` (JSONB) and `last_processing_error` (can be\nmulti-KB) — fetch those from `file.get`. Keeps `description` (small, may be\nshown in list views).",
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "indexed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexed At"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "search_enabled": {
            "default": true,
            "title": "Search Enabled",
            "type": "boolean"
          },
          "size_bytes": {
            "default": 0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "visibility": {
            "default": "PERSONAL",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "path",
          "kind",
          "name",
          "description",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "FileSummaryResponse",
        "type": "object"
      },
      "FileUrlResponse": {
        "properties": {
          "app_url": {
            "title": "App Url",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "path",
          "url",
          "app_url",
          "expires_at"
        ],
        "title": "FileUrlResponse",
        "type": "object"
      },
      "ForeignKeySpec": {
        "description": "Specification for a foreign key constraint.",
        "properties": {
          "references": {
            "description": "Format: 'other_table.primary_key_column'",
            "title": "References",
            "type": "string"
          }
        },
        "required": [
          "references"
        ],
        "title": "ForeignKeySpec",
        "type": "object"
      },
      "FormNode": {
        "description": "Form node for user input. The run waits on it until the form is\nsubmitted via the form-submit endpoint.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/FormNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "FORM",
            "default": "FORM",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "FormNode",
        "type": "object"
      },
      "FormNodeConfig": {
        "description": "Configuration for Form node (user input).",
        "properties": {
          "assignee_pod_member_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pod member assigned to submit this form.",
            "title": "Assignee Pod Member Id"
          },
          "assignee_pod_member_id_expression": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional JMESPath expression resolving to a pod member id. Takes precedence over assignee_pod_member_id.",
            "title": "Assignee Pod Member Id Expression"
          },
          "input_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for user input",
            "title": "Input Schema",
            "type": "object"
          },
          "ui_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "UI configuration",
            "title": "Ui Schema"
          }
        },
        "required": [
          "input_schema"
        ],
        "title": "FormNodeConfig",
        "type": "object"
      },
      "FormNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/FormNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "FORM",
            "default": "FORM",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "FormNodeResponse",
        "type": "object"
      },
      "FunctionActionResponse": {
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "code_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code Path"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "config_schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional configuration schema derived from the function code."
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_schema": {
            "$ref": "#/components/schemas/JsonObject",
            "description": "Input JSON schema derived from the function code."
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "$ref": "#/components/schemas/JsonObject",
            "description": "Output JSON schema derived from the function code."
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "revision_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Hash"
          },
          "status": {
            "$ref": "#/components/schemas/FunctionStatus"
          },
          "type": {
            "$ref": "#/components/schemas/FunctionType"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "input_schema",
          "output_schema",
          "type",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "FunctionActionResponse",
        "type": "object"
      },
      "FunctionDetailResponse": {
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "code_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code Path"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "config_schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional configuration schema derived from the function code."
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_schema": {
            "$ref": "#/components/schemas/JsonObject",
            "description": "Input JSON schema derived from the function code."
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "$ref": "#/components/schemas/JsonObject",
            "description": "Output JSON schema derived from the function code."
          },
          "permissions": {
            "$ref": "#/components/schemas/FunctionPermissionsResponse"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "revision_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Hash"
          },
          "status": {
            "$ref": "#/components/schemas/FunctionStatus"
          },
          "type": {
            "$ref": "#/components/schemas/FunctionType"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "input_schema",
          "output_schema",
          "type",
          "status",
          "created_at",
          "updated_at",
          "permissions"
        ],
        "title": "FunctionDetailResponse",
        "type": "object"
      },
      "FunctionListResponse": {
        "description": "List of functions.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FunctionSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "FunctionListResponse",
        "type": "object"
      },
      "FunctionMessageResponse": {
        "description": "Simple function action response.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "FunctionMessageResponse",
        "type": "object"
      },
      "FunctionNode": {
        "description": "Function node. Completes inline for synchronous functions or waits on\nthe function run for asynchronous ones.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/FunctionNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "FUNCTION",
            "default": "FUNCTION",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "FunctionNode",
        "type": "object"
      },
      "FunctionNodeConfig": {
        "description": "Configuration for Function node.",
        "properties": {
          "function_name": {
            "description": "Function resource name to execute.",
            "examples": [
              "insert-expense"
            ],
            "minLength": 1,
            "title": "Function Name",
            "type": "string"
          },
          "input_mapping": {
            "additionalProperties": {
              "discriminator": {
                "mapping": {
                  "expression": "#/components/schemas/ExpressionInputBinding",
                  "literal": "#/components/schemas/LiteralInputBinding"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ExpressionInputBinding"
                },
                {
                  "$ref": "#/components/schemas/LiteralInputBinding"
                }
              ]
            },
            "description": "Explicit mapping from function argument key to either an expression or a literal JSON value. Strings are never auto-interpreted.",
            "example": {
              "amount": {
                "type": "expression",
                "value": "collect_input.amount"
              },
              "currency": {
                "type": "literal",
                "value": "USD"
              }
            },
            "title": "Input Mapping",
            "type": "object"
          }
        },
        "required": [
          "function_name"
        ],
        "title": "FunctionNodeConfig",
        "type": "object"
      },
      "FunctionNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/FunctionNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "FUNCTION",
            "default": "FUNCTION",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "FunctionNodeResponse",
        "type": "object"
      },
      "FunctionPermissionsReplaceRequest": {
        "properties": {
          "grants": {
            "items": {
              "$ref": "#/components/schemas/FunctionResourcePermissionRequest"
            },
            "title": "Grants",
            "type": "array"
          }
        },
        "title": "FunctionPermissionsReplaceRequest",
        "type": "object"
      },
      "FunctionPermissionsResponse": {
        "properties": {
          "function_id": {
            "format": "uuid",
            "title": "Function Id",
            "type": "string"
          },
          "function_name": {
            "title": "Function Name",
            "type": "string"
          },
          "grants": {
            "items": {
              "$ref": "#/components/schemas/FunctionResourcePermissionResponse"
            },
            "title": "Grants",
            "type": "array"
          }
        },
        "required": [
          "function_id",
          "function_name"
        ],
        "title": "FunctionPermissionsResponse",
        "type": "object"
      },
      "FunctionResourcePermissionRequest": {
        "properties": {
          "permission_ids": {
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "FunctionResourcePermissionRequest",
        "type": "object"
      },
      "FunctionResourcePermissionResponse": {
        "properties": {
          "permission_ids": {
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "FunctionResourcePermissionResponse",
        "type": "object"
      },
      "FunctionRunListResponse": {
        "description": "List of function runs.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FunctionRunSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "FunctionRunListResponse",
        "type": "object"
      },
      "FunctionRunResponse": {
        "description": "Function run response.",
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "function_id": {
            "format": "uuid",
            "title": "Function Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id"
          },
          "logs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logs"
          },
          "output_data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Hash"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/FunctionRunStatus"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "function_id",
          "user_id",
          "status",
          "started_at",
          "completed_at",
          "created_at"
        ],
        "title": "FunctionRunResponse",
        "type": "object"
      },
      "FunctionRunStatus": {
        "description": "Status of a function run.",
        "enum": [
          "PENDING",
          "RUNNING",
          "COMPLETED",
          "FAILED",
          "CANCELLED"
        ],
        "title": "FunctionRunStatus",
        "type": "string"
      },
      "FunctionRunSummaryResponse": {
        "description": "Function run summary for list responses.",
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "function_id": {
            "format": "uuid",
            "title": "Function Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/FunctionRunStatus"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "function_id",
          "user_id",
          "status",
          "started_at",
          "completed_at",
          "created_at"
        ],
        "title": "FunctionRunSummaryResponse",
        "type": "object"
      },
      "FunctionStatus": {
        "description": "Status of a function.",
        "enum": [
          "DRAFT",
          "CODE_GENERATION",
          "READY",
          "ERROR"
        ],
        "title": "FunctionStatus",
        "type": "string"
      },
      "FunctionSummaryResponse": {
        "description": "Lean function shape for list responses.\n\nOmits the heavy `input_schema` / `output_schema` / `config_schema` (full JSON\nschemas derived from the function code) and `code` — fetch those from\n`function.get`.",
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "code_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code Path"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "grants": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FunctionResourcePermissionResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grants"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "revision_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Hash"
          },
          "status": {
            "$ref": "#/components/schemas/FunctionStatus"
          },
          "type": {
            "$ref": "#/components/schemas/FunctionType"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "type",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "FunctionSummaryResponse",
        "type": "object"
      },
      "FunctionType": {
        "description": "Execution mode for a function.",
        "enum": [
          "API",
          "JOB"
        ],
        "title": "FunctionType",
        "type": "string"
      },
      "HarnessKind": {
        "description": "Runtime framework used to execute an agent.\n\nTwo kinds, not one per coding tool: ``LEMMA`` runs in-process, ``HARNESS``\ndispatches through Agent Host. Which tool Agent Host runs is identified by\n``harness_id`` on the runtime profile, so the retired per-tool values\n(``CODEX``, ``CLAUDE_CODE``, ``OPENCODE``, ``CURSOR``, ``ANTIGRAVITY``) went\naway with the local daemon that needed them.\n\nNo stored row is read back through this enum — a persisted runtime profile\nnames a ``RuntimeProfileProtocol``, and the kind is derived from that — so\ndropping those values cannot fail a history read. Back-compat for retired\n*protocols* is handled where it belongs, in the profile repository.",
        "enum": [
          "LEMMA",
          "HARNESS"
        ],
        "title": "HarnessKind",
        "type": "string"
      },
      "HomeAgentResponse": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "HomeAgentResponse",
        "type": "object"
      },
      "HomeAppResponse": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "status"
        ],
        "title": "HomeAppResponse",
        "type": "object"
      },
      "HomePodResponse": {
        "description": "A pod with what it contains and what the caller is to it.",
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/HomeAgentResponse"
            },
            "title": "Agents",
            "type": "array"
          },
          "apps": {
            "items": {
              "$ref": "#/components/schemas/HomeAppResponse"
            },
            "title": "Apps",
            "type": "array"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "title": "Roles",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "roles",
          "apps",
          "agents"
        ],
        "title": "HomePodResponse",
        "type": "object"
      },
      "HostHello": {
        "properties": {
          "host_release": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Host Release",
            "type": "string"
          },
          "installation_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Installation Id",
            "type": "string"
          },
          "protocol_version": {
            "minimum": 1,
            "title": "Protocol Version",
            "type": "integer"
          }
        },
        "required": [
          "installation_id",
          "host_release",
          "protocol_version"
        ],
        "title": "HostHello",
        "type": "object"
      },
      "IconUploadRequest": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "format": "binary",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "IconUploadRequest",
        "type": "object"
      },
      "IconUploadResponse": {
        "description": "Response payload for uploaded icons.",
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "icon_url": {
            "title": "Icon Url",
            "type": "string"
          },
          "storage_path": {
            "title": "Storage Path",
            "type": "string"
          }
        },
        "required": [
          "icon_url",
          "storage_path",
          "content_type"
        ],
        "title": "IconUploadResponse",
        "type": "object"
      },
      "ImportPlanResponse": {
        "properties": {
          "bundle_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bundle Name"
          },
          "format_version": {
            "title": "Format Version",
            "type": "integer"
          },
          "has_destructive_steps": {
            "default": false,
            "title": "Has Destructive Steps",
            "type": "boolean"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/PlanStepResponse"
            },
            "title": "Steps",
            "type": "array"
          },
          "variables": {
            "items": {
              "$ref": "#/components/schemas/VariableSpecResponse"
            },
            "title": "Variables",
            "type": "array"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "format_version"
        ],
        "title": "ImportPlanResponse",
        "type": "object"
      },
      "ImportStartRequest": {
        "description": "Body for starting a URL-based import.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Connector account for a private GitHub repo.",
            "title": "Account Id"
          },
          "kind": {
            "$ref": "#/components/schemas/BundleSourceKind",
            "description": "URL (a lemma signed download URL) or GITHUB (a public repo)."
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "GITHUB repo owner.",
            "title": "Owner"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "GITHUB branch/tag/sha (optional).",
            "title": "Ref"
          },
          "repo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "GITHUB repo name.",
            "title": "Repo"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For URL: a lemma bundle download URL (from an export or an upload). For GITHUB: the repo URL (alternative to owner+repo).",
            "title": "Url"
          }
        },
        "required": [
          "kind"
        ],
        "title": "ImportStartRequest",
        "type": "object"
      },
      "ImportStatus": {
        "enum": [
          "QUEUED",
          "FETCHING",
          "PLANNING",
          "AWAITING_CONFIRMATION",
          "APPLYING",
          "CANCELLING",
          "COMPLETED",
          "FAILED",
          "CANCELLED",
          "PARTIALLY_CANCELLED"
        ],
        "title": "ImportStatus",
        "type": "string"
      },
      "ImportStatusResponse": {
        "description": "Status of a durable pod import job.",
        "properties": {
          "cancel_requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Requested At"
          },
          "committed_steps": {
            "items": {
              "type": "integer"
            },
            "title": "Committed Steps",
            "type": "array"
          },
          "current_step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Step"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "events_url": {
            "title": "Events Url",
            "type": "string"
          },
          "import_id": {
            "format": "uuid",
            "title": "Import Id",
            "type": "string"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ImportPlanResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "progress": {
            "$ref": "#/components/schemas/ExportProgressResponse"
          },
          "retryable": {
            "default": false,
            "title": "Retryable",
            "type": "boolean"
          },
          "source_kind": {
            "title": "Source Kind",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ImportStatus"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "import_id",
          "pod_id",
          "status",
          "source_kind",
          "events_url"
        ],
        "title": "ImportStatusResponse",
        "type": "object"
      },
      "InstalledAppSummary": {
        "properties": {
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "name",
          "connector_id",
          "status",
          "kind"
        ],
        "title": "InstalledAppSummary",
        "type": "object"
      },
      "JsonObject": {
        "additionalProperties": {
          "$ref": "#/components/schemas/JsonValue"
        },
        "type": "object"
      },
      "JsonValue": {},
      "LiteralInputBinding": {
        "description": "Pass a literal JSON value into the target input without resolution.",
        "properties": {
          "type": {
            "const": "literal",
            "default": "literal",
            "title": "Type",
            "type": "string"
          },
          "value": {
            "description": "Literal JSON value forwarded exactly as provided. Use this for strings, numbers, booleans, arrays, or objects that should not be interpreted as JMESPath expressions.",
            "examples": [
              "abc",
              42,
              true,
              {
                "channel": "finance"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "value"
        ],
        "title": "LiteralInputBinding",
        "type": "object"
      },
      "LoopNode": {
        "description": "Loop node. Iterates the body chain once per item; the aggregated\noutput is `{results: [...], count: n}` under the loop node id.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/LoopNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "LOOP",
            "default": "LOOP",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "LoopNode",
        "type": "object"
      },
      "LoopNodeConfig": {
        "description": "Configuration for Loop node.",
        "properties": {
          "child_node_id": {
            "description": "Id of the first node of the loop body executed per item.",
            "title": "Child Node Id",
            "type": "string"
          },
          "item_var_name": {
            "default": "item",
            "description": "Alias for the current item inside the loop body, available as `loop.<item_var_name>` (the item is always available as `loop.item`).",
            "title": "Item Var Name",
            "type": "string"
          },
          "items_path": {
            "description": "JMESPath to an array in the run context to iterate over.",
            "title": "Items Path",
            "type": "string"
          }
        },
        "required": [
          "items_path",
          "child_node_id"
        ],
        "title": "LoopNodeConfig",
        "type": "object"
      },
      "LoopNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/LoopNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "LOOP",
            "default": "LOOP",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "LoopNodeResponse",
        "type": "object"
      },
      "ManualWorkflowStartInput": {
        "properties": {
          "config": {
            "description": "Always `null` for manual workflow starts.",
            "title": "Config",
            "type": "null"
          },
          "type": {
            "const": "MANUAL",
            "default": "MANUAL",
            "description": "Manual workflow start with no configuration payload.",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "ManualWorkflowStartInput",
        "type": "object"
      },
      "ManualWorkflowStartOutput": {
        "properties": {
          "config": {
            "description": "Always `null` for manual workflow starts.",
            "title": "Config",
            "type": "null"
          },
          "type": {
            "const": "MANUAL",
            "default": "MANUAL",
            "description": "Manual workflow start with no configuration payload.",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "ManualWorkflowStartOutput",
        "type": "object"
      },
      "MessageKind": {
        "description": "Discriminates the flat message body.\n\nA message carries exactly one kind. Textual kinds use ``text``; tool kinds\nuse ``tool_name``/``tool_call_id`` plus ``tool_args`` (call) or\n``tool_result`` (return). There is no nested ``content`` object.",
        "enum": [
          "TEXT",
          "NOTIFICATION",
          "THINKING",
          "TOOL_CALL",
          "TOOL_RETURN"
        ],
        "title": "MessageKind",
        "type": "string"
      },
      "MessageListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MessageResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "MessageListResponse",
        "type": "object"
      },
      "MessageResponse": {
        "properties": {
          "agent_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Run Id"
          },
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/MessageKind"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "sequence": {
            "title": "Sequence",
            "type": "integer"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "tool_args": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Tool Args"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name"
          },
          "tool_result": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Tool Result"
          }
        },
        "required": [
          "id",
          "conversation_id",
          "sequence",
          "role",
          "kind",
          "created_at"
        ],
        "title": "MessageResponse",
        "type": "object"
      },
      "MessageResponseSchema": {
        "description": "Schema for message response.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "success": {
            "default": true,
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "message"
        ],
        "title": "MessageResponseSchema",
        "type": "object"
      },
      "NavigationOrganizationResponse": {
        "description": "An organization and the pods the caller can see inside it.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pods": {
            "items": {
              "$ref": "#/components/schemas/NavigationPodResponse"
            },
            "title": "Pods",
            "type": "array"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "pods"
        ],
        "title": "NavigationOrganizationResponse",
        "type": "object"
      },
      "NavigationPodResponse": {
        "description": "A pod as a listing entry — enough to draw it, label it, and link to it.\n\nThe line this payload holds is scalars yes, collections no. A pod's own\ncolumns cost nothing to return: they ride along in the query that found the\npod, so the response grows with the number of pods and not with what is\ninside them. Apps, agents and roles are the other side of that line, and\nlive on ``/organizations/{org_id}/home``.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "updated_at"
        ],
        "title": "NavigationPodResponse",
        "type": "object"
      },
      "NavigationResponse": {
        "description": "Everything a sidebar and a pod list need, for every organization, at once.\n\nShallow in the sense that matters: it carries each pod's own columns, and\nnothing that would require looking inside a pod. Apps, agents and roles are\nthe detail endpoint's job, because carrying them here would make the payload\ngrow with the content of every organization a person happens to belong to,\nwhich is precisely the cost this endpoint exists to remove.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NavigationOrganizationResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "NavigationResponse",
        "type": "object"
      },
      "NotificationDeliveryStatus": {
        "description": "Where the *channel* is: did the message physically get to them?\n\nDeliberately a second column rather than more members on\n:class:`NotificationStatus`. The two axes are independent — a notification\ncan be DELIVERED and still OPEN (they haven't answered), or UNDELIVERABLE\nand still RESPONDED (they saw it in the app and replied there). Smearing\nthem into one enum is how you end up unable to answer \"who did we fail to\nreach?\", which is the only question this column exists for.",
        "enum": [
          "PENDING",
          "DELIVERED",
          "UNDELIVERABLE",
          "FAILED"
        ],
        "title": "NotificationDeliveryStatus",
        "type": "string"
      },
      "NotificationListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NotificationResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "limit"
        ],
        "title": "NotificationListResponse",
        "type": "object"
      },
      "NotificationOriginKind": {
        "description": "What produced the notification. ``origin_id`` is read against this.",
        "enum": [
          "AGENT_RUN",
          "WORKFLOW_FORM",
          "SCHEDULE",
          "API"
        ],
        "title": "NotificationOriginKind",
        "type": "string"
      },
      "NotificationRespondRequest": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional structured payload alongside the answer.",
            "title": "Data"
          },
          "summary": {
            "description": "The answer, in the person's words.",
            "minLength": 1,
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "summary"
        ],
        "title": "NotificationRespondRequest",
        "type": "object"
      },
      "NotificationResponse": {
        "description": "One notification, shaped for the inbox that renders it.\n\nCarries enough to draw the row *and* decide what its action button does,\nwithout a second request: ``awaiting_response`` says whether to draw one at\nall, and ``responds_through_action`` says whether it opens a text box or the\nreal form described by ``action``.",
        "properties": {
          "action": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action"
          },
          "actor_agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Agent Id"
          },
          "actor_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor User Id"
          },
          "awaiting_response": {
            "title": "Awaiting Response",
            "type": "boolean"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "delivery_conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Conversation Id"
          },
          "delivery_platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Platform"
          },
          "delivery_status": {
            "$ref": "#/components/schemas/NotificationDeliveryStatus"
          },
          "expects_response": {
            "title": "Expects Response",
            "type": "boolean"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "origin_conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Conversation Id"
          },
          "origin_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Id"
          },
          "origin_kind": {
            "$ref": "#/components/schemas/NotificationOriginKind"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "read_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read At"
          },
          "responded_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responded At"
          },
          "responds_through_action": {
            "title": "Responds Through Action",
            "type": "boolean"
          },
          "response_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Data"
          },
          "response_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Summary"
          },
          "status": {
            "$ref": "#/components/schemas/NotificationStatus"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "undeliverable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Undeliverable Reason"
          }
        },
        "required": [
          "id",
          "pod_id",
          "title",
          "body",
          "origin_kind",
          "status",
          "delivery_status",
          "expects_response",
          "awaiting_response",
          "responds_through_action",
          "created_at"
        ],
        "title": "NotificationResponse",
        "type": "object"
      },
      "NotificationStatus": {
        "description": "Where the *person* is: has the thing we needed from them happened?",
        "enum": [
          "OPEN",
          "RESPONDED",
          "ACKNOWLEDGED",
          "EXPIRED",
          "CANCELLED"
        ],
        "title": "NotificationStatus",
        "type": "string"
      },
      "NotificationUnreadCountResponse": {
        "properties": {
          "unread": {
            "title": "Unread",
            "type": "integer"
          }
        },
        "required": [
          "unread"
        ],
        "title": "NotificationUnreadCountResponse",
        "type": "object"
      },
      "NotifyMemberRequest": {
        "additionalProperties": false,
        "description": "Send a notification to one pod member.",
        "properties": {
          "background_instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Never shown to the recipient. Tells the agent that handles their reply what to do with it.",
            "title": "Background Instruction"
          },
          "body": {
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "expects_response": {
            "default": true,
            "title": "Expects Response",
            "type": "boolean"
          },
          "expires_in_seconds": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In Seconds"
          },
          "recipient": {
            "description": "Pod member id, user id, or email address of the recipient.",
            "title": "Recipient",
            "type": "string"
          },
          "title": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "recipient",
          "title",
          "body"
        ],
        "title": "NotifyMemberRequest",
        "type": "object"
      },
      "OAuth2DefaultsResponseSchema": {
        "properties": {
          "access_token_path": {
            "default": "access_token",
            "title": "Access Token Path",
            "type": "string"
          },
          "authorization_url": {
            "title": "Authorization Url",
            "type": "string"
          },
          "default_scopes": {
            "items": {
              "type": "string"
            },
            "title": "Default Scopes",
            "type": "array"
          },
          "extra_params": {
            "additionalProperties": true,
            "title": "Extra Params",
            "type": "object"
          },
          "refresh_token_path": {
            "default": "refresh_token",
            "title": "Refresh Token Path",
            "type": "string"
          },
          "revoke_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoke Url"
          },
          "token_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Url"
          },
          "userinfo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Userinfo Url"
          }
        },
        "required": [
          "authorization_url"
        ],
        "title": "OAuth2DefaultsResponseSchema",
        "type": "object"
      },
      "OperationDetail": {
        "description": "Full operation metadata including input and output schemas.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "input_schema": {
            "additionalProperties": true,
            "title": "Input Schema",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema"
          }
        },
        "required": [
          "name",
          "input_schema"
        ],
        "title": "OperationDetail",
        "type": "object"
      },
      "OperationDetailsBatchRequest": {
        "description": "Request multiple operation details in a single call.",
        "properties": {
          "operation_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Operation names to fetch. Omit or pass an empty list to return details for every operation in the connector.",
            "title": "Operation Names"
          }
        },
        "title": "OperationDetailsBatchRequest",
        "type": "object"
      },
      "OperationDetailsBatchResponse": {
        "description": "Batch response containing full metadata for multiple operations.",
        "properties": {
          "connector_id": {
            "description": "Connector identifier.",
            "title": "Connector Id",
            "type": "string"
          },
          "items": {
            "description": "Operation details for the requested operations.",
            "items": {
              "$ref": "#/components/schemas/OperationDetail"
            },
            "title": "Items",
            "type": "array"
          },
          "returned_count": {
            "description": "Number of operation details returned in this response.",
            "title": "Returned Count",
            "type": "integer"
          }
        },
        "required": [
          "connector_id",
          "items",
          "returned_count"
        ],
        "title": "OperationDetailsBatchResponse",
        "type": "object"
      },
      "OperationDiscoverResponse": {
        "description": "Structured result for operation discovery within one connector.",
        "properties": {
          "connector_id": {
            "description": "Connector identifier.",
            "title": "Connector Id",
            "type": "string"
          },
          "items": {
            "description": "Matching operations with compact descriptions.",
            "items": {
              "$ref": "#/components/schemas/OperationSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional discovery query used to rank or filter operations.",
            "title": "Query"
          },
          "returned_count": {
            "description": "Number of operations returned in this response.",
            "title": "Returned Count",
            "type": "integer"
          },
          "total_operations": {
            "description": "Total operations available for the connector.",
            "title": "Total Operations",
            "type": "integer"
          }
        },
        "required": [
          "connector_id",
          "items",
          "total_operations",
          "returned_count"
        ],
        "title": "OperationDiscoverResponse",
        "type": "object"
      },
      "OperationExecutionRequest": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          }
        },
        "required": [
          "payload"
        ],
        "title": "OperationExecutionRequest",
        "type": "object"
      },
      "OperationExecutionResponse": {
        "properties": {
          "result": {
            "title": "Result"
          }
        },
        "required": [
          "result"
        ],
        "title": "OperationExecutionResponse",
        "type": "object"
      },
      "OperationSummary": {
        "description": "Compact operation metadata for discovery flows.",
        "properties": {
          "auth_config": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Install this operation belongs to (org-wide search only).",
            "title": "Auth Config"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Connector this operation belongs to (org-wide search only).",
            "title": "Connector Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "relevance_score": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relative relevance for the discovery query, from 0 to 1.",
            "title": "Relevance Score"
          }
        },
        "required": [
          "name"
        ],
        "title": "OperationSummary",
        "type": "object"
      },
      "OrganizationCreateRequest": {
        "description": "Organization creation request schema.",
        "properties": {
          "email_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Domain"
          },
          "join_policy": {
            "$ref": "#/components/schemas/OrganizationJoinPolicy",
            "default": "INVITE_ONLY"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "resolve_name_conflicts": {
            "default": false,
            "description": "Take the next free name instead of conflicting. For a name the user did not choose -- onboarding's derived first workspace -- where a 409 is a dead end for someone who never typed a name. Leave false for a name they typed, so a clash is reported.",
            "title": "Resolve Name Conflicts",
            "type": "boolean"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          }
        },
        "required": [
          "name"
        ],
        "title": "OrganizationCreateRequest",
        "type": "object"
      },
      "OrganizationHomeResponse": {
        "description": "One organization's landing page in a single response.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "pods": {
            "items": {
              "$ref": "#/components/schemas/HomePodResponse"
            },
            "title": "Pods",
            "type": "array"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          }
        },
        "required": [
          "organization_id",
          "name",
          "role",
          "pods"
        ],
        "title": "OrganizationHomeResponse",
        "type": "object"
      },
      "OrganizationInvitationListResponse": {
        "description": "Organization invitation list response with pagination.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationInvitationResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "OrganizationInvitationListResponse",
        "type": "object"
      },
      "OrganizationInvitationRequest": {
        "description": "Organization invitation request schema.",
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          },
          "pod_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Role"
          },
          "redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Uri"
          },
          "role": {
            "$ref": "#/components/schemas/OrganizationRole"
          }
        },
        "required": [
          "email",
          "role"
        ],
        "title": "OrganizationInvitationRequest",
        "type": "object"
      },
      "OrganizationInvitationResponse": {
        "description": "Organization invitation response schema.",
        "properties": {
          "accepted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "organization_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Name"
          },
          "pod_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Description"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          },
          "pod_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Name"
          },
          "pod_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Role"
          },
          "redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Uri"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "role": {
            "$ref": "#/components/schemas/OrganizationRole"
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationInvitationStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "organization_id",
          "role",
          "status",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "title": "OrganizationInvitationResponse",
        "type": "object"
      },
      "OrganizationInvitationStatus": {
        "description": "Statuses for organization invitations.",
        "enum": [
          "PENDING",
          "ACCEPTED",
          "EXPIRED",
          "REVOKED"
        ],
        "title": "OrganizationInvitationStatus",
        "type": "string"
      },
      "OrganizationJoinPolicy": {
        "description": "Who may self-join an organization, ordered from closed to open.",
        "enum": [
          "INVITE_ONLY",
          "EMAIL_DOMAIN",
          "PUBLIC"
        ],
        "title": "OrganizationJoinPolicy",
        "type": "string"
      },
      "OrganizationListResponse": {
        "description": "Organization list response with pagination.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "OrganizationListResponse",
        "type": "object"
      },
      "OrganizationMemberListResponse": {
        "description": "Organization member list response with pagination.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationMemberResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "OrganizationMemberListResponse",
        "type": "object"
      },
      "OrganizationMemberResponse": {
        "description": "Organization member response schema.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/OrganizationRole"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "organization_id",
          "role",
          "created_at",
          "updated_at"
        ],
        "title": "OrganizationMemberResponse",
        "type": "object"
      },
      "OrganizationMessageResponse": {
        "description": "Generic organization message response.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Uri"
          },
          "success": {
            "default": true,
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "message"
        ],
        "title": "OrganizationMessageResponse",
        "type": "object"
      },
      "OrganizationResponse": {
        "description": "Organization response schema.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Domain"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "join_policy": {
            "$ref": "#/components/schemas/OrganizationJoinPolicy"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "join_policy",
          "created_at",
          "updated_at"
        ],
        "title": "OrganizationResponse",
        "type": "object"
      },
      "OrganizationRole": {
        "description": "Roles for organization membership.",
        "enum": [
          "ORG_OWNER",
          "ORG_EDITOR",
          "ORG_MEMBER"
        ],
        "title": "OrganizationRole",
        "type": "string"
      },
      "OrganizationSlugAvailabilityResponse": {
        "description": "Organization slug availability response.\n\n``available`` answers for the slug, which is the handle and is unique across\nthe deployment. It is the only field that can refuse a create.\n\n``name_available`` is answered whenever a candidate name is passed, and is\nnow always ``true``: display names are labels and two organizations may\nshare one (PS-ONB-014). Kept so callers that probe both fields keep one\nresponse shape, and deprecated -- do not gate a create on it.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "name_available": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "description": "Always true when a name is supplied: organization display names are not unique. Gate creates on `available` instead.",
            "title": "Name Available"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "available"
        ],
        "title": "OrganizationSlugAvailabilityResponse",
        "type": "object"
      },
      "OrganizationUpdateRequest": {
        "description": "Organization update request schema (owner-only).",
        "properties": {
          "email_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Domain"
          },
          "join_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationJoinPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "OrganizationUpdateRequest",
        "type": "object"
      },
      "PlanStepResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "destructive": {
            "default": false,
            "title": "Destructive",
            "type": "boolean"
          },
          "detail": {
            "additionalProperties": true,
            "title": "Detail",
            "type": "object"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "index": {
            "title": "Index",
            "type": "integer"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "default": "PENDING",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "index",
          "kind",
          "name",
          "action"
        ],
        "title": "PlanStepResponse",
        "type": "object"
      },
      "PodConfig": {
        "description": "Typed pod-level configuration.",
        "properties": {
          "default_profile_id": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Profile Id"
          },
          "default_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "join_policy": {
            "$ref": "#/components/schemas/PodJoinPolicy",
            "default": "INVITE_ONLY"
          },
          "recipes": {
            "items": {
              "$ref": "#/components/schemas/PodRecipe"
            },
            "title": "Recipes",
            "type": "array"
          }
        },
        "title": "PodConfig",
        "type": "object"
      },
      "PodCreateRequest": {
        "description": "Pod creation request schema.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/PodConfig"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          }
        },
        "required": [
          "organization_id",
          "name"
        ],
        "title": "PodCreateRequest",
        "type": "object"
      },
      "PodEffectivePermissionsResponse": {
        "properties": {
          "actions": {
            "items": {
              "type": "string"
            },
            "title": "Actions",
            "type": "array"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          }
        },
        "required": [
          "pod_id",
          "actions"
        ],
        "title": "PodEffectivePermissionsResponse",
        "type": "object"
      },
      "PodJoinPolicy": {
        "description": "Who may self-join a pod, ordered from closed to open.",
        "enum": [
          "INVITE_ONLY",
          "ORG_MEMBERS",
          "PUBLIC"
        ],
        "title": "PodJoinPolicy",
        "type": "string"
      },
      "PodJoinRequestApproveRequest": {
        "properties": {
          "org_role": {
            "$ref": "#/components/schemas/OrganizationRole",
            "default": "ORG_MEMBER"
          },
          "pod_role": {
            "$ref": "#/components/schemas/PodRole",
            "default": "POD_USER"
          }
        },
        "title": "PodJoinRequestApproveRequest",
        "type": "object"
      },
      "PodJoinRequestCreateResponse": {
        "properties": {
          "approved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By User Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "org_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "pod_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "requested_at": {
            "format": "date-time",
            "title": "Requested At",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PodJoinRequestStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "user_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Name"
          }
        },
        "required": [
          "id",
          "pod_id",
          "organization_id",
          "user_id",
          "status",
          "requested_at",
          "created_at",
          "updated_at"
        ],
        "title": "PodJoinRequestCreateResponse",
        "type": "object"
      },
      "PodJoinRequestListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodJoinRequestCreateResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "total"
        ],
        "title": "PodJoinRequestListResponse",
        "type": "object"
      },
      "PodJoinRequestStatus": {
        "enum": [
          "PENDING",
          "APPROVED",
          "REJECTED"
        ],
        "title": "PodJoinRequestStatus",
        "type": "string"
      },
      "PodListResponse": {
        "description": "Pod list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "total"
        ],
        "title": "PodListResponse",
        "type": "object"
      },
      "PodMemberAddRequest": {
        "description": "Pod member add request schema.",
        "properties": {
          "organization_member_id": {
            "format": "uuid",
            "title": "Organization Member Id",
            "type": "string"
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Roles",
            "type": "array"
          }
        },
        "required": [
          "organization_member_id",
          "roles"
        ],
        "title": "PodMemberAddRequest",
        "type": "object"
      },
      "PodMemberDetailResponse": {
        "description": "Pod member detail response schema.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "pod_member_id": {
            "format": "uuid",
            "title": "Pod Member Id",
            "type": "string"
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "title": "Roles",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "user_email": {
            "format": "email",
            "title": "User Email",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "user_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Name"
          }
        },
        "required": [
          "pod_member_id",
          "user_id",
          "email",
          "user_email",
          "created_at",
          "updated_at"
        ],
        "title": "PodMemberDetailResponse",
        "type": "object"
      },
      "PodMemberListResponse": {
        "description": "Pod member list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodMemberResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "total"
        ],
        "title": "PodMemberListResponse",
        "type": "object"
      },
      "PodMemberResponse": {
        "description": "Pod member response schema.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "pod_member_id": {
            "format": "uuid",
            "title": "Pod Member Id",
            "type": "string"
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "title": "Roles",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_email": {
            "format": "email",
            "title": "User Email",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "user_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Name"
          }
        },
        "required": [
          "pod_member_id",
          "user_id",
          "email",
          "user_email",
          "created_at",
          "updated_at"
        ],
        "title": "PodMemberResponse",
        "type": "object"
      },
      "PodMemberUpdateRoleRequest": {
        "description": "Pod member role update request schema.",
        "properties": {
          "roles": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Roles",
            "type": "array"
          }
        },
        "required": [
          "roles"
        ],
        "title": "PodMemberUpdateRoleRequest",
        "type": "object"
      },
      "PodPermissionCatalogResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodPermissionResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "PodPermissionCatalogResponse",
        "type": "object"
      },
      "PodPermissionResponse": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "resource_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Type"
          },
          "scope": {
            "title": "Scope",
            "type": "string"
          },
          "system_only": {
            "title": "System Only",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "scope",
          "description",
          "system_only"
        ],
        "title": "PodPermissionResponse",
        "type": "object"
      },
      "PodRecipe": {
        "description": "A record of a bundle installed into this pod (the durable trace of an\nimport; the ephemeral import job state is not kept). ``kind`` distinguishes an\nuploaded bundle from a GitHub-sourced one; ``repo_url`` is set for GitHub.",
        "properties": {
          "format_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format Version"
          },
          "imported_at": {
            "format": "date-time",
            "title": "Imported At",
            "type": "string"
          },
          "imported_by": {
            "format": "uuid",
            "title": "Imported By",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "repo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repo Url"
          }
        },
        "required": [
          "kind",
          "imported_at",
          "imported_by"
        ],
        "title": "PodRecipe",
        "type": "object"
      },
      "PodResponse": {
        "description": "Pod response schema.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/PodConfig"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "organization_id",
          "name",
          "created_at",
          "updated_at"
        ],
        "title": "PodResponse",
        "type": "object"
      },
      "PodRole": {
        "description": "Explicit pod role names used across authorization and pod APIs.",
        "enum": [
          "POD_ADMIN",
          "POD_EDITOR",
          "POD_USER",
          "POD_VIEWER"
        ],
        "title": "PodRole",
        "type": "string"
      },
      "PodRoleCreateRequest": {
        "description": "Pod custom role creation request.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permission_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "title": "PodRoleCreateRequest",
        "type": "object"
      },
      "PodRoleListResponse": {
        "description": "Pod role list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodRoleResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "PodRoleListResponse",
        "type": "object"
      },
      "PodRolePermissionsReplaceRequest": {
        "properties": {
          "grants": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PodRoleResourcePermissionRequest"
            },
            "title": "Grants",
            "type": "array"
          }
        },
        "title": "PodRolePermissionsReplaceRequest",
        "type": "object"
      },
      "PodRolePermissionsResponse": {
        "properties": {
          "grants": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PodRoleResourcePermissionResponse"
            },
            "title": "Grants",
            "type": "array"
          },
          "role_id": {
            "format": "uuid",
            "title": "Role Id",
            "type": "string"
          },
          "role_name": {
            "title": "Role Name",
            "type": "string"
          }
        },
        "required": [
          "role_id",
          "role_name"
        ],
        "title": "PodRolePermissionsResponse",
        "type": "object"
      },
      "PodRoleResourcePermissionRequest": {
        "properties": {
          "permission_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "PodRoleResourcePermissionRequest",
        "type": "object"
      },
      "PodRoleResourcePermissionResponse": {
        "properties": {
          "permission_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "PodRoleResourcePermissionResponse",
        "type": "object"
      },
      "PodRoleResponse": {
        "description": "Pod role response.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By User Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_system": {
            "title": "Is System",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "permission_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "name",
          "is_system",
          "created_at"
        ],
        "title": "PodRoleResponse",
        "type": "object"
      },
      "PodUpdateRequest": {
        "description": "Pod update request schema.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "PodUpdateRequest",
        "type": "object"
      },
      "PublishMode": {
        "enum": [
          "CREATE",
          "UPDATE"
        ],
        "title": "PublishMode",
        "type": "string"
      },
      "PublishStartRequest": {
        "description": "Body for publishing a pod to GitHub.",
        "properties": {
          "account_id": {
            "description": "GitHub connector account to publish as.",
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "ai_readme": {
            "default": false,
            "description": "Polish the generated README with the system model.",
            "title": "Ai Readme",
            "type": "boolean"
          },
          "mode": {
            "$ref": "#/components/schemas/PublishMode",
            "default": "CREATE",
            "description": "CREATE refuses an existing repository. UPDATE requires an existing repository and replaces only Lemma-managed files."
          },
          "private": {
            "default": false,
            "description": "Create the repo as private.",
            "title": "Private",
            "type": "boolean"
          },
          "repo_name": {
            "description": "GitHub repository name (letters, numbers, dot, dash, underscore).",
            "maxLength": 100,
            "minLength": 1,
            "title": "Repo Name",
            "type": "string"
          }
        },
        "required": [
          "repo_name",
          "account_id"
        ],
        "title": "PublishStartRequest",
        "type": "object"
      },
      "PublishStatus": {
        "enum": [
          "QUEUED",
          "EXPORTING",
          "PUBLISHING",
          "COMPLETED",
          "FAILED"
        ],
        "title": "PublishStatus",
        "type": "string"
      },
      "PublishStatusResponse": {
        "description": "Status of a pod publish job (pure Redis read).",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "events_url": {
            "title": "Events Url",
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/PublishMode"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "private": {
            "title": "Private",
            "type": "boolean"
          },
          "progress": {
            "$ref": "#/components/schemas/ExportProgressResponse"
          },
          "publish_id": {
            "format": "uuid",
            "title": "Publish Id",
            "type": "string"
          },
          "repo_name": {
            "title": "Repo Name",
            "type": "string"
          },
          "repo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repo Url"
          },
          "retryable": {
            "default": false,
            "title": "Retryable",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/PublishStatus"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "publish_id",
          "pod_id",
          "status",
          "repo_name",
          "mode",
          "private",
          "account_id",
          "events_url"
        ],
        "title": "PublishStatusResponse",
        "type": "object"
      },
      "RecordAccessMode": {
        "description": "Row-visibility mode for record reads/writes on RLS-enabled tables.\n\n``USER`` (the default when the ``mode`` param is omitted) scopes rows to the\ncaller's own ``user_id`` so app apps keep their per-user semantics — pod\nadmins included. ``ADMIN`` returns and operates on every member's rows and\nrequires the caller to administer the table (otherwise the request is\nrejected). The mode is a no-op for non-RLS tables, whose rows are shared by\nevery member regardless.\n\nEndpoints expose this as an *optional* query param (default ``None`` ==\n``USER``) rather than one defaulting to ``RecordAccessMode.USER``: a named\nenum query param carrying a literal default makes the TypeScript generator\nemit ``mode: RecordAccessMode = 'USER'``, which fails strict typecheck (a raw\nstring is not assignable to the enum). An optional param generates the valid\n``mode?: RecordAccessMode`` while keeping one shared, CAPS-valued enum type.",
        "enum": [
          "USER",
          "ADMIN"
        ],
        "title": "RecordAccessMode",
        "type": "string"
      },
      "RecordListResponse": {
        "description": "Schema for record list response.",
        "properties": {
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "RecordListResponse",
        "type": "object"
      },
      "ReportFeedbackRequest": {
        "description": "Request payload for maintainer feedback reports.",
        "properties": {
          "actual_behavior": {
            "description": "What actually happened.",
            "minLength": 3,
            "title": "Actual Behavior",
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/FeedbackCategory",
            "description": "Which part of Lemma the report is about: 'cli' (the lemma command-line tool), 'skill' (a bundled skill's guidance), 'platform' (the API, runtime, or product behavior), 'docs' (wrong or missing documentation), or 'other'."
          },
          "expected_behavior": {
            "description": "What the caller expected to happen instead.",
            "minLength": 3,
            "title": "Expected Behavior",
            "type": "string"
          },
          "issue_encountered": {
            "description": "What issue, problem, or incorrect information was encountered.",
            "minLength": 3,
            "title": "Issue Encountered",
            "type": "string"
          },
          "subject": {
            "description": "Short subject line summarizing the report.",
            "maxLength": 255,
            "minLength": 3,
            "title": "Subject",
            "type": "string"
          },
          "suggested_next_steps": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional proposed fixes, follow-ups, or next steps.",
            "title": "Suggested Next Steps"
          }
        },
        "required": [
          "category",
          "subject",
          "issue_encountered",
          "expected_behavior",
          "actual_behavior"
        ],
        "title": "ReportFeedbackRequest",
        "type": "object"
      },
      "ReportFeedbackResponse": {
        "description": "Response payload for maintainer feedback reports.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Delegated agent associated with the report, if available.",
            "title": "Agent Id"
          },
          "feedback_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the created feedback report.",
            "title": "Feedback Id"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable status message.",
            "title": "Message"
          },
          "success": {
            "description": "Whether the feedback was recorded successfully.",
            "title": "Success",
            "type": "boolean"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authenticated user associated with the report.",
            "title": "User Id"
          }
        },
        "required": [
          "success"
        ],
        "title": "ReportFeedbackResponse",
        "type": "object"
      },
      "ResolveUserApprovalRequest": {
        "properties": {
          "decision": {
            "$ref": "#/components/schemas/AgentRunApprovalDecision"
          },
          "response": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response"
          }
        },
        "required": [
          "decision"
        ],
        "title": "ResolveUserApprovalRequest",
        "type": "object"
      },
      "ResourceAccessGrantRequest": {
        "properties": {
          "permission_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          }
        },
        "title": "ResourceAccessGrantRequest",
        "type": "object"
      },
      "ResourceAccessGrantResponse": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "grantee_id": {
            "format": "uuid",
            "title": "Grantee Id",
            "type": "string"
          },
          "grantee_type": {
            "title": "Grantee Type",
            "type": "string"
          },
          "permission_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          },
          "role_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Name"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "resource_type",
          "resource_name",
          "grantee_type",
          "grantee_id"
        ],
        "title": "ResourceAccessGrantResponse",
        "type": "object"
      },
      "ResourceAccessResponse": {
        "properties": {
          "grants": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ResourceAccessGrantResponse"
            },
            "title": "Grants",
            "type": "array"
          },
          "resource_name": {
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name"
        ],
        "title": "ResourceAccessResponse",
        "type": "object"
      },
      "ResourcePreviewResponse": {
        "description": "What a shared link may disclose about its target.\n\nReturned only when the viewer can actually read the resource, so every field\nhere is something they could already see by opening it.",
        "properties": {
          "allowed_actions": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "resource_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Id"
          },
          "resource_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Name"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "required": [
          "resource_type",
          "pod_id"
        ],
        "title": "ResourcePreviewResponse",
        "type": "object"
      },
      "ResourceType": {
        "enum": [
          "organization",
          "pod",
          "pod_member",
          "role",
          "datastore_table",
          "datastore_record",
          "folder",
          "document",
          "app",
          "agent",
          "function",
          "workflow",
          "schedule",
          "conversation",
          "connector",
          "connector_account",
          "connector_auth_config"
        ],
        "title": "ResourceType",
        "type": "string"
      },
      "ResourceVisibility": {
        "enum": [
          "PERSONAL",
          "POD",
          "RESTRICTED",
          "PUBLIC"
        ],
        "title": "ResourceVisibility",
        "type": "string"
      },
      "RuntimeModelCapability": {
        "enum": [
          "TEXT",
          "TOOLS",
          "VISION",
          "AUDIO",
          "STRUCTURED_OUTPUT",
          "REASONING"
        ],
        "title": "RuntimeModelCapability",
        "type": "string"
      },
      "RuntimeModelCatalogEntry": {
        "properties": {
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/RuntimeModelCapability"
            },
            "title": "Capabilities",
            "type": "array"
          },
          "default_model_settings": {
            "additionalProperties": true,
            "title": "Default Model Settings",
            "type": "object"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "name": {
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "provider_model_name": {
            "minLength": 1,
            "title": "Provider Model Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "provider_model_name"
        ],
        "title": "RuntimeModelCatalogEntry",
        "type": "object"
      },
      "RuntimeProfileKind": {
        "enum": [
          "MODEL_PROVIDER",
          "HARNESS"
        ],
        "title": "RuntimeProfileKind",
        "type": "string"
      },
      "RuntimeProfileProtocol": {
        "description": "How a profile reaches its runtime.\n\nThe retired local daemon needed one protocol per coding tool\n(``CODEX_APP_SERVER``, ``CLAUDE_CODE``, ``OPENCODE``, ``CURSOR``,\n``ANTIGRAVITY``). Agent Host needs one: the tool is identified by the\nprofile's ``harness_id``. Stored rows can still carry a retired value, so\nthe profile repository skips protocols this enum no longer knows rather\nthan failing the whole listing.",
        "enum": [
          "OPENAI_COMPATIBLE",
          "ANTHROPIC_COMPATIBLE",
          "AZURE_OPENAI",
          "GOOGLE_VERTEX",
          "AGENT_HOST"
        ],
        "title": "RuntimeProfileProtocol",
        "type": "string"
      },
      "RuntimeProfileScope": {
        "enum": [
          "SYSTEM",
          "ORGANIZATION",
          "PERSONAL"
        ],
        "title": "RuntimeProfileScope",
        "type": "string"
      },
      "RuntimeProfileStatus": {
        "enum": [
          "ACTIVE",
          "DISABLED",
          "REAUTH_REQUIRED"
        ],
        "title": "RuntimeProfileStatus",
        "type": "string"
      },
      "ScheduleDetailResponse": {
        "description": "Schedule detail response.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "connector_trigger_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Trigger Id"
          },
          "consecutive_failures": {
            "default": 0,
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "filter_instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Instruction"
          },
          "filter_output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Output Schema"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_internal": {
            "title": "Is Internal",
            "type": "boolean"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_fire_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScheduleFireStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_fired_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Fired At"
          },
          "last_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "paused_by_failures": {
            "description": "True when the failure breaker paused this schedule, as opposed to a person pausing it. Reactivating resets the failure count.",
            "readOnly": true,
            "title": "Paused By Failures",
            "type": "boolean"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          },
          "schedule_type": {
            "$ref": "#/components/schemas/ScheduleType"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "visibility": {
            "title": "Visibility",
            "type": "string"
          },
          "workflow_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Id"
          },
          "workflow_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Name"
          }
        },
        "required": [
          "id",
          "user_id",
          "pod_id",
          "name",
          "schedule_type",
          "agent_id",
          "workflow_id",
          "config",
          "account_id",
          "connector_trigger_id",
          "filter_instruction",
          "filter_output_schema",
          "visibility",
          "is_active",
          "is_internal",
          "created_at",
          "updated_at",
          "paused_by_failures"
        ],
        "title": "ScheduleDetailResponse",
        "type": "object"
      },
      "ScheduleFireStatus": {
        "description": "Outcome of the most recent fire attempt, recorded for debuggability.",
        "enum": [
          "TRIGGERED",
          "FILTERED",
          "ERROR"
        ],
        "title": "ScheduleFireStatus",
        "type": "string"
      },
      "ScheduleListResponse": {
        "description": "Schedule list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ScheduleDetailResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "ScheduleListResponse",
        "type": "object"
      },
      "ScheduleRunListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ScheduleRunResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "ScheduleRunListResponse",
        "type": "object"
      },
      "ScheduleRunResponse": {
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "llm_output": {
            "additionalProperties": true,
            "title": "Llm Output",
            "type": "object"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "redrive_of_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redrive Of Run Id"
          },
          "redriven_by_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redriven By User Id"
          },
          "schedule_id": {
            "format": "uuid",
            "title": "Schedule Id",
            "type": "string"
          },
          "source_event_id": {
            "title": "Source Event Id",
            "type": "string"
          },
          "source_occurred_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Occurred At"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduleRunStatus"
          },
          "target_kind": {
            "title": "Target Kind",
            "type": "string"
          },
          "target_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Run Id"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "schedule_id",
          "user_id",
          "source_event_id",
          "status",
          "attempts",
          "target_kind",
          "target_run_id",
          "payload",
          "metadata",
          "llm_output",
          "created_at",
          "updated_at"
        ],
        "title": "ScheduleRunResponse",
        "type": "object"
      },
      "ScheduleRunStatus": {
        "enum": [
          "RECEIVED",
          "PROCESSING",
          "DISPATCHED",
          "COMPLETED",
          "TARGET_FAILED",
          "CANCELLED",
          "FILTERED",
          "FAILED",
          "DEAD_LETTERED"
        ],
        "title": "ScheduleRunStatus",
        "type": "string"
      },
      "ScheduleType": {
        "description": "Type of schedule source.",
        "enum": [
          "TIME",
          "WEBHOOK",
          "DATASTORE"
        ],
        "title": "ScheduleType",
        "type": "string"
      },
      "ScheduledWorkflowStartConfigInput": {
        "properties": {
          "schedule_type": {
            "$ref": "#/components/schemas/ScheduledWorkflowStartConfigType",
            "description": "Time trigger mode for this workflow definition. Concrete schedule values are provided by pod schedules."
          }
        },
        "required": [
          "schedule_type"
        ],
        "title": "ScheduledWorkflowStartConfigInput",
        "type": "object"
      },
      "ScheduledWorkflowStartConfigOutput": {
        "properties": {
          "schedule_type": {
            "$ref": "#/components/schemas/ScheduledWorkflowStartConfigType",
            "description": "Time trigger mode for this workflow definition. Concrete schedule values are provided by pod schedules."
          }
        },
        "required": [
          "schedule_type"
        ],
        "title": "ScheduledWorkflowStartConfigOutput",
        "type": "object"
      },
      "ScheduledWorkflowStartConfigType": {
        "enum": [
          "ONCE",
          "CRON"
        ],
        "title": "ScheduledWorkflowStartConfigType",
        "type": "string"
      },
      "ScheduledWorkflowStartInput": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/ScheduledWorkflowStartConfigInput",
            "description": "Scheduled workflow definition payload."
          },
          "type": {
            "const": "SCHEDULED",
            "default": "SCHEDULED",
            "description": "Scheduled workflow start.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "config"
        ],
        "title": "ScheduledWorkflowStartInput",
        "type": "object"
      },
      "ScheduledWorkflowStartOutput": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/ScheduledWorkflowStartConfigOutput",
            "description": "Scheduled workflow definition payload."
          },
          "type": {
            "const": "SCHEDULED",
            "default": "SCHEDULED",
            "description": "Scheduled workflow start.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "config"
        ],
        "title": "ScheduledWorkflowStartOutput",
        "type": "object"
      },
      "SearchFreshness": {
        "enum": [
          "day",
          "week",
          "month",
          "year"
        ],
        "title": "SearchFreshness",
        "type": "string"
      },
      "SearchMethod": {
        "enum": [
          "VECTOR",
          "TEXT",
          "HYBRID"
        ],
        "title": "SearchMethod",
        "type": "string"
      },
      "SearchResult": {
        "properties": {
          "duration": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "publisher": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Publisher"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "snippet": {
            "title": "Snippet",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "title",
          "url",
          "snippet",
          "source"
        ],
        "title": "SearchResult",
        "type": "object"
      },
      "SearchVertical": {
        "description": "What kind of result the caller wants.\n\nNot every provider serves every vertical, so `BaseSearchClient` advertises\nwhat it supports and the caller degrades honestly rather than silently\nreturning web pages for a video query.",
        "enum": [
          "web",
          "news",
          "images",
          "videos"
        ],
        "title": "SearchVertical",
        "type": "string"
      },
      "SendMessageRequest": {
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "required": [
          "content"
        ],
        "title": "SendMessageRequest",
        "type": "object"
      },
      "SetDefaultSurfaceRequest": {
        "description": "Pick which surface answers this user for ``platform`` when several could.",
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "surface_id": {
            "format": "uuid",
            "title": "Surface Id",
            "type": "string"
          }
        },
        "required": [
          "platform",
          "surface_id"
        ],
        "title": "SetDefaultSurfaceRequest",
        "type": "object"
      },
      "StepRecordResponse": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "external_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Ref"
          },
          "node_id": {
            "title": "Node Id",
            "type": "string"
          },
          "output_data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Output Data"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/StepStatus"
          },
          "step_index": {
            "title": "Step Index",
            "type": "integer"
          }
        },
        "required": [
          "step_index",
          "node_id",
          "status",
          "started_at"
        ],
        "title": "StepRecordResponse",
        "type": "object"
      },
      "StepStatus": {
        "enum": [
          "RUNNING",
          "WAITING",
          "COMPLETED",
          "FAILED",
          "CANCELLED"
        ],
        "title": "StepStatus",
        "type": "string"
      },
      "SurfaceAdminConsentInfo": {
        "description": "Admin-consent state for surfaces that require an OAuth grant (Teams).",
        "properties": {
          "consent_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consent Url"
          },
          "granted": {
            "default": false,
            "title": "Granted",
            "type": "boolean"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          }
        },
        "title": "SurfaceAdminConsentInfo",
        "type": "object"
      },
      "SurfaceBehaviorConfigInput": {
        "additionalProperties": false,
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/SurfaceChannelRouteInput"
            },
            "title": "Channels",
            "type": "array"
          },
          "dm_conversation_reset_after_hours": {
            "default": 24,
            "title": "Dm Conversation Reset After Hours",
            "type": "integer"
          },
          "identity": {
            "$ref": "#/components/schemas/SurfaceIdentityConfigInput"
          },
          "send_policy": {
            "$ref": "#/components/schemas/SurfaceSendPolicyConfig"
          },
          "slack": {
            "$ref": "#/components/schemas/SurfaceSlackConfigInput"
          },
          "telegram": {
            "$ref": "#/components/schemas/SurfaceTelegramConfigInput"
          }
        },
        "title": "SurfaceBehaviorConfigInput",
        "type": "object"
      },
      "SurfaceChannelRouteInput": {
        "additionalProperties": false,
        "description": "One channel's routing, in the same three states the domain models.\n\n``use_pod_assistant`` is not a synonym for an absent ``agent_name`` — see\n:class:`SurfaceChannelRoute`. Omitting it here is what silently turned an\nexplicit \"the pod assistant answers here\", picked from inside Slack, back\ninto \"unconfigured\" on the next save from the web UI.",
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "channel_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Id"
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          },
          "use_pod_assistant": {
            "default": false,
            "title": "Use Pod Assistant",
            "type": "boolean"
          }
        },
        "title": "SurfaceChannelRouteInput",
        "type": "object"
      },
      "SurfaceChannelRouteResponse": {
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "channel_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Id"
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          },
          "use_pod_assistant": {
            "default": false,
            "title": "Use Pod Assistant",
            "type": "boolean"
          }
        },
        "title": "SurfaceChannelRouteResponse",
        "type": "object"
      },
      "SurfaceConfigResponse": {
        "description": "Mirrors SurfaceBehaviorConfigInput: what you send is what you get back.",
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/SurfaceChannelRouteResponse"
            },
            "title": "Channels",
            "type": "array"
          },
          "dm_conversation_reset_after_hours": {
            "default": 24,
            "title": "Dm Conversation Reset After Hours",
            "type": "integer"
          },
          "identity": {
            "$ref": "#/components/schemas/SurfaceIdentityConfigResponse"
          },
          "send_policy": {
            "$ref": "#/components/schemas/SurfaceSendPolicyConfig"
          },
          "slack": {
            "$ref": "#/components/schemas/SurfaceSlackConfigResponse"
          },
          "telegram": {
            "$ref": "#/components/schemas/SurfaceTelegramConfigInput"
          }
        },
        "title": "SurfaceConfigResponse",
        "type": "object"
      },
      "SurfaceConnectDescriptor": {
        "description": "What the frontend needs to render the \"connect an account\" (CUSTOM) flow\nfor a surface's connector — a slim projection of the connector's LEMMA\ncapability. ``system_oauth_available`` means the platform supplies the OAuth\napp so the user connects without registering their own (distinct from whether\na fully-managed SYSTEM bot exists — that's ``supported_credential_modes``).",
        "properties": {
          "auth_config_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Config Schema"
          },
          "auth_scheme": {
            "$ref": "#/components/schemas/AuthScheme"
          },
          "credential_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Schema"
          },
          "supports_org_custom_oauth": {
            "default": false,
            "title": "Supports Org Custom Oauth",
            "type": "boolean"
          },
          "system_oauth_available": {
            "default": false,
            "title": "System Oauth Available",
            "type": "boolean"
          }
        },
        "required": [
          "auth_scheme"
        ],
        "title": "SurfaceConnectDescriptor",
        "type": "object"
      },
      "SurfaceConnection": {
        "description": "Which account a surface runs on, and who connected it.\n\nAccounts are personal (``accounts.user_id``) while surfaces belong to the\npod, so ``account_id`` alone answers nothing for a teammate — they cannot\nresolve an id they don't own. This block is the pod-visible *identity* of\nthat account: enough for any editor to see who to ask, never the credential.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "connected_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceConnectionOwner"
              },
              {
                "type": "null"
              }
            ]
          },
          "connector_id": {
            "title": "Connector Id",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "status": {
            "$ref": "#/components/schemas/SurfaceConnectionStatus",
            "default": "CONNECTED"
          }
        },
        "required": [
          "account_id",
          "connector_id"
        ],
        "title": "SurfaceConnection",
        "type": "object"
      },
      "SurfaceConnectionOwner": {
        "description": "The person whose connected account backs a surface.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_pod_member": {
            "default": false,
            "title": "Is Pod Member",
            "type": "boolean"
          },
          "is_you": {
            "default": false,
            "title": "Is You",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id"
        ],
        "title": "SurfaceConnectionOwner",
        "type": "object"
      },
      "SurfaceConnectionStatus": {
        "description": "Health of the account a surface runs on.\n\nMirrors ``AccountStatus`` and adds ``MISSING`` for a surface pointing at an\naccount row that is no longer there. Whether the owner is still in the pod\nis deliberately *not* folded in here: a departed owner's token keeps working\nuntil it expires, so it is a separate fact (``connected_by.is_pod_member``),\nnot a rung on this ladder.",
        "enum": [
          "CONNECTED",
          "REAUTH_REQUIRED",
          "DISCONNECTED",
          "MISSING"
        ],
        "title": "SurfaceConnectionStatus",
        "type": "string"
      },
      "SurfaceConnectorSetupGuide": {
        "properties": {
          "docs_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docs Path"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/SurfaceSetupField"
            },
            "title": "Fields",
            "type": "array"
          },
          "mode": {
            "$ref": "#/components/schemas/SurfaceSetupMode"
          },
          "notes": {
            "items": {
              "type": "string"
            },
            "title": "Notes",
            "type": "array"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/SurfaceSetupStep"
            },
            "title": "Steps",
            "type": "array"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "supported": {
            "default": true,
            "title": "Supported",
            "type": "boolean"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "title",
          "summary"
        ],
        "title": "SurfaceConnectorSetupGuide",
        "type": "object"
      },
      "SurfaceCreateRequest": {
        "additionalProperties": false,
        "description": "Body for `POST /pods/{pod_id}/surfaces` — creates one surface.\n\nA pod may have several surfaces of the same ``platform`` (different\nbots/accounts, each routed to its own agent); ``name`` is the stable,\npod-unique identifier used to address it afterward. When omitted, it\ndefaults to the lowercased platform (so the common single-surface-per-\nplatform case needs no name at all) — pick an explicit name to create a\nsecond surface of the same platform.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "config": {
            "$ref": "#/components/schemas/SurfaceBehaviorConfigInput"
          },
          "credential_mode": {
            "$ref": "#/components/schemas/SurfaceCredentialMode",
            "default": "SYSTEM"
          },
          "default_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Agent Name"
          },
          "is_enabled": {
            "default": true,
            "title": "Is Enabled",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pod-unique surface identifier. Defaults to the lowercased platform.",
            "title": "Name"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          }
        },
        "required": [
          "platform"
        ],
        "title": "SurfaceCreateRequest",
        "type": "object"
      },
      "SurfaceCredentialMode": {
        "enum": [
          "SYSTEM",
          "CUSTOM"
        ],
        "title": "SurfaceCredentialMode",
        "type": "string"
      },
      "SurfaceIdentityConfigInput": {
        "additionalProperties": false,
        "properties": {
          "allowed_domains": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Domains",
            "type": "array"
          },
          "allowed_email_addresses": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Email Addresses",
            "type": "array"
          }
        },
        "title": "SurfaceIdentityConfigInput",
        "type": "object"
      },
      "SurfaceIdentityConfigResponse": {
        "properties": {
          "allowed_domains": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Domains",
            "type": "array"
          },
          "allowed_email_addresses": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Email Addresses",
            "type": "array"
          }
        },
        "title": "SurfaceIdentityConfigResponse",
        "type": "object"
      },
      "SurfacePlatform": {
        "enum": [
          "SLACK",
          "TEAMS",
          "WHATSAPP",
          "TELEGRAM",
          "GMAIL",
          "OUTLOOK",
          "RESEND"
        ],
        "title": "SurfacePlatform",
        "type": "string"
      },
      "SurfacePlatformSetupGuide": {
        "properties": {
          "connectors": {
            "items": {
              "$ref": "#/components/schemas/SurfaceConnectorSetupGuide"
            },
            "title": "Connectors",
            "type": "array"
          },
          "docs_path": {
            "title": "Docs Path",
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "platform",
          "title",
          "summary",
          "docs_path"
        ],
        "title": "SurfacePlatformSetupGuide",
        "type": "object"
      },
      "SurfaceReach": {
        "description": "How a human reaches this surface.\n\n``handle`` is the platform-native name a person types/sees to message the\nbot (Slack/Teams bot display name, Telegram ``@username``, WhatsApp phone,\nor the account/email for email surfaces). ``email`` is the surface's email\naddress, when it has one.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "handle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handle"
          }
        },
        "title": "SurfaceReach",
        "type": "object"
      },
      "SurfaceSendPolicyConfig": {
        "description": "Proactive-send controls. Mirrored across request and response.",
        "properties": {
          "allow_send": {
            "default": false,
            "title": "Allow Send",
            "type": "boolean"
          }
        },
        "title": "SurfaceSendPolicyConfig",
        "type": "object"
      },
      "SurfaceSendRequest": {
        "description": "Send a proactive message to a pod member on this surface.",
        "properties": {
          "message": {
            "description": "Message text to deliver.",
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "user_id": {
            "description": "Target pod member (Lemma user id).",
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "message"
        ],
        "title": "SurfaceSendRequest",
        "type": "object"
      },
      "SurfaceSendResponse": {
        "properties": {
          "sent": {
            "title": "Sent",
            "type": "boolean"
          }
        },
        "required": [
          "sent"
        ],
        "title": "SurfaceSendResponse",
        "type": "object"
      },
      "SurfaceSetupAction": {
        "description": "A concrete thing the user must do to finish wiring up a surface.\n\nOnly emitted when the user actually has to act (custom/bring-your-own-app\ncredentials, or a pending OAuth grant). Each action carries where to go\n(``link``), ordered ``steps``, and the values to paste (``fields``).",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/SurfaceSetupActionField"
            },
            "title": "Fields",
            "type": "array"
          },
          "informational": {
            "default": false,
            "title": "Informational",
            "type": "boolean"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "link_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link Label"
          },
          "steps": {
            "items": {
              "type": "string"
            },
            "title": "Steps",
            "type": "array"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "key",
          "title",
          "description"
        ],
        "title": "SurfaceSetupAction",
        "type": "object"
      },
      "SurfaceSetupActionField": {
        "description": "A copy-able value the user pastes into their provider dashboard.",
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          },
          "secret": {
            "default": false,
            "title": "Secret",
            "type": "boolean"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "label",
          "value"
        ],
        "title": "SurfaceSetupActionField",
        "type": "object"
      },
      "SurfaceSetupField": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "example": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Example"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "required": {
            "default": true,
            "title": "Required",
            "type": "boolean"
          },
          "secret": {
            "default": false,
            "title": "Secret",
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/SurfaceSetupFieldSource"
          }
        },
        "required": [
          "name",
          "label",
          "source",
          "description"
        ],
        "title": "SurfaceSetupField",
        "type": "object"
      },
      "SurfaceSetupFieldSource": {
        "enum": [
          "CREATE_REQUEST",
          "CREATE_RESPONSE"
        ],
        "title": "SurfaceSetupFieldSource",
        "type": "string"
      },
      "SurfaceSetupMode": {
        "enum": [
          "CONNECTED_ACCOUNT",
          "PLATFORM_BUILT_IN"
        ],
        "title": "SurfaceSetupMode",
        "type": "string"
      },
      "SurfaceSetupPhase": {
        "enum": [
          "PREPARE",
          "CREATE_SURFACE",
          "CONFIGURE_PROVIDER",
          "VERIFY"
        ],
        "title": "SurfaceSetupPhase",
        "type": "string"
      },
      "SurfaceSetupResponse": {
        "description": "Everything a caller needs to finish setting up a surface, in one read.\n\nMerges the former setup-status, admin-consent, and platform-checklist\nendpoints. Works both before a surface exists (`exists=False`, guide only)\nand after.\n\n``ready`` is True when the user has nothing left to do (system credentials,\nor an already-granted consent). ``actions`` is populated *only* when the\nuser must act — e.g. point their own Slack/Teams/WhatsApp app at Lemma —\nso the UI can show a clean \"Ready\" state otherwise.",
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/SurfaceSetupAction"
            },
            "title": "Actions",
            "type": "array"
          },
          "admin_consent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceAdminConsentInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "exists": {
            "title": "Exists",
            "type": "boolean"
          },
          "guide": {
            "$ref": "#/components/schemas/SurfacePlatformSetupGuide"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "ready": {
            "default": false,
            "title": "Ready",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/AgentSurfaceStatus"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          }
        },
        "required": [
          "platform",
          "exists",
          "status",
          "guide"
        ],
        "title": "SurfaceSetupResponse",
        "type": "object"
      },
      "SurfaceSetupStep": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "phase": {
            "$ref": "#/components/schemas/SurfaceSetupPhase"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "phase",
          "title",
          "description"
        ],
        "title": "SurfaceSetupStep",
        "type": "object"
      },
      "SurfaceSlackConfigInput": {
        "additionalProperties": false,
        "description": "The Slack settings a *caller* owns.\n\nOnly ``app_name``. The per-person DM agent map is written from inside Slack\n— each person picks their own in the App Home — so it is readable here and\nnever writable, which keeps one editor from reassigning everybody.",
        "properties": {
          "app_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Name"
          }
        },
        "title": "SurfaceSlackConfigInput",
        "type": "object"
      },
      "SurfaceSlackConfigResponse": {
        "description": "Slack settings as read back. ``dm_agent_by_user`` maps a Slack user id to\nthe agent that person chose, or ``__pod_assistant__`` when they explicitly\nchose the pod assistant. A user absent from the map has never chosen and\nfalls to the surface default.",
        "properties": {
          "app_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Name"
          },
          "dm_agent_by_user": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Dm Agent By User",
            "type": "object"
          }
        },
        "title": "SurfaceSlackConfigResponse",
        "type": "object"
      },
      "SurfaceSystemClaim": {
        "description": "Whether this org can still put the platform's Lemma-managed bot/number\nbehind a surface.\n\nThe shared identity is claimable exactly once per organization, so the setup\nUI can render the option as unavailable *before* the user commits instead of\ndiscovering it as a failed save. ``claimed_by_pod_id`` is the pod holding the\nclaim — always a pod in the caller's own org, so linking to it leaks nothing\nthey can't already see.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "claimed_by_pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Claimed By Pod Id"
          },
          "claimed_by_surface_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Claimed By Surface Name"
          }
        },
        "required": [
          "available"
        ],
        "title": "SurfaceSystemClaim",
        "type": "object"
      },
      "SurfaceTelegramConfigInput": {
        "additionalProperties": false,
        "description": "Selects the pod app exposed as this bot's Telegram Mini App.",
        "properties": {
          "app_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Name"
          }
        },
        "title": "SurfaceTelegramConfigInput",
        "type": "object"
      },
      "SurfaceUpdateRequest": {
        "additionalProperties": false,
        "description": "Body for `PATCH /pods/{pod_id}/surfaces/{surface_name}`.\n\nPartial update (merge semantics): only fields present in the request are\napplied. The surface's ``platform`` and ``name`` are immutable — delete and\nrecreate to change either.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "config": {
            "$ref": "#/components/schemas/SurfaceBehaviorConfigInput"
          },
          "credential_mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceCredentialMode"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Agent Name"
          },
          "is_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Enabled"
          }
        },
        "title": "SurfaceUpdateRequest",
        "type": "object"
      },
      "TableDetailResponse": {
        "description": "Schema for table detail response.",
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "columns": {
            "items": {
              "$ref": "#/components/schemas/ColumnSchema"
            },
            "title": "Columns",
            "type": "array"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "enable_rls": {
            "title": "Enable Rls",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "primary_key_column": {
            "title": "Primary Key Column",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "name",
          "primary_key_column",
          "columns",
          "config",
          "enable_rls",
          "created_at",
          "updated_at"
        ],
        "title": "TableDetailResponse",
        "type": "object"
      },
      "TableListResponse": {
        "description": "Schema for table list response.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TableSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "TableListResponse",
        "type": "object"
      },
      "TableSummaryResponse": {
        "description": "Lean table shape for list responses.\n\nOmits the full `columns` definitions and `config` — fetch those from\n`table.get`. Exposes a cheap `column_count` for list views.",
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "column_count": {
            "default": 0,
            "title": "Column Count",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "enable_rls": {
            "title": "Enable Rls",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "primary_key_column": {
            "title": "Primary Key Column",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pod_id",
          "name",
          "primary_key_column",
          "enable_rls",
          "created_at",
          "updated_at"
        ],
        "title": "TableSummaryResponse",
        "type": "object"
      },
      "TelegramManagedBotSetupRequest": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "$ref": "#/components/schemas/SurfaceBehaviorConfigInput"
          },
          "default_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Agent Name"
          },
          "is_enabled": {
            "default": true,
            "title": "Is Enabled",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pod-unique surface name. Defaults to telegram.",
            "title": "Name"
          }
        },
        "title": "TelegramManagedBotSetupRequest",
        "type": "object"
      },
      "TelegramManagedBotSetupResponse": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "bot_launch_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bot Launch Url"
          },
          "bot_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bot Username"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string"
          },
          "launch_url": {
            "title": "Launch Url",
            "type": "string"
          },
          "manager_bot_username": {
            "title": "Manager Bot Username",
            "type": "string"
          },
          "setup_id": {
            "title": "Setup Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "surface_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface Id"
          }
        },
        "required": [
          "setup_id",
          "status",
          "launch_url",
          "manager_bot_username",
          "expires_at"
        ],
        "title": "TelegramManagedBotSetupResponse",
        "type": "object"
      },
      "UpdateAgentHostRuntimeProfileRequest": {
        "properties": {
          "config_selections": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config Selections"
          },
          "default_model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "host_wait_timeout_seconds": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host Wait Timeout Seconds"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "source": {
            "const": "AGENT_HOST",
            "default": "AGENT_HOST",
            "title": "Source",
            "type": "string"
          }
        },
        "title": "UpdateAgentHostRuntimeProfileRequest",
        "type": "object"
      },
      "UpdateAgentRequest": {
        "properties": {
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "instruction": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema"
          },
          "permissions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentPermissionsReplaceRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional resource grants to REPLACE on this agent, in the same request. Equivalent to calling the permissions-replace endpoint right after update — grants are keyed by resource_name. Omit the key to leave existing grants alone; an empty grant list revokes them."
          },
          "toolsets": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentToolset"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Toolsets"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResourceVisibility"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "UpdateAgentRequest",
        "type": "object"
      },
      "UpdateAnthropicCompatibleRuntimeProfileRequest": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "base_url": {
            "anyOf": [
              {
                "format": "uri",
                "maxLength": 2083,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "default_model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "model_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Names"
          },
          "model_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Settings"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "refresh_models": {
            "default": false,
            "title": "Refresh Models",
            "type": "boolean"
          },
          "source": {
            "const": "ANTHROPIC_COMPATIBLE",
            "default": "ANTHROPIC_COMPATIBLE",
            "title": "Source",
            "type": "string"
          }
        },
        "title": "UpdateAnthropicCompatibleRuntimeProfileRequest",
        "type": "object"
      },
      "UpdateAppRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "public_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Slug"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "title": "UpdateAppRequest",
        "type": "object"
      },
      "UpdateConversationRequest": {
        "properties": {
          "agent_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "UpdateConversationRequest",
        "type": "object"
      },
      "UpdateFunctionRequest": {
        "additionalProperties": false,
        "description": "Request to update a function.",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated Python source for the function. When provided, the platform re-analyzes the code and refreshes input_schema, output_schema, and config_schema on the returned function.",
            "title": "Code"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "permissions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionPermissionsReplaceRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional resource grants to REPLACE on this function, in the same request. Equivalent to calling the permissions-replace endpoint right after this call — grants are keyed by resource_name. Omit the key to leave existing grants alone; an empty grant list revokes them."
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResourceVisibility"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "UpdateFunctionRequest",
        "type": "object"
      },
      "UpdateMemberRoleRequest": {
        "description": "Update member role request schema.",
        "properties": {
          "role": {
            "$ref": "#/components/schemas/OrganizationRole"
          }
        },
        "required": [
          "role"
        ],
        "title": "UpdateMemberRoleRequest",
        "type": "object"
      },
      "UpdateOpenAICompatibleRuntimeProfileRequest": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "base_url": {
            "anyOf": [
              {
                "format": "uri",
                "maxLength": 2083,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "default_model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "model_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Names"
          },
          "model_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Settings"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "refresh_models": {
            "default": false,
            "title": "Refresh Models",
            "type": "boolean"
          },
          "source": {
            "const": "OPENAI_COMPATIBLE",
            "default": "OPENAI_COMPATIBLE",
            "title": "Source",
            "type": "string"
          }
        },
        "title": "UpdateOpenAICompatibleRuntimeProfileRequest",
        "type": "object"
      },
      "UpdateRecordRequest": {
        "description": "Schema for updating a record.",
        "properties": {
          "data": {
            "additionalProperties": true,
            "description": "Partial record patch keyed by table column names.",
            "title": "Data",
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "title": "UpdateRecordRequest",
        "type": "object"
      },
      "UpdateScheduleRequest": {
        "description": "Request to update a schedule.",
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "filter_instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Instruction"
          },
          "filter_output_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Output Schema"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          },
          "workflow_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Name"
          }
        },
        "title": "UpdateScheduleRequest",
        "type": "object"
      },
      "UpdateTableRequest": {
        "description": "Schema for updating a table.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Replacement metadata/config payload for the table.",
            "title": "Config"
          },
          "enable_rls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Toggle per-user row-level security. Only allowed on an empty table: enabling adds the user_id ownership column and isolation policy, disabling removes the policy. Omit to leave RLS unchanged.",
            "title": "Enable Rls"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "title": "UpdateTableRequest",
        "type": "object"
      },
      "UploadResponse": {
        "description": "Result of staging a local .zip: a signed URL to feed the URL-based import.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "url": {
            "description": "Signed lemma download URL (pass as kind=URL).",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "title": "UploadResponse",
        "type": "object"
      },
      "UsageLimitScopeResponse": {
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "limit_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usd"
          },
          "remaining_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Usd"
          },
          "reserved_usd": {
            "title": "Reserved Usd",
            "type": "number"
          },
          "reset_at": {
            "format": "date-time",
            "title": "Reset At",
            "type": "string"
          },
          "scope": {
            "title": "Scope",
            "type": "string"
          },
          "used_usd": {
            "title": "Used Usd",
            "type": "number"
          },
          "window_start": {
            "format": "date-time",
            "title": "Window Start",
            "type": "string"
          }
        },
        "required": [
          "scope",
          "used_usd",
          "reserved_usd",
          "allowed",
          "reset_at",
          "window_start"
        ],
        "title": "UsageLimitScopeResponse",
        "type": "object"
      },
      "UsageLimitsResponse": {
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "org_monthly": {
            "$ref": "#/components/schemas/UsageLimitScopeResponse"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "user_monthly": {
            "$ref": "#/components/schemas/UsageLimitScopeResponse"
          },
          "user_weekly": {
            "$ref": "#/components/schemas/UsageLimitScopeResponse"
          }
        },
        "required": [
          "organization_id",
          "user_id",
          "org_monthly",
          "user_weekly",
          "user_monthly",
          "allowed"
        ],
        "title": "UsageLimitsResponse",
        "type": "object"
      },
      "UsageListResponse": {
        "properties": {
          "end_date": {
            "format": "date-time",
            "title": "End Date",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/UsageRecordResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "start_date": {
            "format": "date-time",
            "title": "Start Date",
            "type": "string"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "start_date",
          "end_date"
        ],
        "title": "UsageListResponse",
        "type": "object"
      },
      "UsageRecordResponse": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Run Id"
          },
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id"
          },
          "cost_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "model_name": {
            "title": "Model Name",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "parent_agent_run_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Agent Run Id"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          },
          "profile_id": {
            "title": "Profile Id",
            "type": "string"
          },
          "profile_scope": {
            "title": "Profile Scope",
            "type": "string"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "source_type": {
            "title": "Source Type",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          },
          "units": {
            "title": "Units",
            "type": "number"
          },
          "usage_kind": {
            "title": "Usage Kind",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "source_type",
          "profile_id",
          "profile_scope",
          "model_name",
          "usage_kind",
          "input_tokens",
          "output_tokens",
          "total_tokens",
          "units",
          "metadata",
          "occurred_at",
          "created_at"
        ],
        "title": "UsageRecordResponse",
        "type": "object"
      },
      "UsageStatsBucketResponse": {
        "properties": {
          "bucket": {
            "format": "date-time",
            "title": "Bucket",
            "type": "string"
          },
          "group": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "system_cost_usd": {
            "title": "System Cost Usd",
            "type": "number"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          },
          "units": {
            "title": "Units",
            "type": "number"
          }
        },
        "required": [
          "bucket",
          "input_tokens",
          "output_tokens",
          "total_tokens",
          "units",
          "system_cost_usd"
        ],
        "title": "UsageStatsBucketResponse",
        "type": "object"
      },
      "UsageStatsResponse": {
        "properties": {
          "end_date": {
            "format": "date-time",
            "title": "End Date",
            "type": "string"
          },
          "granularity": {
            "title": "Granularity",
            "type": "string"
          },
          "group_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group By"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/UsageStatsBucketResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "start_date": {
            "format": "date-time",
            "title": "Start Date",
            "type": "string"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "start_date",
          "end_date",
          "granularity"
        ],
        "title": "UsageStatsResponse",
        "type": "object"
      },
      "UsageSummaryResponse": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "end_date": {
            "format": "date-time",
            "title": "End Date",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "period_days": {
            "title": "Period Days",
            "type": "integer"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          },
          "start_date": {
            "format": "date-time",
            "title": "Start Date",
            "type": "string"
          },
          "system_cost_usd": {
            "title": "System Cost Usd",
            "type": "number"
          },
          "total_by_kind": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Total By Kind",
            "type": "object"
          },
          "total_by_model": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Total By Model",
            "type": "object"
          },
          "total_by_profile": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Total By Profile",
            "type": "object"
          },
          "total_input_tokens": {
            "title": "Total Input Tokens",
            "type": "integer"
          },
          "total_output_tokens": {
            "title": "Total Output Tokens",
            "type": "integer"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          },
          "total_units": {
            "title": "Total Units",
            "type": "number"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "start_date",
          "end_date",
          "total_input_tokens",
          "total_output_tokens",
          "total_tokens",
          "total_units",
          "system_cost_usd",
          "total_by_profile",
          "total_by_model",
          "total_by_kind",
          "period_days"
        ],
        "title": "UsageSummaryResponse",
        "type": "object"
      },
      "UserApprovalListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MessageResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "UserApprovalListResponse",
        "type": "object"
      },
      "UserProfileRequest": {
        "description": "User profile request schema.",
        "properties": {
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "date_of_birth": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Birth"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "mobile_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Number"
          },
          "telegram_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telegram Username"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          }
        },
        "title": "UserProfileRequest",
        "type": "object"
      },
      "UserResponse": {
        "description": "User response schema.",
        "properties": {
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "date_of_birth": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Birth"
          },
          "deactivated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deactivated At"
          },
          "deactivation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deactivation Reason"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "email_verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Verified At"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_superuser": {
            "title": "Is Superuser",
            "type": "boolean"
          },
          "is_verified": {
            "title": "Is Verified",
            "type": "boolean"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "mobile_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Number"
          },
          "mobile_verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Verified At"
          },
          "telegram_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telegram Username"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "is_verified",
          "is_active",
          "is_superuser",
          "created_at",
          "updated_at"
        ],
        "title": "UserResponse",
        "type": "object"
      },
      "UserSurfaceItem": {
        "description": "One of the current user's surfaces (across any pod they belong to).",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "shares_address": {
            "default": false,
            "title": "Shares Address",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "pod_id",
          "platform"
        ],
        "title": "UserSurfaceItem",
        "type": "object"
      },
      "UserSurfacePlatformGroup": {
        "description": "All of a user's surfaces for one platform. ``conflict`` is true when two\nof them answer at the same address, so the user has to say which pod hears\nthem (the ``shares_address`` surfaces are the ones to choose between).",
        "properties": {
          "conflict": {
            "default": false,
            "title": "Conflict",
            "type": "boolean"
          },
          "default_surface_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Surface Id"
          },
          "platform": {
            "$ref": "#/components/schemas/SurfacePlatform"
          },
          "surfaces": {
            "items": {
              "$ref": "#/components/schemas/UserSurfaceItem"
            },
            "title": "Surfaces",
            "type": "array"
          }
        },
        "required": [
          "platform",
          "surfaces"
        ],
        "title": "UserSurfacePlatformGroup",
        "type": "object"
      },
      "UserSurfacesResponse": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UserSurfacePlatformGroup"
            },
            "title": "Groups",
            "type": "array"
          }
        },
        "required": [
          "groups"
        ],
        "title": "UserSurfacesResponse",
        "type": "object"
      },
      "VariableSpecResponse": {
        "properties": {
          "connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a connector account variable, the connector the account must belong to (e.g. 'slack'), so the importer can connect the right connector. Null for non-connector variables.",
            "title": "Connector"
          },
          "connector_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a connector account variable, which of the connector's kinds the source install used ('composio', 'package', 'mcp', 'sql', 'http'), so the importer selects an account of the same kind. Null for non-connector variables.",
            "title": "Connector Kind"
          },
          "default": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "title": "VariableSpecResponse",
        "type": "object"
      },
      "VerifyTokenResponse": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "function_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Function Id"
          },
          "function_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Function Name"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email"
        ],
        "title": "VerifyTokenResponse",
        "type": "object"
      },
      "WaitUntilNode": {
        "description": "Wait node. Suspends the run until the scheduler wakes it.",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/WaitUntilNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "WAIT_UNTIL",
            "default": "WAIT_UNTIL",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "WaitUntilNode",
        "type": "object"
      },
      "WaitUntilNodeConfig": {
        "properties": {
          "timeout_seconds": {
            "title": "Timeout Seconds",
            "type": "integer"
          }
        },
        "required": [
          "timeout_seconds"
        ],
        "title": "WaitUntilNodeConfig",
        "type": "object"
      },
      "WaitUntilNodeResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/WaitUntilNodeConfig"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "position": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "type": {
            "const": "WAIT_UNTIL",
            "default": "WAIT_UNTIL",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "config"
        ],
        "title": "WaitUntilNodeResponse",
        "type": "object"
      },
      "WebSearchRequest": {
        "description": "Request model for standard web search",
        "properties": {
          "exclude_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Drop results from these domains, e.g. ['pinterest.com'].",
            "title": "Exclude Domains"
          },
          "freshness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SearchFreshness"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only results from the past `day`, `week`, `month`, or `year`. Use it for anything time-sensitive — search engines happily return five-year-old pages for current questions."
          },
          "include_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Restrict results to these domains, e.g. ['arxiv.org'].",
            "title": "Include Domains"
          },
          "max_results": {
            "default": 10,
            "description": "Maximum number of search results to return",
            "title": "Max Results",
            "type": "integer"
          },
          "query": {
            "description": "Search query. Use specific keywords rather than a question, and prefer `include_domains`/`exclude_domains` over typing `site:` yourself.",
            "title": "Query",
            "type": "string"
          },
          "vertical": {
            "$ref": "#/components/schemas/SearchVertical",
            "default": "web",
            "description": "What to search: `web` pages, `news` articles, `images`, or `videos`. Not every provider serves every vertical; if the one configured here cannot, you get web results and a note saying so."
          }
        },
        "required": [
          "query"
        ],
        "title": "WebSearchRequest",
        "type": "object"
      },
      "WebSearchResponse": {
        "description": "Response model for standard web search",
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Error message if the search was not successful",
            "title": "Error"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Status message",
            "title": "Message"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the search could not be run exactly as asked — for example a vertical this provider does not serve.",
            "title": "Note"
          },
          "results": {
            "description": "List of search results",
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "title": "Results",
            "type": "array"
          },
          "success": {
            "description": "Whether the search was successful",
            "title": "Success",
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "WebSearchResponse",
        "type": "object"
      },
      "WidgetEmbedUrlResponse": {
        "properties": {
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "WidgetEmbedUrlResponse",
        "type": "object"
      },
      "WorkflowCreateRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional workflow description.",
            "title": "Description"
          },
          "edges": {
            "description": "Optional initial graph edges connecting the provided nodes.",
            "items": {
              "$ref": "#/components/schemas/WorkflowEdge"
            },
            "title": "Edges",
            "type": "array"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional public icon URL for the workflow.",
            "title": "Icon Url"
          },
          "mode": {
            "$ref": "#/components/schemas/WorkflowMode",
            "default": "GLOBAL",
            "description": "Workflow schedule ownership mode. `GLOBAL` means one pod-level workflow schedule is allowed; `USER` is reserved for per-user schedule ownership."
          },
          "name": {
            "description": "Workflow name.",
            "title": "Name",
            "type": "string"
          },
          "nodes": {
            "description": "Optional initial graph nodes. When provided, the graph is stored at creation time so a separate `workflow.graph.update` call is not required. Omit (or pass an empty list) to create a shell and upload the graph later. Node `input_mapping` entries must use explicit typed bindings like `{\"type\": \"expression\", \"value\": \"start.payload.x\"}`.",
            "items": {
              "discriminator": {
                "mapping": {
                  "AGENT": "#/components/schemas/AgentNode",
                  "DECISION": "#/components/schemas/DecisionNode",
                  "END": "#/components/schemas/EndNode",
                  "FORM": "#/components/schemas/FormNode",
                  "FUNCTION": "#/components/schemas/FunctionNode",
                  "LOOP": "#/components/schemas/LoopNode",
                  "WAIT_UNTIL": "#/components/schemas/WaitUntilNode"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/FormNode"
                },
                {
                  "$ref": "#/components/schemas/AgentNode"
                },
                {
                  "$ref": "#/components/schemas/FunctionNode"
                },
                {
                  "$ref": "#/components/schemas/DecisionNode"
                },
                {
                  "$ref": "#/components/schemas/LoopNode"
                },
                {
                  "$ref": "#/components/schemas/WaitUntilNode"
                },
                {
                  "$ref": "#/components/schemas/EndNode"
                }
              ]
            },
            "title": "Nodes",
            "type": "array"
          },
          "start": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "DATASTORE_EVENT": "#/components/schemas/DataStoreWorkflowStartInput",
                    "EVENT": "#/components/schemas/EventWorkflowStartInput",
                    "MANUAL": "#/components/schemas/ManualWorkflowStartInput",
                    "SCHEDULED": "#/components/schemas/ScheduledWorkflowStartInput"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ManualWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/ScheduledWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/EventWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/DataStoreWorkflowStartInput"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Start configuration. If omitted, the workflow can be started manually via `workflow.start`.",
            "title": "Start"
          },
          "visibility": {
            "$ref": "#/components/schemas/ResourceVisibility",
            "default": "POD"
          }
        },
        "required": [
          "name"
        ],
        "title": "WorkflowCreateRequest",
        "type": "object"
      },
      "WorkflowDetailResponse": {
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "edges": {
            "items": {
              "$ref": "#/components/schemas/WorkflowEdge"
            },
            "title": "Edges",
            "type": "array"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "mode": {
            "$ref": "#/components/schemas/WorkflowMode",
            "default": "GLOBAL"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "nodes": {
            "items": {
              "discriminator": {
                "mapping": {
                  "AGENT": "#/components/schemas/AgentNodeResponse",
                  "DECISION": "#/components/schemas/DecisionNodeResponse",
                  "END": "#/components/schemas/EndNodeResponse",
                  "FORM": "#/components/schemas/FormNodeResponse",
                  "FUNCTION": "#/components/schemas/FunctionNodeResponse",
                  "LOOP": "#/components/schemas/LoopNodeResponse",
                  "WAIT_UNTIL": "#/components/schemas/WaitUntilNodeResponse"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/FormNodeResponse"
                },
                {
                  "$ref": "#/components/schemas/AgentNodeResponse"
                },
                {
                  "$ref": "#/components/schemas/FunctionNodeResponse"
                },
                {
                  "$ref": "#/components/schemas/DecisionNodeResponse"
                },
                {
                  "$ref": "#/components/schemas/LoopNodeResponse"
                },
                {
                  "$ref": "#/components/schemas/WaitUntilNodeResponse"
                },
                {
                  "$ref": "#/components/schemas/EndNodeResponse"
                }
              ]
            },
            "title": "Nodes",
            "type": "array"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "start": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "DATASTORE_EVENT": "#/components/schemas/DataStoreWorkflowStartOutput",
                    "EVENT": "#/components/schemas/EventWorkflowStartOutput",
                    "MANUAL": "#/components/schemas/ManualWorkflowStartOutput",
                    "SCHEDULED": "#/components/schemas/ScheduledWorkflowStartOutput"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ManualWorkflowStartOutput"
                  },
                  {
                    "$ref": "#/components/schemas/ScheduledWorkflowStartOutput"
                  },
                  {
                    "$ref": "#/components/schemas/EventWorkflowStartOutput"
                  },
                  {
                    "$ref": "#/components/schemas/DataStoreWorkflowStartOutput"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "pod_id"
        ],
        "title": "WorkflowDetailResponse",
        "type": "object"
      },
      "WorkflowEdge": {
        "description": "An edge in the workflow graph.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "target": {
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source",
          "target"
        ],
        "title": "WorkflowEdge",
        "type": "object"
      },
      "WorkflowGraphUpdateRequest": {
        "description": "Named request body for replacing a workflow graph.",
        "example": {
          "edges": [],
          "nodes": [
            {
              "config": {
                "function_name": "summarize-ticket",
                "input_mapping": {
                  "channel": {
                    "type": "literal",
                    "value": "support"
                  },
                  "ticket_key": {
                    "type": "expression",
                    "value": "start.payload.ticket.key"
                  }
                }
              },
              "id": "collect_context",
              "type": "FUNCTION"
            }
          ],
          "start": {
            "config": {
              "operations": [
                "INSERT",
                "UPDATE",
                "DELETE"
              ],
              "table_name": "expenses"
            },
            "type": "DATASTORE_EVENT"
          }
        },
        "properties": {
          "edges": {
            "description": "Complete edge list connecting the provided nodes.",
            "items": {
              "$ref": "#/components/schemas/WorkflowEdge"
            },
            "title": "Edges",
            "type": "array"
          },
          "nodes": {
            "description": "Complete node list for the workflow graph. Agent/function `input_mapping` entries must use explicit typed bindings like `{\"type\": \"expression\", \"value\": \"start.payload.issue.key\"}` or `{\"type\": \"literal\", \"value\": \"finance\"}`.",
            "items": {
              "discriminator": {
                "mapping": {
                  "AGENT": "#/components/schemas/AgentNode",
                  "DECISION": "#/components/schemas/DecisionNode",
                  "END": "#/components/schemas/EndNode",
                  "FORM": "#/components/schemas/FormNode",
                  "FUNCTION": "#/components/schemas/FunctionNode",
                  "LOOP": "#/components/schemas/LoopNode",
                  "WAIT_UNTIL": "#/components/schemas/WaitUntilNode"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/FormNode"
                },
                {
                  "$ref": "#/components/schemas/AgentNode"
                },
                {
                  "$ref": "#/components/schemas/FunctionNode"
                },
                {
                  "$ref": "#/components/schemas/DecisionNode"
                },
                {
                  "$ref": "#/components/schemas/LoopNode"
                },
                {
                  "$ref": "#/components/schemas/WaitUntilNode"
                },
                {
                  "$ref": "#/components/schemas/EndNode"
                }
              ]
            },
            "title": "Nodes",
            "type": "array"
          },
          "start": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "DATASTORE_EVENT": "#/components/schemas/DataStoreWorkflowStartInput",
                    "EVENT": "#/components/schemas/EventWorkflowStartInput",
                    "MANUAL": "#/components/schemas/ManualWorkflowStartInput",
                    "SCHEDULED": "#/components/schemas/ScheduledWorkflowStartInput"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ManualWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/ScheduledWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/EventWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/DataStoreWorkflowStartInput"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional replacement start configuration stored with the graph.",
            "title": "Start"
          }
        },
        "required": [
          "nodes",
          "edges"
        ],
        "title": "WorkflowGraphUpdateRequest",
        "type": "object"
      },
      "WorkflowListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WorkflowSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "WorkflowListResponse",
        "type": "object"
      },
      "WorkflowMode": {
        "description": "Workflow schedule ownership mode.",
        "enum": [
          "GLOBAL",
          "USER"
        ],
        "title": "WorkflowMode",
        "type": "string"
      },
      "WorkflowRunFormSubmitRequest": {
        "additionalProperties": false,
        "description": "Canonical form submission payload — identical across web, SDKs, CLI.",
        "properties": {
          "inputs": {
            "additionalProperties": true,
            "description": "Form field values keyed by field name.",
            "title": "Inputs",
            "type": "object"
          },
          "node_id": {
            "description": "Id of the FORM node being submitted. Must match the run's active wait; mismatches return 422.",
            "title": "Node Id",
            "type": "string"
          }
        },
        "required": [
          "node_id"
        ],
        "title": "WorkflowRunFormSubmitRequest",
        "type": "object"
      },
      "WorkflowRunListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WorkflowRunSummaryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "WorkflowRunListResponse",
        "type": "object"
      },
      "WorkflowRunResponse": {
        "description": "Full run state. `execution_context` is the same flat view that\nworkflow expressions resolve against (`<node_id>.<field>`, `start.*`,\n`loop.*`). `active_wait` is set when the run is suspended, including\nWAITING form waits and RUNNING platform waits.",
        "properties": {
          "active_wait": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowRunWaitResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "current_node_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Node Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "execution_context": {
            "additionalProperties": true,
            "title": "Execution Context",
            "type": "object"
          },
          "failed_node_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed Node Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "schedule_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Event Id"
          },
          "start_type": {
            "default": "MANUAL",
            "title": "Start Type",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStatus",
            "default": "PENDING"
          },
          "step_history": {
            "items": {
              "$ref": "#/components/schemas/StepRecordResponse"
            },
            "title": "Step History",
            "type": "array"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "workflow_id": {
            "format": "uuid",
            "title": "Workflow Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workflow_id",
          "pod_id",
          "user_id"
        ],
        "title": "WorkflowRunResponse",
        "type": "object"
      },
      "WorkflowRunStatus": {
        "description": "Status of a flow run.\n\nPENDING exists only in memory before the first advance; persisted runs\nare RUNNING, WAITING, or terminal. WAITING is reserved for human form\nwaits. Runs suspended on platform work such as an agent, function job, or\ntimer remain RUNNING; the active wait row records the exact wait_type.",
        "enum": [
          "PENDING",
          "RUNNING",
          "WAITING",
          "COMPLETED",
          "FAILED",
          "CANCELLED"
        ],
        "title": "WorkflowRunStatus",
        "type": "string"
      },
      "WorkflowRunSummaryResponse": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "current_node_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Node Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "failed_node_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed Node Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "schedule_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Event Id"
          },
          "start_type": {
            "default": "MANUAL",
            "title": "Start Type",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStatus",
            "default": "PENDING"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "workflow_id": {
            "format": "uuid",
            "title": "Workflow Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workflow_id",
          "pod_id",
          "user_id"
        ],
        "title": "WorkflowRunSummaryResponse",
        "type": "object"
      },
      "WorkflowRunWaitAssignment": {
        "properties": {
          "run": {
            "$ref": "#/components/schemas/WorkflowRunSummaryResponse"
          },
          "wait": {
            "$ref": "#/components/schemas/WorkflowRunWaitResponse"
          }
        },
        "required": [
          "wait",
          "run"
        ],
        "title": "WorkflowRunWaitAssignment",
        "type": "object"
      },
      "WorkflowRunWaitAssignmentListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WorkflowRunWaitAssignment"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items",
          "limit"
        ],
        "title": "WorkflowRunWaitAssignmentListResponse",
        "type": "object"
      },
      "WorkflowRunWaitResponse": {
        "properties": {
          "assigned_pod_member_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Pod Member Id"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "external_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Ref"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "node_id": {
            "title": "Node Id",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "run_id": {
            "format": "uuid",
            "title": "Run Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunWaitStatus"
          },
          "wait_type": {
            "$ref": "#/components/schemas/WorkflowRunWaitType"
          },
          "workflow_id": {
            "format": "uuid",
            "title": "Workflow Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "run_id",
          "workflow_id",
          "pod_id",
          "node_id",
          "wait_type",
          "status"
        ],
        "title": "WorkflowRunWaitResponse",
        "type": "object"
      },
      "WorkflowRunWaitStatus": {
        "enum": [
          "ACTIVE",
          "COMPLETED",
          "FAILED",
          "CANCELLED"
        ],
        "title": "WorkflowRunWaitStatus",
        "type": "string"
      },
      "WorkflowRunWaitType": {
        "enum": [
          "HUMAN",
          "AGENT",
          "FUNCTION",
          "TIME"
        ],
        "title": "WorkflowRunWaitType",
        "type": "string"
      },
      "WorkflowSummaryResponse": {
        "description": "Lean workflow shape for list responses.\n\nOmits the full graph (`nodes`/`edges`/`start`) — fetch those from\n`workflow.get`. Carries cheap derived `node_count`/`node_types` so list\nviews can show step counts and participant badges without the graph.",
        "properties": {
          "allowed_actions": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Actions",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "mode": {
            "$ref": "#/components/schemas/WorkflowMode",
            "default": "GLOBAL"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "node_count": {
            "default": 0,
            "title": "Node Count",
            "type": "integer"
          },
          "node_targets": {
            "items": {
              "type": "string"
            },
            "title": "Node Targets",
            "type": "array"
          },
          "node_types": {
            "items": {
              "type": "string"
            },
            "title": "Node Types",
            "type": "array"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "visibility": {
            "default": "POD",
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "pod_id"
        ],
        "title": "WorkflowSummaryResponse",
        "type": "object"
      },
      "WorkflowUpdateRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated workflow description.",
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated public icon URL for the workflow.",
            "title": "Icon Url"
          },
          "mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowMode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated workflow schedule ownership mode."
          },
          "start": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "DATASTORE_EVENT": "#/components/schemas/DataStoreWorkflowStartInput",
                    "EVENT": "#/components/schemas/EventWorkflowStartInput",
                    "MANUAL": "#/components/schemas/ManualWorkflowStartInput",
                    "SCHEDULED": "#/components/schemas/ScheduledWorkflowStartInput"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ManualWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/ScheduledWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/EventWorkflowStartInput"
                  },
                  {
                    "$ref": "#/components/schemas/DataStoreWorkflowStartInput"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated start trigger configuration.",
            "title": "Start"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResourceVisibility"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "WorkflowUpdateRequest",
        "type": "object"
      },
      "WorkspaceAppAccessRequest": {
        "properties": {
          "ttl_seconds": {
            "default": 1800,
            "maximum": 3600,
            "minimum": 60,
            "title": "Ttl Seconds",
            "type": "integer"
          }
        },
        "title": "WorkspaceAppAccessRequest",
        "type": "object"
      },
      "WorkspaceAppAccessResponse": {
        "properties": {
          "app": {
            "title": "App",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "app",
          "url",
          "expires_at"
        ],
        "title": "WorkspaceAppAccessResponse",
        "type": "object"
      },
      "attach": {
        "properties": {
          "data": {
            "contentMediaType": "application/octet-stream",
            "format": "binary",
            "type": "string"
          },
          "images": {
            "default": [],
            "items": {
              "contentMediaType": "application/octet-stream",
              "format": "binary",
              "type": "string"
            },
            "type": "array"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "path"
        ],
        "title": "attach",
        "type": "object"
      },
      "fastapi___compat__v2__Body_pod__bundle__upload": {
        "properties": {
          "data": {
            "contentMediaType": "application/octet-stream",
            "format": "binary",
            "title": "Data",
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "title": "fastapi___compat__v2__Body_pod__bundle__upload",
        "type": "object"
      },
      "update": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "type": "string"
          },
          "search_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path"
        ],
        "title": "update",
        "type": "object"
      }
    }
  },
  "info": {
    "description": "Authentication API with JWT, user management, and OAuth support",
    "title": "Lemma Backend",
    "version": "0.7.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/agent-host/events:append": {
      "post": {
        "description": "Append one ordered batch to the run's stream.\n\nThere is no second lane to publish on: every event type travels the one\nordered stream, and the ack watermark is the stream's last entry.",
        "operationId": "agent.host.events.append",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentHostEventBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostEventAck"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Append Agent Host Events",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host.events"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host.events",
          "result": "entity",
          "verb": "append"
        }
      }
    },
    "/agent-host/harnesses": {
      "put": {
        "description": "Replace this host's harness snapshots with the reported set.",
        "operationId": "agent.host.harnesses.publish",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentHostHarnessPublishRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostHarnessPublishResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Publish Agent Host Harnesses",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host.harnesses"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host.harnesses",
          "result": "entity",
          "verb": "publish"
        }
      }
    },
    "/agent-host/pairings:complete": {
      "post": {
        "description": "Consume a pairing code and issue the host secret, shown exactly once.",
        "operationId": "agent.host.pairing.complete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentHostPairingComplete"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostPairingCompleted"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Complete Agent Host Pairing",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host.pairing"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host.pairing",
          "result": "entity",
          "verb": "complete"
        }
      }
    },
    "/agent-host/poll": {
      "post": {
        "description": "Long-poll for commands, carrying the host's control updates up.\n\nThis owns its own units of work rather than the request-scoped one: the\nidle wait below can hold the connection open for 25 seconds, and a\ntransaction must not stay open across it.",
        "operationId": "agent.host.poll",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentHostPollRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostPollResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Poll Agent Host Commands",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host",
          "result": "entity",
          "verb": "poll"
        }
      }
    },
    "/agent-host/revoke": {
      "post": {
        "description": "Let a host retire its own credential, e.g. on uninstall.",
        "operationId": "agent.host.self_revoke",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Self Revoke Agent Host",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host",
          "result": "entity",
          "verb": "self_revoke"
        }
      }
    },
    "/auth/verify-token": {
      "get": {
        "description": "Validate the current bearer token and return the resolved user context.",
        "operationId": "auth.verify_token",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyTokenResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Verify access token",
        "tags": [
          "Auth"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "auth",
          "result": "entity",
          "verb": "verify_token"
        }
      }
    },
    "/connectors": {
      "get": {
        "description": "Get all active connectors available for connector",
        "operationId": "connector.list",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorListResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Connectors",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "connector",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/connectors/connect-requests/oauth/callback": {
      "get": {
        "description": "Handle OAuth callback and complete account connection. This endpoint is public and uses state parameter for security.",
        "operationId": "connector.oauth.callback",
        "parameters": [
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Format"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "OAuth Callback",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.oauth",
          "result": "entity",
          "verb": "callback"
        }
      }
    },
    "/connectors/{connector_id}": {
      "get": {
        "description": "Get a specific connector by ID along with its operation catalog",
        "operationId": "connector.get",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorDetailResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Connector",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/connectors/{connector_id}/skill": {
      "get": {
        "description": "Get the skill guide markdown for a connector. Pass `kind=package` or `kind=composio` to get kind-specific instructions when the app supports both. Falls back to the generic doc if no kind-specific file exists. Returns 404 if no skill doc has been generated yet.",
        "operationId": "connector.skill.get",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "title": "Connector Id",
              "type": "string"
            }
          },
          {
            "description": "Kind override, e.g. package or composio",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Kind override, e.g. package or composio",
              "title": "Kind"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSkillResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Connector Skill",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.skill",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/icons/upload": {
      "post": {
        "description": "Upload an image asset and receive a public icon URL.",
        "operationId": "icon.upload",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/IconUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IconUploadResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Upload Icon",
        "tags": [
          "icons"
        ],
        "x-lemma": {
          "invalidates": [
            "icon"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "icon",
          "result": "entity",
          "verb": "upload"
        }
      }
    },
    "/me/runtime/agent-host-pairings": {
      "post": {
        "description": "Mint a short-lived pairing code for a machine this user controls.\n\nA paired computer is the user's, not a workspace's: nothing here needs an\norganization. Sharing it happens later, by giving a runtime profile\nORGANIZATION scope.",
        "operationId": "agent.host.pairing.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentHostPairingCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostPairingCreated"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Agent Host Pairing",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host.pairing"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host.pairing",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/me/runtime/agent-hosts": {
      "get": {
        "operationId": "agent.host.list",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostListResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Agent Hosts",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.host",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/me/runtime/agent-hosts/{host_id}": {
      "delete": {
        "description": "Revoke a host, invalidating its secret immediately.",
        "operationId": "agent.host.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Host Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Agent Host",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.host"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.host",
          "result": "void",
          "verb": "revoke"
        }
      }
    },
    "/me/runtime/agent-hosts/{host_id}/harnesses": {
      "get": {
        "operationId": "agent.host.harnesses.list",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Host Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHostHarnessListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Agent Host Harnesses",
        "tags": [
          "agent_host"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.host.harnesses",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/organizations": {
      "get": {
        "description": "Get all organizations the current user belongs to",
        "operationId": "org.list",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List My Organizations",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "org",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a new organization",
        "operationId": "org.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Organization",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/organizations/invitations": {
      "get": {
        "description": "Get all pending invitations for the current user",
        "operationId": "org.invitation.list_mine",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/OrganizationInvitationStatus",
              "default": "PENDING"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvitationListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List My Invitations",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "org.invitation",
          "result": "collection",
          "verb": "list_mine"
        }
      }
    },
    "/organizations/invitations/{invitation_id}": {
      "delete": {
        "description": "Revoke an organization invitation",
        "operationId": "org.invitation.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invitation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Invitation",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org.invitation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org.invitation",
          "result": "void",
          "verb": "revoke"
        }
      },
      "get": {
        "description": "Get an invitation by id",
        "operationId": "org.invitation.get",
        "parameters": [
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invitation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvitationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Organization Invitation",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "org.invitation",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/organizations/invitations/{invitation_id}/accept": {
      "post": {
        "description": "Accept an organization invitation",
        "operationId": "org.invitation.accept",
        "parameters": [
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invitation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Accept Invitation",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org.invitation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org.invitation",
          "result": "entity",
          "verb": "accept"
        }
      }
    },
    "/organizations/navigation": {
      "get": {
        "description": "Every organization the current user belongs to, each with the pods they can see in it. Replaces fetching the organization list and then one pod list per organization; the payload stays shallow so it does not grow with the contents of each pod.",
        "operationId": "org.navigation",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Organizations And Their Pods",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "navigation"
        }
      }
    },
    "/organizations/slug-availability": {
      "get": {
        "description": "Check whether an organization slug — the handle, and the only unique one of the two — is available. `name_available` is deprecated and always true: display names are labels, and two organizations may share one.",
        "operationId": "org.slug_availability",
        "parameters": [
          {
            "in": "query",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSlugAvailabilityResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Check Organization Slug Availability",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "slug_availability"
        }
      }
    },
    "/organizations/suggested": {
      "get": {
        "description": "Get auto-join organizations matching the current user's email domain",
        "operationId": "org.suggested",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Suggested Organizations",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "org",
          "result": "entity",
          "verb": "suggested"
        }
      }
    },
    "/organizations/{org_id}": {
      "get": {
        "description": "Get organization details",
        "operationId": "org.get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Organization",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update an organization's name or join policy (owner only)",
        "operationId": "org.update",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Organization",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/organizations/{org_id}/agent-runtime/profiles": {
      "get": {
        "operationId": "agent.runtime.profiles.list",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_disabled",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Disabled",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRuntimeProfileListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Available Agent Runtime Profiles",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "agent.runtime.profiles.create",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "discriminator": {
                  "mapping": {
                    "AGENT_HOST": "#/components/schemas/CreateAgentHostRuntimeProfileRequest",
                    "ANTHROPIC_COMPATIBLE": "#/components/schemas/CreateAnthropicCompatibleRuntimeProfileRequest",
                    "OPENAI_COMPATIBLE": "#/components/schemas/CreateOpenAICompatibleRuntimeProfileRequest"
                  },
                  "propertyName": "source"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateAgentHostRuntimeProfileRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CreateOpenAICompatibleRuntimeProfileRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CreateAnthropicCompatibleRuntimeProfileRequest"
                  }
                ],
                "title": "Data"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRuntimeProfileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Agent Runtime Profile",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.profiles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/organizations/{org_id}/agent-runtime/profiles/{profile_id}": {
      "delete": {
        "operationId": "agent.runtime.profiles.archive",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Archive Agent Runtime Profile",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.profiles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "void",
          "verb": "archive"
        }
      },
      "get": {
        "operationId": "agent.runtime.profiles.get",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRuntimeProfileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Agent Runtime Profile",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "operationId": "agent.runtime.profiles.update",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "discriminator": {
                  "mapping": {
                    "AGENT_HOST": "#/components/schemas/UpdateAgentHostRuntimeProfileRequest",
                    "ANTHROPIC_COMPATIBLE": "#/components/schemas/UpdateAnthropicCompatibleRuntimeProfileRequest",
                    "OPENAI_COMPATIBLE": "#/components/schemas/UpdateOpenAICompatibleRuntimeProfileRequest"
                  },
                  "propertyName": "source"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UpdateAgentHostRuntimeProfileRequest"
                  },
                  {
                    "$ref": "#/components/schemas/UpdateOpenAICompatibleRuntimeProfileRequest"
                  },
                  {
                    "$ref": "#/components/schemas/UpdateAnthropicCompatibleRuntimeProfileRequest"
                  }
                ],
                "title": "Data"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRuntimeProfileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Agent Runtime Profile",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.profiles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/organizations/{org_id}/agent-runtime/profiles/{profile_id}:restore": {
      "post": {
        "operationId": "agent.runtime.profiles.restore",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRuntimeProfileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Restore Agent Runtime Profile",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.profiles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "entity",
          "verb": "restore"
        }
      }
    },
    "/organizations/{org_id}/home": {
      "get": {
        "description": "One organization's landing page: every pod the current user can see, with its apps, its agents, and the user's roles in that pod. Replaces fetching apps and agents per pod. Cached briefly per user.",
        "operationId": "org.home",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationHomeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Organization Home",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "home"
        }
      }
    },
    "/organizations/{org_id}/invitations": {
      "get": {
        "description": "Get all pending invitations for an organization",
        "operationId": "org.invitation.list",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/OrganizationInvitationStatus",
              "default": "PENDING"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvitationListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Organization Invitations",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "org.invitation",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Invite a user to join the organization",
        "operationId": "org.invitation.invite",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvitationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Invite Member",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org.invitation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org.invitation",
          "result": "entity",
          "verb": "invite"
        }
      }
    },
    "/organizations/{org_id}/join": {
      "post": {
        "description": "Join an organization when the current user's email domain is allowed to auto-join",
        "operationId": "org.join_auto_join",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Join Auto-Join Organization",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org",
          "result": "entity",
          "verb": "join_auto_join"
        }
      }
    },
    "/organizations/{org_id}/members": {
      "get": {
        "description": "Get all members of an organization",
        "operationId": "org.member.list",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationMemberListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Organization Members",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "org.member",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/organizations/{org_id}/members/{member_id}": {
      "delete": {
        "description": "Remove a member from the organization",
        "operationId": "org.member.remove",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Member Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Member",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org.member",
          "result": "void",
          "verb": "remove"
        }
      }
    },
    "/organizations/{org_id}/members/{member_id}/role": {
      "patch": {
        "description": "Update a member's role in the organization",
        "operationId": "org.member.update_role",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Member Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationMemberResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Member Role",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "invalidates": [
            "org.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "org.member",
          "result": "entity",
          "verb": "update_role"
        }
      }
    },
    "/organizations/{organization_id}/connector-operations": {
      "get": {
        "description": "Search operations across every connector installed in the org. Each hit carries the `auth_config` to execute it against, so a caller that knows what it wants to do — but not which connector provides it — needs one request instead of one per install.",
        "operationId": "connector.operation.search",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDiscoverResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Connector Operations Across Installs",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "connector.operation",
          "result": "collection",
          "verb": "search"
        }
      }
    },
    "/organizations/{organization_id}/connectors/accounts": {
      "get": {
        "description": "Get all connected accounts for the current user. Optionally filter by connector_id or connector_name",
        "operationId": "connector.account.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "connector_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Connector Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountListResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Accounts",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "connector.account",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Directly connect a credential-managed native account for an org auth config.",
        "operationId": "connector.account.create",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCreateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Account",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.account",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/organizations/{organization_id}/connectors/accounts/{account_id}": {
      "delete": {
        "description": "Delete a connected account and revoke the connection",
        "operationId": "connector.account.delete",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Account",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.account",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get a specific account by ID",
        "operationId": "connector.account.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Account",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.account",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/organizations/{organization_id}/connectors/auth-configs": {
      "get": {
        "operationId": "connector.auth_config.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfigListResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Auth Configs",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "connector.auth_config",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "connector.auth_config.create",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthConfigCreateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfigResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Auth Config",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.auth_config"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.auth_config",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/organizations/{organization_id}/connectors/auth-configs/{auth_config_name}": {
      "delete": {
        "operationId": "connector.auth_config.delete",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "title": "Response Connector.Auth Config.Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Auth Config",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.auth_config"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.auth_config",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "connector.auth_config.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfigResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Auth Config",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.auth_config",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update an install in place. Rotating an MCP server URL or an OAuth app no longer requires deleting the install, which cascades away every account connected to it. Accounts are never deleted here: if the change invalidates their credentials they are marked REAUTH_REQUIRED, and reconnecting updates them in place. `kind`, `connector_id` and `config_source` are immutable -- changing any of them reinterprets every stored operation and credential, so that is a new install rather than an update.",
        "operationId": "connector.auth_config.update",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthConfigUpdateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfigUpdateResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Auth Config",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.auth_config"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.auth_config",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/organizations/{organization_id}/connectors/auth-configs/{auth_config_name}/operations/refresh": {
      "post": {
        "description": "Re-discover the operations exposed by a discovery-based install (MCP server, OpenAPI URL). Use after the upstream server changes its tools, or to retry a discovery that failed when the install was created.",
        "operationId": "connector.auth_config.refresh_operations",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Connector.Auth Config.Refresh Operations",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Refresh Auth Config Operations",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.auth_config"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.auth_config",
          "result": "entity",
          "verb": "refresh_operations"
        }
      }
    },
    "/organizations/{organization_id}/connectors/connect-requests": {
      "post": {
        "description": "Initiate an OAuth connection request for a connector",
        "operationId": "connector.connect_request.create",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRequestInitiateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectRequestResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Initiate Connect Request",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.connect_request"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.connect_request",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/organizations/{organization_id}/connectors/status": {
      "get": {
        "operationId": "connector.status.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Connector Status",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.status",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/organizations/{organization_id}/connectors/{auth_config_name}/operations": {
      "get": {
        "operationId": "connector.operation.discover",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDiscoverResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Discover Connector Operations",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "connector.operation",
          "result": "entity",
          "verb": "discover"
        }
      }
    },
    "/organizations/{organization_id}/connectors/{auth_config_name}/operations/details": {
      "post": {
        "operationId": "connector.operation.details.batch",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationDetailsBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDetailsBatchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Connector Operation Details In Batch",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.operation.details"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.operation.details",
          "result": "entity",
          "verb": "batch"
        }
      }
    },
    "/organizations/{organization_id}/connectors/{auth_config_name}/operations/{operation_name}": {
      "get": {
        "operationId": "connector.operation.detail",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "operation_name",
            "required": true,
            "schema": {
              "title": "Operation Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Connector Operation Details",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.operation",
          "result": "entity",
          "verb": "detail"
        }
      }
    },
    "/organizations/{organization_id}/connectors/{auth_config_name}/operations/{operation_name}/execute": {
      "post": {
        "operationId": "connector.operation.execute",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "operation_name",
            "required": true,
            "schema": {
              "title": "Operation Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationExecutionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationExecutionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Execute Connector Operation",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.operation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.operation",
          "result": "entity",
          "verb": "execute"
        }
      }
    },
    "/organizations/{organization_id}/connectors/{auth_config_name}/triggers": {
      "get": {
        "operationId": "connector.trigger.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppTriggerListResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Connector Triggers",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "connector.trigger",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/organizations/{organization_id}/connectors/{auth_config_name}/triggers/{trigger_name}": {
      "get": {
        "operationId": "connector.trigger.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_name",
            "required": true,
            "schema": {
              "title": "Auth Config Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "trigger_name",
            "required": true,
            "schema": {
              "title": "Trigger Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppTriggerResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Connector Trigger",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.trigger",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods": {
      "post": {
        "description": "Create a new pod",
        "operationId": "pod.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pod",
        "tags": [
          "Pods"
        ],
        "x-lemma": {
          "invalidates": [
            "pod"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/bundle/download": {
      "get": {
        "description": "Stream a bundle archive (application/zip) by signed token. Requires an authenticated lemma user AND a valid token; not pod-scoped, so a share link works for any signed-in user. 410 if the token is invalid/expired or the archive was swept.",
        "operationId": "pod.bundle.download",
        "parameters": [
          {
            "description": "Signed download token.",
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "description": "Signed download token.",
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download A Bundle Archive",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.bundle",
          "result": "entity",
          "verb": "download"
        }
      }
    },
    "/pods/organization/{organization_id}": {
      "get": {
        "description": "List all pods in an organization",
        "operationId": "pod.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List PodS by Organization",
        "tags": [
          "Pods"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "pod",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}": {
      "delete": {
        "description": "Delete a pod",
        "operationId": "pod.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Pod",
        "tags": [
          "Pods"
        ],
        "x-lemma": {
          "invalidates": [
            "pod"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get pod details",
        "operationId": "pod.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod",
        "tags": [
          "Pods"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod",
          "result": "entity",
          "verb": "get"
        }
      },
      "put": {
        "description": "Update pod details",
        "operationId": "pod.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pod",
        "tags": [
          "Pods"
        ],
        "x-lemma": {
          "invalidates": [
            "pod"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/agents": {
      "get": {
        "description": "List pod-owned agent definitions visible to the current user.",
        "operationId": "agent.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Extra data to embed. `permissions` attaches each agent's resource grants, resolved for the whole page in one query — without it, a caller that needs grants must call the per-agent permissions endpoint once per row.",
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "description": "Extra data to embed. `permissions` attaches each agent's resource grants, resolved for the whole page in one query — without it, a caller that needs grants must call the per-agent permissions endpoint once per row.",
              "items": {
                "type": "string"
              },
              "title": "Include",
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Agents",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "agent",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a pod-owned agent definition with runtime, toolsets, and schemas.",
        "operationId": "agent.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Agent",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "invalidates": [
            "agent"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/agents/{agent_name}": {
      "delete": {
        "description": "Delete a pod-owned agent definition by name.",
        "operationId": "agent.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_name",
            "required": true,
            "schema": {
              "title": "Agent Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Agent",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "invalidates": [
            "agent"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get one pod-owned agent definition by its stable name.",
        "operationId": "agent.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_name",
            "required": true,
            "schema": {
              "title": "Agent Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Agent",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update an agent definition, including prompt instruction, runtime, toolsets, and schemas.",
        "operationId": "agent.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_name",
            "required": true,
            "schema": {
              "title": "Agent Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Agent",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "invalidates": [
            "agent"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/agents/{agent_name}/permissions": {
      "get": {
        "description": "Get explicit resource grants assigned to an agent.",
        "operationId": "agent.permissions.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_name",
            "required": true,
            "schema": {
              "title": "Agent Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Agent Resource Permissions",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.permissions",
          "result": "entity",
          "verb": "get"
        }
      },
      "put": {
        "description": "Replace explicit resource grants assigned to an agent.",
        "operationId": "agent.permissions.replace",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent_name",
            "required": true,
            "schema": {
              "title": "Agent Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPermissionsReplaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Agent Resource Permissions",
        "tags": [
          "agents"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.permissions"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.permissions",
          "result": "entity",
          "verb": "replace"
        }
      }
    },
    "/pods/{pod_id}/apps": {
      "get": {
        "operationId": "app.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Apps",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "app",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "app.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create App",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "app"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "app",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/apps/from-widget": {
      "post": {
        "description": "Promote a conversation widget into a persisted app.\n\nThe widget and the app share one source artifact at two lifecycle stages. This\nfetches the stored fragment, preserves it, and deploys it in the standalone\ndocument wrapper (without conversation-only padding or height messaging).",
        "operationId": "app.create_from_widget",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAppFromWidgetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save Widget As App",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "app"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "app",
          "result": "entity",
          "verb": "create_from_widget"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}": {
      "delete": {
        "operationId": "app.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete App",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "app"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "app",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "app.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get App",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "app",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "operationId": "app.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update App",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "app"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "app",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}/assets": {
      "get": {
        "operationId": "app.asset.root.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get App Root Asset",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "app.asset.root",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}/assets/{asset_path}": {
      "get": {
        "operationId": "app.asset.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "asset_path",
            "required": true,
            "schema": {
              "title": "Asset Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get App Asset",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "app.asset",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}/bundle": {
      "post": {
        "operationId": "app.bundle.upload",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AppBundleUploadRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBundleUploadResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload App Bundle",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "app.bundle"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "app.bundle",
          "result": "entity",
          "verb": "upload"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}/dist/archive": {
      "get": {
        "operationId": "app.dist.archive.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Zip archive bytes"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download App Dist Archive",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "app.dist.archive",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}/source/archive": {
      "get": {
        "operationId": "app.source.archive.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_name",
            "required": true,
            "schema": {
              "title": "App Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Zip archive bytes"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download App Source Archive",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "app.source.archive",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/available-surfaces": {
      "get": {
        "description": "The connectable-surface catalog: every surface platform with its connector,\nsupported credential modes, the schema to connect an account, and whether this\npod's org can still claim the platform's Lemma-managed bot/number. Otherwise\nplatform-level — no surface need exist.",
        "operationId": "agent.surface.available",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableSurfacesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Available Surfaces",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "available"
        }
      }
    },
    "/pods/{pod_id}/bundle/exports": {
      "post": {
        "description": "Enqueue a pod export. Returns 202 with an export_id; poll the status endpoint until READY, then fetch the signed download_url.",
        "operationId": "pod.bundle.export.start",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Pod Export",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle.export"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle.export",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/pods/{pod_id}/bundle/exports/{export_id}": {
      "get": {
        "description": "Poll the status of a pod export (Redis-only; 410 when expired). When READY, includes the signed download_url, its expires_at, and any data-cap warnings.",
        "operationId": "pod.bundle.export.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Export Status",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.bundle.export",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/bundle/imports": {
      "post": {
        "description": "Import a pod bundle from a URL. kind=URL takes a lemma signed download URL (from an export, or from POST …/bundle/uploads); kind=GITHUB takes a public repo (repo_url or owner+repo, with account_id for private repos). Returns 202 with an import_id; poll status until AWAITING_CONFIRMATION, review the plan, then apply.",
        "operationId": "pod.bundle.import.start",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Pod Import",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle.import"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle.import",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/pods/{pod_id}/bundle/imports/{import_id}": {
      "delete": {
        "description": "Abort a running import and delete its state + staged archive.",
        "operationId": "pod.bundle.import.cancel",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "import_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Import Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel Pod Import",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle.import"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle.import",
          "result": "entity",
          "verb": "cancel"
        }
      },
      "get": {
        "description": "Poll the status + plan of a pod import (Redis-only; 410 when expired).",
        "operationId": "pod.bundle.import.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "import_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Import Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Import Status",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.bundle.import",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/bundle/imports/{import_id}/apply": {
      "post": {
        "description": "Apply a planned import. Requires confirm_destructive when the plan drops or alters columns, and resolved values for any required variables. Returns 202; poll the status endpoint for per-step progress.",
        "operationId": "pod.bundle.import.apply",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "import_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Import Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Apply Pod Import",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle.import"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle.import",
          "result": "entity",
          "verb": "apply"
        }
      }
    },
    "/pods/{pod_id}/bundle/imports/{import_id}/events": {
      "get": {
        "description": "Server-Sent Events for an import. The first frame is a full state snapshot; subsequent frames are live status/step/progress updates. The stream closes when the import reaches a terminal state or expires.",
        "operationId": "pod.bundle.import.events",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "import_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Import Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stream Pod Import Progress",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.bundle.import",
          "result": "entity",
          "verb": "events"
        }
      }
    },
    "/pods/{pod_id}/bundle/imports/{import_id}/replan": {
      "post": {
        "description": "Re-run planning against the still-staged bundle (410 if swept).",
        "operationId": "pod.bundle.import.replan",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "import_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Import Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Re-plan Pod Import",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle.import"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle.import",
          "result": "entity",
          "verb": "replan"
        }
      }
    },
    "/pods/{pod_id}/bundle/publishes": {
      "post": {
        "description": "Publish the pod as a bundle to a new GitHub repository. Returns 202 with a publish_id; poll the status endpoint for the repo URL.",
        "operationId": "pod.bundle.publish.start",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Publish Pod To GitHub",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle.publish"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle.publish",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/pods/{pod_id}/bundle/publishes/{publish_id}": {
      "get": {
        "description": "Poll the status of a pod publish (Redis-only; 410 when expired).",
        "operationId": "pod.bundle.publish.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "publish_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Publish Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Publish Status",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.bundle.publish",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/bundle/publishes/{publish_id}/events": {
      "get": {
        "description": "Server-Sent Events for a publish (snapshot then live frames).",
        "operationId": "pod.bundle.publish.events",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "publish_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Publish Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stream Pod Publish Progress",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.bundle.publish",
          "result": "entity",
          "verb": "events"
        }
      }
    },
    "/pods/{pod_id}/bundle/uploads": {
      "post": {
        "description": "Upload a local .zip bundle and receive a signed lemma download URL to pass to POST …/bundle/imports as kind=URL. The only multipart endpoint; it stages bytes and mints a URL, nothing more.",
        "operationId": "pod.bundle.upload",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/fastapi___compat__v2__Body_pod__bundle__upload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stage A Local Bundle Upload",
        "tags": [
          "Pod Bundle"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.bundle"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.bundle",
          "result": "entity",
          "verb": "upload"
        }
      }
    },
    "/pods/{pod_id}/conversations": {
      "get": {
        "description": "List root conversations for the current user in a pod. Omit agent_name to list conversations across the pod, pass POD_DEFAULT (or pod_default) to list default pod assistant conversations, or pass a name to list conversations for a specific pod agent. Child (sub-agent) conversations are omitted by default; pass parent_id to list the children of a specific conversation instead.",
        "operationId": "agent.conversation.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ConversationStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ConversationType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Parent Id"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pod Agent Conversations",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "agent.conversation",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a new pod-scoped conversation. When agent_name is omitted, the conversation uses the default pod assistant. Workflow and sub-agent executions also use conversations as their external execution handle.",
        "operationId": "agent.conversation.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pod Agent Conversation",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}": {
      "get": {
        "description": "Get a single pod-scoped assistant or agent conversation by id.",
        "operationId": "agent.conversation.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Conversation",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.conversation",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update mutable conversation settings for a pod-scoped conversation. The conversation runtime is used by future runs; message sends do not carry per-request runtime overrides.",
        "operationId": "agent.conversation.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pod Conversation",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/approvals": {
      "get": {
        "description": "List pending user-interaction tool calls (request_approval and ask_user) awaiting the user in a conversation.",
        "operationId": "agent.conversation.approval.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserApprovalListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Agent Run Approvals",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.conversation.approval",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/approvals/{approval_id}/decision": {
      "post": {
        "description": "Record the user's decision/answers for a paused request_approval or ask_user call and start a fresh run that resumes the agent. For an approved request_approval the wrapped tool runs as the user; the response body carries ask_user answers under `response.answers`.",
        "operationId": "agent.conversation.approval.resolve",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "approval_id",
            "required": true,
            "schema": {
              "title": "Approval Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveUserApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalDecisionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resolve User Approval",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation.approval"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation.approval",
          "result": "entity",
          "verb": "resolve"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/messages": {
      "get": {
        "description": "List the latest persisted messages in chronological order. Pass next_page_token as page_token to fetch the next older page above the current page.",
        "operationId": "agent.conversation.message.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "in": "query",
            "name": "before_sequence",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before Sequence"
            }
          },
          {
            "in": "query",
            "name": "after_sequence",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After Sequence"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pod Conversation Messages",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "agent.conversation.message",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Append a user message to a pod-scoped conversation and stream runtime events over Server-Sent Events until the active run completes. User messages can also be appended while a run is already active; the next harness step sees the new message in persisted history.",
        "operationId": "agent.conversation.message.send",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Pod Conversation Message",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation.message",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/retry": {
      "post": {
        "description": "Start a new run from the latest failed run's persisted conversation history without appending a duplicate user message. Retry is allowed only when the failed run produced no assistant, tool, or system activity. Attach to the returned run with the conversation stream endpoint.",
        "operationId": "agent.conversation.retry",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunStartResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conversation was not found or is not visible"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The latest run is not safely retryable"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The account usage limit was exceeded"
          }
        },
        "summary": "Retry Failed Pod Conversation Run",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation",
          "result": "entity",
          "verb": "retry"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/stop": {
      "post": {
        "description": "Request cancellation of the active internal run for a conversation.",
        "operationId": "agent.conversation.stop",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stop Pod Conversation",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation",
          "result": "void",
          "verb": "stop"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/stream": {
      "get": {
        "description": "Subscribe to Server-Sent Events for an existing pod-scoped conversation. The stream closes immediately when the conversation has no active run. Optionally filter to a specific internal run id for reconnects; terminal runs replay their persisted terminal event.",
        "operationId": "agent.conversation.stream",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stream Pod Conversation",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.conversation",
          "result": "entity",
          "verb": "stream"
        }
      }
    },
    "/pods/{pod_id}/datastore/files": {
      "get": {
        "operationId": "file.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "directory_path",
            "required": false,
            "schema": {
              "default": "/",
              "title": "Directory Path",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Files",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "file",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "file.upload",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DatastoreFileUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload File",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "upload"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/by-path": {
      "delete": {
        "operationId": "file.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete File Or Folder",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "file.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get File",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "operationId": "file.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/update"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update File",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/by-path/markdown": {
      "delete": {
        "description": "Remove a document's user-provided markdown so it reverts to extraction.",
        "operationId": "file.markdown.detach",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Detach Document Markdown",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file.markdown"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file.markdown",
          "result": "entity",
          "verb": "detach"
        }
      },
      "put": {
        "description": "Attach user-authored markdown and referenced images to a document.\n\nThe source file remains unchanged; the markdown is indexed for agent use.",
        "operationId": "file.markdown.attach",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/attach"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attach Document Markdown",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file.markdown"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file.markdown",
          "result": "entity",
          "verb": "attach"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/children": {
      "get": {
        "operationId": "file.children.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileChildrenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List a document's derived child files",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file.children",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/children/content": {
      "get": {
        "operationId": "file.child.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "description": "Child path, e.g. /folder/report.pdf/document.md, /folder/report.pdf/image_0.png, or /folder/report.pdf/pages/page_0001.jpg",
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "description": "Child path, e.g. /folder/report.pdf/document.md, /folder/report.pdf/image_0.png, or /folder/report.pdf/pages/page_0001.jpg",
              "title": "Path",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Start"
            }
          },
          {
            "in": "query",
            "name": "page_end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page End"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "File bytes"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Fetch a document's child artifact by path",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file.child",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/download": {
      "get": {
        "operationId": "file.download",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "File bytes"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download File",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "download"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/folders": {
      "post": {
        "operationId": "file.folder.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Folder",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file.folder"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file.folder",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/search": {
      "post": {
        "operationId": "file.search",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Files",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file",
          "result": "collection",
          "verb": "search"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/signed-url": {
      "post": {
        "operationId": "file.signed_url",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/FileSignedUrlRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSignedUrlResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a public, hit-capped signed URL for a file",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "signed_url"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/tree": {
      "get": {
        "operationId": "file.tree",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "root_path",
            "required": false,
            "schema": {
              "default": "/",
              "title": "Root Path",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "files_per_directory",
            "required": false,
            "schema": {
              "default": 3,
              "maximum": 20,
              "minimum": 0,
              "title": "Files Per Directory",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryTreeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Directory Tree",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "tree"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/url": {
      "get": {
        "operationId": "file.url",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUrlResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a short-lived URL for a file",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "url"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/{file_id}": {
      "get": {
        "description": "Read one file by its id.\n\nFiles were addressable only by path, which forced share links to carry one —\nand a personal path is the alias ``/me``, resolved against *whoever is\nasking*. A link to ``/me/notes.md`` therefore pointed at the recipient's own\nfile: a 404 that reads as \"deleted\", or, on a name collision, silently the\nwrong document. An id means the same file for everyone, and survives renames\nand moves besides.",
        "operationId": "file.get_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get File by ID",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "get_by_id"
        }
      }
    },
    "/pods/{pod_id}/datastore/query": {
      "post": {
        "description": "Execute a read-only SQL query inside the datastore schema. Joins, aggregates, subqueries, and cross-table reads are allowed, including across RLS-enabled tables — rows of RLS tables are scoped to the caller by default (pod admins included). Pass `mode=admin` to read every member's rows, which requires permission to administer each referenced RLS table. Only a single read-only statement is permitted; mutating statements and cross-schema references are rejected.",
        "operationId": "query.execute",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables referenced by the query. Omitted/`USER` (default) scopes their rows to the signed-in user — the per-user data apps and functions expect. `ADMIN` returns every member's rows and requires permission to administer every RLS table the query touches; a caller without it gets a 403. Non-RLS tables are unaffected.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables referenced by the query. Omitted/`USER` (default) scopes their rows to the signed-in user — the per-user data apps and functions expect. `ADMIN` returns every member's rows and requires permission to administer every RLS table the query touches; a caller without it gets a 403. Non-RLS tables are unaffected.",
              "title": "Mode"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatastoreQueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatastoreQueryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Execute Query",
        "tags": [
          "query"
        ],
        "x-lemma": {
          "invalidates": [
            "query"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "query",
          "result": "entity",
          "verb": "execute"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables": {
      "get": {
        "description": "List tables in a datastore.",
        "operationId": "table.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "description": "Max number of tables to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max number of tables to return.",
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Cursor from a previous response for pagination.",
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Cursor from a previous response for pagination.",
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Tables",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "table",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a table in a datastore. Define primary key, column schema, and optional RLS behavior.",
        "operationId": "table.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Table",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}": {
      "delete": {
        "description": "Delete a table and all records in it.",
        "operationId": "table.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Table",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get table schema metadata by table name.",
        "operationId": "table.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Table",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "table",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update table metadata/configuration, visibility, or toggle row-level security (enable_rls, empty tables only).",
        "operationId": "table.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Table",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/columns": {
      "post": {
        "description": "Add a new column to a table. Column names must be unique and compatible with existing table schema rules.",
        "operationId": "table.column.add",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddColumnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Column",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table.column"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table.column",
          "result": "entity",
          "verb": "add"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/columns/{column_name}": {
      "delete": {
        "description": "Remove a non-primary, non-system column from a table. System columns and the primary key cannot be removed.",
        "operationId": "table.column.remove",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "column_name",
            "required": true,
            "schema": {
              "title": "Column Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Column",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table.column"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table.column",
          "result": "void",
          "verb": "remove"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/records": {
      "get": {
        "description": "List table records with token pagination only. Use the datastore query endpoint for joins, aggregates, or custom read-only SQL.",
        "operationId": "record.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "description": "Max number of rows to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Max number of rows to return.",
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Row offset for direct pagination.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Row offset for direct pagination.",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{\"field\":\"<column_name>\",\"op\":\"<operator>\",\"value\":<comparison_value>}`. Allowed operators are: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`. Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={\"field\":\"amount\",\"op\":\"gt\",\"value\":100}` and `filter={\"field\":\"status\",\"op\":\"eq\",\"value\":\"OPEN\"}`.",
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{\"field\":\"<column_name>\",\"op\":\"<operator>\",\"value\":<comparison_value>}`. Allowed operators are: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`. Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={\"field\":\"amount\",\"op\":\"gt\",\"value\":100}` and `filter={\"field\":\"status\",\"op\":\"eq\",\"value\":\"OPEN\"}`.",
              "title": "Filter"
            }
          },
          {
            "description": "Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{\"field\":\"<column_name>\",\"direction\":\"<direction>\"}`. Allowed directions are: `asc`, `desc`. Repeat the query parameter to provide multi-column sorting in priority order. Example: `sort={\"field\":\"created_at\",\"direction\":\"desc\"}`.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{\"field\":\"<column_name>\",\"direction\":\"<direction>\"}`. Allowed directions are: `asc`, `desc`. Repeat the query parameter to provide multi-column sorting in priority order. Example: `sort={\"field\":\"created_at\",\"direction\":\"desc\"}`.",
              "title": "Sort"
            }
          },
          {
            "description": "Opaque token from a previous response page.",
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque token from a previous response page.",
              "title": "Page Token"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
              "title": "Mode"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Records",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "record",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Insert a record into a table. Returns the created record object keyed by column name (no envelope). Reserved tables (`reserved_*`) are system-managed and cannot be mutated through record write endpoints.",
        "operationId": "record.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Record.Create",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Record",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "invalidates": [
            "record"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "record",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/records/bulk/create": {
      "post": {
        "description": "Insert multiple records in one request. Returns the affected-row count.",
        "operationId": "record.bulk_create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCreateRecordsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatastoreCountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Bulk Create",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "invalidates": [
            "record"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "record",
          "result": "entity",
          "verb": "bulk_create"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/records/bulk/delete": {
      "post": {
        "description": "Delete multiple records by primary key values. Returns the affected-row count.",
        "operationId": "record.bulk_delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
              "title": "Mode"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteRecordsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatastoreCountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Bulk Delete",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "invalidates": [
            "record"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "record",
          "result": "void",
          "verb": "bulk_delete"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/records/bulk/update": {
      "post": {
        "description": "Update multiple records in one request (each item needs primary key). Returns the affected-row count.",
        "operationId": "record.bulk_update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
              "title": "Mode"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateRecordsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatastoreCountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Bulk Update",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "invalidates": [
            "record"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "record",
          "result": "entity",
          "verb": "bulk_update"
        }
      }
    },
    "/pods/{pod_id}/datastore/tables/{table_name}/records/{record_id}": {
      "delete": {
        "description": "Delete a record by primary key.",
        "operationId": "record.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "title": "Record Id",
              "type": "string"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
              "title": "Mode"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Record",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "invalidates": [
            "record"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "record",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Fetch one record by primary key value (returns the record object, no envelope). The `record_id` path segment is the table's primary key value as stored in the table, not necessarily a UUID.",
        "operationId": "record.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "title": "Record Id",
              "type": "string"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
              "title": "Mode"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Record.Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Record",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "record",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Patch a record by primary key. Returns the updated record object (no envelope).",
        "operationId": "record.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "table_name",
            "required": true,
            "schema": {
              "title": "Table Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "title": "Record Id",
              "type": "string"
            }
          },
          {
            "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RecordAccessMode"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Row-visibility mode for RLS-enabled tables. Omitted/`USER` (default) scopes rows to the signed-in user's own records — the per-user semantics an app app expects. `ADMIN` returns/operates on every member's rows and requires permission to administer the table; a caller without it gets a 403. Ignored for non-RLS tables, whose rows are shared by all members.",
              "title": "Mode"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Record.Update",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Record",
        "tags": [
          "records"
        ],
        "x-lemma": {
          "invalidates": [
            "record"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "record",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/functions": {
      "get": {
        "description": "List all functions in a pod",
        "operationId": "function.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "description": "Extra data to embed. `permissions` attaches each function's resource grants, resolved for the whole page in one query — without it, a caller that needs grants must call the per-function permissions endpoint once per row.",
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "description": "Extra data to embed. `permissions` attaches each function's resource grants, resolved for the whole page in one query — without it, a caller that needs grants must call the per-function permissions endpoint once per row.",
              "items": {
                "type": "string"
              },
              "title": "Include",
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Functions",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "function",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a new function in a pod. Do not send input_schema, output_schema, or config_schema; the platform derives those schemas from the function code and returns them in the response.",
        "operationId": "function.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFunctionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Function",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/functions/{function_name}": {
      "delete": {
        "description": "Delete a function",
        "operationId": "function.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Function",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get a function by name",
        "operationId": "function.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Function",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "function",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update a function. When code is supplied, the platform re-derives the function input_schema and output_schema and returns the refreshed function.",
        "operationId": "function.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFunctionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Function",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/functions/{function_name}/permissions": {
      "get": {
        "description": "Get explicit resource grants assigned to a function.",
        "operationId": "function.permissions.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionPermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Function Resource Permissions",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "function.permissions",
          "result": "entity",
          "verb": "get"
        }
      },
      "put": {
        "description": "Replace explicit resource grants assigned to a function.",
        "operationId": "function.permissions.replace",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FunctionPermissionsReplaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionPermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Function Resource Permissions",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function.permissions"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function.permissions",
          "result": "entity",
          "verb": "replace"
        }
      }
    },
    "/pods/{pod_id}/functions/{function_name}/runs": {
      "get": {
        "description": "List runs for a function",
        "operationId": "function.run.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Runs",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "function.run",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Execute a function",
        "operationId": "function.run",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteFunctionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Execute Function",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function",
          "result": "entity",
          "verb": "run"
        }
      }
    },
    "/pods/{pod_id}/functions/{function_name}/runs/{run_id}": {
      "get": {
        "description": "Get a specific function run",
        "operationId": "function.run.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "function_name",
            "required": true,
            "schema": {
              "title": "Function Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Run",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "function.run",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/join": {
      "post": {
        "description": "Self-join a pod when its join policy (ORG_MEMBERS / PUBLIC) allows it",
        "operationId": "pod.join",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Join Pod",
        "tags": [
          "Pods"
        ],
        "x-lemma": {
          "invalidates": [
            "pod"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod",
          "result": "entity",
          "verb": "join"
        }
      }
    },
    "/pods/{pod_id}/join-requests": {
      "get": {
        "description": "List join requests for a pod",
        "operationId": "pod.join_request.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PodJoinRequestStatus"
                },
                {
                  "type": "null"
                }
              ],
              "default": "PENDING",
              "title": "Status Filter"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodJoinRequestListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pod Join Requests",
        "tags": [
          "Pod Join Requests"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "pod.join_request",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a join request for the current user to access this pod",
        "operationId": "pod.join_request.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodJoinRequestCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pod Join Request",
        "tags": [
          "Pod Join Requests"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.join_request"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.join_request",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/join-requests/me": {
      "get": {
        "description": "Get the current user's pending join request for this pod",
        "operationId": "pod.join_request.me",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PodJoinRequestCreateResponse"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Pod.Join Request.Me"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get My Pod Join Request",
        "tags": [
          "Pod Join Requests"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.join_request",
          "result": "entity",
          "verb": "me"
        }
      }
    },
    "/pods/{pod_id}/join-requests/{join_request_id}/approve": {
      "post": {
        "description": "Approve a pending pod join request and add user to org/pod",
        "operationId": "pod.join_request.approve",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "join_request_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Join Request Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodJoinRequestApproveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodJoinRequestCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Approve Pod Join Request",
        "tags": [
          "Pod Join Requests"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.join_request"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.join_request",
          "result": "entity",
          "verb": "approve"
        }
      }
    },
    "/pods/{pod_id}/members": {
      "get": {
        "description": "List all members of a pod",
        "operationId": "pod.member.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pod Members",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "pod.member",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Add a member to a pod",
        "operationId": "pod.member.add",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodMemberAddRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Pod Member",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.member",
          "result": "entity",
          "verb": "add"
        }
      }
    },
    "/pods/{pod_id}/members/lookup/by-email": {
      "get": {
        "description": "Resolve a pod member by email",
        "operationId": "pod.member.lookup_by_email",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "email",
            "required": true,
            "schema": {
              "format": "email",
              "title": "Email",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lookup Pod Member By Email",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.member",
          "result": "entity",
          "verb": "lookup_by_email"
        }
      }
    },
    "/pods/{pod_id}/members/lookup/by-user-id/{user_id}": {
      "get": {
        "description": "Resolve a pod member by user id",
        "operationId": "pod.member.lookup_by_user_id",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lookup Pod Member By User ID",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.member",
          "result": "entity",
          "verb": "lookup_by_user_id"
        }
      }
    },
    "/pods/{pod_id}/members/{pod_member_id}": {
      "delete": {
        "description": "Remove a member from a pod",
        "operationId": "pod.member.remove",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pod_member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Member Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Pod Member",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.member",
          "result": "void",
          "verb": "remove"
        }
      },
      "get": {
        "description": "Get a pod member by pod member id",
        "operationId": "pod.member.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pod_member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Member Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Member",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.member",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/members/{pod_member_id}/roles": {
      "patch": {
        "description": "Update a pod member's roles",
        "operationId": "pod.member.update_roles",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pod_member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Member Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodMemberUpdateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMemberResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Member Roles",
        "tags": [
          "Pod Members"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.member",
          "result": "entity",
          "verb": "update_roles"
        }
      }
    },
    "/pods/{pod_id}/notifications": {
      "get": {
        "description": "Notifications addressed to the current user in this pod, newest first. Filter with `status` (repeatable). Each item carries everything needed to render its action: `awaiting_response` decides whether to offer one, and `responds_through_action` decides whether it is a free-text reply or the form described by `action`.",
        "operationId": "notification.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/NotificationStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List My Notifications",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "notification",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Reach a pod member on whichever surface they actually use, leaving a copy in their Lemma inbox either way.\n\nGated on `conversation.write` rather than an editor permission: this opens a conversation and writes a message into it, which is exactly that grant. Requiring `agent.update` is what left the older `surface.send` endpoint with no caller in the product.\n\nA 201 with `delivery_status` of `UNDELIVERABLE` is a success, not a failure — the notification exists and the inbox has it. Read `undeliverable_reason` to tell the user what to do about it.",
        "operationId": "notification.send",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotifyMemberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Notify A Pod Member",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "invalidates": [
            "notification"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "notification",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/pods/{pod_id}/notifications/read-all": {
      "post": {
        "description": "Returns the remaining unread count, which is always zero.",
        "operationId": "notification.mark_all_read",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationUnreadCountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mark All My Notifications Read",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "invalidates": [
            "notification"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "notification",
          "result": "entity",
          "verb": "mark_all_read"
        }
      }
    },
    "/pods/{pod_id}/notifications/unread-count": {
      "get": {
        "description": "Unread, not unanswered. A notification you have read but not yet acted on has stopped being new.",
        "operationId": "notification.unread_count",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationUnreadCountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Count My Unread Notifications",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "notification",
          "result": "entity",
          "verb": "unread_count"
        }
      }
    },
    "/pods/{pod_id}/notifications/{notification_id}/acknowledge": {
      "post": {
        "description": "Dismiss a notification that asked for nothing. Returns 409 when a response is owed — dismissing a question is not answering it.",
        "operationId": "notification.acknowledge",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "notification_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Notification Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Acknowledge A Notification",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "invalidates": [
            "notification"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "notification",
          "result": "entity",
          "verb": "acknowledge"
        }
      }
    },
    "/pods/{pod_id}/notifications/{notification_id}/read": {
      "post": {
        "operationId": "notification.mark_read",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "notification_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Notification Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mark Notification Read",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "invalidates": [
            "notification"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "notification",
          "result": "entity",
          "verb": "mark_read"
        }
      }
    },
    "/pods/{pod_id}/notifications/{notification_id}/respond": {
      "post": {
        "description": "Answer a notification from the app. Produces the same `RESPONDED` an agent-mediated reply on a chat surface produces, so the asking run sees it either way.\n\nReturns 409 when the notification is answered by completing its `action` instead — a workflow form is submitted through the workflow run endpoint, where it is validated against the node's schema. It also returns 409 if somebody already answered it, rather than overwriting an answer that may already have been acted on.",
        "operationId": "notification.respond",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "notification_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Notification Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationRespondRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Respond To A Notification",
        "tags": [
          "notifications"
        ],
        "x-lemma": {
          "invalidates": [
            "notification"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "notification",
          "result": "entity",
          "verb": "respond"
        }
      }
    },
    "/pods/{pod_id}/permissions/catalog": {
      "get": {
        "operationId": "pod.permissions.catalog",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodPermissionCatalogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Permission Catalog",
        "tags": [
          "Pod Permissions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.permissions",
          "result": "entity",
          "verb": "catalog"
        }
      }
    },
    "/pods/{pod_id}/permissions/me": {
      "get": {
        "operationId": "pod.permissions.me",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodEffectivePermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get My Pod Permissions",
        "tags": [
          "Pod Permissions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.permissions",
          "result": "entity",
          "verb": "me"
        }
      }
    },
    "/pods/{pod_id}/resources/{resource_type}/preview": {
      "get": {
        "description": "Describe a shared resource, addressed by id or by name.\n\nBoth, because the two live in different worlds: agents, apps and tables are\nlinked by name, while a document's \"name\" is its stored path — which a\nrecipient does not have, since the link they were sent carries an id\nprecisely so it does not depend on a path.",
        "operationId": "pod.resource.preview",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "resource_type",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ResourceType"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name"
            }
          },
          {
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePreviewResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview a Shared Resource",
        "tags": [
          "Pod Resource Preview"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.resource",
          "result": "entity",
          "verb": "preview"
        }
      }
    },
    "/pods/{pod_id}/resources/{resource_type}/{resource_name}/access": {
      "get": {
        "operationId": "pod.resource_access.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "resource_type",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ResourceType"
            }
          },
          {
            "in": "path",
            "name": "resource_name",
            "required": true,
            "schema": {
              "title": "Resource Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceAccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Resource Access",
        "tags": [
          "Pod Resource Access"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.resource_access",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/resources/{resource_type}/{resource_name}/access/grantees/{grantee_type}/{grantee_id}": {
      "delete": {
        "operationId": "pod.resource_access.grant.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "resource_type",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ResourceType"
            }
          },
          {
            "in": "path",
            "name": "resource_name",
            "required": true,
            "schema": {
              "title": "Resource Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grantee_type",
            "required": true,
            "schema": {
              "title": "Grantee Type",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grantee_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Grantee Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceAccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Resource Access Grant",
        "tags": [
          "Pod Resource Access"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.resource_access.grant"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.resource_access.grant",
          "result": "void",
          "verb": "delete"
        }
      },
      "put": {
        "operationId": "pod.resource_access.grant.replace",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "resource_type",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ResourceType"
            }
          },
          {
            "in": "path",
            "name": "resource_name",
            "required": true,
            "schema": {
              "title": "Resource Name",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grantee_type",
            "required": true,
            "schema": {
              "title": "Grantee Type",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grantee_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Grantee Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceAccessGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceAccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Resource Access Grant",
        "tags": [
          "Pod Resource Access"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.resource_access.grant"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.resource_access.grant",
          "result": "entity",
          "verb": "replace"
        }
      }
    },
    "/pods/{pod_id}/roles": {
      "get": {
        "operationId": "pod.roles.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodRoleListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pod Roles",
        "tags": [
          "Pod Roles"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.roles",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "pod.roles.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodRoleCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodRoleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pod Role",
        "tags": [
          "Pod Roles"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.roles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.roles",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/roles/{role_name}": {
      "delete": {
        "operationId": "pod.roles.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "role_name",
            "required": true,
            "schema": {
              "title": "Role Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Pod Role",
        "tags": [
          "Pod Roles"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.roles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.roles",
          "result": "void",
          "verb": "delete"
        }
      },
      "patch": {
        "operationId": "pod.roles.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "role_name",
            "required": true,
            "schema": {
              "title": "Role Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodRoleCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodRoleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pod Role",
        "tags": [
          "Pod Roles"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.roles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.roles",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/roles/{role_name}/permissions": {
      "get": {
        "operationId": "pod.role.permissions.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "role_name",
            "required": true,
            "schema": {
              "title": "Role Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodRolePermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Role Permissions",
        "tags": [
          "Pod Roles"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.role.permissions",
          "result": "entity",
          "verb": "get"
        }
      },
      "put": {
        "operationId": "pod.role.permissions.replace",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "role_name",
            "required": true,
            "schema": {
              "title": "Role Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodRolePermissionsReplaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodRolePermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Pod Role Permissions",
        "tags": [
          "Pod Roles"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.role.permissions"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.role.permissions",
          "result": "entity",
          "verb": "replace"
        }
      }
    },
    "/pods/{pod_id}/schedules": {
      "get": {
        "description": "List pod schedules.",
        "operationId": "schedule.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "schedule_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ScheduleType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Schedule Type"
            }
          },
          {
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Active"
            }
          },
          {
            "in": "query",
            "name": "agent_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "in": "query",
            "name": "workflow_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workflow Name"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Schedules",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "schedule",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a new pod schedule.",
        "operationId": "schedule.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Schedule",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "invalidates": [
            "schedule"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "schedule",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/schedules/{schedule_id}": {
      "delete": {
        "description": "Delete a schedule.",
        "operationId": "schedule.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Schedule Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Schedule",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "invalidates": [
            "schedule"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "schedule",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get a schedule by ID.",
        "operationId": "schedule.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Schedule Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Schedule",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "schedule",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update a schedule.",
        "operationId": "schedule.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Schedule Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Schedule",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "invalidates": [
            "schedule"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "schedule",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/schedules/{schedule_id}/runs": {
      "get": {
        "operationId": "schedule.run.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Schedule Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Schedule Runs",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "schedule.run",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/schedules/{schedule_id}/runs/{run_id}/retry": {
      "post": {
        "operationId": "schedule.run.retry",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Schedule Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retry Schedule Run",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "invalidates": [
            "schedule.run"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "schedule.run",
          "result": "entity",
          "verb": "retry"
        }
      }
    },
    "/pods/{pod_id}/surface-setup/{platform}": {
      "get": {
        "description": "The static pre-creation checklist for a platform (env/OAuth\nprerequisites) — works before any surface of this platform exists.",
        "operationId": "agent.surface.setup_guide",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "platform",
            "required": true,
            "schema": {
              "title": "Platform",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SurfacePlatformSetupGuide"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Surface Setup Guide",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "setup_guide"
        }
      }
    },
    "/pods/{pod_id}/surfaces": {
      "get": {
        "description": "List surfaces in the pod. A pod may have several surfaces of the same\n``platform`` (different bots/accounts, one per agent); filter by\n``platform`` and/or ``agent_name`` to narrow the results.",
        "operationId": "agent.surface.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "agent_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSurfaceListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Surfaces",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "agent.surface",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a surface. ``name`` defaults to the lowercased platform — pass an\nexplicit name to create a second surface of the same platform (e.g. a\nsecond bot routed to a different agent).",
        "operationId": "agent.surface.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurfaceCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSurfaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Surface",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/surfaces/{surface_name}": {
      "delete": {
        "operationId": "agent.surface.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "surface_name",
            "required": true,
            "schema": {
              "title": "Surface Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Surface",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "agent.surface.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "surface_name",
            "required": true,
            "schema": {
              "title": "Surface Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSurfaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Surface",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Partially update a surface. Only fields present in the request are\napplied; the surface's platform and name are immutable.\n\nPassing ``account_id`` rebinds the surface to a different connected account\n— the repair when the account it runs on expires, or its owner leaves the\npod. It must be an account the caller owns.",
        "operationId": "agent.surface.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "surface_name",
            "required": true,
            "schema": {
              "title": "Surface Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurfaceUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSurfaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Surface",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/surfaces/{surface_name}/channels": {
      "get": {
        "description": "List the channels/groups this surface bot can be configured to respond in.\n\nReturns an empty list for platforms without an enumerable channel concept\n(Telegram groups, WhatsApp, email).",
        "operationId": "agent.surface.channels",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "surface_name",
            "required": true,
            "schema": {
              "title": "Surface Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableSurfaceChannelsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Surface Channels",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "channels"
        }
      }
    },
    "/pods/{pod_id}/surfaces/{surface_name}/send": {
      "post": {
        "description": "Proactively send a message to a pod member on this surface.\n\nPowers notifications from functions/workflows. Reuses the member's existing\nthread on the surface (bots can't cold-DM), so a 404 means the member has no\nreachable conversation here yet.",
        "operationId": "agent.surface.send",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "surface_name",
            "required": true,
            "schema": {
              "title": "Surface Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurfaceSendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SurfaceSendResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Surface Message",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/pods/{pod_id}/surfaces/{surface_name}/setup": {
      "get": {
        "description": "Live setup state for an existing surface: static platform checklist plus\nwebhook URL and admin-consent status. For the pre-creation checklist (before\nany surface exists) use ``GET /pods/{pod_id}/surface-setup/{platform}``.",
        "operationId": "agent.surface.setup",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "surface_name",
            "required": true,
            "schema": {
              "title": "Surface Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SurfaceSetupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Surface Setup",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "setup"
        }
      }
    },
    "/pods/{pod_id}/telegram-bot-setups": {
      "post": {
        "operationId": "agent.surface.telegram_managed.start",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelegramManagedBotSetupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramManagedBotSetupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Telegram Managed Bot Setup",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.telegram_managed"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.telegram_managed",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/pods/{pod_id}/telegram-bot-setups/{setup_id}": {
      "get": {
        "operationId": "agent.surface.telegram_managed.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setup_id",
            "required": true,
            "schema": {
              "title": "Setup Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramManagedBotSetupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Telegram Managed Bot Setup",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface.telegram_managed",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/widgets/{conversation_id}/{tool_call_id}/embed-token": {
      "post": {
        "description": "Mint a short-lived, signed embed URL for a widget the caller may view.\n\nPer-view (not baked into the persisted tool result) so the token stays\nephemeral and membership is re-checked each time the widget is opened.",
        "operationId": "widget.embed_token",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "tool_call_id",
            "required": true,
            "schema": {
              "title": "Tool Call Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetEmbedUrlResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mint Widget Embed URL",
        "tags": [
          "Widgets"
        ],
        "x-lemma": {
          "invalidates": [
            "widget"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "widget",
          "result": "entity",
          "verb": "embed_token"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs": {
      "get": {
        "description": "Recent runs across every workflow in the pod, newest first. Exists so an index that wants 'what has been happening here' makes one request instead of one per workflow. Filter with `status` (repeatable).",
        "operationId": "workflow.run.list_for_pod",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/WorkflowRunStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Workflow Runs In Pod",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "list_for_pod"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs/waiting/assigned-to-me": {
      "get": {
        "description": "The current user's approval queue: active form waits assigned to them, with the owning run.",
        "operationId": "workflow.run.waiting_assigned_to_me",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunWaitAssignmentListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Workflow Runs Waiting For Current User",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "waiting_assigned_to_me"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs/{run_id}": {
      "get": {
        "description": "Get current state, context, step history, and the active wait (when WAITING) of a workflow run.",
        "operationId": "workflow.run.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Workflow Run",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs/{run_id}/cancel": {
      "post": {
        "description": "Cancel a non-terminal run. The active wait (if any) is cancelled in the same transaction; late completion events for cancelled waits are dropped. Cancelling a terminal run returns 409.",
        "operationId": "workflow.run.cancel",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel Workflow Run",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow.run"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "cancel"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs/{run_id}/form": {
      "post": {
        "description": "Submit the form the run is waiting on. `node_id` must match the run's active HUMAN wait (409 when the run is not waiting on a form, 422 on node mismatch, 403 when the wait is assigned to someone else). The submitted `inputs` become the form node's output, available to later nodes as `<node_id>.<field>`.",
        "operationId": "workflow.run.form.submit",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunFormSubmitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Submit Workflow Run Form",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow.run.form"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow.run.form",
          "result": "entity",
          "verb": "submit"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs/{run_id}/stream": {
      "get": {
        "description": "Server-sent events carrying the run's state as it advances. The first frame is the current run, so a client needs no separate GET; each later frame is the whole run again rather than a diff, which makes reconnecting a matter of replacing state. A `completed` frame is sent when the run reaches a terminal status, after which the stream closes. Polling remains a valid fallback.",
        "operationId": "workflow.run.stream",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stream Workflow Run",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "stream"
        }
      }
    },
    "/pods/{pod_id}/workflow-runs/{run_id}/visualize": {
      "get": {
        "description": "Render an HTML view of a run overlaid on its workflow graph.",
        "operationId": "workflow.run.visualize",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Visualize Workflow Run",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "visualize"
        }
      }
    },
    "/pods/{pod_id}/workflows": {
      "get": {
        "description": "List all workflows in a pod.",
        "operationId": "workflow.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Workflows",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "workflow",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a workflow definition. The graph (`nodes`/`edges`) can be included in this call to create a ready-to-run workflow in one step, or omitted to create a shell and upload the graph later with `workflow.graph.update`.",
        "operationId": "workflow.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Workflow",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/workflows/{workflow_name}": {
      "delete": {
        "description": "Delete a workflow definition.",
        "operationId": "workflow.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Workflow",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "Get a single workflow definition including graph and start configuration.",
        "operationId": "workflow.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Workflow",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workflow",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Update workflow-level metadata such as description and schedule mode. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.",
        "operationId": "workflow.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Workflow Metadata",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/workflows/{workflow_name}/graph": {
      "put": {
        "description": "Replace the workflow graph. Agent/function node `input_mapping` entries must use explicit typed bindings. Use `{type: \"expression\", value: \"start.payload.issue.key\"}` for context lookups and `{type: \"literal\", value: \"abc\"}` for fixed JSON values.",
        "operationId": "workflow.graph.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowGraphUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Workflow Graph",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow.graph"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow.graph",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/workflows/{workflow_name}/runs": {
      "get": {
        "description": "List recent runs for a given workflow.",
        "operationId": "workflow.run.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Workflow Runs",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "workflow.run",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Create a new run for this workflow. Takes no request body: if the workflow's entry node is a FORM node the run is created WAITING on it (see `active_wait` in the response) and input is submitted via `workflow.run.form.submit`; otherwise the run executes immediately. Trigger payloads for scheduled/event/datastore starts are supplied by the platform, not through this endpoint.",
        "operationId": "workflow.run.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Workflow Run",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow.run"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/workflows/{workflow_name}/visualize": {
      "get": {
        "description": "Render an HTML visualization for debugging workflow graph structure.",
        "operationId": "workflow.visualize",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workflow_name",
            "required": true,
            "schema": {
              "title": "Workflow Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Visualize Workflow",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workflow",
          "result": "entity",
          "verb": "visualize"
        }
      }
    },
    "/public/icons/{icon_path}": {
      "get": {
        "description": "Fetch a previously uploaded public icon asset.",
        "operationId": "icon.public.get",
        "parameters": [
          {
            "in": "path",
            "name": "icon_path",
            "required": true,
            "schema": {
              "title": "Icon Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Public Icon",
        "tags": [
          "icons"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "icon.public",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/surface-setup/slack/manifest": {
      "get": {
        "description": "The Slack app manifest to paste when running your own Slack app.\n\nServed rather than copied out of the repo so the URLs always match the\ndeployment answering this request, and the scopes always match the code\nthat will consume the events.\n\nSigned-in access is the only gate, and that is enough: every value in here\nis already public — this deployment's URLs and the scopes its own code\nasks for. It carries no credential and reveals nothing about a pod.",
        "operationId": "agent.surface.slack_manifest",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Agent.Surface.Slack Manifest",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Slack App Manifest",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "slack_manifest"
        }
      }
    },
    "/surfaces/me": {
      "get": {
        "description": "Every surface across the current user's pods, grouped by platform, with\nthe chosen default and a ``conflict`` flag when two of them answer at the\nsame address.",
        "operationId": "agent.surface.list_mine",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSurfacesResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List My Surfaces",
        "tags": [
          "Agent Surfaces (Me)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "collection",
          "verb": "list_mine"
        }
      }
    },
    "/surfaces/me/default": {
      "put": {
        "description": "Choose which surface answers the current user for a platform when several\ncould (e.g. a shared system bot spanning pods in different orgs).",
        "operationId": "agent.surface.set_my_default",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultSurfaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSurfacesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set My Default Surface",
        "tags": [
          "Agent Surfaces (Me)"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "set_my_default"
        }
      }
    },
    "/surfaces/teams/admin-consent/callback": {
      "get": {
        "operationId": "agent.surface.teams_admin_consent_callback",
        "parameters": [
          {
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tenant"
            }
          },
          {
            "in": "query",
            "name": "admin_consent",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Admin Consent"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "in": "query",
            "name": "error_description",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error Description"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Teams Admin Consent Callback",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "teams_admin_consent_callback"
        }
      }
    },
    "/surfaces/webhooks/telegram-manager": {
      "post": {
        "operationId": "surface.webhook.handle_telegram_manager",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Handle Telegram manager-bot webhook",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "invalidates": [
            "surface.webhook"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "handle_telegram_manager"
        }
      }
    },
    "/surfaces/webhooks/{platform}": {
      "get": {
        "description": "Webhook verification endpoint for platforms that require it.",
        "operationId": "surface.webhook.verify",
        "parameters": [
          {
            "in": "path",
            "name": "platform",
            "required": true,
            "schema": {
              "title": "Platform",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Verify surface webhook using the platform callback URL",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "verify"
        }
      },
      "post": {
        "description": "Handle platform-level webhook callbacks.",
        "operationId": "surface.webhook.handle_platform",
        "parameters": [
          {
            "in": "path",
            "name": "platform",
            "required": true,
            "schema": {
              "title": "Platform",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Handle platform-level surface webhook",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "invalidates": [
            "surface.webhook"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "handle_platform"
        }
      }
    },
    "/surfaces/{surface_id}/webhook": {
      "get": {
        "description": "Webhook verification endpoint for platforms that require it.\n\nWhatsApp surfaces bound to a connector account are verified against that\naccount's own ``verify_token`` (never the system-wide one) so each\ncustomer's WhatsApp Business webhook config only has to match their own\ncredentials.",
        "operationId": "surface.webhook.verify_surface",
        "parameters": [
          {
            "in": "path",
            "name": "surface_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Surface Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Verify surface webhook using a surface-level callback URL",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "verify_surface"
        }
      },
      "post": {
        "description": "Handle webhooks addressed to one concrete surface.",
        "operationId": "surface.webhook.handle_surface",
        "parameters": [
          {
            "in": "path",
            "name": "surface_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Surface Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Handle surface-level webhook",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "invalidates": [
            "surface.webhook"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "handle_surface"
        }
      }
    },
    "/tools/report-feedback": {
      "post": {
        "description": "Record a maintainer-facing feedback report about the CLI, a skill, the platform, or the docs.",
        "operationId": "agent.tool.report_feedback",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportFeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportFeedbackResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Agent Report Feedback",
        "tags": [
          "agent-tools"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.tool"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.tool",
          "result": "entity",
          "verb": "report_feedback"
        }
      }
    },
    "/tools/web-search": {
      "post": {
        "description": "Run a raw web search and return structured results.",
        "operationId": "agent.tool.web_search",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Agent Web Search",
        "tags": [
          "agent-tools"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.tool"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.tool",
          "result": "entity",
          "verb": "web_search"
        }
      }
    },
    "/usage/organizations/{organization_id}/events": {
      "get": {
        "operationId": "usage.organization.events.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pod_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pod Id"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User Id"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "profile_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Id"
            }
          },
          {
            "in": "query",
            "name": "profile_scope",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Scope"
            }
          },
          {
            "in": "query",
            "name": "model_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Name"
            }
          },
          {
            "in": "query",
            "name": "usage_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Usage Kind"
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Type"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Usage Events",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.organization.events",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/usage/organizations/{organization_id}/limits": {
      "get": {
        "operationId": "usage.organization.limits.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageLimitsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Usage Limits",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "usage.organization.limits",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/usage/organizations/{organization_id}/me": {
      "get": {
        "operationId": "usage.organization.me.summary.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pod_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pod Id"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User Id"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "profile_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Id"
            }
          },
          {
            "in": "query",
            "name": "profile_scope",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Scope"
            }
          },
          {
            "in": "query",
            "name": "model_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Name"
            }
          },
          {
            "in": "query",
            "name": "usage_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Usage Kind"
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Type"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSummaryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get My Usage",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.organization.me.summary",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/usage/organizations/{organization_id}/stats": {
      "get": {
        "operationId": "usage.organization.stats.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pod_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pod Id"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User Id"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "profile_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Id"
            }
          },
          {
            "in": "query",
            "name": "profile_scope",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Scope"
            }
          },
          {
            "in": "query",
            "name": "model_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Name"
            }
          },
          {
            "in": "query",
            "name": "usage_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Usage Kind"
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Type"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "default": "day",
              "pattern": "^(hour|day|week)$",
              "title": "Granularity",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(profile|model|user|pod|agent|kind|source)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group By"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageStatsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Usage Stats",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.organization.stats",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/usage/organizations/{organization_id}/summary": {
      "get": {
        "operationId": "usage.organization.summary.get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pod_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pod Id"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "User Id"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "profile_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Id"
            }
          },
          {
            "in": "query",
            "name": "profile_scope",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Profile Scope"
            }
          },
          {
            "in": "query",
            "name": "model_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Name"
            }
          },
          {
            "in": "query",
            "name": "usage_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Usage Kind"
            }
          },
          {
            "in": "query",
            "name": "source_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Type"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSummaryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Organization Usage Summary",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.organization.summary",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/users/me": {
      "get": {
        "description": "Get the current authenticated user's information",
        "operationId": "user.current.get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Current User",
        "tags": [
          "Users"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "user.current",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/users/me/profile": {
      "get": {
        "description": "Get the current user's profile",
        "operationId": "user.profile.get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get User Profile",
        "tags": [
          "Users"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "user.profile",
          "result": "entity",
          "verb": "get"
        }
      },
      "post": {
        "description": "Create or update the current user's profile",
        "operationId": "user.profile.upsert",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create or Update Profile",
        "tags": [
          "Users"
        ],
        "x-lemma": {
          "invalidates": [
            "user.profile"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "user.profile",
          "result": "entity",
          "verb": "upsert"
        }
      }
    },
    "/workspace/apps/browser/access": {
      "post": {
        "operationId": "workspace.browser.access",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceAppAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceAppAccessResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create workspace browser access URL",
        "tags": [
          "Workspace Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "workspace.browser"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workspace.browser",
          "result": "entity",
          "verb": "access"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.lemma.work",
      "description": "Lemma Cloud API"
    }
  ]
}
