{
  "components": {
    "schemas": {
      "Accepted": {
        "properties": {
          "ok": {
            "default": true,
            "title": "Ok",
            "type": "boolean"
          }
        },
        "title": "Accepted",
        "type": "object"
      },
      "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"
      },
      "AccountCredentialsUpdateSchema": {
        "description": "A replacement credential for an account that already exists.",
        "properties": {
          "credentials": {
            "additionalProperties": true,
            "description": "The new credential, validated against the kind's schema",
            "title": "Credentials",
            "type": "object"
          }
        },
        "required": [
          "credentials"
        ],
        "title": "AccountCredentialsUpdateSchema",
        "type": "object"
      },
      "AccountInstallationsSchema": {
        "description": "What an account can actually reach, asked of the provider.",
        "properties": {
          "choices": {
            "items": {
              "$ref": "#/components/schemas/InstallationChoiceSchema"
            },
            "title": "Choices",
            "type": "array"
          },
          "install_state": {
            "title": "Install State",
            "type": "string"
          },
          "installation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Installation Id"
          }
        },
        "required": [
          "install_state"
        ],
        "title": "AccountInstallationsSchema",
        "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"
      },
      "AccountOption": {
        "description": "One of the importer's own accounts, shareable for a SHARED connector.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          }
        },
        "required": [
          "account_id",
          "auth_config_id"
        ],
        "title": "AccountOption",
        "type": "object"
      },
      "AccountPodUsage": {
        "properties": {
          "is_member_default": {
            "title": "Is Member Default",
            "type": "boolean"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "pod_account_id": {
            "format": "uuid",
            "title": "Pod Account Id",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/PodAccountSource"
          },
          "used_by": {
            "items": {
              "type": "string"
            },
            "title": "Used By",
            "type": "array"
          },
          "visibility": {
            "$ref": "#/components/schemas/PodAccountVisibility"
          }
        },
        "required": [
          "pod_id",
          "pod_account_id",
          "visibility",
          "source",
          "is_member_default"
        ],
        "title": "AccountPodUsage",
        "type": "object"
      },
      "AccountPodUsageResponse": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AccountPodUsage"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "title": "AccountPodUsageResponse",
        "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"
          },
          "install_state": {
            "default": "READY",
            "description": "READY, INSTALL_REQUIRED, CHOOSE_INSTALL or PENDING_APPROVAL. Anything but READY means the connection cannot reach resources yet.",
            "title": "Install State",
            "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"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentKind",
            "default": "USER"
          },
          "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": {
            "$ref": "#/components/schemas/ResourceVisibility",
            "default": "POD"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "instruction",
          "created_at",
          "updated_at"
        ],
        "title": "AgentActionResponse",
        "type": "object"
      },
      "AgentAnswers": {
        "description": "When an agent in a channel answers.",
        "enum": [
          "MENTIONED",
          "EVERY_LINE"
        ],
        "title": "AgentAnswers",
        "type": "string"
      },
      "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"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentKind",
            "default": "USER"
          },
          "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": {
            "$ref": "#/components/schemas/ResourceVisibility",
            "default": "POD"
          }
        },
        "required": [
          "id",
          "pod_id",
          "user_id",
          "name",
          "instruction",
          "created_at",
          "updated_at",
          "permissions"
        ],
        "title": "AgentDetailResponse",
        "type": "object"
      },
      "AgentHostHarnessListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentHostHarnessResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AgentHostHarnessListResponse",
        "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"
      },
      "AgentHostListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentHostResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AgentHostListResponse",
        "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"
      },
      "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"
      },
      "AgentHostStatus": {
        "enum": [
          "ONLINE",
          "OFFLINE",
          "DRAINING",
          "UPGRADE_REQUIRED",
          "REVOKED"
        ],
        "title": "AgentHostStatus",
        "type": "string"
      },
      "AgentKind": {
        "description": "Whether somebody made this agent, or the pod came with it.\n\nThe pod's default assistant used to be the absence of an agent: a\nconversation naming nobody, synthesised at runtime against one sentinel id\nshared by every pod. That absence could not be pointed at by a foreign key,\nso anything wanting to name it grew its own way of saying so — a boolean on\nthe schedule, a second boolean on a channel route, a magic string in a map\nof who answers whose DMs.\n\nA kind is one way of saying it, in the row itself. ``POD_DEFAULT`` is\npinned by check constraints to exactly one row per pod, whose id is the\npod's own — so \"is this the default assistant?\" stays a comparison rather\nthan a query, which matters on paths that answer it per request.",
        "enum": [
          "USER",
          "POD_DEFAULT"
        ],
        "title": "AgentKind",
        "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"
          },
          "generation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GenerationSettings"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the model generates for this step: reasoning effort, output cap, temperature. Each field set here replaces the agent's; each left unset keeps it."
          },
          "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"
          },
          "instructions": {
            "anyOf": [
              {
                "maxLength": 20000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What this step is for. Added to the agent's own instructions for this run only; the agent keeps its identity and gains a task.",
            "title": "Instructions"
          },
          "model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Another model from the agent's runtime profile, for this step only. Unset runs on the agent's model.",
            "title": "Model Name"
          },
          "timeout_seconds": {
            "anyOf": [
              {
                "maximum": 604800,
                "minimum": 600,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How long the step may run before the workflow stops it, in place of the deployment's ceiling. Checked by a periodic sweep, so the step ends within minutes of it, not to the second. A step waiting on a person gets the usual multiple of it.",
            "title": "Timeout Seconds"
          }
        },
        "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"
          },
          "deduplicated": {
            "default": false,
            "description": "True when this send was already received -- the same client_message_id, or the same text from the same person a moment ago. Nothing new was stored; agent_run_id is the run already answering it.",
            "title": "Deduplicated",
            "type": "boolean"
          },
          "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, an optional catalog model, and how it generates.",
        "properties": {
          "config_selections": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config Selections"
          },
          "model_name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "profile_id": {
            "minLength": 1,
            "title": "Profile Id",
            "type": "string"
          },
          "settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GenerationSettings"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "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": [
              {
                "$ref": "#/components/schemas/RuntimeProfileAvailability"
              },
              {
                "type": "null"
              }
            ]
          },
          "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"
          },
          "harness_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Harness Key"
          },
          "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"
          },
          "model_catalog": {
            "items": {
              "$ref": "#/components/schemas/RuntimeModelCatalogEntry"
            },
            "title": "Model Catalog",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_default": {
            "default": false,
            "title": "Organization Default",
            "type": "boolean"
          },
          "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"
          },
          "organization_default_runtime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRuntimeConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "default_runtime"
        ],
        "title": "AgentRuntimeProfileListResponse",
        "type": "object"
      },
      "AgentRuntimeProfileResponse": {
        "properties": {
          "availability_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RuntimeProfileAvailability"
              },
              {
                "type": "null"
              }
            ]
          },
          "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"
          },
          "harness_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Harness Key"
          },
          "has_credentials": {
            "default": false,
            "title": "Has Credentials",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/RuntimeProfileKind"
          },
          "model_catalog": {
            "items": {
              "$ref": "#/components/schemas/RuntimeModelCatalogEntry"
            },
            "title": "Model Catalog",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_default": {
            "default": false,
            "title": "Organization Default",
            "type": "boolean"
          },
          "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"
      },
      "AgentRuntimeProfileTestResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Models"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "message"
        ],
        "title": "AgentRuntimeProfileTestResponse",
        "type": "object"
      },
      "AgentSeat": {
        "properties": {
          "answers": {
            "$ref": "#/components/schemas/AgentAnswers",
            "default": "MENTIONED"
          },
          "id": {
            "description": "One of the pod's agents.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "AgentSeat",
        "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"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentKind",
            "default": "USER"
          },
          "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": {
            "$ref": "#/components/schemas/ResourceVisibility",
            "default": "POD"
          }
        },
        "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": {
          "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"
              }
            ]
          },
          "contacts_warning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contacts Warning"
          },
          "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_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Connector"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Problem"
          },
          "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",
          "BROWSER",
          "SKILLS",
          "WEB_SEARCH",
          "USER_INTERACTION",
          "SPEECH",
          "POD",
          "SUBAGENTS",
          "TODO",
          "CONNECTORS",
          "WAIT",
          "MESSAGING",
          "MEMORY",
          "VIEW_IMAGE"
        ],
        "title": "AgentToolset",
        "type": "string"
      },
      "AnswerSignInRequest": {
        "properties": {
          "signed_in": {
            "description": "True when the person says they have signed in; false when they cannot right now.",
            "title": "Signed In",
            "type": "boolean"
          }
        },
        "required": [
          "signed_in"
        ],
        "title": "AnswerSignInRequest",
        "type": "object"
      },
      "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": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "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": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "None where no app host is served -- see `public_app_url`.",
            "readOnly": true,
            "title": "Url"
          },
          "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"
      },
      "AppReleaseListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AppReleaseResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items"
        ],
        "title": "AppReleaseListResponse",
        "type": "object"
      },
      "AppReleaseResponse": {
        "description": "One entry in an app's release history.",
        "properties": {
          "app_id": {
            "format": "uuid",
            "title": "App Id",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "has_source": {
            "description": "Whether this release's own source archive is still stored.",
            "title": "Has Source",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_live": {
            "description": "True for the release this app currently serves.",
            "title": "Is Live",
            "type": "boolean"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "preview_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "title": "Preview Url"
          },
          "pruned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when retention removed this release's build. The entry stays in the history, but it can no longer be previewed or promoted.",
            "title": "Pruned At"
          },
          "release_number": {
            "title": "Release Number",
            "type": "integer"
          },
          "version": {
            "description": "sha256 digest of the release's dist archive.",
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "id",
          "app_id",
          "release_number",
          "version",
          "created_at",
          "is_live",
          "has_source",
          "preview_url"
        ],
        "title": "AppReleaseResponse",
        "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"
          },
          "connectors": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ConnectorChoice"
            },
            "description": "Choices for the plan's `connectors`, by slug: which installation (default: the plan's `auth_config_id`), or to create one, and for a SHARED connector which of your own accounts to share. Account ids are never in a bundle; they are chosen here, in your own org.",
            "title": "Connectors",
            "type": "object"
          },
          "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"
      },
      "AskMembersRequest": {
        "properties": {
          "user_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only these members, of those the connector is waiting on. Left out: everyone it is waiting on.",
            "title": "User Ids"
          }
        },
        "title": "AskMembersRequest",
        "type": "object"
      },
      "AskMembersResponse": {
        "description": "Who was asked to connect, and who was asked too recently to ask again.",
        "properties": {
          "asked": {
            "items": {
              "$ref": "#/components/schemas/MemberAwaited"
            },
            "title": "Asked",
            "type": "array"
          },
          "asked_recently": {
            "description": "Already asked about this connector in the last day; not asked again.",
            "items": {
              "$ref": "#/components/schemas/MemberAwaited"
            },
            "title": "Asked Recently",
            "type": "array"
          },
          "connect_url": {
            "title": "Connect Url",
            "type": "string"
          },
          "not_asked": {
            "description": "Not asked, because whether they were asked today could not be checked, or the line to them could not be posted, just now. Try again shortly.",
            "items": {
              "$ref": "#/components/schemas/MemberAwaited"
            },
            "title": "Not Asked",
            "type": "array"
          }
        },
        "required": [
          "asked",
          "connect_url"
        ],
        "title": "AskMembersResponse",
        "type": "object"
      },
      "AskablePodListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AskablePodResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AskablePodListResponse",
        "type": "object"
      },
      "AskablePodResponse": {
        "properties": {
          "connected": {
            "description": "It linked itself to this pod, so it can be asked with nobody present.",
            "title": "Connected",
            "type": "boolean"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the pod is for.",
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "through_you": {
            "description": "The caller is in it too, so it can be asked as them.",
            "title": "Through You",
            "type": "boolean"
          }
        },
        "required": [
          "pod_id",
          "name",
          "through_you",
          "connected"
        ],
        "title": "AskablePodResponse",
        "type": "object"
      },
      "AttentionResponse": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "since": {
            "format": "date-time",
            "title": "Since",
            "type": "string"
          }
        },
        "required": [
          "since"
        ],
        "title": "AttentionResponse",
        "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"
      },
      "AuthConfigOperationsRefreshResponseSchema": {
        "description": "The result of the refresh endpoint, which is the recovery path.\n\nIt reports the outcome rather than only a count because it exists for the\ncase where discovery already failed once: answering `{\"operation_count\": 0}`\nto a server that refused the listing again told the operator their retry\nhad worked.",
        "properties": {
          "auth_config_name": {
            "title": "Auth Config Name",
            "type": "string"
          },
          "operation_count": {
            "default": 0,
            "description": "Operations stored for the install. Zero unless status is ok.",
            "title": "Operation Count",
            "type": "integer"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Machine-readable cause when status is not ok: the connector error code for a refused discovery, or why none was attempted.",
            "title": "Reason"
          },
          "status": {
            "$ref": "#/components/schemas/OperationDiscoveryStatus"
          }
        },
        "required": [
          "status",
          "auth_config_name"
        ],
        "title": "AuthConfigOperationsRefreshResponseSchema",
        "type": "object"
      },
      "AuthConfigResponseSchema": {
        "properties": {
          "auth_scheme": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How this install authenticates, which is not always what the connector's catalog entry says. `mcp` is one catalog entry standing for every server a tenant may point at: the entry says API_KEY, but an install whose server described its own authorization when it was created signs in through a browser and answers OAUTH2 here. Branch on this rather than on the connector's kind when deciding how to connect an install.",
            "title": "Auth Scheme"
          },
          "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, and also zero when discovery was refused -- read `operations_discovery.status` to tell those apart.",
            "title": "Operations Discovered",
            "type": "integer"
          },
          "operations_discovery": {
            "$ref": "#/components/schemas/OperationDiscoverySchema",
            "description": "Whether the re-discovery this change triggered succeeded."
          }
        },
        "required": [
          "auth_config",
          "operations_discovery"
        ],
        "title": "AuthConfigUpdateResponseSchema",
        "type": "object"
      },
      "AuthConfigUpdateSchema": {
        "additionalProperties": false,
        "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"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurfaceUnavailableReason"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "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"
      },
      "BrowserStatusResponse": {
        "description": "What the pane can say without waking anything.\n\n`asleep` the computer is paused or was never started; `stopped` it is up but\nthe browser is not (the resting state after five idle minutes); `running` a\nbrowser is there now; `unavailable` the relay did not answer, which on an\nolder image is permanent until it is replaced; `unsupported` this fabric\ncannot reach a port at all.",
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "state": {
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "title": "BrowserStatusResponse",
        "type": "object"
      },
      "BulkCreateRecordsRequest": {
        "description": "Schema for bulk creating records.",
        "properties": {
          "intent": {
            "$ref": "#/components/schemas/WriteIntent",
            "default": "bulk",
            "description": "Why these rows are written, as DATASTORE triggers see it: `bulk` (the default) or `import` lets each trigger decide by its `bulk_writes` / `import_writes` setting (by default, skipped and recorded); `normal` fires triggers like single writes do."
          },
          "records": {
            "description": "List of record payload objects to insert. At most 1000 per request.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "maxItems": 1000,
            "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": {
          "intent": {
            "$ref": "#/components/schemas/WriteIntent",
            "default": "bulk",
            "description": "Why these rows are written, as DATASTORE triggers see it: `bulk` (the default) or `import` lets each trigger decide by its `bulk_writes` / `import_writes` setting (by default, skipped and recorded); `normal` fires triggers like single writes do."
          },
          "record_ids": {
            "description": "Primary key values to delete. At most 1000 per request.",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "format": "uuid",
                  "type": "string"
                }
              ]
            },
            "maxItems": 1000,
            "title": "Record Ids",
            "type": "array"
          }
        },
        "required": [
          "record_ids"
        ],
        "title": "BulkDeleteRecordsRequest",
        "type": "object"
      },
      "BulkUpdateRecordsRequest": {
        "description": "Schema for bulk updating records.",
        "properties": {
          "intent": {
            "$ref": "#/components/schemas/WriteIntent",
            "default": "bulk",
            "description": "Why these rows are written, as DATASTORE triggers see it: `bulk` (the default) or `import` lets each trigger decide by its `bulk_writes` / `import_writes` setting (by default, skipped and recorded); `normal` fires triggers like single writes do."
          },
          "records": {
            "description": "List of record updates. Each item must include the table primary key field. At most 1000 per request.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "maxItems": 1000,
            "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"
      },
      "CallConfigResponse": {
        "properties": {
          "engines": {
            "description": "The voice engines this server can open, the default first.",
            "items": {
              "enum": [
                "gemini_live",
                "openai_realtime",
                "cascade"
              ],
              "type": "string"
            },
            "title": "Engines",
            "type": "array"
          }
        },
        "required": [
          "engines"
        ],
        "title": "CallConfigResponse",
        "type": "object"
      },
      "CallResponse": {
        "properties": {
          "call_id": {
            "description": "The call, which is also its conversation.",
            "format": "uuid",
            "title": "Call Id",
            "type": "string"
          },
          "engines": {
            "description": "The voice engines this server can open, the default first.",
            "items": {
              "enum": [
                "gemini_live",
                "openai_realtime",
                "cascade"
              ],
              "type": "string"
            },
            "title": "Engines",
            "type": "array"
          }
        },
        "required": [
          "call_id",
          "engines"
        ],
        "title": "CallResponse",
        "type": "object"
      },
      "CaseEventResponse": {
        "properties": {
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who made it, when one did."
          },
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "kind": {
            "description": "`opened`, `assigned`, `handed_back`, `attention`, `acknowledged`, `first_response`, `status`, `closed`, `reopened` or `merged`.",
            "title": "Kind",
            "type": "string"
          },
          "value": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "description": "What it changed to: `status`, `user_id`, `reason`, `seq`, ...",
            "title": "Value",
            "type": "object"
          }
        },
        "required": [
          "at",
          "kind"
        ],
        "title": "CaseEventResponse",
        "type": "object"
      },
      "CaseResponse": {
        "properties": {
          "assigned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned At"
          },
          "assignee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "attention": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttentionResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "closed_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "events": {
            "description": "Oldest first; the newest 200 of a long case.",
            "items": {
              "$ref": "#/components/schemas/CaseEventResponse"
            },
            "title": "Events",
            "type": "array"
          },
          "first_response_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first member line to the contact in it.",
            "title": "First Response At"
          },
          "first_response_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "opened_at": {
            "format": "date-time",
            "title": "Opened At",
            "type": "string"
          },
          "opened_seq": {
            "description": "The channel's newest line when it opened: the case is the lines after.",
            "title": "Opened Seq",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ContactStatus"
          }
        },
        "required": [
          "id",
          "status",
          "opened_at",
          "opened_seq"
        ],
        "title": "CaseResponse",
        "type": "object"
      },
      "ChannelAnswerRequest": {
        "properties": {
          "answer": {
            "additionalProperties": true,
            "description": "The answer, in the question's terms: `{choice}` or `{text}` for a question, `{decision, note?}` for an approval, the form's fields for a form.",
            "title": "Answer",
            "type": "object"
          }
        },
        "required": [
          "answer"
        ],
        "title": "ChannelAnswerRequest",
        "type": "object"
      },
      "ChannelCasesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CaseResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "ChannelCasesResponse",
        "type": "object"
      },
      "ChannelCreateRequest": {
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/AgentSeat"
            },
            "maxItems": 50,
            "title": "Agents",
            "type": "array"
          },
          "members": {
            "description": "Members to add, by user id.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "title": "Members",
            "type": "array"
          },
          "title": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          },
          "topic": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "default": "PUBLIC"
          }
        },
        "required": [
          "title"
        ],
        "title": "ChannelCreateRequest",
        "type": "object"
      },
      "ChannelDetailResponse": {
        "properties": {
          "agents_answer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: whether its agents answer the contact.",
            "title": "Agents Answer"
          },
          "answers_shared": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "A group's: whether an answer an agent gives a member here with their own access is read by everybody in it (the default), or by that member alone until they share it. Absent for another kind.",
            "title": "Answers Shared"
          },
          "archived": {
            "default": false,
            "title": "Archived",
            "type": "boolean"
          },
          "assignee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: who answers them by hand."
          },
          "attention": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttentionResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: its current case asks for a person, and why. Never set on another kind of channel."
          },
          "case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: its current case, the one `status`, `assignee` and `attention` are read from (`/cases` lists them all).",
            "title": "Case Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "hand_back_after_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: how long the assignee holds the contact after their last line before the agent answers again.",
            "title": "Hand Back After Hours"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "joined": {
            "default": false,
            "description": "Whether the reader is in it. A pod admin listing a bot's groups (`source_surface`) is shown its private ones too, not joined and without their last line, until they join.",
            "title": "Joined",
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/ChannelKind"
          },
          "last_line": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinePreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_line_at": {
            "format": "date-time",
            "title": "Last Line At",
            "type": "string"
          },
          "last_seq": {
            "default": 0,
            "title": "Last Seq",
            "type": "integer"
          },
          "me": {
            "$ref": "#/components/schemas/MyMembershipResponse"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/ChannelMemberResponse"
            },
            "title": "Members",
            "type": "array"
          },
          "opted_out": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: whether they asked the pod to stop writing to a handle of theirs -- lines to it are not sent until they write from it again (the contact's `identities` say which).",
            "title": "Opted Out"
          },
          "person": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whose channel it is: the member's for a DIRECT one, the contact's for a CONTACT one; absent for a GROUP."
          },
          "source_places": {
            "items": {
              "$ref": "#/components/schemas/ChannelSourceResponse"
            },
            "title": "Source Places",
            "type": "array"
          },
          "source_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SourceSettingsResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Listed by `source_surface`: that bot's settings for its place here -- who answers its people outside the pod, and whether they are."
          },
          "sources": {
            "description": "The outside places feeding it.",
            "items": {
              "$ref": "#/components/schemas/SourceSummary"
            },
            "title": "Sources",
            "type": "array"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: where it stands."
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "topic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          },
          "unread": {
            "$ref": "#/components/schemas/UnreadResponse"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          }
        },
        "required": [
          "id",
          "kind",
          "visibility",
          "created_at",
          "last_line_at"
        ],
        "title": "ChannelDetailResponse",
        "type": "object"
      },
      "ChannelEditRequest": {
        "description": "Absent is unchanged; ``null`` clears the parts. The text cannot be\ncleared: delete the line instead.",
        "properties": {
          "parts": {
            "anyOf": [
              {
                "items": {
                  "discriminator": {
                    "mapping": {
                      "file": "#/components/schemas/FilePart",
                      "link": "#/components/schemas/LinkPart",
                      "mention": "#/components/schemas/MentionPart"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MentionPart"
                    },
                    {
                      "$ref": "#/components/schemas/FilePart"
                    },
                    {
                      "$ref": "#/components/schemas/LinkPart"
                    }
                  ]
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Absent keeps the parts; `null` or `[]` clears them.",
            "title": "Parts"
          },
          "text": {
            "anyOf": [
              {
                "maxLength": 20000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "title": "ChannelEditRequest",
        "type": "object"
      },
      "ChannelKind": {
        "enum": [
          "DIRECT",
          "CONTACT",
          "GROUP"
        ],
        "title": "ChannelKind",
        "type": "string"
      },
      "ChannelListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ChannelResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` for the next page.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "ChannelListResponse",
        "type": "object"
      },
      "ChannelMemberListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ChannelMemberResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` for the next page.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "ChannelMemberListResponse",
        "type": "object"
      },
      "ChannelMemberResponse": {
        "properties": {
          "answers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentAnswers"
              },
              {
                "type": "null"
              }
            ],
            "description": "An agent's: when it answers here."
          },
          "joined_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Joined At"
          },
          "person": {
            "$ref": "#/components/schemas/PersonRef",
            "description": "A member, a contact, or an agent."
          },
          "role": {
            "$ref": "#/components/schemas/MemberRole"
          }
        },
        "required": [
          "person",
          "role"
        ],
        "title": "ChannelMemberResponse",
        "type": "object"
      },
      "ChannelMessageResponse": {
        "properties": {
          "can_share": {
            "default": false,
            "description": "The reader is the member an `asker_only` answer was made for, and may share it with the channel (`…/messages/{id}/share`).",
            "title": "Can Share",
            "type": "boolean"
          },
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "client_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "On the reader's own line: the name their client gave it, as sent (`client_message_id`, or `Idempotency-Key`).",
            "title": "Client Message Id"
          },
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deleted": {
            "default": false,
            "title": "Deleted",
            "type": "boolean"
          },
          "delivered": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LineDelivery"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Each place outside Lemma the line went to, and what became of it -- on every line the reader may read. Pushes to members are not listed here (`…/deliveries` has the writer's every send).",
            "title": "Delivered"
          },
          "edited_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edited At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_reply_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Reply At"
          },
          "members_only": {
            "default": false,
            "title": "Members Only",
            "type": "boolean"
          },
          "on_behalf_of": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "For an agent's line: the member or contact it acted for, whose access the answer was made with."
          },
          "parts": {
            "items": {
              "discriminator": {
                "mapping": {
                  "file": "#/components/schemas/FilePart",
                  "link": "#/components/schemas/LinkPart",
                  "mention": "#/components/schemas/MentionPart"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MentionPart"
                },
                {
                  "$ref": "#/components/schemas/FilePart"
                },
                {
                  "$ref": "#/components/schemas/LinkPart"
                }
              ]
            },
            "title": "Parts",
            "type": "array"
          },
          "question": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QuestionResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "removed_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "On a deleted line: the member who removed it, when that was not who wrote it -- somebody who may change the channel."
          },
          "reply_count": {
            "default": 0,
            "description": "On a thread's first line.",
            "title": "Reply Count",
            "type": "integer"
          },
          "reply_to_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To Id"
          },
          "sender": {
            "$ref": "#/components/schemas/PersonRef"
          },
          "seq": {
            "description": "Its place in the channel's timeline.",
            "title": "Seq",
            "type": "integer"
          },
          "shared_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was shared with the channel: by the member it was made for, or as it was posted, in a group that shows agents' answers to everybody (`answers_shared`).",
            "title": "Shared At"
          },
          "source_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where it was said or sent; absent for a line only in Lemma.",
            "title": "Source Id"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Absent where the line is withheld from the reader, or deleted.",
            "title": "Text"
          },
          "thread_root_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The line this one is a reply in the thread of.",
            "title": "Thread Root Id"
          },
          "visibility": {
            "default": "channel",
            "description": "`asker_only`: an agent's answer made with one member's own access, read in full by that member alone; everybody else here is shown it `withheld`. `channel`: everybody here reads it.",
            "enum": [
              "asker_only",
              "channel"
            ],
            "title": "Visibility",
            "type": "string"
          },
          "withheld": {
            "default": false,
            "description": "An answer an agent made with another member's own access: the reader sees that it was given, and for whom, not what it said.",
            "title": "Withheld",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "channel_id",
          "seq",
          "sender",
          "created_at"
        ],
        "title": "ChannelMessageResponse",
        "type": "object"
      },
      "ChannelMessagesResponse": {
        "properties": {
          "has_more": {
            "description": "Whether there are more lines in the direction read: older ones, or with `after_seq`, newer ones.",
            "title": "Has More",
            "type": "boolean"
          },
          "items": {
            "description": "Oldest first.",
            "items": {
              "$ref": "#/components/schemas/ChannelMessageResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_after_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `after_seq` for the newer page.",
            "title": "Next After Seq"
          },
          "next_before_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `before_seq` for the older page.",
            "title": "Next Before Seq"
          }
        },
        "required": [
          "items",
          "has_more"
        ],
        "title": "ChannelMessagesResponse",
        "type": "object"
      },
      "ChannelPostRequest": {
        "properties": {
          "client_message_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The client's name for this line: sending it again is the same line. Shown back on the line to its writer, as sent.",
            "title": "Client Message Id"
          },
          "members_only": {
            "default": false,
            "description": "A note to the pod's members: never sent outside.",
            "title": "Members Only",
            "type": "boolean"
          },
          "parts": {
            "description": "Mentions, files and links. Who a line names is read from here.",
            "items": {
              "discriminator": {
                "mapping": {
                  "file": "#/components/schemas/FilePart",
                  "link": "#/components/schemas/LinkPart",
                  "mention": "#/components/schemas/MentionPart"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MentionPart"
                },
                {
                  "$ref": "#/components/schemas/FilePart"
                },
                {
                  "$ref": "#/components/schemas/LinkPart"
                }
              ]
            },
            "maxItems": 20,
            "title": "Parts",
            "type": "array"
          },
          "reply_to_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To Id"
          },
          "source_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which outside place it goes to; by default the thread's, else the one the channel last heard from.",
            "title": "Source Id"
          },
          "text": {
            "default": "",
            "maxLength": 20000,
            "title": "Text",
            "type": "string"
          },
          "thread_root_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reply in the thread of this line.",
            "title": "Thread Root Id"
          }
        },
        "title": "ChannelPostRequest",
        "type": "object"
      },
      "ChannelRef": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ChannelKind"
          },
          "person": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "kind"
        ],
        "title": "ChannelRef",
        "type": "object"
      },
      "ChannelResponse": {
        "properties": {
          "agents_answer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: whether its agents answer the contact.",
            "title": "Agents Answer"
          },
          "answers_shared": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "A group's: whether an answer an agent gives a member here with their own access is read by everybody in it (the default), or by that member alone until they share it. Absent for another kind.",
            "title": "Answers Shared"
          },
          "archived": {
            "default": false,
            "title": "Archived",
            "type": "boolean"
          },
          "assignee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: who answers them by hand."
          },
          "attention": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttentionResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: its current case asks for a person, and why. Never set on another kind of channel."
          },
          "case_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: its current case, the one `status`, `assignee` and `attention` are read from (`/cases` lists them all).",
            "title": "Case Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "hand_back_after_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: how long the assignee holds the contact after their last line before the agent answers again.",
            "title": "Hand Back After Hours"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "joined": {
            "default": false,
            "description": "Whether the reader is in it. A pod admin listing a bot's groups (`source_surface`) is shown its private ones too, not joined and without their last line, until they join.",
            "title": "Joined",
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/ChannelKind"
          },
          "last_line": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinePreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_line_at": {
            "format": "date-time",
            "title": "Last Line At",
            "type": "string"
          },
          "last_seq": {
            "default": 0,
            "title": "Last Seq",
            "type": "integer"
          },
          "person": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whose channel it is: the member's for a DIRECT one, the contact's for a CONTACT one; absent for a GROUP."
          },
          "source_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SourceSettingsResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Listed by `source_surface`: that bot's settings for its place here -- who answers its people outside the pod, and whether they are."
          },
          "sources": {
            "description": "The outside places feeding it.",
            "items": {
              "$ref": "#/components/schemas/SourceSummary"
            },
            "title": "Sources",
            "type": "array"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "A contact's channel: where it stands."
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "topic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          },
          "unread": {
            "$ref": "#/components/schemas/UnreadResponse"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          }
        },
        "required": [
          "id",
          "kind",
          "visibility",
          "created_at",
          "last_line_at"
        ],
        "title": "ChannelResponse",
        "type": "object"
      },
      "ChannelSourceResponse": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_private": {
            "description": "The platform keeps it to its members.",
            "title": "Is Private",
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/SourceKind"
          },
          "last_inbound_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Inbound At"
          },
          "pending": {
            "default": false,
            "description": "A group the bot asked the platform for, not confirmed yet.",
            "title": "Pending",
            "type": "boolean"
          },
          "platform": {
            "description": "Where it is: TELEGRAM, WHATSAPP, SLACK, TEAMS, RESEND, WEB...",
            "title": "Platform",
            "type": "string"
          },
          "surface_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surface Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "platform",
          "kind",
          "is_private"
        ],
        "title": "ChannelSourceResponse",
        "type": "object"
      },
      "ChannelUpdateRequest": {
        "description": "Absent is unchanged; ``null`` clears where clearing means something.\n\nA group takes ``title``, ``topic``, ``visibility``, ``archived``,\n``answers_shared``. A contact's channel takes ``agents_answer``, ``hand_back_after_hours``,\n``status``, ``assignee`` (and needs ``contact.message``). Anything else\nfor the kind is 409.",
        "properties": {
          "agents_answer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "On also hands the contact back now: nobody is assigned.",
            "title": "Agents Answer"
          },
          "answers_shared": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "A group's: on, agents' answers made with the asker's access are read by everybody here; off, by the asker alone until they share one. Applies to answers posted from then on.",
            "title": "Answers Shared"
          },
          "archived": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived"
          },
          "assignee": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "const": "me",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`me`, or a member's user id; `null` unassigns.",
            "title": "Assignee"
          },
          "hand_back_after_hours": {
            "anyOf": [
              {
                "maximum": 720,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hand Back After Hours"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "topic": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Visibility"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ChannelUpdateRequest",
        "type": "object"
      },
      "CodeRequest": {
        "properties": {
          "altcha": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Altcha"
          },
          "email": {
            "maxLength": 320,
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "CodeRequest",
        "type": "object"
      },
      "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"
      },
      "ConnectPodRequest": {
        "properties": {
          "shares": {
            "description": "What the asking pod may read here, past what is Public.",
            "items": {
              "$ref": "#/components/schemas/SharedResourceBody"
            },
            "title": "Shares",
            "type": "array"
          }
        },
        "title": "ConnectPodRequest",
        "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"
          },
          "connection_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-connection values the sign-in itself does not carry, such as Shopify's store `subdomain`. Validated against the connector kind's `config_schema`; omit for connectors that declare none.",
            "title": "Connection Fields"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Connector ID to connect",
            "title": "Connector Id"
          },
          "return_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Path inside the app to come back to when the flow finishes. Only a rooted path is accepted; anything else is ignored.",
            "title": "Return To"
          }
        },
        "title": "ConnectRequestInitiateSchema",
        "type": "object"
      },
      "ConnectRequestResponseSchema": {
        "description": "Schema for connect request response.\n\n`attributes` is deliberately absent. The row carries the live OAuth\n`state`, the provider's own handle on the authorization, and the PKCE\nverifier -- the three things that have to survive the redirect and the\nthree the caller has no use for. Returning them put the verifier and the\n`state` into browser memory, client-side logs and any HAR capture, which is\nthe exposure PKCE exists to survive. The client needs `authorization_url`\nand `id`.",
        "properties": {
          "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",
          "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"
      },
      "ConnectedClientResponse": {
        "properties": {
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "client_name": {
            "title": "Client Name",
            "type": "string"
          },
          "client_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Uri"
          },
          "connected_at": {
            "format": "date-time",
            "title": "Connected At",
            "type": "string"
          },
          "grant_id": {
            "format": "uuid",
            "title": "Grant Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "listens_to": {
            "items": {
              "$ref": "#/components/schemas/EventSubscriptionResponse"
            },
            "title": "Listens To",
            "type": "array"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "title": "Scopes",
            "type": "array"
          },
          "user_id": {
            "description": "The person who connected it.",
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "grant_id",
          "user_id",
          "pod_id",
          "client_id",
          "client_name",
          "client_uri",
          "scopes",
          "connected_at",
          "last_used_at"
        ],
        "title": "ConnectedClientResponse",
        "type": "object"
      },
      "ConnectedClientsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectedClientResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "ConnectedClientsResponse",
        "type": "object"
      },
      "ConnectorChoice": {
        "additionalProperties": false,
        "description": "What the importer chose for one bundled connector.\n\nLeave it all out to take the plan's default installation and share no\naccount. ``auth_config_id`` and ``create_installation`` are alternatives.",
        "properties": {
          "auth_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the plan's `installations` for this connector.",
            "title": "Auth Config Id"
          },
          "create_installation": {
            "default": false,
            "description": "Install Lemma's own app for the connector in your organization and use it. Offered only where the plan says `can_create_installation`.",
            "title": "Create Installation",
            "type": "boolean"
          },
          "share_account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "SHARED only: one of your own accounts (the plan's `account_options`) to share with the pod for this connector to run as. Left out, the connector imports needing an account.",
            "title": "Share Account Id"
          }
        },
        "title": "ConnectorChoice",
        "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"
          },
          "oauth_redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The redirect URI an OAuth app registered for this deployment must allow -- the callback every sign-in returns to. The same for every connector; published here because this is what a person reads while registering their own app, and a hand-built copy of it is how a wrong path reached users as redirect_uri_mismatch.",
            "title": "Oauth Redirect Uri"
          },
          "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"
        ],
        "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"
          },
          "install_config_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "JSON Schema for the organization-supplied install config, when the connector cannot be installed with the platform's own credentials.",
            "title": "Install Config Schema"
          },
          "kind": {
            "$ref": "#/components/schemas/ConnectorKind"
          },
          "oauth2_defaults": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OAuth2DefaultsResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "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"
      },
      "ConnectorPlan": {
        "properties": {
          "account_options": {
            "items": {
              "$ref": "#/components/schemas/AccountOption"
            },
            "title": "Account Options",
            "type": "array"
          },
          "auth_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Config Id"
          },
          "can_create_installation": {
            "default": false,
            "title": "Can Create Installation",
            "type": "boolean"
          },
          "connector": {
            "title": "Connector",
            "type": "string"
          },
          "installations": {
            "items": {
              "$ref": "#/components/schemas/InstallationOption"
            },
            "title": "Installations",
            "type": "array"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "mode": {
            "enum": [
              "PER_MEMBER",
              "SHARED"
            ],
            "title": "Mode",
            "type": "string"
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purpose"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectorPlanStatus"
          },
          "used_by": {
            "items": {
              "type": "string"
            },
            "title": "Used By",
            "type": "array"
          },
          "visibility": {
            "default": "POD",
            "enum": [
              "POD",
              "RESTRICTED"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "connector",
          "mode",
          "status"
        ],
        "title": "ConnectorPlan",
        "type": "object"
      },
      "ConnectorPlanStatus": {
        "enum": [
          "READY",
          "NEEDS_ACCOUNT",
          "NEEDS_INSTALLATION",
          "EXISTS",
          "CONFLICT"
        ],
        "title": "ConnectorPlanStatus",
        "type": "string"
      },
      "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"
      },
      "ContactAnswer": {
        "description": "Whom a bot answers in a private chat, beyond the pod's members.",
        "enum": [
          "off",
          "known",
          "anyone"
        ],
        "title": "ContactAnswer",
        "type": "string"
      },
      "ContactExportResponse": {
        "description": "Everything the pod holds about one contact, a page at a time.\n\nTheir conversations come first, then their rows in the pod's\ncontact-owned tables. Follow `next_cursor` until it is absent.",
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/ContactResponse"
          },
          "conversations": {
            "items": {
              "$ref": "#/components/schemas/ExportedConversation"
            },
            "title": "Conversations",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` for the next page; absent on the last.",
            "title": "Next Cursor"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ContactRow"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "contact",
          "conversations"
        ],
        "title": "ContactExportResponse",
        "type": "object"
      },
      "ContactIdentityResponse": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/IdentityKind"
          },
          "opted_out": {
            "default": false,
            "description": "They asked the pod to stop writing to this handle (STOP, an unsubscribe link, a bounce or a complaint): nothing is sent to it until they write from it again.",
            "title": "Opted Out",
            "type": "boolean"
          },
          "strength": {
            "$ref": "#/components/schemas/IdentityStrength"
          },
          "value": {
            "title": "Value",
            "type": "string"
          },
          "verified_at": {
            "format": "date-time",
            "title": "Verified At",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "value",
          "strength",
          "verified_at"
        ],
        "title": "ContactIdentityResponse",
        "type": "object"
      },
      "ContactListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ContactResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` for the next page; absent on the last.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "ContactListResponse",
        "type": "object"
      },
      "ContactResponse": {
        "properties": {
          "answered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When an agent first answered them; what the contact limit counts.",
            "title": "Answered At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "identities": {
            "items": {
              "$ref": "#/components/schemas/ContactIdentityResponse"
            },
            "title": "Identities",
            "type": "array"
          },
          "is_anonymous": {
            "default": false,
            "description": "Known only by the browser they wrote from: a web visitor nobody has vouched for yet.",
            "title": "Is Anonymous",
            "type": "boolean"
          },
          "label": {
            "description": "What to call them: their name, else the handle they are known by (an email address, a number), else that they are a web visitor.",
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "created_at"
        ],
        "title": "ContactResponse",
        "type": "object"
      },
      "ContactRow": {
        "description": "One row the pod keeps about a contact, for a request to see their data.",
        "properties": {
          "table": {
            "title": "Table",
            "type": "string"
          },
          "values": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Values",
            "type": "object"
          }
        },
        "required": [
          "table",
          "values"
        ],
        "title": "ContactRow",
        "type": "object"
      },
      "ContactStatus": {
        "description": "Where a contact's conversation stands, as the pod's inbox sees it.",
        "enum": [
          "open",
          "waiting_on_contact",
          "closed"
        ],
        "title": "ContactStatus",
        "type": "string"
      },
      "ContactUpdateRequest": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          }
        },
        "title": "ContactUpdateRequest",
        "type": "object"
      },
      "ContactsCapResponse": {
        "description": "What the organization lets its bots spend answering contacts, a month.",
        "properties": {
          "answered_contacts": {
            "default": 0,
            "description": "How many contacts its bots have answered so far.",
            "title": "Answered Contacts",
            "type": "integer"
          },
          "is_default": {
            "default": false,
            "description": "Nobody in the organization set a cap, so the deployment's default applies.",
            "title": "Is Default",
            "type": "boolean"
          },
          "max_contacts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many contacts the organization's bots may answer at all. Absent for no limit.",
            "title": "Max Contacts"
          },
          "monthly_limit_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The cap that applies this month. Absent when an owner removed it: no limit.",
            "title": "Monthly Limit Usd"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "spent_this_month_usd": {
            "description": "Spent this calendar month (UTC) answering contacts and people outside the pod in groups, on models Lemma provides.",
            "title": "Spent This Month Usd",
            "type": "number"
          }
        },
        "required": [
          "organization_id",
          "spent_this_month_usd"
        ],
        "title": "ContactsCapResponse",
        "type": "object"
      },
      "ContactsCapUpdate": {
        "properties": {
          "max_contacts": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many contacts the bots may answer. Leave it out to keep the current number; null removes the limit.",
            "title": "Max Contacts"
          },
          "monthly_limit_usd": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null removes the cap: no limit, kept as the owner's choice. Zero stops bots answering contacts. Leave it out to keep the current cap.",
            "title": "Monthly Limit Usd"
          }
        },
        "title": "ContactsCapUpdate",
        "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"
              }
            ]
          },
          "channel_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "has_pending_interaction": {
            "default": false,
            "description": "A question, approval or Agent Host permission request here is waiting on the conversation's owner. Not implied by status: a WAITING conversation may be waiting on a timer, and a permission request waits inside a RUNNING one.",
            "title": "Has Pending Interaction",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "is_archived": {
            "default": false,
            "title": "Is Archived",
            "type": "boolean"
          },
          "last_activity_at": {
            "format": "date-time",
            "title": "Last Activity At",
            "type": "string"
          },
          "last_run_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Error"
          },
          "last_run_error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Error Code"
          },
          "last_run_error_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Error Reason"
          },
          "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_cwd": {
            "description": "The conversation's working directory in pod files. Anything a person attaches here is what the agent finds by a bare filename, because this is the directory its pod tools resolve against.",
            "readOnly": true,
            "title": "Pod Cwd",
            "type": "string"
          },
          "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"
          },
          "waiting_on_work": {
            "default": false,
            "description": "WAITING on the agent's own work -- a sub-agent, a process or a timer -- rather than on a person: a run will start when it ends, so a viewer can follow the conversation to it. Set when one conversation is read, false in lists.",
            "title": "Waiting On Work",
            "type": "boolean"
          },
          "workspace_cwd": {
            "description": "The conversation's working directory in the sandbox. This is where the agent's shell starts and where its files land, so it is the directory a file pane should be showing.",
            "readOnly": true,
            "title": "Workspace Cwd",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "pod_id",
          "last_activity_at",
          "created_at",
          "updated_at",
          "workspace_cwd",
          "pod_cwd"
        ],
        "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": {
            "maxLength": 60000,
            "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"
          },
          "reasoning_model_names": {
            "items": {
              "type": "string"
            },
            "title": "Reasoning Model Names",
            "type": "array"
          },
          "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"
          },
          "reasoning_model_names": {
            "items": {
              "type": "string"
            },
            "title": "Reasoning Model Names",
            "type": "array"
          },
          "source": {
            "const": "OPENAI_COMPATIBLE",
            "default": "OPENAI_COMPATIBLE",
            "title": "Source",
            "type": "string"
          },
          "vision_model_names": {
            "items": {
              "type": "string"
            },
            "title": "Vision Model Names",
            "type": "array"
          }
        },
        "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"
              }
            ],
            "deprecated": true,
            "description": "Deprecated -- do not send; name `pod_connector` instead. Still accepted, as the pod connector that serves this account to you.",
            "title": "Account Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pod agent to wake, by name. Pass 'POD_DEFAULT' (or 'pod_default') to wake the pod's default assistant, which has no name of its own.",
            "title": "Agent Name"
          },
          "config": {
            "additionalProperties": true,
            "description": "Settings for the schedule's type: `cron`/`scheduled_at`/`timezone` for TIME, `source` for WEBHOOK, `table_name`/`operations`/`when` for DATASTORE. A TIME schedule's `cron` (5 fields) and a `scheduled_at` without an offset are read in `timezone`, an IANA name such as `Europe/Berlin`; **without `timezone` they are UTC**. The response's `next_fire_at` says when it will next fire. Any type may set `max_concurrent_runs`: at most that many of the schedule's runs in flight at once, from 1 to 1000; a fire that finds it full is skipped and recorded as skipped, not queued. DATASTORE may set `bulk_writes` and `import_writes` to `skip`, `each` or `batch`: what a bulk write or an import does to the trigger. Both default to `skip` (the changes are recorded as skipped, aggregated); the pod setting `triggers.bulk_writes_default` changes the default for `bulk_writes`.",
            "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"
          },
          "include_outside_rows": {
            "default": false,
            "description": "DATASTORE schedules only: also fire on rows people outside the pod added to an open table. Off by default. When it fires, the run is told the row's content came from outside and is untrusted.",
            "title": "Include Outside Rows",
            "type": "boolean"
          },
          "instruction": {
            "anyOf": [
              {
                "maxLength": 8000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the target should do when this fires, in your own words. Reaches an agent as the run's conversation instructions, layered after the agent's own. Required when targeting the default assistant, which has no standing instruction to fall back on. Distinct from filter_instruction, which decides whether to fire.",
            "title": "Instruction"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stable pod-scoped schedule name used for import/export upserts.",
            "title": "Name"
          },
          "pod_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pod connector, by slug, a WEBHOOK schedule listens through -- for a connector trigger or an MCP server's event. The account it means is the connector's decision: your own for a per-member connector, the shared one for a shared connector. It is resolved again on every fire and renewal, as the schedule's owner.",
            "title": "Pod Connector"
          },
          "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"
          },
          "contact_columns": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Of a contact-owned table, the columns a contact may read of their own rows -- an explicit choice, so a column added later stays members-only until it is chosen too.",
            "title": "Contact Columns"
          },
          "contact_owned": {
            "default": false,
            "description": "Rows the pod keeps about its contacts. Adds a `contact_id` column; every member sees every row, and a contact's run reads only rows naming that contact. Not combinable with `enable_rls`, and never Public. Requires `contact_columns`.",
            "title": "Contact Owned",
            "type": "boolean"
          },
          "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, at most 63 bytes — PostgreSQL truncates longer names and two that share that prefix would become one table. Names prefixed with `reserved_` are system-managed and should not be user-created.",
            "maxLength": 63,
            "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"
      },
      "CurrentPageUrlResponse": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "CurrentPageUrlResponse",
        "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": {
            "description": "Number of rows in `items`. This is what came back, not how many rows the query matched: when `truncated` is true the result was cut at the deployment's row cap and more rows exist.",
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "description": "True when the row cap cut the result short, so `items` is a prefix of the query's real answer. Narrow the query (add a WHERE, aggregate, or LIMIT) to see the rest. Reported because a capped result is otherwise indistinguishable from a complete one.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "DatastoreQueryResponse",
        "type": "object"
      },
      "DecisionAnswerResponse": {
        "properties": {
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "The provider's probability for this value, when it measures one. Null from providers that do not, such as a language model.",
            "title": "Confidence"
          },
          "value": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The answer, or null when the evidence did not support one. Null is an answer, not a failure: a failure is an error response.",
            "title": "Value"
          }
        },
        "required": [
          "value",
          "confidence"
        ],
        "title": "DecisionAnswerResponse",
        "type": "object"
      },
      "DecisionExampleBody": {
        "additionalProperties": false,
        "properties": {
          "answers": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "How that case was answered, by question key. Questions may be left out; null means the right answer there was 'can't tell'.",
            "title": "Answers",
            "type": "object"
          },
          "evidence": {
            "$ref": "#/components/schemas/JsonValue",
            "description": "A past case, as evidence was sent."
          }
        },
        "required": [
          "evidence",
          "answers"
        ],
        "title": "DecisionExampleBody",
        "type": "object"
      },
      "DecisionNode": {
        "description": "Decision node. Routes to the first rule whose condition is truthy, or on\nthe answer to its question; falls through to the default outgoing edge\nwhen nothing routes.",
        "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: `rules`, or a `question`, never both.",
        "properties": {
          "question": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DecisionQuestion"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ask one closed question about some evidence and route on the answer. The run waits while it is asked; an answer that cannot be had fails the run rather than taking any branch."
          },
          "rules": {
            "description": "Conditions evaluated in order against the run context; the first truthy one picks the next node.",
            "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"
      },
      "DecisionQuestion": {
        "additionalProperties": false,
        "description": "One closed question, asked about one piece of evidence, routed on.",
        "properties": {
          "answer": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "description": "The question, as one closed JSON Schema property whose `description` is the question: a choice (`{\"type\": \"string\", \"enum\": [...]}` or `oneOf` of `{const, description}`), yes or no (`{\"type\": \"boolean\"}`), or a scale (`{\"type\": \"integer\", \"minimum\": 1, \"maximum\": 5}` or `oneOf` of integer levels). A multi-choice is not routable and is refused.",
            "example": {
              "description": "What is this support email about?",
              "enum": [
                "billing",
                "bug",
                "other"
              ],
              "type": "string"
            },
            "title": "Answer",
            "type": "object"
          },
          "evidence": {
            "description": "What to judge, as an input binding resolved against the run context -- an email, an event, a row. Never followed as instructions.",
            "discriminator": {
              "mapping": {
                "expression": "#/components/schemas/ExpressionInputBinding",
                "literal": "#/components/schemas/LiteralInputBinding"
              },
              "propertyName": "type"
            },
            "example": {
              "type": "expression",
              "value": "start.payload.email"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExpressionInputBinding"
              },
              {
                "$ref": "#/components/schemas/LiteralInputBinding"
              }
            ],
            "title": "Evidence"
          },
          "examples": {
            "description": "Past cases and their answers, to steer the provider.",
            "items": {
              "$ref": "#/components/schemas/DecisionQuestionExample"
            },
            "maxItems": 20,
            "title": "Examples",
            "type": "array"
          },
          "instruction": {
            "description": "What to judge and how, in the author's words. Trusted: it is the only part of the question the provider follows.",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Instruction",
            "type": "string"
          },
          "min_confidence": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "An answer whose confidence is below this counts as unsure. Ignored when the provider reports no confidence, as a language model does.",
            "title": "Min Confidence"
          },
          "routes": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Next node id by answer, the answer written as a string: `true` or `false` for yes or no, `3` for a scale level, the option itself for a choice. An answer with no route takes the node's default edge -- its first outgoing edge.",
            "example": {
              "billing": "refund",
              "bug": "file_bug"
            },
            "title": "Routes",
            "type": "object"
          },
          "unsure_next_node_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to go when the evidence does not support an answer, or the answer's confidence is below `min_confidence`. Unset, an unsure answer takes the default edge.",
            "title": "Unsure Next Node Id"
          }
        },
        "required": [
          "instruction",
          "evidence",
          "answer"
        ],
        "title": "DecisionQuestion",
        "type": "object"
      },
      "DecisionQuestionExample": {
        "additionalProperties": false,
        "description": "A past case and how it should have been answered.",
        "properties": {
          "answer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How that case was answered: one of the question's values, or null when the right answer there was 'can't tell'.",
            "title": "Answer"
          },
          "evidence": {
            "$ref": "#/components/schemas/JsonValue",
            "description": "The evidence of a past case."
          }
        },
        "required": [
          "evidence",
          "answer"
        ],
        "title": "DecisionQuestionExample",
        "type": "object"
      },
      "DecisionResponse": {
        "properties": {
          "answers": {
            "additionalProperties": {
              "$ref": "#/components/schemas/DecisionAnswerResponse"
            },
            "description": "One answer per question, by key.",
            "title": "Answers",
            "type": "object"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model that ran.",
            "title": "Model"
          },
          "provider": {
            "description": "The provider that answered.",
            "title": "Provider",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/DecisionUsageResponse"
          }
        },
        "required": [
          "answers",
          "provider",
          "model",
          "usage"
        ],
        "title": "DecisionResponse",
        "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"
      },
      "DecisionUsageResponse": {
        "properties": {
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          }
        },
        "title": "DecisionUsageResponse",
        "type": "object"
      },
      "DeliveriesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DeliveryResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "DeliveriesResponse",
        "type": "object"
      },
      "DeliveryResponse": {
        "properties": {
          "attempts": {
            "default": 0,
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "message_id": {
            "format": "uuid",
            "title": "Message Id",
            "type": "string"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryStatus"
          },
          "target": {
            "$ref": "#/components/schemas/DeliveryTarget"
          }
        },
        "required": [
          "id",
          "message_id",
          "target",
          "status"
        ],
        "title": "DeliveryResponse",
        "type": "object"
      },
      "DeliveryStatus": {
        "enum": [
          "PENDING",
          "SENT",
          "FAILED",
          "SKIPPED",
          "DEAD"
        ],
        "title": "DeliveryStatus",
        "type": "string"
      },
      "DeliveryTarget": {
        "properties": {
          "kind": {
            "enum": [
              "source",
              "member"
            ],
            "title": "Kind",
            "type": "string"
          },
          "person": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member a push went to."
          },
          "source_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          }
        },
        "required": [
          "kind"
        ],
        "title": "DeliveryTarget",
        "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"
      },
      "DisplaySizeRequest": {
        "description": "The size the pane wants its picture to be, in CSS pixels.\n\nBounded here because these numbers come from a browser window and decide\nhow much memory a framebuffer takes. The sandbox clamps again against the\nframebuffer it actually allocated, which is the limit that cannot be\nargued with.",
        "properties": {
          "height": {
            "maximum": 4096,
            "minimum": 240,
            "title": "Height",
            "type": "integer"
          },
          "width": {
            "maximum": 4096,
            "minimum": 320,
            "title": "Width",
            "type": "integer"
          }
        },
        "required": [
          "width",
          "height"
        ],
        "title": "DisplaySizeRequest",
        "type": "object"
      },
      "DisplaySizeResponse": {
        "properties": {
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          }
        },
        "title": "DisplaySizeResponse",
        "type": "object"
      },
      "EmailDeliveryStatusResponse": {
        "properties": {
          "configured": {
            "description": "Whether mail sent from this server can reach an inbox. False while no provider is set up, and while mail is written to a local spool (EMAIL_TRANSPORT=filesystem) instead of being sent.",
            "title": "Configured",
            "type": "boolean"
          }
        },
        "required": [
          "configured"
        ],
        "title": "EmailDeliveryStatusResponse",
        "type": "object"
      },
      "EmailDeliveryTestResponse": {
        "properties": {
          "message": {
            "description": "What happened, in words to show the person: where the email went, or what to change. Never the provider's own error.",
            "title": "Message",
            "type": "string"
          },
          "ok": {
            "description": "Whether the test email was handed to the provider",
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "message"
        ],
        "title": "EmailDeliveryTestResponse",
        "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"
      },
      "EventCatalogResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EventDescriptorResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "EventCatalogResponse",
        "type": "object"
      },
      "EventDescriptorResponse": {
        "description": "An MCP Events descriptor, plus the schedule type that serves it.",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "event": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event"
          },
          "input_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Input Schema",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "payload_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Payload Schema",
            "type": "object"
          },
          "pod_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Connector"
          },
          "schedule_type": {
            "$ref": "#/components/schemas/ScheduleType"
          },
          "server": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "name",
          "title",
          "description",
          "schedule_type",
          "input_schema",
          "payload_schema"
        ],
        "title": "EventDescriptorResponse",
        "type": "object"
      },
      "EventSubscriptionResponse": {
        "description": "Something a connected app asked to be told about.",
        "properties": {
          "arguments": {
            "additionalProperties": true,
            "title": "Arguments",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "paused_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When delivery gave up on a callback that kept failing. The app's next refresh resumes it.",
            "title": "Paused At"
          },
          "refresh_before": {
            "format": "date-time",
            "title": "Refresh Before",
            "type": "string"
          },
          "stopped_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the person pressed Stop. The app's refresh is refused until it is resumed.",
            "title": "Stopped At"
          }
        },
        "required": [
          "id",
          "name",
          "arguments",
          "last_delivery_at",
          "last_error",
          "refresh_before"
        ],
        "title": "EventSubscriptionResponse",
        "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"
          },
          "revision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Run a specific revision instead of the live one -- a revision number ('r12') or a hash prefix. Requires function.update: running a superseded build is an authoring action, not an execution one.",
            "title": "Revision"
          }
        },
        "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"
      },
      "ExportedConversation": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ExportedMessage"
            },
            "title": "Messages",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "title",
          "created_at",
          "messages"
        ],
        "title": "ExportedConversation",
        "type": "object"
      },
      "ExportedMessage": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "sequence": {
            "title": "Sequence",
            "type": "integer"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "role",
          "text",
          "created_at",
          "sequence"
        ],
        "title": "ExportedMessage",
        "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"
      },
      "FilePart": {
        "description": "A file of the pod's the line shares.\n\nWhoever writes the line must be able to read the file; it is then read\nthrough the line (``GET …/messages/{m}/files/{file_id}``), by whoever may\nsee the line, as its writer reads it -- never through the file's own\nfolder, which a private channel's readers need not share.",
        "properties": {
          "file_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "mime_type": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "path": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Path",
            "type": "string"
          },
          "size": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "type": {
            "const": "file",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "path",
          "name"
        ],
        "title": "FilePart",
        "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": {
            "description": "Number of matches in `items`. This is what came back, not how many matches the pod holds: when `truncated` is true the result was cut at `limit` and more exist.",
            "title": "Total",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "description": "True when the result filled the requested `limit`, so there are likely further matches this response does not show. Narrow the query or raise `limit` to see more. Reported because a capped result is otherwise indistinguishable from a complete one — an agent reading `total` as the number of matching documents states it to a person as fact.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "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": [
              {
                "maximum": 604800,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires Seconds"
          },
          "max_hits": {
            "anyOf": [
              {
                "maximum": 1000,
                "minimum": 1,
                "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"
      },
      "FirstWorkspaceRequest": {
        "additionalProperties": false,
        "properties": {
          "with_pod": {
            "default": true,
            "description": "Ensure a personal pod and assistant. Importers may request only an organization.",
            "title": "With Pod",
            "type": "boolean"
          }
        },
        "title": "FirstWorkspaceRequest",
        "type": "object"
      },
      "FirstWorkspaceResponse": {
        "properties": {
          "assistant_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Id"
          },
          "entry": {
            "enum": [
              "existing",
              "surface_join",
              "invitation",
              "domain_join",
              "new_org"
            ],
            "title": "Entry",
            "type": "string"
          },
          "organization_created": {
            "title": "Organization Created",
            "type": "boolean"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "pod_created": {
            "title": "Pod Created",
            "type": "boolean"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Id"
          }
        },
        "required": [
          "organization_id",
          "entry",
          "organization_created",
          "pod_created"
        ],
        "title": "FirstWorkspaceResponse",
        "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"
      },
      "ForgetResponse": {
        "properties": {
          "forgotten": {
            "description": "False when the browser was holding nothing for this site.",
            "title": "Forgotten",
            "type": "boolean"
          },
          "site": {
            "title": "Site",
            "type": "string"
          }
        },
        "required": [
          "site",
          "forgotten"
        ],
        "title": "ForgetResponse",
        "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."
          },
          "contacts_invoke": {
            "default": false,
            "description": "Callable from a contact's conversation.",
            "title": "Contacts Invoke",
            "type": "boolean"
          },
          "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"
      },
      "FunctionContactAccessRequest": {
        "description": "Open a function to contacts, or close it.",
        "properties": {
          "contacts_invoke": {
            "description": "Let a contact's conversation call this function. It runs as the function itself, with no member behind it: its own grants, its own pod, and only the asking contact's rows of contact-owned tables. The platform puts the contact's `contact_id` in its input, so the input schema must declare `contact_id`.",
            "title": "Contacts Invoke",
            "type": "boolean"
          }
        },
        "required": [
          "contacts_invoke"
        ],
        "title": "FunctionContactAccessRequest",
        "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."
          },
          "contacts_invoke": {
            "default": false,
            "description": "Callable from a contact's conversation.",
            "title": "Contacts Invoke",
            "type": "boolean"
          },
          "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"
      },
      "FunctionResponse": {
        "description": "Function response.",
        "properties": {
          "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."
          },
          "contacts_invoke": {
            "default": false,
            "description": "Callable from a contact's conversation.",
            "title": "Contacts Invoke",
            "type": "boolean"
          },
          "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": "FunctionResponse",
        "type": "object"
      },
      "FunctionRevisionListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FunctionRevisionResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "items"
        ],
        "title": "FunctionRevisionListResponse",
        "type": "object"
      },
      "FunctionRevisionPromoteResponse": {
        "properties": {
          "revision": {
            "$ref": "#/components/schemas/FunctionRevisionResponse"
          },
          "schema_changed": {
            "description": "True when this revision's input/output/config schemas differ from the ones that were live. The schemas move with the revision, so agents and workflows bound to the old contract may need updating.",
            "title": "Schema Changed",
            "type": "boolean"
          }
        },
        "required": [
          "revision",
          "schema_changed"
        ],
        "title": "FunctionRevisionPromoteResponse",
        "type": "object"
      },
      "FunctionRevisionResponse": {
        "description": "One entry in a function's revision history.",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "config_schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "function_id": {
            "format": "uuid",
            "title": "Function Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "input_schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_live": {
            "description": "True for the revision this function runs.",
            "title": "Is Live",
            "type": "boolean"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "output_schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "pruned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when retention removed this revision's artifact. The entry stays in the history, but it can no longer be run or promoted.",
            "title": "Pruned At"
          },
          "revision_hash": {
            "title": "Revision Hash",
            "type": "string"
          },
          "revision_number": {
            "title": "Revision Number",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "function_id",
          "revision_number",
          "revision_hash",
          "created_at",
          "is_live"
        ],
        "title": "FunctionRevisionResponse",
        "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": {
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the run acted for: `user:{id}` for a member, `contact:{id}` for a contact's call (which runs as the function itself, with no member), or `anonymous`.",
            "title": "Actor"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "contact_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "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": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "function_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": {
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the run acted for: `user:{id}` for a member, `contact:{id}` for a contact's call (which runs as the function itself, with no member), or `anonymous`.",
            "title": "Actor"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "contact_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "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": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "function_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"
              }
            ]
          },
          "contacts_invoke": {
            "default": false,
            "description": "Callable from a contact's conversation.",
            "title": "Contacts Invoke",
            "type": "boolean"
          },
          "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"
      },
      "GenerationSettings": {
        "additionalProperties": false,
        "description": "Portable generation settings. Every field unset means \"provider default\".\n\nLayered lowest to highest: the model's catalog entry, the runtime profile,\nthe agent, the workflow step. A field a layer leaves unset is inherited\nfrom the layer below, so an agent that only lowers reasoning effort keeps\nwhatever output cap its profile chose.",
        "properties": {
          "max_output_tokens": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most tokens one model response may use, thinking included. Still clamped to the room the context window leaves.",
            "title": "Max Output Tokens"
          },
          "reasoning_effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sent only to OpenAI-compatible models whose catalog entry declares the REASONING capability; ignored elsewhere."
          },
          "temperature": {
            "anyOf": [
              {
                "maximum": 2,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "thinking_budget_tokens": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Extended-thinking budget. Sent only to Anthropic-compatible models whose catalog entry declares the REASONING capability; ignored elsewhere.",
            "title": "Thinking Budget Tokens"
          },
          "top_p": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          }
        },
        "title": "GenerationSettings",
        "type": "object"
      },
      "GranteeRef": {
        "properties": {
          "grantee_id": {
            "format": "uuid",
            "title": "Grantee Id",
            "type": "string"
          },
          "grantee_type": {
            "enum": [
              "ROLE",
              "POD_MEMBER"
            ],
            "title": "Grantee Type",
            "type": "string"
          }
        },
        "required": [
          "grantee_type",
          "grantee_id"
        ],
        "title": "GranteeRef",
        "type": "object"
      },
      "GroupPublicResponse": {
        "description": "The pod's Public files and tables, the first few of each.",
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/PublicFileResponse"
            },
            "title": "Files",
            "type": "array"
          },
          "more": {
            "description": "More is Public than is listed here.",
            "title": "More",
            "type": "boolean"
          },
          "tables": {
            "items": {
              "type": "string"
            },
            "title": "Tables",
            "type": "array"
          }
        },
        "required": [
          "files",
          "tables",
          "more"
        ],
        "title": "GroupPublicResponse",
        "type": "object"
      },
      "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"
      },
      "HistoryMessage": {
        "properties": {
          "client_nonce": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Nonce"
          },
          "from_person": {
            "default": false,
            "description": "A person on the team wrote it, not the bot.",
            "title": "From Person",
            "type": "boolean"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "sequence": {
            "title": "Sequence",
            "type": "integer"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "role",
          "text",
          "sequence"
        ],
        "title": "HistoryMessage",
        "type": "object"
      },
      "HistoryResponse": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/HistoryMessage"
            },
            "title": "Messages",
            "type": "array"
          }
        },
        "required": [
          "messages"
        ],
        "title": "HistoryResponse",
        "type": "object"
      },
      "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": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "required": [
          "id",
          "name",
          "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"
      },
      "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"
      },
      "IdentityKind": {
        "description": "What sort of handle names a contact.",
        "enum": [
          "PHONE",
          "EMAIL",
          "TELEGRAM",
          "HOST",
          "SLACK",
          "TEAMS",
          "WEB"
        ],
        "title": "IdentityKind",
        "type": "string"
      },
      "IdentityStrength": {
        "description": "Who vouched for a handle.\n\n``CHANNEL``: the platform the message came through, in a payload whose\nsignature was checked (WhatsApp, Telegram), or the receiving mail service's\nauthentication verdict (email). ``HOST`` and ``CODE``: see their values.\n``MEMBER``: a pod member added it by hand,\nwhich says who the member believes it is and nothing about who writes from\nit -- so it never makes a message count as that contact on its own.",
        "enum": [
          "CHANNEL",
          "MEMBER",
          "HOST",
          "CODE",
          "SESSION"
        ],
        "title": "IdentityStrength",
        "type": "string"
      },
      "ImpactedPod": {
        "description": "One pod the caller can open, and what in it stops.",
        "properties": {
          "event_subscription_count": {
            "default": 0,
            "title": "Event Subscription Count",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_connectors": {
            "description": "Slugs of its connectors on it.",
            "items": {
              "type": "string"
            },
            "title": "Pod Connectors",
            "type": "array"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "schedule_count": {
            "default": 0,
            "title": "Schedule Count",
            "type": "integer"
          },
          "surface_count": {
            "default": 0,
            "title": "Surface Count",
            "type": "integer"
          }
        },
        "required": [
          "pod_id",
          "name"
        ],
        "title": "ImpactedPod",
        "type": "object"
      },
      "ImpactedPodConnector": {
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/PodConnectorMode"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "pod_id",
          "slug",
          "mode"
        ],
        "title": "ImpactedPodConnector",
        "type": "object"
      },
      "ImportPlanResponse": {
        "properties": {
          "bundle_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bundle Name"
          },
          "connectors": {
            "description": "The bundle's pod connectors, each with the importing org's installations of its catalog connector, whether one can be created, and (SHARED) your own accounts you could share. NEEDS_INSTALLATION and CONFLICT block the apply until resolved; NEEDS_ACCOUNT imports, waiting for an account.",
            "items": {
              "$ref": "#/components/schemas/ConnectorPlan"
            },
            "title": "Connectors",
            "type": "array"
          },
          "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": {
        "additionalProperties": false,
        "description": "Body for starting a URL-based import.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "description": "Deprecated and ignored: a private repo is fetched through the pod's `github` connector, as you.",
            "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"
          },
          "connect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to connect the GitHub account the pod's `github` connector needs, when the job failed for want of one.",
            "title": "Connect Url"
          },
          "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"
          },
          "partial_apply": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PartialApplyResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the import stopped part-way and the pod was already changed. Null on a clean success, and on a job that changed nothing."
          },
          "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"
      },
      "InboxItem": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/ChannelRef"
          },
          "message": {
            "$ref": "#/components/schemas/ChannelMessageResponse"
          }
        },
        "required": [
          "channel",
          "message"
        ],
        "title": "InboxItem",
        "type": "object"
      },
      "InboxResponse": {
        "properties": {
          "contacts": {
            "description": "Contacts waiting on a reply, most recently active first: those asking for a person, and those assigned to the reader the contact wrote to last. Only for a reader who may see contacts.",
            "items": {
              "$ref": "#/components/schemas/ChannelResponse"
            },
            "title": "Contacts",
            "type": "array"
          },
          "mentions": {
            "description": "Unread lines naming the reader, newest first.",
            "items": {
              "$ref": "#/components/schemas/InboxItem"
            },
            "title": "Mentions",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/InboxTotals"
          },
          "waiting": {
            "description": "Questions waiting on the reader, newest first.",
            "items": {
              "$ref": "#/components/schemas/InboxItem"
            },
            "title": "Waiting",
            "type": "array"
          }
        },
        "required": [
          "totals"
        ],
        "title": "InboxResponse",
        "type": "object"
      },
      "InboxTotals": {
        "properties": {
          "channels": {
            "description": "Channels with something new.",
            "title": "Channels",
            "type": "integer"
          },
          "contacts": {
            "default": 0,
            "description": "Contacts waiting on a reply: asking for a person, or assigned to the reader and written to last by the contact.",
            "title": "Contacts",
            "type": "integer"
          },
          "mentions": {
            "description": "Unread lines naming the reader.",
            "title": "Mentions",
            "type": "integer"
          },
          "waiting": {
            "description": "Questions waiting on the reader's answer.",
            "title": "Waiting",
            "type": "integer"
          }
        },
        "required": [
          "channels",
          "mentions",
          "waiting"
        ],
        "title": "InboxTotals",
        "type": "object"
      },
      "InstallRequestInitiateSchema": {
        "description": "Which account still needs its provider-side installation.",
        "properties": {
          "account_id": {
            "description": "The connected account the installation is for.",
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "return_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Path inside the app to come back to. Only a rooted path is accepted; anything else is ignored rather than followed.",
            "title": "Return To"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "InstallRequestInitiateSchema",
        "type": "object"
      },
      "InstallRequestResponseSchema": {
        "description": "Where to send somebody to finish installing.\n\nOnly the URL: like a connect request, the `state` on it is a capability and\ndoes not belong in a response body, browser memory or a HAR capture.",
        "properties": {
          "authorization_url": {
            "description": "Provider URL that completes the installation step.",
            "title": "Authorization Url",
            "type": "string"
          }
        },
        "required": [
          "authorization_url"
        ],
        "title": "InstallRequestResponseSchema",
        "type": "object"
      },
      "InstallationBindSchema": {
        "description": "Which of several installations this account speaks for.",
        "properties": {
          "installation_id": {
            "description": "One of the ids offered by the installations endpoint.",
            "title": "Installation Id",
            "type": "string"
          }
        },
        "required": [
          "installation_id"
        ],
        "title": "InstallationBindSchema",
        "type": "object"
      },
      "InstallationChoiceSchema": {
        "description": "One installation an account could speak for.",
        "properties": {
          "account_login": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Login"
          },
          "account_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Type"
          },
          "installation_id": {
            "title": "Installation Id",
            "type": "string"
          },
          "manage_url": {
            "description": "Where the person changes this installation's repository access. A link rather than an API call: the endpoints that add or remove a repository accept only classic personal access tokens.",
            "title": "Manage Url",
            "type": "string"
          },
          "repository_selection": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "'all' or 'selected'. A selected installation does not pick up newly created repositories, which is the commonest reason a repository is missing.",
            "title": "Repository Selection"
          }
        },
        "required": [
          "installation_id",
          "manage_url"
        ],
        "title": "InstallationChoiceSchema",
        "type": "object"
      },
      "InstallationImpactResponse": {
        "description": "What deleting or disabling an installation stops, before it is done.\n\nThe counts are the whole organization's; `pods` and `pod_connectors` name\nonly the pods the caller can open, and the rest are counted in\n`unnamed_pod_count`.",
        "properties": {
          "account_count": {
            "title": "Account Count",
            "type": "integer"
          },
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "complete": {
            "default": true,
            "description": "False when the surfaces, schedules and subscriptions could not be counted just now: the counts above them are zero for that reason, not because nothing stops. Removing is not blocked by it.",
            "title": "Complete",
            "type": "boolean"
          },
          "event_subscription_count": {
            "default": 0,
            "description": "MCP event subscriptions held on its accounts.",
            "title": "Event Subscription Count",
            "type": "integer"
          },
          "pod_account_count": {
            "title": "Pod Account Count",
            "type": "integer"
          },
          "pod_connectors": {
            "description": "Its pod connectors in the pods the caller can open.",
            "items": {
              "$ref": "#/components/schemas/ImpactedPodConnector"
            },
            "title": "Pod Connectors",
            "type": "array"
          },
          "pods": {
            "description": "Per pod the caller can open: what stops there.",
            "items": {
              "$ref": "#/components/schemas/ImpactedPod"
            },
            "title": "Pods",
            "type": "array"
          },
          "schedule_count": {
            "default": 0,
            "description": "Schedules that listen through one of its pod connectors.",
            "title": "Schedule Count",
            "type": "integer"
          },
          "surface_count": {
            "default": 0,
            "description": "Surfaces that answer through one of its pod connectors.",
            "title": "Surface Count",
            "type": "integer"
          },
          "unnamed_pod_connector_count": {
            "default": 0,
            "description": "The pod connectors those unnamed pods lose.",
            "title": "Unnamed Pod Connector Count",
            "type": "integer"
          },
          "unnamed_pod_count": {
            "default": 0,
            "description": "Pods that lose a connector and are not named here: the caller cannot open them, or (with `complete: false`) whether they can could not be checked.",
            "title": "Unnamed Pod Count",
            "type": "integer"
          }
        },
        "required": [
          "auth_config_id",
          "account_count",
          "pod_account_count",
          "pod_connectors"
        ],
        "title": "InstallationImpactResponse",
        "type": "object"
      },
      "InstallationOperationExecutionRequest": {
        "description": "The deprecated org-level execute's body: an installation, maybe an account.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "description": "Deprecated. Served only if it is the account a pod connector for this installation resolves to, or your own on a per-member one.",
            "title": "Account Id"
          },
          "payload": {
            "additionalProperties": true,
            "description": "The operation's arguments. A file argument takes a reference -- `{\"pod_path\": \"/me/report.pdf\"}`, `{\"file_id\": \"...\"}`, `{\"url\": \"https://...\"}` or `{\"base64\": \"...\", \"filename\": \"...\"}` -- read with the caller's own access before the call is made. `output_path` chooses where a file result lands in the pod.",
            "title": "Payload",
            "type": "object"
          },
          "pod_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pod whose connectors serve the call, and that file references resolve in. Implied for a call made from inside a pod.",
            "title": "Pod Id"
          }
        },
        "required": [
          "payload"
        ],
        "title": "InstallationOperationExecutionRequest",
        "type": "object"
      },
      "InstallationOption": {
        "properties": {
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "auth_config_id",
          "name"
        ],
        "title": "InstallationOption",
        "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": {},
      "LineDelivery": {
        "description": "Where a line went outside Lemma, as everybody who reads it is shown.",
        "properties": {
          "id": {
            "description": "The delivery; retry it by this id.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it was skipped, failed or given up.",
            "title": "Reason"
          },
          "source_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryStatus"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "LineDelivery",
        "type": "object"
      },
      "LinePreview": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deleted": {
            "default": false,
            "description": "Its writer deleted it.",
            "title": "Deleted",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "sender": {
            "$ref": "#/components/schemas/PersonRef"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          },
          "text": {
            "description": "The start of what was said; empty when withheld or deleted.",
            "title": "Text",
            "type": "string"
          },
          "withheld": {
            "default": false,
            "title": "Withheld",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "seq",
          "sender",
          "text",
          "created_at"
        ],
        "title": "LinePreview",
        "type": "object"
      },
      "LinkPart": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "type": {
            "const": "link",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 1,
            "pattern": "^https?://",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "type",
          "url"
        ],
        "title": "LinkPart",
        "type": "object"
      },
      "ListeningResponse": {
        "description": "How a schedule on a connected MCP server's event is hearing from it.",
        "properties": {
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_event_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Event At"
          },
          "refresh_before": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Before"
          },
          "server": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The connected server it listens to, by name.",
            "title": "Server"
          },
          "state": {
            "description": "listening: the server holds the subscription. retrying: renewing it failed and is being retried. lapsed: the server no longer tells us anything. pending: the server has not answered yet.",
            "enum": [
              "listening",
              "retrying",
              "lapsed",
              "pending"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "title": "ListeningResponse",
        "type": "object"
      },
      "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"
      },
      "MakeDecisionRequest": {
        "additionalProperties": false,
        "properties": {
          "evidence": {
            "$ref": "#/components/schemas/JsonValue",
            "description": "What to judge: an email, an event, a row, as text or JSON. Never followed as instructions. At most 64 KiB; send the part that matters."
          },
          "examples": {
            "description": "Past cases and their answers, to steer the provider.",
            "items": {
              "$ref": "#/components/schemas/DecisionExampleBody"
            },
            "maxItems": 20,
            "title": "Examples",
            "type": "array"
          },
          "instruction": {
            "description": "What to judge and how, in your words. Trusted: it is the only part of the request the provider follows.",
            "maxLength": 8000,
            "minLength": 1,
            "title": "Instruction",
            "type": "string"
          },
          "priority": {
            "default": "background",
            "description": "`interactive` when someone is waiting on the answer: a shorter deadline and no second attempt. `background` otherwise.",
            "enum": [
              "interactive",
              "background"
            ],
            "title": "Priority",
            "type": "string"
          },
          "schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "description": "The questions, as a flat JSON Schema object: one property per question, its `description` the question. Each property is a choice (`{\"type\": \"string\", \"enum\": [...]}`, or `oneOf` of `{const, description}`), a multi-choice (`{\"type\": \"array\", \"items\": <choice>, \"uniqueItems\": true}`), yes or no (`{\"type\": \"boolean\"}`), or a scale (`{\"type\": \"integer\", \"minimum\": 1, \"maximum\": 5}`, or `oneOf` of described integer levels). Free text and open-ended numbers are not supported.",
            "title": "Schema",
            "type": "object"
          }
        },
        "required": [
          "instruction",
          "evidence",
          "schema"
        ],
        "title": "MakeDecisionRequest",
        "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"
      },
      "McpEndpointResponse": {
        "properties": {
          "url": {
            "description": "The URL to add to an MCP client for this pod.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "McpEndpointResponse",
        "type": "object"
      },
      "MemberAwaited": {
        "description": "A member a required per-member connector is still waiting on.\n\nWho, and why -- never which account: nobody but its owner is shown that.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "pod_member_id": {
            "format": "uuid",
            "title": "Pod Member Id",
            "type": "string"
          },
          "standing": {
            "$ref": "#/components/schemas/MemberConnectStanding"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "pod_member_id",
          "standing"
        ],
        "title": "MemberAwaited",
        "type": "object"
      },
      "MemberConnectStanding": {
        "enum": [
          "CONNECTED",
          "MISSING",
          "REAUTH_REQUIRED"
        ],
        "title": "MemberConnectStanding",
        "type": "string"
      },
      "MemberRole": {
        "enum": [
          "owner",
          "member",
          "guest"
        ],
        "title": "MemberRole",
        "type": "string"
      },
      "MemberUpdateRequest": {
        "properties": {
          "answers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentAnswers"
              },
              {
                "type": "null"
              }
            ],
            "description": "An agent's."
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberRole"
              },
              {
                "type": "null"
              }
            ],
            "description": "A person's."
          }
        },
        "title": "MemberUpdateRequest",
        "type": "object"
      },
      "MembersAddRequest": {
        "additionalProperties": false,
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/AgentSeat"
            },
            "maxItems": 50,
            "title": "Agents",
            "type": "array"
          },
          "people": {
            "description": "Members, by user id.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "title": "People",
            "type": "array"
          }
        },
        "title": "MembersAddRequest",
        "type": "object"
      },
      "MentionPart": {
        "description": "Somebody the line names, resolved: a member, a contact or an agent.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "enum": [
              "MEMBER",
              "CONTACT",
              "AGENT"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "type": {
            "const": "mention",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "kind",
          "id"
        ],
        "title": "MentionPart",
        "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"
      },
      "MessageRequest": {
        "properties": {
          "client_nonce": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The page's own name for this message, echoed on it in history, so the page can tell its copy from the server's without comparing text.",
            "title": "Client Nonce"
          },
          "text": {
            "maxLength": 4000,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "MessageRequest",
        "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"
      },
      "MyMembershipResponse": {
        "properties": {
          "can_manage": {
            "default": false,
            "description": "Whether the reader may change this channel and its members.",
            "title": "Can Manage",
            "type": "boolean"
          },
          "joined": {
            "default": false,
            "title": "Joined",
            "type": "boolean"
          },
          "muted_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Muted Until"
          },
          "notify": {
            "$ref": "#/components/schemas/NotifyLevel",
            "default": "ALL"
          },
          "notify_via": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where lines reach them outside the app; absent for the pod's rule.",
            "title": "Notify Via"
          },
          "read_seq": {
            "default": 0,
            "title": "Read Seq",
            "type": "integer"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberRole"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "MyMembershipResponse",
        "type": "object"
      },
      "MyMembershipUpdate": {
        "description": "Absent is unchanged; ``null`` clears ``notify_via`` (the pod's rule)\nand ``muted_until`` (unmuted).",
        "properties": {
          "muted_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Muted Until"
          },
          "notify": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotifyLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "notify_via": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "EMAIL",
                    "SLACK",
                    "TEAMS",
                    "WHATSAPP",
                    "TELEGRAM",
                    "RESEND"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify Via"
          }
        },
        "title": "MyMembershipUpdate",
        "type": "object"
      },
      "MyUsageLimitsResponse": {
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "organization_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "plan_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Name"
          },
          "plan_type": {
            "anyOf": [
              {
                "enum": [
                  "PERSONAL",
                  "TEAM"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Type"
          },
          "warning_percent": {
            "title": "Warning Percent",
            "type": "number"
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/UsageAllowanceResponse"
            },
            "title": "Windows",
            "type": "array"
          }
        },
        "required": [
          "organization_id",
          "plan_type",
          "plan_name",
          "windows",
          "allowed",
          "warning_percent"
        ],
        "title": "MyUsageLimitsResponse",
        "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/{organization_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"
      },
      "NoticeRequest": {
        "properties": {
          "text": {
            "maxLength": 4000,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "NoticeRequest",
        "type": "object"
      },
      "NoticeResponse": {
        "properties": {
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "message_id": {
            "format": "uuid",
            "title": "Message Id",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "channel_id"
        ],
        "title": "NoticeResponse",
        "type": "object"
      },
      "NotifyLevel": {
        "description": "Which lines of a channel reach a member outside the app.",
        "enum": [
          "ALL",
          "MENTIONS",
          "NONE"
        ],
        "title": "NotifyLevel",
        "type": "string"
      },
      "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"
      },
      "OpenCallRequest": {
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pod agent to call in a new conversation; empty calls the pod's default agent. A call in an existing chat is with that chat's agent.",
            "title": "Agent Name"
          },
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Hold the call in this chat -- your own, in this pod -- so the call, the agent's work and the transcript are that one chat; a call already held there is picked up again. Empty starts a new conversation.",
            "title": "Conversation Id"
          },
          "display_name": {
            "default": "your teammate",
            "description": "What the agent is called in a new call's title.",
            "maxLength": 120,
            "minLength": 1,
            "title": "Display Name",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A new call conversation's title; an existing chat keeps its own.",
            "title": "Title"
          }
        },
        "title": "OpenCallRequest",
        "type": "object"
      },
      "OpenTableRequest": {
        "properties": {
          "audience": {
            "$ref": "#/components/schemas/PublicAudience"
          },
          "columns": {
            "description": "The columns people outside may fill, in the order to ask them. Checked against the table when it is opened.",
            "items": {
              "type": "string"
            },
            "title": "Columns",
            "type": "array"
          }
        },
        "required": [
          "audience",
          "columns"
        ],
        "title": "OpenTableRequest",
        "type": "object"
      },
      "OpenTableSummary": {
        "properties": {
          "audience": {
            "$ref": "#/components/schemas/PublicAudience"
          },
          "table": {
            "title": "Table",
            "type": "string"
          }
        },
        "required": [
          "table",
          "audience"
        ],
        "title": "OpenTableSummary",
        "type": "object"
      },
      "OpenTablesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OpenTableSummary"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "OpenTablesResponse",
        "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": {
          "limit": {
            "default": 100,
            "description": "How many to return when `operation_names` is omitted. Ignored when names are given.",
            "maximum": 1000,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "operation_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 1000,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Operation names to fetch. Omit or pass an empty list to return details for the first `limit` operations in the connector; read `total_operations` on the response to see whether that was all of them.",
            "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"
          },
          "total_operations": {
            "default": 0,
            "description": "Operations the connector exposes in total. Greater than `returned_count` means the unnamed request was capped.",
            "title": "Total Operations",
            "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"
      },
      "OperationDiscoverySchema": {
        "description": "What re-reading an install's operation list actually did.\n\n`operation_count` alone cannot say: a connector with no operations to\nadvertise, a kind whose operations are static, and a server that refused\nthe listing all report zero. They need different things from the reader --\nnothing, nothing, and a retry once the server is reachable -- so the status\nis the field to branch on and the count is detail.",
        "properties": {
          "operation_count": {
            "default": 0,
            "description": "Operations stored for the install. Zero unless status is ok.",
            "title": "Operation Count",
            "type": "integer"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Machine-readable cause when status is not ok: the connector error code for a refused discovery, or why none was attempted.",
            "title": "Reason"
          },
          "status": {
            "$ref": "#/components/schemas/OperationDiscoveryStatus"
          }
        },
        "required": [
          "status"
        ],
        "title": "OperationDiscoverySchema",
        "type": "object"
      },
      "OperationDiscoveryStatus": {
        "description": "Whether a discovery attempt worked, was never made, or was refused.",
        "enum": [
          "ok",
          "not_applicable",
          "failed"
        ],
        "title": "OperationDiscoveryStatus",
        "type": "string"
      },
      "OperationExecutionRequest": {
        "properties": {
          "payload": {
            "additionalProperties": true,
            "description": "The operation's arguments. A file argument takes a reference -- `{\"pod_path\": \"/me/report.pdf\"}`, `{\"file_id\": \"...\"}`, `{\"url\": \"https://...\"}` or `{\"base64\": \"...\", \"filename\": \"...\"}` -- read with the caller's own access before the call is made. `output_path` chooses where a file result lands in the pod.",
            "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"
      },
      "OrganizationEffectivePermissionsResponse": {
        "description": "The organization-level permission ids the caller holds.",
        "properties": {
          "actions": {
            "items": {
              "type": "string"
            },
            "title": "Actions",
            "type": "array"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          }
        },
        "required": [
          "organization_id",
          "actions"
        ],
        "title": "OrganizationEffectivePermissionsResponse",
        "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": {
          "accept_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The link the invitee opens to accept, as the invitation email carries it. Returned to the organization's owners and editors, so an invitation can be handed over another way when email is not set up here.",
            "title": "Accept Url"
          },
          "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"
          },
          "emailed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether this server emails invitations. False means email is not set up here: the invitation exists, but nobody was sent it, so share `accept_url` with the invitee yourself.",
            "title": "Emailed"
          },
          "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"
      },
      "OutreachDelivery": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "source_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryStatus",
            "description": "PENDING until the line is sent; SENT, SKIPPED or FAILED after."
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "OutreachDelivery",
        "type": "object"
      },
      "OutreachLine": {
        "properties": {
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          },
          "source_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "channel_id",
          "seq",
          "text",
          "created_at"
        ],
        "title": "OutreachLine",
        "type": "object"
      },
      "OutreachRequest": {
        "properties": {
          "client_message_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The same id twice is the same line: a retry sends nothing new.",
            "title": "Client Message Id"
          },
          "handle": {
            "description": "One of the contact's handles to write to: an email address, a phone number (WhatsApp), a Telegram user id.",
            "maxLength": 320,
            "minLength": 1,
            "title": "Handle",
            "type": "string"
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdentityKind"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which kind of handle it is, when the value could be two."
          },
          "text": {
            "maxLength": 4000,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "handle",
          "text"
        ],
        "title": "OutreachRequest",
        "type": "object"
      },
      "OutreachResponse": {
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/OutreachDelivery"
          },
          "line": {
            "$ref": "#/components/schemas/OutreachLine"
          }
        },
        "required": [
          "line",
          "delivery"
        ],
        "title": "OutreachResponse",
        "type": "object"
      },
      "PartialApplyResponse": {
        "description": "What a stopped import already wrote to the pod, and how to continue it.\n\nApply is not transactional: each step commits in its own unit of work, so an\nimport that fails or is cancelled part-way leaves the pod changed and there\nis no rollback. `committed_steps` says which steps landed, but a bare list\nof integers does not tell anyone that the pod was modified at all, nor that\nre-applying resumes instead of duplicating. This does.",
        "properties": {
          "resumable": {
            "description": "Whether applying this import again continues it. False once the job reached a status apply no longer accepts, in which case the pod keeps what was already applied and the rest must be imported afresh.",
            "title": "Resumable",
            "type": "boolean"
          },
          "resume_from_step": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Index of the first step still to run. Applying this import again resumes here; steps already applied are not repeated.",
            "title": "Resume From Step"
          },
          "steps_applied": {
            "description": "Plan steps already applied to this pod. Not undone.",
            "title": "Steps Applied",
            "type": "integer"
          },
          "steps_total": {
            "description": "Steps in the approved plan.",
            "title": "Steps Total",
            "type": "integer"
          }
        },
        "required": [
          "steps_applied",
          "steps_total",
          "resumable"
        ],
        "title": "PartialApplyResponse",
        "type": "object"
      },
      "PendingInteractionKind": {
        "description": "What the person is being asked for.",
        "enum": [
          "QUESTION",
          "APPROVAL",
          "PERMISSION"
        ],
        "title": "PendingInteractionKind",
        "type": "string"
      },
      "PendingInteractionListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PendingInteractionResponse"
            },
            "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": "PendingInteractionListResponse",
        "type": "object"
      },
      "PendingInteractionResponse": {
        "description": "One pause waiting on the caller, and the conversation it is in.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Absent for the pod's own assistant on older conversations.",
            "title": "Agent Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "conversation_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversation_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Title"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PendingInteractionKind"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The question asked, or the approval's title, on one line.",
            "title": "Summary"
          },
          "tool_call_id": {
            "description": "The paused call, which is also the approval id the decision endpoint takes.",
            "title": "Tool Call Id",
            "type": "string"
          }
        },
        "required": [
          "conversation_id",
          "tool_call_id",
          "kind",
          "created_at"
        ],
        "title": "PendingInteractionResponse",
        "type": "object"
      },
      "PendingSignInResponse": {
        "description": "What the page needs to put a site in front of somebody.",
        "properties": {
          "origin": {
            "title": "Origin",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "tool_call_id": {
            "title": "Tool Call Id",
            "type": "string"
          }
        },
        "required": [
          "tool_call_id",
          "origin",
          "reason"
        ],
        "title": "PendingSignInResponse",
        "type": "object"
      },
      "PersonRef": {
        "description": "Somebody in a channel, said one way everywhere: a member of the pod, one\nof its contacts, or one of its agents. There is nobody else -- everybody\noutside the pod is a contact.",
        "properties": {
          "id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member's user id, the contact's id or the agent's id; absent for a member or an agent since removed.",
            "title": "Id"
          },
          "kind": {
            "$ref": "#/components/schemas/SenderKind"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What to call them, where known.",
            "title": "Name"
          }
        },
        "required": [
          "kind"
        ],
        "title": "PersonRef",
        "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"
      },
      "PodAccountCreateRequest": {
        "properties": {
          "account_id": {
            "description": "One of your own accounts in this organization.",
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "share_with": {
            "description": "RESTRICTED only: the members or roles who may use it.",
            "items": {
              "$ref": "#/components/schemas/GranteeRef"
            },
            "maxItems": 100,
            "title": "Share With",
            "type": "array"
          },
          "visibility": {
            "$ref": "#/components/schemas/PodAccountVisibility",
            "default": "PERSONAL"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "PodAccountCreateRequest",
        "type": "object"
      },
      "PodAccountListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodAccountResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "PodAccountListResponse",
        "type": "object"
      },
      "PodAccountResponse": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "allow_sandbox_use": {
            "default": false,
            "title": "Allow Sandbox Use",
            "type": "boolean"
          },
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "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_member_default": {
            "title": "Is Member Default",
            "type": "boolean"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Something the change did not do at once, for the owner to read: after turning `allow_sandbox_use` off, that sandboxes already given the token keep a copy until it is swept.",
            "title": "Notice"
          },
          "owner_user_id": {
            "format": "uuid",
            "title": "Owner User Id",
            "type": "string"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/PodAccountSource"
          },
          "used_by": {
            "description": "Slugs of the SHARED pod connectors that run as this account.",
            "items": {
              "type": "string"
            },
            "title": "Used By",
            "type": "array"
          },
          "visibility": {
            "$ref": "#/components/schemas/PodAccountVisibility"
          }
        },
        "required": [
          "id",
          "pod_id",
          "account_id",
          "auth_config_id",
          "owner_user_id",
          "visibility",
          "is_member_default",
          "source",
          "created_at"
        ],
        "title": "PodAccountResponse",
        "type": "object"
      },
      "PodAccountShareAsRequest": {
        "description": "Share one of your pod accounts with the pod as a SHARED connector.",
        "properties": {
          "purpose": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purpose"
          },
          "slug": {
            "description": "The SHARED connector to run as it: an existing one on the same installation is pointed at it, otherwise one is declared.",
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "slug"
        ],
        "title": "PodAccountShareAsRequest",
        "type": "object"
      },
      "PodAccountSource": {
        "enum": [
          "AUTO",
          "MANUAL",
          "IMPORT",
          "MIGRATED"
        ],
        "title": "PodAccountSource",
        "type": "string"
      },
      "PodAccountUpdateRequest": {
        "additionalProperties": false,
        "properties": {
          "allow_sandbox_use": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner only: allow this account's credential inside sandboxes, so a SHARED connector on it (the pod's `github`) can give other members' workspaces its raw token for git and gh, which they can copy. Off by default; withdrawing the account turns it off.",
            "title": "Allow Sandbox Use"
          },
          "is_member_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner only: make this the account your own calls use here.",
            "title": "Is Member Default"
          },
          "share_with": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/GranteeRef"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "RESTRICTED only: replaces who may use it.",
            "title": "Share With"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodAccountVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner only. PERSONAL withdraws it: SHARED connectors using it need another account at once."
          }
        },
        "title": "PodAccountUpdateRequest",
        "type": "object"
      },
      "PodAccountVisibility": {
        "enum": [
          "PERSONAL",
          "POD",
          "RESTRICTED"
        ],
        "title": "PodAccountVisibility",
        "type": "string"
      },
      "PodConfig": {
        "description": "Typed pod-level configuration.",
        "properties": {
          "contacts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodContactSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "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"
          },
          "triggers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodTriggerSettings"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "PodConfig",
        "type": "object"
      },
      "PodConnectorCoverage": {
        "description": "How many of the members who may use a connector can run it as their own.",
        "properties": {
          "connected": {
            "description": "Of those, how many have a working account.",
            "title": "Connected",
            "type": "integer"
          },
          "eligible": {
            "description": "Members of the pod who may use this connector.",
            "title": "Eligible",
            "type": "integer"
          },
          "truncated": {
            "default": false,
            "description": "The pod has more members than were counted.",
            "title": "Truncated",
            "type": "boolean"
          },
          "waiting_on": {
            "description": "The rest: missing an account, or theirs needs reconnecting.",
            "items": {
              "$ref": "#/components/schemas/MemberAwaited"
            },
            "title": "Waiting On",
            "type": "array"
          }
        },
        "required": [
          "eligible",
          "connected"
        ],
        "title": "PodConnectorCoverage",
        "type": "object"
      },
      "PodConnectorCreateRequest": {
        "properties": {
          "auth_config_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The organization installation this connector uses. Give this or `connector_id`.",
            "title": "Auth Config Id"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A catalog connector (`gmail`) instead of an installation: its organization default, or -- when the organization has none and you may install connectors -- Lemma's own app for it, installed now.",
            "title": "Connector Id"
          },
          "mode": {
            "$ref": "#/components/schemas/PodConnectorMode",
            "default": "PER_MEMBER",
            "description": "PER_MEMBER (the default): each call uses the acting member's own account. SHARED: every call uses the one account set as `shared_pod_account_id`."
          },
          "purpose": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Shown to members when they are asked to connect.",
            "title": "Purpose"
          },
          "required": {
            "default": false,
            "description": "PER_MEMBER: ask every member who has no account to connect one.",
            "title": "Required",
            "type": "boolean"
          },
          "shared_pod_account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "SHARED only: a pod account its owner has already shared with the pod.",
            "title": "Shared Pod Account Id"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pod-local name apps, agents and bundles address it by, e.g. `gmail` or `support-inbox`. Left out: the installation's name, made free in this pod.",
            "title": "Slug"
          },
          "visibility": {
            "$ref": "#/components/schemas/PodConnectorVisibility",
            "default": "POD"
          }
        },
        "title": "PodConnectorCreateRequest",
        "type": "object"
      },
      "PodConnectorListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodConnectorResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "PodConnectorListResponse",
        "type": "object"
      },
      "PodConnectorMode": {
        "enum": [
          "PER_MEMBER",
          "SHARED"
        ],
        "title": "PodConnectorMode",
        "type": "string"
      },
      "PodConnectorResponse": {
        "properties": {
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "can_use": {
            "default": false,
            "description": "Whether the caller may run operations through it: what decides if connecting their own account would let them use it. False for a viewer, and for anyone a RESTRICTED connector leaves out.",
            "title": "Can Use",
            "type": "boolean"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "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"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "installation_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Installation Name"
          },
          "member_coverage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodConnectorCoverage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not filled in on listings, which stay cheap: read it from `GET /pods/{pod_id}/connectors/{slug}/coverage`. Kept so a client reading it gets null rather than a missing key."
          },
          "mode": {
            "$ref": "#/components/schemas/PodConnectorMode"
          },
          "pod_id": {
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purpose"
          },
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "shared_account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SharedAccountSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "shared_pod_account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shared Pod Account Id"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/PodConnectorSource",
            "default": "MANUAL"
          },
          "status": {
            "$ref": "#/components/schemas/PodConnectorStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/PodConnectorVisibility"
          }
        },
        "required": [
          "id",
          "pod_id",
          "slug",
          "auth_config_id",
          "mode",
          "required",
          "visibility",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "PodConnectorResponse",
        "type": "object"
      },
      "PodConnectorSource": {
        "enum": [
          "AUTO",
          "MANUAL",
          "IMPORT",
          "MIGRATED"
        ],
        "title": "PodConnectorSource",
        "type": "string"
      },
      "PodConnectorStatus": {
        "enum": [
          "READY",
          "NEEDS_ACCOUNT",
          "UNAVAILABLE"
        ],
        "title": "PodConnectorStatus",
        "type": "string"
      },
      "PodConnectorUpdateRequest": {
        "additionalProperties": false,
        "description": "Fields left out are unchanged; `shared_pod_account_id: null` clears it.\nIts slug and installation are fixed: a different one is a different\nconnector, which apps, agents and bundles already address.",
        "properties": {
          "mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodConnectorMode"
              },
              {
                "type": "null"
              }
            ]
          },
          "purpose": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purpose"
          },
          "required": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required"
          },
          "shared_pod_account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shared Pod Account Id"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PodConnectorVisibility"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "PodConnectorUpdateRequest",
        "type": "object"
      },
      "PodConnectorVisibility": {
        "enum": [
          "POD",
          "RESTRICTED"
        ],
        "title": "PodConnectorVisibility",
        "type": "string"
      },
      "PodContactSettings": {
        "description": "How the pod treats the people outside it who write to it.",
        "properties": {
          "auto_acknowledge": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Said once to a contact who writes while their channel's agents are off -- for example \"Thanks, someone from {pod} will reply\" -- until a member writes to them or their channel is closed. ``{pod}`` is the pod's name. Omitted means nothing is said.",
            "title": "Auto Acknowledge"
          }
        },
        "title": "PodContactSettings",
        "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"
      },
      "PodLinkListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PodLinkResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "PodLinkListResponse",
        "type": "object"
      },
      "PodLinkResponse": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pod_id": {
            "description": "The other pod.",
            "format": "uuid",
            "title": "Pod Id",
            "type": "string"
          },
          "shared": {
            "items": {
              "$ref": "#/components/schemas/SharedResourceBody"
            },
            "title": "Shared",
            "type": "array"
          },
          "steward_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steward Name"
          },
          "steward_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who connected it, and looks after it.",
            "title": "Steward User Id"
          }
        },
        "required": [
          "pod_id",
          "name",
          "shared"
        ],
        "title": "PodLinkResponse",
        "type": "object"
      },
      "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"
      },
      "PodTriggerSettings": {
        "description": "Pod-wide defaults for the pod's DATASTORE triggers.",
        "properties": {
          "bulk_writes_default": {
            "anyOf": [
              {
                "enum": [
                  "skip",
                  "each",
                  "batch"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What a bulk write does to this pod's triggers that do not say: skip (recorded as skipped), each (fire per matching row) or batch (one fire with the rows). Omitted means skip.",
            "title": "Bulk Writes Default"
          }
        },
        "title": "PodTriggerSettings",
        "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"
      },
      "PublicAudience": {
        "description": "Who outside the pod may add rows.",
        "enum": [
          "contacts",
          "anyone"
        ],
        "title": "PublicAudience",
        "type": "string"
      },
      "PublicColumnItem": {
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "title": "PublicColumnItem",
        "type": "object"
      },
      "PublicColumnResponse": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "input": {
            "description": "The form control to ask with.",
            "title": "Input",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "title": "Options",
            "type": "array"
          },
          "required": {
            "description": "The table needs it, so it must be open.",
            "title": "Required",
            "type": "boolean"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "required",
          "options",
          "description",
          "input"
        ],
        "title": "PublicColumnResponse",
        "type": "object"
      },
      "PublicFileResponse": {
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Absent for a file in somebody's personal files.",
            "title": "Path"
          }
        },
        "required": [
          "name"
        ],
        "title": "PublicFileResponse",
        "type": "object"
      },
      "PublicRowsResponse": {
        "properties": {
          "columns": {
            "items": {
              "$ref": "#/components/schemas/PublicColumnItem"
            },
            "title": "Columns",
            "type": "array"
          },
          "rows": {
            "description": "Every row, at most 500. Dates and times are ISO 8601; a JSON column is its own lists and objects.",
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          },
          "table": {
            "title": "Table",
            "type": "string"
          },
          "truncated": {
            "description": "More than 500 rows matched, so these are the first of them.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "table",
          "columns",
          "rows",
          "truncated"
        ],
        "title": "PublicRowsResponse",
        "type": "object"
      },
      "PublishMode": {
        "enum": [
          "CREATE",
          "UPDATE"
        ],
        "title": "PublishMode",
        "type": "string"
      },
      "PublishStartRequest": {
        "additionalProperties": false,
        "description": "Body for publishing a pod to GitHub.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "description": "Deprecated and ignored: the publish runs as the account the pod's `github` connector resolves to for you.",
            "title": "Account Id"
          },
          "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": "Both modes require the repository to exist -- publishing does not create one. CREATE refuses a repository Lemma has already published to (one carrying a publish manifest), so it is what you use for a repository you just made. UPDATE requires that manifest and replaces only Lemma-managed files."
          },
          "private": {
            "default": false,
            "description": "Recorded on the job and reported back, but not acted on: the repository already exists, so its visibility is whatever it was created with.",
            "title": "Private",
            "type": "boolean"
          },
          "repo_name": {
            "description": "GitHub repository to publish into, as `name` or `owner/name`. It must already exist and be covered by the Lemma app's installation -- publishing does not create repositories, because a GitHub App cannot.",
            "maxLength": 100,
            "minLength": 1,
            "title": "Repo Name",
            "type": "string"
          }
        },
        "required": [
          "repo_name"
        ],
        "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"
              }
            ],
            "deprecated": true,
            "title": "Account Id"
          },
          "connect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to connect the GitHub account the pod's `github` connector needs, when the publish failed for want of one.",
            "title": "Connect Url"
          },
          "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",
          "events_url"
        ],
        "title": "PublishStatusResponse",
        "type": "object"
      },
      "QuestionKind": {
        "enum": [
          "ASK",
          "APPROVAL",
          "FORM"
        ],
        "title": "QuestionKind",
        "type": "string"
      },
      "QuestionResponse": {
        "properties": {
          "answer": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answer"
          },
          "answered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "answered_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "awaits": {
            "$ref": "#/components/schemas/PersonRef",
            "description": "The one person who may answer it."
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "kind": {
            "$ref": "#/components/schemas/QuestionKind"
          },
          "question": {
            "additionalProperties": true,
            "description": "What is asked, in the asker's shape: a `prompt`, and `choices` or a form `schema` where it offers them.",
            "title": "Question",
            "type": "object"
          },
          "state": {
            "$ref": "#/components/schemas/QuestionState"
          }
        },
        "required": [
          "kind",
          "state",
          "question",
          "awaits"
        ],
        "title": "QuestionResponse",
        "type": "object"
      },
      "QuestionState": {
        "enum": [
          "OPEN",
          "ANSWERING",
          "ANSWERED",
          "CANCELLED",
          "EXPIRED"
        ],
        "title": "QuestionState",
        "type": "string"
      },
      "ReadRequest": {
        "properties": {
          "seq": {
            "description": "The newest line the reader has seen.",
            "maximum": 9223372036854776000,
            "minimum": 0,
            "title": "Seq",
            "type": "integer"
          },
          "thread_root_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Read in this thread: its replies (and its first line) up to `seq` are seen. Without it, the timeline is: thread replies are not.",
            "title": "Thread Root Id"
          }
        },
        "required": [
          "seq"
        ],
        "title": "ReadRequest",
        "type": "object"
      },
      "ReadResponse": {
        "properties": {
          "read_seq": {
            "title": "Read Seq",
            "type": "integer"
          }
        },
        "required": [
          "read_seq"
        ],
        "title": "ReadResponse",
        "type": "object"
      },
      "ReasoningEffort": {
        "description": "How long a reasoning model thinks before it answers.\n\nThe values are the OpenAI Chat Completions ``reasoning_effort`` vocabulary,\nwhich is the wire format OPENAI_COMPATIBLE speaks. Which values a given\nmodel accepts is the model's business; ``none`` and ``minimal`` in\nparticular are not universal.",
        "enum": [
          "none",
          "minimal",
          "low",
          "medium",
          "high"
        ],
        "title": "ReasoningEffort",
        "type": "string"
      },
      "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",
          "web_login",
          "connector_auth_config"
        ],
        "title": "ResourceType",
        "type": "string"
      },
      "ResourceVisibility": {
        "enum": [
          "PERSONAL",
          "POD",
          "RESTRICTED",
          "PUBLIC"
        ],
        "title": "ResourceVisibility",
        "type": "string"
      },
      "RowRequest": {
        "properties": {
          "table": {
            "maxLength": 255,
            "title": "Table",
            "type": "string"
          },
          "values": {
            "additionalProperties": true,
            "title": "Values",
            "type": "object"
          }
        },
        "required": [
          "table"
        ],
        "title": "RowRequest",
        "type": "object"
      },
      "RuntimeModelCapability": {
        "enum": [
          "TEXT",
          "TOOLS",
          "VISION",
          "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"
      },
      "RuntimeProfileAvailability": {
        "description": "Whether a profile can take work right now.\n\nDerived from the harness and its host at read time, never persisted: the\nsame profile is READY or OFFLINE depending only on whether someone's laptop\nis awake. Model-provider profiles have no availability - they are reachable\nwhenever their endpoint is.",
        "enum": [
          "READY",
          "OFFLINE",
          "NOT_INSTALLED",
          "UNAVAILABLE"
        ],
        "title": "RuntimeProfileAvailability",
        "type": "string"
      },
      "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",
          "AGENT_HOST"
        ],
        "title": "RuntimeProfileProtocol",
        "type": "string"
      },
      "RuntimeProfileScope": {
        "enum": [
          "SYSTEM",
          "ORGANIZATION",
          "PERSONAL"
        ],
        "title": "RuntimeProfileScope",
        "type": "string"
      },
      "RuntimeProfileStatus": {
        "enum": [
          "ACTIVE",
          "DISABLED"
        ],
        "title": "RuntimeProfileStatus",
        "type": "string"
      },
      "ScheduleDetailResponse": {
        "description": "Schedule detail response.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "description": "Deprecated and always null; see `pod_connector`.",
            "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"
          },
          "include_outside_rows": {
            "default": false,
            "title": "Include Outside Rows",
            "type": "boolean"
          },
          "instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "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"
          },
          "listening": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListeningResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a schedule on an MCP server's event: whether it is still hearing from the server. Absent for every other schedule."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "next_fire_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "TIME schedules: the next instant it fires, in UTC. Absent while paused, after a one-time schedule has fired, and for other types.",
            "title": "Next Fire At"
          },
          "next_fire_at_local": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`next_fire_at` read in the schedule's `config.timezone` (UTC when it sets none), as an ISO 8601 time with its offset.",
            "title": "Next Fire At Local"
          },
          "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"
          },
          "paused_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the platform paused this schedule: `fire_cap` (it fired more than its daily ceiling), `consecutive_failures`, `fire_failed` (a scheduled run could not be started), or another system reason. Absent while it runs, or when a person paused it. Reactivating clears it.",
            "title": "Paused Reason"
          },
          "pod_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pod connector it listens through, by slug.",
            "title": "Pod Connector"
          },
          "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",
          "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",
          "FILTERING",
          "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"
      },
      "Scope": {
        "description": "What a grant lets a client do in its pod.\n\nThe tools split cleanly in two: those that only read and those that write.\nA finer set would ask a person to reason about tools they have never seen,\non a consent screen they will read once.\n\nEvents are the third, and not a kind of reading. A read happens while the\nperson uses the app; a subscription sends rows to a server the app chose,\nas they are added, for as long as it keeps refreshing -- including while\nthe person is away. So it is asked for by name and agreed to separately,\nand a connection made before it existed does not have it.",
        "enum": [
          "pod:read",
          "pod:write",
          "pod:events"
        ],
        "title": "Scope",
        "type": "string"
      },
      "SearchFreshness": {
        "enum": [
          "day",
          "week",
          "month",
          "year"
        ],
        "title": "SearchFreshness",
        "type": "string"
      },
      "SearchItem": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/ChannelRef"
          },
          "message": {
            "$ref": "#/components/schemas/ChannelMessageResponse"
          },
          "rank": {
            "description": "How closely the line matches the words.",
            "title": "Rank",
            "type": "number"
          },
          "snippet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The words around the match, as plain text.",
            "title": "Snippet"
          }
        },
        "required": [
          "channel",
          "message",
          "rank"
        ],
        "title": "SearchItem",
        "type": "object"
      },
      "SearchMethod": {
        "enum": [
          "VECTOR",
          "TEXT",
          "HYBRID"
        ],
        "title": "SearchMethod",
        "type": "string"
      },
      "SearchResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SearchItem"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "SearchResponse",
        "type": "object"
      },
      "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": {
          "client_message_id": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The sender's own id for this send, generated once per message the person sends and reused on every retry of it. A second send with an id already used in this conversation stores nothing and returns the first send's run, with deduplicated=true.",
            "title": "Client Message Id"
          },
          "content": {
            "maxLength": 60000,
            "minLength": 1,
            "title": "Content",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "required": [
          "content"
        ],
        "title": "SendMessageRequest",
        "type": "object"
      },
      "SenderKind": {
        "enum": [
          "MEMBER",
          "CONTACT",
          "AGENT"
        ],
        "title": "SenderKind",
        "type": "string"
      },
      "SessionRequest": {
        "properties": {
          "altcha": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The solved challenge, when starting an anonymous session.",
            "title": "Altcha"
          },
          "host_token": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A token the page's own server signed with the widget's secret.",
            "title": "Host Token"
          },
          "secret": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The secret a previous answer returned, to come back to that session.",
            "title": "Secret"
          }
        },
        "title": "SessionRequest",
        "type": "object"
      },
      "SessionResponse": {
        "properties": {
          "access_token": {
            "description": "Send as `Authorization: Bearer` on every other call. Never store it.",
            "title": "Access Token",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "expires_in": {
            "description": "Seconds until the access token expires.",
            "title": "Expires In",
            "type": "integer"
          },
          "is_contact": {
            "title": "Is Contact",
            "type": "boolean"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when new: keep it to come back. Null means keep the one you have.",
            "title": "Secret"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "access_token",
          "secret",
          "is_contact",
          "display_name",
          "expires_in"
        ],
        "title": "SessionResponse",
        "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"
      },
      "SetOrganizationDefaultRuntimeRequest": {
        "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": "SetOrganizationDefaultRuntimeRequest",
        "type": "object"
      },
      "SharedAccountSummary": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "owner_user_id": {
            "format": "uuid",
            "title": "Owner User Id",
            "type": "string"
          },
          "pod_account_id": {
            "format": "uuid",
            "title": "Pod Account Id",
            "type": "string"
          }
        },
        "required": [
          "pod_account_id",
          "owner_user_id"
        ],
        "title": "SharedAccountSummary",
        "type": "object"
      },
      "SharedResourceBody": {
        "properties": {
          "permission_ids": {
            "description": "Reading only: datastore.table.read and datastore.record.read for a table, folder.read for a folder.",
            "items": {
              "type": "string"
            },
            "title": "Permission Ids",
            "type": "array"
          },
          "resource_name": {
            "description": "The table's name, or the folder's path.",
            "title": "Resource Name",
            "type": "string"
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        },
        "required": [
          "resource_type",
          "resource_name",
          "permission_ids"
        ],
        "title": "SharedResourceBody",
        "type": "object"
      },
      "SignInOutcomeResponse": {
        "properties": {
          "origin": {
            "title": "Origin",
            "type": "string"
          },
          "signed_in": {
            "title": "Signed In",
            "type": "boolean"
          },
          "working": {
            "default": false,
            "description": "Whether the site stopped asking for a login straight afterwards. Reported, not enforced: the person has already done what was asked, and a site that shows a form at the same address under a neutral title reads as still asking.",
            "title": "Working",
            "type": "boolean"
          }
        },
        "required": [
          "origin",
          "signed_in"
        ],
        "title": "SignInOutcomeResponse",
        "type": "object"
      },
      "SignedUrlListResponse": {
        "properties": {
          "links": {
            "items": {
              "$ref": "#/components/schemas/SignedUrlSummary"
            },
            "title": "Links",
            "type": "array"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          }
        },
        "required": [
          "links"
        ],
        "title": "SignedUrlListResponse",
        "type": "object"
      },
      "SignedUrlRevokeResponse": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "revoked": {
            "title": "Revoked",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "revoked"
        ],
        "title": "SignedUrlRevokeResponse",
        "type": "object"
      },
      "SignedUrlSummary": {
        "description": "One live public link, as its pod sees it.\n\nDeliberately carries the ``code`` and not the full URL: this is the listing\na pod member reads to decide what to revoke, and the code is what revoking\ntakes. Anyone who needs the openable URL already has it.",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "exhausted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exhausted At"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "max_hits": {
            "title": "Max Hits",
            "type": "integer"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "path",
          "filename",
          "content_type",
          "size_bytes",
          "max_hits",
          "expires_at"
        ],
        "title": "SignedUrlSummary",
        "type": "object"
      },
      "SlackAppCreateRequest": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent the app answers as; the pod's own agent when omitted. The app is named after it.",
            "title": "Agent Id"
          },
          "team_id": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Team Id",
            "type": "string"
          }
        },
        "required": [
          "team_id"
        ],
        "title": "SlackAppCreateRequest",
        "type": "object"
      },
      "SlackAppCreateResponse": {
        "description": "The app Slack made, and the install to authorise it against.",
        "properties": {
          "app_id": {
            "title": "App Id",
            "type": "string"
          },
          "auth_config_id": {
            "format": "uuid",
            "title": "Auth Config Id",
            "type": "string"
          },
          "reused": {
            "default": false,
            "description": "An app made earlier for the same agent and workspace (or the same Idempotency-Key), not a new one.",
            "title": "Reused",
            "type": "boolean"
          }
        },
        "required": [
          "app_id",
          "auth_config_id"
        ],
        "title": "SlackAppCreateResponse",
        "type": "object"
      },
      "SlackAppWorkspaceListResponse": {
        "properties": {
          "can_manage": {
            "description": "Whether the caller may save tokens and create apps: an owner or editor of the organization. Others are shown no workspace.",
            "title": "Can Manage",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SlackAppWorkspaceResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "can_manage",
          "items"
        ],
        "title": "SlackAppWorkspaceListResponse",
        "type": "object"
      },
      "SlackAppWorkspaceResponse": {
        "description": "A Slack workspace Lemma can create apps in. Carries no token.",
        "properties": {
          "needs_new_token": {
            "default": false,
            "description": "Slack no longer accepts the saved token, or Lemma can no longer read it: paste a new one before Lemma can create apps here.",
            "title": "Needs New Token",
            "type": "boolean"
          },
          "saved_at": {
            "format": "date-time",
            "title": "Saved At",
            "type": "string"
          },
          "slack_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Slack user whose configuration token this is. Slack creates every app as them, and the token can change every app they collaborate on.",
            "title": "Slack User Id"
          },
          "team_id": {
            "title": "Team Id",
            "type": "string"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          }
        },
        "required": [
          "team_id",
          "saved_at"
        ],
        "title": "SlackAppWorkspaceResponse",
        "type": "object"
      },
      "SlackConfigurationTokenRequest": {
        "properties": {
          "refresh_token": {
            "description": "The refresh token of an app configuration token, from api.slack.com/apps. Lemma rotates it at once, which proves it works and names the workspace it is for.",
            "format": "password",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Refresh Token",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "refresh_token"
        ],
        "title": "SlackConfigurationTokenRequest",
        "type": "object"
      },
      "SlackInstallAvailabilityResponse": {
        "description": "Whether \"Add to Slack\" can work on this server, asked before anything\nis made for it.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          }
        },
        "required": [
          "available"
        ],
        "title": "SlackInstallAvailabilityResponse",
        "type": "object"
      },
      "SlackInstallRequest": {
        "description": "Which organization Lemma's app joins the workspace for.",
        "properties": {
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          }
        },
        "required": [
          "organization_id"
        ],
        "title": "SlackInstallRequest",
        "type": "object"
      },
      "SlackInstallResponse": {
        "description": "Slack's consent page for Lemma's own app, to send the browser to.",
        "properties": {
          "authorization_url": {
            "title": "Authorization Url",
            "type": "string"
          }
        },
        "required": [
          "authorization_url"
        ],
        "title": "SlackInstallResponse",
        "type": "object"
      },
      "SlackManagedWorkspaceListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SlackManagedWorkspaceResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "SlackManagedWorkspaceListResponse",
        "type": "object"
      },
      "SlackManagedWorkspaceResponse": {
        "description": "A Slack workspace Lemma's own app manages for this organization.",
        "properties": {
          "team_id": {
            "title": "Team Id",
            "type": "string"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          }
        },
        "required": [
          "team_id"
        ],
        "title": "SlackManagedWorkspaceResponse",
        "type": "object"
      },
      "SlackManagerBindRequest": {
        "properties": {
          "account_id": {
            "description": "The account made by authorising Lemma's own Slack app.",
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "SlackManagerBindRequest",
        "type": "object"
      },
      "SlackSignInRequest": {
        "description": "Whom the App Home link was for.",
        "properties": {
          "slack_user_id": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Slack User Id",
            "type": "string"
          },
          "team_id": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Team Id",
            "type": "string"
          }
        },
        "required": [
          "team_id",
          "slack_user_id"
        ],
        "title": "SlackSignInRequest",
        "type": "object"
      },
      "SlackSignInResponse": {
        "description": "Where to send the browser: Slack's own sign-in page.",
        "properties": {
          "authorization_url": {
            "title": "Authorization Url",
            "type": "string"
          }
        },
        "required": [
          "authorization_url"
        ],
        "title": "SlackSignInResponse",
        "type": "object"
      },
      "SourceKind": {
        "enum": [
          "PERSON",
          "CHAT"
        ],
        "title": "SourceKind",
        "type": "string"
      },
      "SourceSettingsDetailResponse": {
        "properties": {
          "answers_outsiders": {
            "description": "This group's own switch for people outside the pod.",
            "title": "Answers Outsiders",
            "type": "boolean"
          },
          "bot_answers_outsiders": {
            "default": true,
            "description": "The bot's own switch, over every group it is in. Off, nobody outside the pod is answered in any of them.",
            "title": "Bot Answers Outsiders",
            "type": "boolean"
          },
          "can_manage": {
            "default": false,
            "description": "The reader may switch outsiders here or take it over: they answer for it, nobody in the pod does, or they are an admin of the pod.",
            "title": "Can Manage",
            "type": "boolean"
          },
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "id": {
            "description": "The source's id, as the channel lists it.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "invite_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invite Link"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who answers for its outsiders."
          },
          "pending": {
            "default": false,
            "description": "Asked of the platform and not yet confirmed (WhatsApp).",
            "title": "Pending",
            "type": "boolean"
          },
          "platform": {
            "title": "Platform",
            "type": "string"
          },
          "public": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GroupPublicResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "What people outside the pod can be answered from."
          },
          "shared_externally": {
            "default": false,
            "description": "A Slack channel shared with another company.",
            "title": "Shared Externally",
            "type": "boolean"
          },
          "surface_name": {
            "title": "Surface Name",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "welcomes_outsiders": {
            "description": "People outside the pod are answered here today: the group's switch is on, a member of the pod answers for them, and the bot's own switch is on.",
            "title": "Welcomes Outsiders",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "channel_id",
          "surface_name",
          "platform",
          "answers_outsiders",
          "welcomes_outsiders",
          "updated_at"
        ],
        "title": "SourceSettingsDetailResponse",
        "type": "object"
      },
      "SourceSettingsResponse": {
        "properties": {
          "answers_outsiders": {
            "description": "This group's own switch for people outside the pod.",
            "title": "Answers Outsiders",
            "type": "boolean"
          },
          "bot_answers_outsiders": {
            "default": true,
            "description": "The bot's own switch, over every group it is in. Off, nobody outside the pod is answered in any of them.",
            "title": "Bot Answers Outsiders",
            "type": "boolean"
          },
          "can_manage": {
            "default": false,
            "description": "The reader may switch outsiders here or take it over: they answer for it, nobody in the pod does, or they are an admin of the pod.",
            "title": "Can Manage",
            "type": "boolean"
          },
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "id": {
            "description": "The source's id, as the channel lists it.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "invite_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invite Link"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who answers for its outsiders."
          },
          "pending": {
            "default": false,
            "description": "Asked of the platform and not yet confirmed (WhatsApp).",
            "title": "Pending",
            "type": "boolean"
          },
          "platform": {
            "title": "Platform",
            "type": "string"
          },
          "shared_externally": {
            "default": false,
            "description": "A Slack channel shared with another company.",
            "title": "Shared Externally",
            "type": "boolean"
          },
          "surface_name": {
            "title": "Surface Name",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "welcomes_outsiders": {
            "description": "People outside the pod are answered here today: the group's switch is on, a member of the pod answers for them, and the bot's own switch is on.",
            "title": "Welcomes Outsiders",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "channel_id",
          "surface_name",
          "platform",
          "answers_outsiders",
          "welcomes_outsiders",
          "updated_at"
        ],
        "title": "SourceSettingsResponse",
        "type": "object"
      },
      "SourceSummary": {
        "properties": {
          "platform": {
            "title": "Platform",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "platform"
        ],
        "title": "SourceSummary",
        "type": "object"
      },
      "SourceUpdateRequest": {
        "description": "Absent is unchanged; neither field can be cleared.",
        "properties": {
          "answers_outsiders": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Answer people outside the pod here, or stop.",
            "title": "Answers Outsiders"
          },
          "owner": {
            "anyOf": [
              {
                "const": "me",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`me`: answer for its outsiders yourself from now on.",
            "title": "Owner"
          }
        },
        "title": "SourceUpdateRequest",
        "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"
          },
          "contacts": {
            "$ref": "#/components/schemas/SurfaceContactsConfig"
          },
          "dm_conversation_reset_after_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true,
            "description": "Ignored. A private chat is one conversation per agent and person, however long it goes quiet. Still accepted so existing pod bundles and clients keep working.",
            "title": "Dm Conversation Reset After Hours"
          },
          "groups": {
            "$ref": "#/components/schemas/SurfaceGroupsConfig"
          },
          "identity": {
            "$ref": "#/components/schemas/SurfaceIdentityConfigInput"
          },
          "send_policy": {
            "$ref": "#/components/schemas/SurfaceSendPolicyConfig"
          },
          "slack": {
            "$ref": "#/components/schemas/SurfaceSlackConfigInput"
          },
          "telegram": {
            "$ref": "#/components/schemas/SurfaceTelegramConfigInput"
          },
          "whatsapp": {
            "$ref": "#/components/schemas/SurfaceWhatsAppConfigInput"
          }
        },
        "title": "SurfaceBehaviorConfigInput",
        "type": "object"
      },
      "SurfaceChannelRouteInput": {
        "additionalProperties": false,
        "description": "One channel this surface's agent may be spoken to in.\n\nAn allow-list entry. A surface belongs to exactly one agent, so a channel\nsays *where*, never *who* — it used to name an agent, back when one bot\ncould serve several.",
        "properties": {
          "channel_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Id"
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          }
        },
        "title": "SurfaceChannelRouteInput",
        "type": "object"
      },
      "SurfaceChannelRouteResponse": {
        "properties": {
          "channel_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Id"
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          }
        },
        "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"
          },
          "contacts": {
            "$ref": "#/components/schemas/SurfaceContactsConfig"
          },
          "groups": {
            "$ref": "#/components/schemas/SurfaceGroupsConfig"
          },
          "identity": {
            "$ref": "#/components/schemas/SurfaceIdentityConfigResponse"
          },
          "send_policy": {
            "$ref": "#/components/schemas/SurfaceSendPolicyConfig"
          },
          "slack": {
            "$ref": "#/components/schemas/SurfaceSlackConfigResponse"
          },
          "telegram": {
            "$ref": "#/components/schemas/SurfaceTelegramConfigInput"
          },
          "whatsapp": {
            "$ref": "#/components/schemas/SurfaceWhatsAppConfigInput"
          }
        },
        "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's pod connector runs as, and whose it is.\n\nAccounts are personal (``accounts.user_id``) while surfaces belong to the\npod, so an 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": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "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"
          },
          "pod_connector": {
            "title": "Pod Connector",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SurfaceConnectionStatus",
            "default": "CONNECTED"
          }
        },
        "required": [
          "pod_connector",
          "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 whose pod\nconnector runs as no account right now: removed, or its account withdrawn\nby its owner or gone. 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"
      },
      "SurfaceContactsConfig": {
        "additionalProperties": false,
        "description": "Whom the bot answers in private chats beyond the pod's members. Mirrored.",
        "properties": {
          "answer": {
            "$ref": "#/components/schemas/ContactAnswer",
            "default": "off",
            "description": "`off`: members only. `known`: members and the pod's existing contacts. `anyone`: a stranger becomes a contact with their first message. Only a bot that is the pod's own (its own token, number or email address) answers contacts."
          },
          "looked_after_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member contacts' conversations belong to. Defaults to whoever turns contacts on; must be a member of the pod.",
            "title": "Looked After By"
          }
        },
        "title": "SurfaceContactsConfig",
        "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`` — one bot per\nagent is the model, not the exception; ``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"
              }
            ],
            "deprecated": true,
            "description": "Deprecated: name `pod_connector` instead. Still accepted, as the pod connector that serves this account to you.",
            "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"
          },
          "pod_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Slug of the SHARED pod connector this surface runs as: an account its owner shared with the pod. Omit to run on Lemma's own credentials where the platform has them.",
            "title": "Pod Connector"
          }
        },
        "required": [
          "platform"
        ],
        "title": "SurfaceCreateRequest",
        "type": "object"
      },
      "SurfaceCredentialMode": {
        "enum": [
          "SYSTEM",
          "CUSTOM"
        ],
        "title": "SurfaceCredentialMode",
        "type": "string"
      },
      "SurfaceGroupsConfig": {
        "additionalProperties": false,
        "description": "How the bot treats people outside the pod in its groups. Mirrored.",
        "properties": {
          "answers_outsiders": {
            "default": true,
            "description": "Answer people outside the pod in this bot's groups, from what the pod made Public. Off, the bot answers only the pod's members, whatever a group's own switch says.",
            "title": "Answers Outsiders",
            "type": "boolean"
          }
        },
        "title": "SurfaceGroupsConfig",
        "type": "object"
      },
      "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": {
        "description": "The platforms a pod can be reached on.\n\nEmail is Resend, and only Resend. Gmail and Outlook were here as\nComposio-backed mailboxes, which made \"an email surface\" mean three\ndifferent transports with three attachment strategies between them -- bytes,\nGraph drafts, and a signed URL the provider downloads server-side. Reaching\na Gmail *account* is still something an agent does, through the connector;\nit is just not a surface.",
        "enum": [
          "SLACK",
          "TEAMS",
          "WHATSAPP",
          "TELEGRAM",
          "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.",
        "properties": {
          "app_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Name"
          }
        },
        "title": "SurfaceSlackConfigInput",
        "type": "object"
      },
      "SurfaceSlackConfigResponse": {
        "description": "Slack settings as read back.",
        "properties": {
          "app_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Name"
          }
        },
        "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"
      },
      "SurfaceUnavailableReason": {
        "description": "Why a platform cannot be connected on this server right now.\n\nPublished so a setup screen can say what to do instead of offering a\nConnect button whose only outcome is a refusal. Each value names the thing\nthat is missing, not the setting that supplies it: the setting is the\noperator's word, and on Desktop the person reading is the operator but\nconfigures it through a form, not an environment variable.",
        "enum": [
          "NEEDS_PUBLIC_LINK",
          "NEEDS_EMAIL_DOMAIN"
        ],
        "title": "SurfaceUnavailableReason",
        "type": "string"
      },
      "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"
              }
            ],
            "deprecated": true,
            "description": "Deprecated: name `pod_connector` instead. Still accepted, as the pod connector that serves this account to you.",
            "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"
          },
          "pod_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Slug of the SHARED pod connector to run this surface as instead: the repair when the account it runs as is withdrawn or expires. Omit to keep the one it has.",
            "title": "Pod Connector"
          }
        },
        "title": "SurfaceUpdateRequest",
        "type": "object"
      },
      "SurfaceWhatsAppConfigInput": {
        "additionalProperties": false,
        "description": "WhatsApp settings. Mirrored across request and response.",
        "properties": {
          "language": {
            "default": "en_US",
            "description": "The template's language code.",
            "title": "Language",
            "type": "string"
          },
          "reengage_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An approved message template on this number's business account. Sent to a member whose 24-hour window has closed, holding the message itself until they reply. Unset, such a message is refused.",
            "title": "Reengage Template"
          }
        },
        "title": "SurfaceWhatsAppConfigInput",
        "type": "object"
      },
      "TableColumn": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "input": {
            "title": "Input",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "title": "Options",
            "type": "array"
          },
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "required",
          "options",
          "description",
          "input"
        ],
        "title": "TableColumn",
        "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"
          },
          "contact_columns": {
            "items": {
              "type": "string"
            },
            "title": "Contact Columns",
            "type": "array"
          },
          "contact_owned": {
            "default": false,
            "title": "Contact Owned",
            "type": "boolean"
          },
          "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"
      },
      "TableOpeningResponse": {
        "properties": {
          "audience": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicAudience"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who outside may add rows; null when the table is closed."
          },
          "columns": {
            "description": "The open columns, in order.",
            "items": {
              "type": "string"
            },
            "title": "Columns",
            "type": "array"
          },
          "contact_owned": {
            "description": "A confirmed contact's row names them in contact_id.",
            "title": "Contact Owned",
            "type": "boolean"
          },
          "offered": {
            "description": "The columns people outside could be asked to fill.",
            "items": {
              "$ref": "#/components/schemas/PublicColumnResponse"
            },
            "title": "Offered",
            "type": "array"
          },
          "per_user": {
            "description": "Each member sees only their own rows, so it can't be opened.",
            "title": "Per User",
            "type": "boolean"
          },
          "table": {
            "title": "Table",
            "type": "string"
          }
        },
        "required": [
          "table",
          "per_user",
          "contact_owned",
          "offered",
          "audience",
          "columns"
        ],
        "title": "TableOpeningResponse",
        "type": "object"
      },
      "TableResponse": {
        "properties": {
          "columns": {
            "items": {
              "$ref": "#/components/schemas/TableColumn"
            },
            "title": "Columns",
            "type": "array"
          },
          "contacts_only": {
            "title": "Contacts Only",
            "type": "boolean"
          },
          "table": {
            "title": "Table",
            "type": "string"
          }
        },
        "required": [
          "table",
          "contacts_only",
          "columns"
        ],
        "title": "TableResponse",
        "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"
          },
          "contact_columns": {
            "items": {
              "type": "string"
            },
            "title": "Contact Columns",
            "type": "array"
          },
          "contact_owned": {
            "default": false,
            "title": "Contact Owned",
            "type": "boolean"
          },
          "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"
      },
      "TelegramLinkRequest": {
        "properties": {
          "surface_name": {
            "minLength": 1,
            "title": "Surface Name",
            "type": "string"
          }
        },
        "required": [
          "surface_name"
        ],
        "title": "TelegramLinkRequest",
        "type": "object"
      },
      "TelegramLinkResponse": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "url": {
            "description": "Opens Telegram's own choose-a-group screen.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "title": "TelegramLinkResponse",
        "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": {
          "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"
          },
          "pod_connector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pod Connector"
          },
          "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"
      },
      "ThreadResponse": {
        "properties": {
          "has_more": {
            "description": "Whether there are more replies in the direction read: newer ones, or with `before_seq` or `newest`, older ones.",
            "title": "Has More",
            "type": "boolean"
          },
          "items": {
            "description": "Replies, oldest first.",
            "items": {
              "$ref": "#/components/schemas/ChannelMessageResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_after_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `after_seq` for the newer page.",
            "title": "Next After Seq"
          },
          "next_before_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reading backwards: pass as `before_seq` for the older page.",
            "title": "Next Before Seq"
          },
          "root": {
            "$ref": "#/components/schemas/ChannelMessageResponse"
          }
        },
        "required": [
          "root",
          "items",
          "has_more"
        ],
        "title": "ThreadResponse",
        "type": "object"
      },
      "TriggerSkipListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TriggerSkipResponse"
            },
            "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": "TriggerSkipListResponse",
        "type": "object"
      },
      "TriggerSkipReason": {
        "enum": [
          "bulk_write",
          "import_write",
          "fire_cap",
          "lag_exceeded",
          "condition_not_met",
          "outside_row"
        ],
        "title": "TriggerSkipReason",
        "type": "string"
      },
      "TriggerSkipResponse": {
        "description": "Changes or fires the trigger let pass without firing, aggregated.\n\nOne row stands for every change of one delivered page skipped for one\nreason: a bulk write of thousands of rows is a handful of rows here.",
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "count": {
            "description": "How many changes or fires this row stands for.",
            "title": "Count",
            "type": "integer"
          },
          "first": {
            "description": "Position of the first skipped change or fire.",
            "title": "First",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last": {
            "description": "Position of the last skipped change or fire.",
            "title": "Last",
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/TriggerSkipReason",
            "description": "`bulk_write` / `import_write`: the trigger's write mode for that intent is `skip`. `fire_cap`: the trigger reached its daily fire ceiling and paused. `lag_exceeded`: the trigger fell further behind its table than the change log waits for a subscriber (24 hours by default), and these changes were passed over."
          }
        },
        "required": [
          "id",
          "reason",
          "first",
          "last",
          "count",
          "at"
        ],
        "title": "TriggerSkipResponse",
        "type": "object"
      },
      "UnreadResponse": {
        "properties": {
          "lines": {
            "default": 0,
            "description": "New lines since the reader last read it, in channels they joined -- and, in one they are not in, while a line naming them is unread, from that line; stops at 100.",
            "title": "Lines",
            "type": "integer"
          },
          "mentions": {
            "default": 0,
            "description": "Unread lines naming the reader.",
            "title": "Mentions",
            "type": "integer"
          },
          "read_seq": {
            "default": 0,
            "description": "The last line the reader read.",
            "title": "Read Seq",
            "type": "integer"
          },
          "waiting": {
            "default": 0,
            "description": "Questions here waiting on the reader's answer.",
            "title": "Waiting",
            "type": "integer"
          }
        },
        "title": "UnreadResponse",
        "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": [
              {
                "maxLength": 60000,
                "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"
          },
          "reasoning_model_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Model Names"
          },
          "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"
          },
          "is_archived": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Archived"
          },
          "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"
          },
          "reasoning_model_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Model Names"
          },
          "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"
          },
          "expected_updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional optimistic-concurrency guard: the `updated_at` value the caller last read. The patch applies only while the row still carries it, and answers 409 when it does not — so two clients editing the same field cannot silently keep the later one. Omit it for last-writer-wins.",
            "title": "Expected Updated At"
          }
        },
        "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"
              }
            ],
            "description": "Replaces the whole config. Settings for the schedule's type: `cron`/`scheduled_at`/`timezone` for TIME, `source` for WEBHOOK, `table_name`/`operations`/`when` for DATASTORE. A TIME schedule's `cron` (5 fields) and a `scheduled_at` without an offset are read in `timezone`, an IANA name such as `Europe/Berlin`; **without `timezone` they are UTC**. The response's `next_fire_at` says when it will next fire. Any type may set `max_concurrent_runs`: at most that many of the schedule's runs in flight at once, from 1 to 1000; a fire that finds it full is skipped and recorded as skipped, not queued. DATASTORE may set `bulk_writes` and `import_writes` to `skip`, `each` or `batch`: what a bulk write or an import does to the trigger. Both default to `skip` (the changes are recorded as skipped, aggregated); the pod setting `triggers.bulk_writes_default` changes the default for `bulk_writes`.",
            "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"
          },
          "include_outside_rows": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "DATASTORE schedules only: also fire on rows people outside the pod added to an open table. Off by default. When it fires, the run is told the row's content came from outside and is untrusted.",
            "title": "Include Outside Rows"
          },
          "instruction": {
            "anyOf": [
              {
                "maxLength": 8000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "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"
          },
          "contact_columns": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Of a contact-owned table, the columns a contact may read of their own rows -- an explicit choice, so a column added later stays members-only until it is chosen too. Omit to leave them unchanged.",
            "title": "Contact Columns"
          },
          "contact_owned": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Make the table contact-owned, or stop it being. Enabling adds a `contact_id` column if there is none (rows without one are seen by members only) and requires `contact_columns`. Omit to leave it unchanged.",
            "title": "Contact Owned"
          },
          "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"
      },
      "UsageAllowanceResponse": {
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "reset_at": {
            "format": "date-time",
            "title": "Reset At",
            "type": "string"
          },
          "used_percent": {
            "title": "Used Percent",
            "type": "number"
          }
        },
        "required": [
          "key",
          "label",
          "used_percent",
          "allowed",
          "reset_at"
        ],
        "title": "UsageAllowanceResponse",
        "type": "object"
      },
      "UsageLimitScopeResponse": {
        "description": "One spend window, as a caller outside the deployment may see it.\n\n**The cap is expressed as a percentage, never as an amount.** This used to\ncarry `limit_usd` and `remaining_usd`, which state a dollar allowance —\nand a dollar allowance is a promise the product does not make. What a plan\nincludes is set per plan and may be retuned; what a given request costs\ndepends on the model it routes to. Publishing \"$12.40 remaining\" invites a\ncustomer to plan against a number that is neither fixed nor ours to\nguarantee, and turns any retune into a broken promise.\n\nWhat is published instead is how much of the window is gone. That is the\nfact a caller can act on — show a meter, warn at 80%, stop starting new\nwork — and it stays true however the underlying allowance is set.\n\n`used_usd` and `reserved_usd` remain, and deliberately: those are what the\ncustomer has actually spent, which is theirs to know. It is the *boundary*\nthat is percentage-only, not the consumption.\n\nThe internal `UsageLimitScope` keeps its dollar fields — enforcement is done\nin dollars, and `usage_service` reserves against them. This is the API\nboundary, and the boundary is where the promise is made.",
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "reserved_usd": {
            "description": "Spend held against this window for work in flight. A reservation is released if the work does not happen, and moves into `used_usd` when it settles, so this is not a second charge.",
            "title": "Reserved Usd",
            "type": "number"
          },
          "reset_at": {
            "format": "date-time",
            "title": "Reset At",
            "type": "string"
          },
          "scope": {
            "title": "Scope",
            "type": "string"
          },
          "used_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "How much of this window is consumed, as a percentage of its cap, counting `used_usd` and `reserved_usd` together — a meter that ignored reservations would read low exactly while a burst was landing. Null means the window is uncapped, which is a different statement from 0% used. May exceed 100: a reservation can settle above what it reserved, and a caller wanting a meter should clamp it itself rather than be handed a number that has already lost the overage.",
            "title": "Used Percent"
          },
          "used_usd": {
            "description": "Settled spend in this window: work that has finished and been charged. Does not include reservations still held for work in flight — those are `reserved_usd`.",
            "title": "Used Usd",
            "type": "number"
          },
          "window_start": {
            "format": "date-time",
            "title": "Window Start",
            "type": "string"
          }
        },
        "required": [
          "scope",
          "used_usd",
          "reserved_usd",
          "used_percent",
          "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"
          },
          "cache_write_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Tokens"
          },
          "cached_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cached Input Tokens"
          },
          "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"
          },
          "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"
          },
          "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"
              }
            ],
            "deprecated": true,
            "description": "Deprecated: accepted and ignored, and will be removed. A Telegram account is linked by sharing a contact with a Lemma bot, never by a handle typed onto a profile.",
            "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"
          },
          "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": {
          "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"
      },
      "VerifyRequest": {
        "properties": {
          "code": {
            "maxLength": 12,
            "title": "Code",
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email",
          "code"
        ],
        "title": "VerifyRequest",
        "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"
      },
      "Visibility": {
        "enum": [
          "PUBLIC",
          "PRIVATE"
        ],
        "title": "Visibility",
        "type": "string"
      },
      "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"
      },
      "WebLoginListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebLoginResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "sleeping": {
            "default": false,
            "description": "True when the computer is paused and was not woken to answer. Items are empty; its browser still holds whatever it held.",
            "title": "Sleeping",
            "type": "boolean"
          }
        },
        "required": [
          "items"
        ],
        "title": "WebLoginListResponse",
        "type": "object"
      },
      "WebLoginResponse": {
        "properties": {
          "cookie_count": {
            "description": "How many cookies this site has. A rough sense of scale.",
            "title": "Cookie Count",
            "type": "integer"
          },
          "expires": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the soonest of them lapses, which is the closest thing to 'when will I have to sign in again'. Null when they are all session cookies, which go when the browser does.",
            "title": "Expires"
          },
          "signed_in": {
            "default": false,
            "description": "True when somebody answered 'yes, I signed in' to a sign-in request for this site. The cookies cannot say this on their own: a real profile held two session cookies for a site that was signed in and six for one that merely had a video played on it, identical on every flag. False means only 'nobody said so' -- the browser may still have a usable session.",
            "title": "Signed In",
            "type": "boolean"
          },
          "site": {
            "description": "The site, as a person would name it. Cookies are grouped by registrable domain, so `lemma.work` and `api.lemma.work` are one login rather than two -- the second being the half nobody visited on purpose.",
            "title": "Site",
            "type": "string"
          }
        },
        "required": [
          "site",
          "cookie_count"
        ],
        "title": "WebLoginResponse",
        "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",
            "maximum": 20,
            "minimum": 1,
            "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 — or when it found nothing, which is not always the same as nothing existing.",
            "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"
      },
      "WebWidgetCreateRequest": {
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that answers. The pod's assistant if omitted.",
            "title": "Agent Name"
          },
          "allowed_origins": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "title": "Allowed Origins",
            "type": "array"
          },
          "answer": {
            "$ref": "#/components/schemas/WidgetAnswer",
            "default": "off",
            "description": "Whom it answers. Off until a member chooses."
          },
          "host_issuer": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The product whose users the widget's host tokens name, such as `acme-app`: give two widgets of one product the same issuer, and widgets of two products different ones, so their user 42s are two people. Letters, digits, dots, dashes and underscores. Fixed once the widget is made; `default` if omitted.",
            "title": "Host Issuer"
          },
          "looked_after_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Looked After By"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "WebWidgetCreateRequest",
        "type": "object"
      },
      "WebWidgetCreatedResponse": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "allowed_origins": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Origins",
            "type": "array"
          },
          "answer": {
            "$ref": "#/components/schemas/WidgetAnswer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "embed": {
            "description": "The script tag that puts the chat on a page.",
            "title": "Embed",
            "type": "string"
          },
          "host_issuer": {
            "description": "The product whose users this widget's host tokens name: a host contact is known as that product's user. Widgets of one product share it.",
            "title": "Host Issuer",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "looked_after_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Looked After By"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "page_url": {
            "description": "A page Lemma hosts with the chat on it, to share as a link.",
            "title": "Page Url",
            "type": "string"
          },
          "public_key": {
            "title": "Public Key",
            "type": "string"
          },
          "signing_secret": {
            "description": "Signs host tokens on the customer's server. Shown this once; keep it off web pages.",
            "title": "Signing Secret",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "agent_id",
          "public_key",
          "allowed_origins",
          "answer",
          "looked_after_by",
          "created_at",
          "host_issuer",
          "embed",
          "page_url",
          "signing_secret"
        ],
        "title": "WebWidgetCreatedResponse",
        "type": "object"
      },
      "WebWidgetListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebWidgetResponse"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "WebWidgetListResponse",
        "type": "object"
      },
      "WebWidgetResponse": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "allowed_origins": {
            "items": {
              "type": "string"
            },
            "title": "Allowed Origins",
            "type": "array"
          },
          "answer": {
            "$ref": "#/components/schemas/WidgetAnswer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "embed": {
            "description": "The script tag that puts the chat on a page.",
            "title": "Embed",
            "type": "string"
          },
          "host_issuer": {
            "description": "The product whose users this widget's host tokens name: a host contact is known as that product's user. Widgets of one product share it.",
            "title": "Host Issuer",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "looked_after_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Looked After By"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "page_url": {
            "description": "A page Lemma hosts with the chat on it, to share as a link.",
            "title": "Page Url",
            "type": "string"
          },
          "public_key": {
            "title": "Public Key",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "agent_id",
          "public_key",
          "allowed_origins",
          "answer",
          "looked_after_by",
          "created_at",
          "host_issuer",
          "embed",
          "page_url"
        ],
        "title": "WebWidgetResponse",
        "type": "object"
      },
      "WebWidgetSecretResponse": {
        "properties": {
          "signing_secret": {
            "title": "Signing Secret",
            "type": "string"
          }
        },
        "required": [
          "signing_secret"
        ],
        "title": "WebWidgetSecretResponse",
        "type": "object"
      },
      "WebWidgetUpdateRequest": {
        "properties": {
          "allowed_origins": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Origins"
          },
          "answer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WidgetAnswer"
              },
              {
                "type": "null"
              }
            ]
          },
          "looked_after_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Looked After By"
          }
        },
        "title": "WebWidgetUpdateRequest",
        "type": "object"
      },
      "WhatsAppGroupRequest": {
        "properties": {
          "answers_outsiders": {
            "default": true,
            "title": "Answers Outsiders",
            "type": "boolean"
          },
          "surface_name": {
            "minLength": 1,
            "title": "Surface Name",
            "type": "string"
          },
          "title": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "surface_name",
          "title"
        ],
        "title": "WhatsAppGroupRequest",
        "type": "object"
      },
      "WidgetAnswer": {
        "description": "Whom a widget answers. Mirrors a bot's ``contacts.answer``.",
        "enum": [
          "off",
          "known",
          "anyone"
        ],
        "title": "WidgetAnswer",
        "type": "string"
      },
      "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"
          },
          "max_concurrent_runs": {
            "anyOf": [
              {
                "maximum": 1000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many runs of this workflow may be in progress at once. A run started past the limit is not refused: it waits, with a `QUEUED` active wait, and starts when an earlier run finishes. Null means no limit.",
            "title": "Max Concurrent Runs"
          },
          "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"
          },
          "run_title": {
            "description": "What each run is about, as up to four JMESPath expressions over the run context, joined with ' · '. Example: `[\"collect.candidate_name\", \"collect.role\"]`. Evaluated whenever a run is read, so a part filled in by a later form appears once that form is answered; parts that resolve to nothing are skipped. Empty means runs carry no title.",
            "items": {
              "type": "string"
            },
            "title": "Run Title",
            "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"
          },
          "max_concurrent_runs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many runs of this workflow may be in progress at once. A run started past the limit is not refused: it waits, with a `QUEUED` active wait, and starts when an earlier run finishes. Null means no limit.",
            "title": "Max Concurrent Runs"
          },
          "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"
          },
          "run_title": {
            "description": "What each run is about, as up to four JMESPath expressions over the run context, joined with ' · '. Example: `[\"collect.candidate_name\", \"collect.role\"]`. Evaluated whenever a run is read, so a part filled in by a later form appears once that form is answered; parts that resolve to nothing are skipped. Empty means runs carry no title.",
            "items": {
              "type": "string"
            },
            "title": "Run Title",
            "type": "array"
          },
          "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"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What this run is about, from the workflow's `run_title`. Null when the workflow sets none or nothing it names is filled in yet.",
            "title": "Title"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "waiting_on": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowRunWaitingOn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The run's active wait, while it has one."
          },
          "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"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What this run is about, from the workflow's `run_title`. Null when the workflow sets none or nothing it names is filled in yet.",
            "title": "Title"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "waiting_on": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowRunWaitingOn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The run's active wait, while it has one."
          },
          "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",
          "DECISION",
          "QUEUED"
        ],
        "title": "WorkflowRunWaitType",
        "type": "string"
      },
      "WorkflowRunWaitingOn": {
        "description": "Where a suspended run is parked and on whom -- the active wait, cut\ndown to what a list needs. The full wait (form schema included) is on\n`workflow.run.get` as `active_wait`.",
        "properties": {
          "assigned_pod_member_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pod member a FORM wait is assigned to, when it is.",
            "title": "Assigned Pod Member Id"
          },
          "node_id": {
            "title": "Node Id",
            "type": "string"
          },
          "since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the run started waiting here.",
            "title": "Since"
          },
          "wait_type": {
            "$ref": "#/components/schemas/WorkflowRunWaitType"
          }
        },
        "required": [
          "node_id",
          "wait_type"
        ],
        "title": "WorkflowRunWaitingOn",
        "type": "object"
      },
      "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"
          },
          "max_concurrent_runs": {
            "anyOf": [
              {
                "maximum": 1000,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many runs of this workflow may be in progress at once. A run started past the limit is not refused: it waits, with a `QUEUED` active wait, and starts when an earlier run finishes. Null means no limit. Send null to remove it.",
            "title": "Max Concurrent Runs"
          },
          "mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowMode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated workflow schedule ownership mode."
          },
          "run_title": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "What each run is about, as up to four JMESPath expressions over the run context, joined with ' · '. Example: `[\"collect.candidate_name\", \"collect.role\"]`. Evaluated whenever a run is read, so a part filled in by a later form appears once that form is answered; parts that resolve to nothing are skipped. Empty means runs carry no title. Send `[]` to remove the title.",
            "title": "Run Title"
          },
          "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"
      },
      "WorkspaceFileEntry": {
        "properties": {
          "kind": {
            "description": "What this entry is.",
            "enum": [
              "file",
              "directory",
              "symlink"
            ],
            "title": "Kind",
            "type": "string"
          },
          "mode": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "POSIX permission bits, when the fabric reports them. A viewer showing a file it cannot write should be able to say so.",
            "title": "Mode"
          },
          "modified_at": {
            "description": "Last modification time.",
            "format": "date-time",
            "title": "Modified At",
            "type": "string"
          },
          "name": {
            "description": "Final path segment.",
            "title": "Name",
            "type": "string"
          },
          "path": {
            "description": "Absolute path inside the workspace.",
            "title": "Path",
            "type": "string"
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Content hash, when the fabric computes one. Doubles as the `ETag` on a read, so re-opening a file a viewer already has is a 304 rather than the bytes again.",
            "title": "Sha256"
          },
          "size_bytes": {
            "description": "Size in bytes; 0 for a directory.",
            "title": "Size Bytes",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "name",
          "kind",
          "size_bytes",
          "modified_at"
        ],
        "title": "WorkspaceFileEntry",
        "type": "object"
      },
      "WorkspaceFileListResponse": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceFileEntry"
            },
            "title": "Entries",
            "type": "array"
          },
          "exists": {
            "default": true,
            "description": "False when the directory is not there. A directory that does not exist and one that is merely empty used to answer identically, which is why a pane pointed at the wrong path looked like a working, empty folder rather than a mistake.",
            "title": "Exists",
            "type": "boolean"
          },
          "home_root": {
            "default": "/home/user",
            "description": "The durable root, and the furthest up a caller may browse. Served rather than assumed: this path has moved once already, and the clients that had hardcoded the old one went on asking for a directory that no longer existed.",
            "title": "Home Root",
            "type": "string"
          },
          "next_after": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `after` to get the next page. Null when this is the last one. A directory with more entries than fit was previously a dead end: the rest could be counted and never reached.",
            "title": "Next After"
          },
          "path": {
            "description": "The directory that was listed.",
            "title": "Path",
            "type": "string"
          },
          "sleeping": {
            "default": false,
            "description": "True when the workspace is paused and was not woken to answer. Entries are empty; ask again with `wake=true` to start it.",
            "title": "Sleeping",
            "type": "boolean"
          },
          "truncated": {
            "default": false,
            "description": "True when the directory holds more entries than were returned.",
            "title": "Truncated",
            "type": "boolean"
          },
          "workspace_root": {
            "default": "/home/user/lemma",
            "description": "Where projects and conversation directories live. Inside `home_root`, and the sensible place for a file browser to open.",
            "title": "Workspace Root",
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "title": "WorkspaceFileListResponse",
        "type": "object"
      },
      "WorkspaceStatusResponse": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A sentence for a person.",
            "title": "Detail"
          },
          "done_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "While `downloading`: megabytes fetched so far.",
            "title": "Done Mb"
          },
          "state": {
            "description": "`ready`: running. `downloading`: fetching its image, which the first start after an update does. `starting`: coming up. `asleep`: not running, and starts on first use. `unavailable`: could not be asked.",
            "enum": [
              "ready",
              "downloading",
              "starting",
              "asleep",
              "unavailable"
            ],
            "title": "State",
            "type": "string"
          },
          "total_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "While `downloading`: megabytes in total.",
            "title": "Total Mb"
          }
        },
        "required": [
          "state"
        ],
        "title": "WorkspaceStatusResponse",
        "type": "object"
      },
      "WriteIntent": {
        "enum": [
          "normal",
          "bulk",
          "import"
        ],
        "title": "WriteIntent",
        "type": "string"
      },
      "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.10.1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/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 the state parameter for security.\n\nA browser is redirected back into the app (303) carrying the outcome as query parameters: `connect` is one of `connected`, `install_required`, `pending_approval`, `install_received` or `error`. Pass `format=json` (or an `Accept` header of `application/json` without `text/html`) to receive the account as JSON instead.",
        "operationId": "connector.oauth.callback",
        "parameters": [
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "description": "Set to `json` to receive the account instead of a redirect.",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Set to `json` to receive the account instead of a redirect.",
              "title": "Format"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {}
            },
            "description": "The connected account, when JSON was requested."
          },
          "303": {
            "description": "Redirect back into the app with the outcome."
          },
          "307": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The provider rejected the authorization, or the callback carried no usable state."
          },
          "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=http` 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. http or composio",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Kind override, e.g. http 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/connectors/accounts/{account_id}/pods": {
      "get": {
        "operationId": "connector.account.pods",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPodUsageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Where One Of My Accounts Is Used",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.account",
          "result": "entity",
          "verb": "pods"
        }
      }
    },
    "/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.\n\nThe secret stops authenticating the moment this commits, but a link opened\nwith it before then is already past authentication. The notice closes it,\non whichever replica holds it, instead of leaving it working until the host\nhappens to reconnect.",
        "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"
        }
      }
    },
    "/oauth/grants": {
      "get": {
        "operationId": "mcp_access.grants.list",
        "parameters": [
          {
            "description": "Only this pod's.",
            "in": "query",
            "name": "pod_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this pod's.",
              "title": "Pod Id"
            }
          },
          {
            "description": "Every member's connections to pod_id. Pod admins only.",
            "in": "query",
            "name": "everyone",
            "required": false,
            "schema": {
              "default": false,
              "description": "Every member's connections to pod_id. Pod admins only.",
              "title": "Everyone",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectedClientsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "MCP clients you have connected",
        "tags": [
          "MCP Access"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "mcp_access.grants",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/oauth/grants/{grant_id}": {
      "delete": {
        "description": "Ends the grant and every token it issued. The client's next request is\nrefused and it has to ask the person again. A pod's admins may end any\nmember's connection to their pod.",
        "operationId": "mcp_access.grants.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Grant Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such connection, already ended, or not yours to end"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect an MCP client",
        "tags": [
          "MCP Access"
        ],
        "x-lemma": {
          "invalidates": [
            "mcp_access.grants"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "mcp_access.grants",
          "result": "void",
          "verb": "revoke"
        }
      }
    },
    "/oauth/grants/{grant_id}/subscriptions/{subscription_id}": {
      "delete": {
        "description": "The app keeps its connection and stops receiving this event. It stays\nstopped -- the app's refresh is refused -- until it is resumed.",
        "operationId": "mcp_access.grants.subscription.delete",
        "parameters": [
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Grant Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such subscription"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stop telling a connected app about an event",
        "tags": [
          "MCP Access"
        ],
        "x-lemma": {
          "invalidates": [
            "mcp_access.grants.subscription"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "mcp_access.grants.subscription",
          "result": "void",
          "verb": "delete"
        }
      }
    },
    "/oauth/grants/{grant_id}/subscriptions/{subscription_id}/resume": {
      "post": {
        "description": "Lifts a Stop. Delivery starts again when the app next refreshes.",
        "operationId": "mcp_access.grants.subscription.resume",
        "parameters": [
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Grant Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such subscription"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Let a connected app be told about an event again",
        "tags": [
          "MCP Access"
        ],
        "x-lemma": {
          "invalidates": [
            "mcp_access.grants.subscription"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "mcp_access.grants.subscription",
          "result": "void",
          "verb": "resume"
        }
      }
    },
    "/oauth/mcp-endpoint/{pod_id}": {
      "get": {
        "description": "Built here rather than in the browser, which knows the API's address\nonly as the page was configured -- not necessarily as clients reach it.",
        "operationId": "mcp_access.endpoint.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/McpEndpointResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "The MCP URL for a pod",
        "tags": [
          "MCP Access"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "mcp_access.endpoint",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/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/{organization_id}": {
      "get": {
        "description": "Get organization details",
        "operationId": "org.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/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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/agent-runtime/default": {
      "delete": {
        "operationId": "agent.runtime.default.clear",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Clear the Organization's Default Model",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.default"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.default",
          "result": "void",
          "verb": "clear"
        }
      },
      "put": {
        "operationId": "agent.runtime.default.set",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetOrganizationDefaultRuntimeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRuntimeConfig"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set the Organization's Default Model",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.default"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.default",
          "result": "entity",
          "verb": "set"
        }
      }
    },
    "/organizations/{organization_id}/agent-runtime/profiles": {
      "get": {
        "operationId": "agent.runtime.profiles.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/agent-runtime/profiles/{profile_id}": {
      "delete": {
        "operationId": "agent.runtime.profiles.archive",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/agent-runtime/profiles/{profile_id}/restore": {
      "post": {
        "operationId": "agent.runtime.profiles.restore",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/agent-runtime/profiles/{profile_id}/test": {
      "post": {
        "operationId": "agent.runtime.profiles.test",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/AgentRuntimeProfileTestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Test a Saved Model Provider",
        "tags": [
          "agent_runtime"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.runtime.profiles"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.runtime.profiles",
          "result": "entity",
          "verb": "test"
        }
      }
    },
    "/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"
        }
      },
      "patch": {
        "description": "Replace a credential-managed account's credential, keeping the account and its id. Rotating by deleting and reconnecting issues a new id and strands every schedule, surface and grant that referenced the old one.",
        "operationId": "connector.account.update",
        "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"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCredentialsUpdateSchema"
              }
            }
          },
          "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": "Update Account",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.account",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/organizations/{organization_id}/connectors/accounts/{account_id}/github/installations": {
      "get": {
        "description": "Which GitHub App installations this account can reach, resolving and recording one when it is unambiguous.",
        "operationId": "connector.account.installations",
        "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"
            }
          },
          {
            "description": "Ask the provider again rather than trusting what is recorded. Editing an installation's repositories sends no callback and no reliable event, so this is how a change made on GitHub is seen.",
            "in": "query",
            "name": "refresh",
            "required": false,
            "schema": {
              "default": false,
              "description": "Ask the provider again rather than trusting what is recorded. Editing an installation's repositories sends no callback and no reliable event, so this is how a change made on GitHub is seen.",
              "title": "Refresh",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountInstallationsSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Installations",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.account",
          "result": "entity",
          "verb": "installations"
        }
      },
      "post": {
        "description": "Bind an account to one of the installations it can reach.",
        "operationId": "connector.account.bind_installation",
        "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"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstallationBindSchema"
              }
            }
          },
          "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": "Bind Account Installation",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.account",
          "result": "entity",
          "verb": "bind_installation"
        }
      }
    },
    "/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. Answers 200 whether or not the server responded -- the install is deliberately kept either way -- so read `status`: `failed` means the server refused and the retry is still outstanding.",
        "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": {
                  "$ref": "#/components/schemas/AuthConfigOperationsRefreshResponseSchema"
                }
              }
            },
            "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/connect-requests/install": {
      "post": {
        "description": "Start the installation leg for an account that is authorized but not yet installed, returning the URL to send the person to.",
        "operationId": "connector.connect_request.install",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstallRequestInitiateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallRequestResponseSchema"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Install Step",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.connect_request"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.connect_request",
          "result": "entity",
          "verb": "install"
        }
      }
    },
    "/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": {
        "deprecated": true,
        "description": "Deprecated: use `pod.connector.operation.execute`. Still served, through the connectors the caller's pod declares for this installation; a person outside any pod uses their own account.",
        "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/InstallationOperationExecutionRequest"
              }
            }
          },
          "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 (deprecated)",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "connector.operation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "connector.operation",
          "result": "entity",
          "verb": "execute"
        },
        "x-lemma-replacement": "call POST /pods/{pod_id}/connectors/{slug}/operations/{operation}/execute with the pod connector's slug (SDK: pod.connectors.execute(slug, ...)); the connector decides the account, so drop account_id",
        "x-lemma-sunset": "2027-01-31"
      }
    },
    "/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"
        }
      }
    },
    "/organizations/{organization_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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/installations/{auth_config_id}/impact": {
      "get": {
        "description": "Accounts, pod accounts and pod connectors on the installation, and the surfaces, schedules and MCP event subscriptions that run through them: organization-wide counts, and per pod for the pods the caller can open. If the second half cannot be read just now the first is still returned, with `complete: false`.",
        "operationId": "connector.installation.impact",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "auth_config_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Auth Config Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallationImpactResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "What Removing An Installation Would Stop",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "connector.installation",
          "result": "entity",
          "verb": "impact"
        }
      }
    },
    "/organizations/{organization_id}/invitations": {
      "get": {
        "description": "Get all pending invitations for an organization",
        "operationId": "org.invitation.list",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_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": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/members": {
      "get": {
        "description": "Get all members of an organization",
        "operationId": "org.member.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/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/{organization_id}/members/{member_id}": {
      "delete": {
        "description": "Remove a member from the organization",
        "operationId": "org.member.remove",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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/{organization_id}/members/{member_id}/role": {
      "patch": {
        "description": "Update a member's role in the organization",
        "operationId": "org.member.update_role",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization 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}/permissions/me": {
      "get": {
        "description": "The organization-level permission ids the caller holds here, such as `org.installation.manage`. Pod permissions are `/pods/{pod_id}/permissions/me`.",
        "operationId": "org.permissions.me",
        "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/OrganizationEffectivePermissionsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "My Permissions In An Organization",
        "tags": [
          "Organizations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "org.permissions",
          "result": "entity",
          "verb": "me"
        }
      }
    },
    "/organizations/{organization_id}/pods": {
      "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": {
      "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/{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}/releases": {
      "get": {
        "operationId": "app.release.list",
        "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"
            }
          },
          {
            "description": "Max releases to return, up to 200. Page beyond that with `page_token`.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Max releases to return, up to 200. Page beyond that with `page_token`.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_page_token` from the previous page.",
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_page_token` from the previous page.",
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppReleaseListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List App Releases",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "app.release",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/apps/{app_name}/releases/{release_ref}/promote": {
      "post": {
        "description": "Make an existing release the one this app serves. The release keeps its bytes; only the app's current-release pointer moves.",
        "operationId": "app.release.promote",
        "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": "release_ref",
            "required": true,
            "schema": {
              "title": "Release Ref",
              "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": "Promote App Release",
        "tags": [
          "Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "app.release"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "app.release",
          "result": "entity",
          "verb": "promote"
        }
      }
    },
    "/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}/askable-pods": {
      "get": {
        "description": "The other pods this pod's assistant can ask: those the caller is also a member of, which it asks as the caller, and those connected to this pod, which it can ask with nobody present.",
        "operationId": "agent.askable_pod.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/AskablePodListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pods This Pod Can Ask",
        "tags": [
          "agent_asks"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.askable_pod",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/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 repo (repo_url or owner+repo), fetched through the pod's `github` connector as the importer, or anonymously for a public repo. 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 GitHub repository, as the account the pod's `github` connector resolves to for the caller. Refused up front with `CONNECTION_REQUIRED` / `REAUTH_REQUIRED` (with `connect_url`) or `POD_CONNECTOR_NOT_FOUND` when there is none. 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}/calls": {
      "post": {
        "description": "Open a live voice call with a pod agent, in the chat named by `conversation_id` or in a new conversation. The call is held in that conversation: its agent coordinates the call, hands work to sub-agents and shows things on the call's canvas. Connect to `/pods/{pod_id}/calls/{call_id}/socket` to talk.",
        "operationId": "call.open",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenCallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The caller may not run this agent."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The agent, or the conversation, was not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "That conversation cannot hold a call."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The caller cannot run the model the agent runs on."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No voice engine is configured."
          }
        },
        "summary": "Open a call",
        "tags": [
          "Calls"
        ],
        "x-lemma": {
          "invalidates": [
            "call"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "call",
          "result": "entity",
          "verb": "open"
        }
      }
    },
    "/pods/{pod_id}/calls/config": {
      "get": {
        "description": "Which voice engines this server can open a call with.",
        "operationId": "call.config",
        "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/CallConfigResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Call configuration",
        "tags": [
          "Calls"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "call",
          "result": "entity",
          "verb": "config"
        }
      }
    },
    "/pods/{pod_id}/channels": {
      "get": {
        "description": "The channels the reader may see, most recently active first, each with\nwhat is new in it for them and its last line.",
        "operationId": "channel.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ChannelKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "description": "Only `PUBLIC` or only `PRIVATE` channels; a member's and a contact's own channel are private.",
            "in": "query",
            "name": "visibility",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Visibility"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `PUBLIC` or only `PRIVATE` channels; a member's and a contact's own channel are private.",
              "title": "Visibility"
            }
          },
          {
            "description": "Only channels named by every one of these words, in any order and case: by title, or -- a member's or a contact's own channel -- by whose it is.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only channels named by every one of these words, in any order and case: by title, or -- a member's or a contact's own channel -- by whose it is.",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "default": false,
              "title": "Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Only this contact's channel.",
            "in": "query",
            "name": "contact_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this contact's channel.",
              "title": "Contact Id"
            }
          },
          {
            "description": "`me`, or a member's user id: contacts' channels assigned to them.",
            "in": "query",
            "name": "assignee",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 36,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`me`, or a member's user id: contacts' channels assigned to them.",
              "title": "Assignee"
            }
          },
          {
            "in": "query",
            "name": "unassigned",
            "required": false,
            "schema": {
              "default": false,
              "title": "Unassigned",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ContactStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "description": "Only contacts' channels waiting on a person: open, unassigned, and the agent off or asking for one.",
            "in": "query",
            "name": "needs_person",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only contacts' channels waiting on a person: open, unassigned, and the agent off or asking for one.",
              "title": "Needs Person",
              "type": "boolean"
            }
          },
          {
            "description": "Only channels the reader is in.",
            "in": "query",
            "name": "joined",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only channels the reader is in.",
              "title": "Joined",
              "type": "boolean"
            }
          },
          {
            "description": "A bot's surface name: only the groups it is in, each with its `source_settings`. Takes reading the bot.",
            "in": "query",
            "name": "source_surface",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A bot's surface name: only the groups it is in, each with its `source_settings`. Takes reading the bot.",
              "title": "Source Surface"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "List Channels",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "channel",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "A group made in Lemma: public unless asked otherwise, with its maker as\nits owner and the members and agents named in it. The same\n`Idempotency-Key` from the same member returns the group it made; sent\nwith another title, topic or visibility, it is refused (422).",
        "operationId": "channel.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Create Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/channels/me": {
      "get": {
        "description": "The reader's own channel with the pod; 404 until it is made.",
        "operationId": "channel.me.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/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Get My Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "channel.me",
          "result": "entity",
          "verb": "get"
        }
      },
      "post": {
        "description": "Make the reader's own channel with the pod; 200 with it if it exists.",
        "operationId": "channel.me.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/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Create My Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.me"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.me",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/channels/telegram-links": {
      "post": {
        "description": "A one-use link that adds the pod's Telegram bot to a group the caller picks.\n\nThe group becomes a GROUP channel, the caller's to answer for. Which\nTelegram account is theirs is still their profile's to say: a link is\neasily passed on, so the one that used it is never taken for them. The link\nworks for an hour.",
        "operationId": "channel.telegram_link.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/TelegramLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramLinkResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Telegram Link",
        "tags": [
          "Channel Sources"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.telegram_link"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.telegram_link",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/channels/whatsapp-groups": {
      "post": {
        "description": "Start a WhatsApp group with the pod's bot in it, answered for by the caller.\n\nIt is a new GROUP channel's source: the channel is made with it, and its\nid is `channel_id`. WhatsApp confirms the group moments later: it comes\nback ``pending``, and its invite link appears once confirmed. Telegram and\nSlack cannot create groups for a bot; add the bot to one of theirs instead.\nThe same `Idempotency-Key` from the same member answers with the group it\nstarted, for a day.",
        "operationId": "channel.whatsapp_group.start",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsAppGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceSettingsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A start with that Idempotency-Key is still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The member has started as many groups as a day allows."
          }
        },
        "summary": "Start Whatsapp Group",
        "tags": [
          "Channel Sources"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.whatsapp_group"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.whatsapp_group",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}": {
      "delete": {
        "description": "Delete a group made in Lemma, and its timeline: its owners' or an\nadmin's. A channel an outside place feeds is archived instead.",
        "operationId": "channel.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Delete Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "description": "One channel, with the places it is fed from, its members and agents,\nand how the reader hears of it.",
        "operationId": "channel.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Get Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "channel",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Change exactly the fields named; `null` clears.\n\nA group: `title`, `topic`, `visibility`, `archived`, `answers_shared`\n(whether agents' answers made with the asker's access are read by\neverybody here, or kept to the asker until they share one) -- its\nowners' or an admin's. A contact's channel: `agents_answer`, `hand_back_after_hours`,\n`status`, `assignee` -- for who may write to contacts. Switching the agent\non hands the contact back to it now: nobody is assigned.",
        "operationId": "channel.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Update Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/cases": {
      "get": {
        "description": "A contact's channel's cases, the most recently opened first, each with\nwhat happened in it: time to first response, reopens and time to close\nare read from here. Only a contact's channel has cases.",
        "operationId": "channel.case.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "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/ChannelCasesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "List Cases",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "channel.case",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/members": {
      "get": {
        "description": "Who is in a channel -- members, contacts and agents -- in the order\nthey joined, a page at a time.",
        "operationId": "channel.member.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "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/ChannelMemberListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "List Members",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "channel.member",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Add members of the pod, and the pod's agents, to a group. An agent\nalready in it answers as now asked.",
        "operationId": "channel.member.add",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MembersAddRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Add Members",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.member",
          "result": "entity",
          "verb": "add"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/members/me": {
      "delete": {
        "description": "Leave a channel. Leaving one not joined is nothing; a member's own\nchannel cannot be left, nor a private group by the last person in it (409\n`LAST_MEMBER`). A group's last owner leaving hands it to whoever has been\nin it longest.",
        "operationId": "channel.member.leave",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Leave Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.member",
          "result": "void",
          "verb": "leave"
        }
      },
      "patch": {
        "description": "How the reader hears of this channel's lines outside the app. Absent is\nunchanged; `null` clears `notify_via` (the pod's rule) and `muted_until`.",
        "operationId": "channel.member.me_update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MyMembershipUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Update My Membership",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.member",
          "result": "entity",
          "verb": "me_update"
        }
      },
      "post": {
        "description": "Join a channel the reader may see: a public group, or -- holding\n`contact.read` -- a contact's channel. Holding `channel.manage`, a private\ngroup too, on request: how a pod admin finds and takes over a group nobody\nlet them into; it is logged. Joining one already joined is nothing.",
        "operationId": "channel.member.join",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Join Channel",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.member",
          "result": "entity",
          "verb": "join"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/members/{kind}:{member_id}": {
      "delete": {
        "description": "Take somebody out of a group -- its owners' or an editor's -- or leave a\nchannel oneself. A group keeps an owner, and a private one somebody in it\n(409 `LAST_OWNER`, `LAST_MEMBER`): its last owner leaving hands it on.",
        "operationId": "channel.member.remove",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SenderKind"
            }
          },
          {
            "in": "path",
            "name": "member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Member Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Remove Member",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.member",
          "result": "void",
          "verb": "remove"
        }
      },
      "patch": {
        "description": "A person's role (`owner` or `member`), or when an agent answers.",
        "operationId": "channel.member.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SenderKind"
            }
          },
          {
            "in": "path",
            "name": "member_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Member Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Update Member",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.member"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.member",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages": {
      "get": {
        "description": "The timeline, oldest first: the newest page, the page before\n`before_seq`, or the page after `after_seq`. A thread's replies are not in\nit; its first line counts them.",
        "operationId": "channel.message.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "before_seq",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854776000,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before Seq"
            }
          },
          {
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854776000,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After Seq"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMessagesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "List Messages",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "channel.message",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Write in the channel. A reply goes where its thread is; otherwise to\nthe place named, or the one the channel last heard from -- unless it is a\nnote to members. Naming somebody who cannot see the channel is refused.",
        "operationId": "channel.message.post",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelPostRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Post Message",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.message",
          "result": "entity",
          "verb": "post"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}": {
      "delete": {
        "description": "Delete a line: it keeps its place, saying nothing. One's own -- or,\nfor who may change the channel, anybody's, shown as removed by them. A\ncopy already sent outside Lemma stays as sent.",
        "operationId": "channel.message.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Delete Message",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.message",
          "result": "void",
          "verb": "delete"
        }
      },
      "patch": {
        "description": "Change what one's own line says: absent is unchanged, `null` parts\nclears them. A copy already sent outside stays as sent.",
        "operationId": "channel.message.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelEditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Edit Message",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.message",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}/answer": {
      "post": {
        "description": "Answer what this line asks the reader: a question, an approval (which\nneeds a `decision`), a form. Only the person it waits on may -- and an\napproval, or an agent's paused question, only by their own hand: an agent\ncalling with a token delegated by them is refused, as its tool is.\n\nNo session is held across the answer: what asked takes it in its own -- a\nrun resumed, a form submitted -- and may call out to do so.",
        "operationId": "channel.message.answer",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelAnswerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Answer Question",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.message",
          "result": "entity",
          "verb": "answer"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}/deliveries": {
      "get": {
        "description": "Where a line went outside Lemma, and what became of each send. A push\nto a member is shown only to that member.",
        "operationId": "channel.delivery.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveriesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "List Deliveries",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "channel.delivery",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}/deliveries/{delivery_id}/retry": {
      "post": {
        "description": "Try a failed or given-up send again, now. A send to a place: for who\nwrote the line, or may change the channel -- anybody else who reads the\nline is refused. A push to a member: theirs alone, as only they see it.\nIt is one more try: a send that fails again on its last is given up.",
        "operationId": "channel.delivery.retry",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Delivery Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Retry Delivery",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.delivery"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.delivery",
          "result": "entity",
          "verb": "retry"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}/files/{file_id}": {
      "get": {
        "description": "A file a line shares, for a reader of the line: read as its writer\nreads it. Gone with the line, or once its writer can no longer read it.",
        "operationId": "channel.message.file",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The file's bytes"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Line File",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "channel.message",
          "result": "entity",
          "verb": "file"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}/share": {
      "post": {
        "description": "Share an agent's answer made with your own access with everybody in the\nchannel. Until then only you read it; the others are shown that it was\ngiven. Yours alone to share; sharing it again changes nothing.",
        "operationId": "channel.message.share",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Share Message",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.message",
          "result": "entity",
          "verb": "share"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/messages/{message_id}/thread": {
      "get": {
        "description": "A thread: its first line, and a page of its replies, oldest first\nwithin it -- from the start, after `after_seq`, before `before_seq`, or\n(`newest`) the latest.",
        "operationId": "channel.message.thread",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854776000,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After Seq"
            }
          },
          {
            "in": "query",
            "name": "before_seq",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854776000,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before Seq"
            }
          },
          {
            "description": "The newest page of replies, rather than the first.",
            "in": "query",
            "name": "newest",
            "required": false,
            "schema": {
              "default": false,
              "description": "The newest page of replies, rather than the first.",
              "title": "Newest",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "List Thread",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "channel.message",
          "result": "entity",
          "verb": "thread"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/read": {
      "post": {
        "description": "The reader has seen the timeline up to line `seq`: it never goes back,\nand never past the newest line. Lines of the timeline naming them up to\nit are read too; replies naming them are not -- with `thread_root_id`,\nthe reader has seen that thread up to `seq`, and what named them there is\nread, while the timeline's `read_seq` stays where it was.",
        "operationId": "channel.read",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Mark Read",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "invalidates": [
            "channel"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel",
          "result": "entity",
          "verb": "read"
        }
      }
    },
    "/pods/{pod_id}/channels/{channel_id}/sources/{source_id}": {
      "get": {
        "description": "A group source's settings: who answers its outsiders, and from what.",
        "operationId": "channel.source.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceSettingsDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Source",
        "tags": [
          "Channel Sources"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "channel.source",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "description": "Switch outsiders on or off in one group, or take it over (`owner: \"me\"`).\nAbsent is unchanged; neither can be cleared.\n\nThe member who answers for the group may; so may anybody who configures the\nbot when nobody in the pod answers for it, and an admin of the pod, whose\nchange the member is told about.",
        "operationId": "channel.source.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceSettingsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Source",
        "tags": [
          "Channel Sources"
        ],
        "x-lemma": {
          "invalidates": [
            "channel.source"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "channel.source",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/connector-accounts": {
      "get": {
        "operationId": "pod.connector_account.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/PodAccountListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Accounts In Use In The Pod",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.connector_account",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "pod.connector_account.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/PodAccountCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodAccountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add One Of Your Accounts To The Pod",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector_account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector_account",
          "result": "entity",
          "verb": "add"
        }
      }
    },
    "/pods/{pod_id}/connector-accounts/{pod_account_id}": {
      "delete": {
        "operationId": "pod.connector_account.remove",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pod_account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove An Account From The Pod",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector_account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector_account",
          "result": "void",
          "verb": "remove"
        }
      },
      "patch": {
        "operationId": "pod.connector_account.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pod_account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Account Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodAccountUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodAccountResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Share Or Withdraw Your Account In The Pod",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector_account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector_account",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/connector-accounts/{pod_account_id}/share-as": {
      "post": {
        "description": "Owner only, and the caller must also manage the pod's connectors: share this pod account with the pod (if it is still yours alone) and run the SHARED connector `slug` as it -- pointing the existing one, or declaring it. Checked in full before anything changes, and done in one transaction: a refusal leaves the account as it was.",
        "operationId": "pod.connector_account.share_as",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pod_account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Account Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodAccountShareAsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodConnectorResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Share Your Account As A Pod Connector",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector_account"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector_account",
          "result": "entity",
          "verb": "share_as"
        }
      }
    },
    "/pods/{pod_id}/connectors": {
      "get": {
        "operationId": "pod.connector.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/PodConnectorListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pod Connectors",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.connector",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "description": "Declare a connector by an organization installation (`auth_config_id`) or by a catalog connector (`connector_id`): its organization default, or Lemma's own app for it installed now when the organization has none and the caller may install connectors. `slug` defaults to the installation's name; `mode` to PER_MEMBER.",
        "operationId": "pod.connector.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/PodConnectorCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodConnectorResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Declare A Pod Connector",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/connectors/{slug}": {
      "delete": {
        "operationId": "pod.connector.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Pod Connector",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "pod.connector.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodConnectorResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pod Connector",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.connector",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "operationId": "pod.connector.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodConnectorUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodConnectorResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pod Connector",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/connectors/{slug}/ask-members": {
      "post": {
        "description": "Post one line, \"This pod uses <connector> — connect yours: <connect_url>\", in the own channel of each member a PER_MEMBER connector is waiting on (as `coverage` counts them). A member is asked about one connector at most once a day; those asked already are returned as `asked_recently`, and those whose line could not be posted, or whose last ask could not be checked, as `not_asked`.",
        "operationId": "pod.connector.ask_members",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/AskMembersRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskMembersResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Ask Members To Connect",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector",
          "result": "entity",
          "verb": "ask_members"
        }
      }
    },
    "/pods/{pod_id}/connectors/{slug}/coverage": {
      "get": {
        "description": "For someone who may manage the pod's connectors: of the members who may use this PER_MEMBER connector, how many have connected a working account, and who has not. Viewers, and anyone a RESTRICTED connector leaves out, are not counted. Asked for one connector at a time, because it weighs each member's own access; listings leave it out.",
        "operationId": "pod.connector.coverage",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodConnectorCoverage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Who A Per-Member Connector Is Waiting On",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.connector",
          "result": "entity",
          "verb": "coverage"
        }
      }
    },
    "/pods/{pod_id}/connectors/{slug}/operations": {
      "get": {
        "operationId": "pod.connector.operation.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "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 Pod Connector Operations",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "pod.connector.operation",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/connectors/{slug}/operations/{operation_name}": {
      "get": {
        "operationId": "pod.connector.operation.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "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 Pod Connector Operation",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "pod.connector.operation",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/connectors/{slug}/operations/{operation_name}/execute": {
      "post": {
        "description": "Run an operation through a pod connector. The account it runs as is decided by the connector: the caller's own for a PER_MEMBER connector, the shared one for a SHARED connector. Typed refusals: `CONNECTION_REQUIRED` and `REAUTH_REQUIRED` (with `connect_url`), `CONNECTOR_NEEDS_ACCOUNT`, `CONNECTOR_UNAVAILABLE`.",
        "operationId": "pod.connector.operation.execute",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "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 Pod Connector Operation",
        "tags": [
          "Connectors"
        ],
        "x-lemma": {
          "invalidates": [
            "pod.connector.operation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "pod.connector.operation",
          "result": "entity",
          "verb": "execute"
        }
      }
    },
    "/pods/{pod_id}/contacts": {
      "get": {
        "description": "The pod's contacts, newest first. Follow `next_cursor` until it is\nabsent.",
        "operationId": "contact.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": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "Only contacts whose name, email address or number holds this.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only contacts whose name, email address or number holds this.",
              "title": "Q"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Contacts",
        "tags": [
          "Contacts"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "contact",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/contacts/{contact_id}": {
      "delete": {
        "description": "Forget a contact: their rows, handles, conversations and chat sessions.\n\nSee ``services/forget`` for the order, which is what makes a failure safe\nto retry.",
        "operationId": "contact.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Contact",
        "tags": [
          "Contacts"
        ],
        "x-lemma": {
          "invalidates": [
            "contact"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "contact",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "contact.get",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Contact",
        "tags": [
          "Contacts"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "contact",
          "result": "entity",
          "verb": "get"
        }
      },
      "patch": {
        "operationId": "contact.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Contact",
        "tags": [
          "Contacts"
        ],
        "x-lemma": {
          "invalidates": [
            "contact"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "contact",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/contacts/{contact_id}/export": {
      "get": {
        "description": "A contact's handles, what was said with them, and the rows that are theirs.\n\nTakes a pod admin, as forgetting does: both answer the person the data is\nabout, not the member reading it.",
        "operationId": "contact.export",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 1000,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactExportResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Contact",
        "tags": [
          "Contacts"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "contact",
          "result": "entity",
          "verb": "export"
        }
      }
    },
    "/pods/{pod_id}/contacts/{contact_id}/outreach": {
      "post": {
        "description": "Write to a contact first, on one of their handles: email any time,\nWhatsApp within 24 hours of their last message there. The line goes in\ntheir channel, at that handle's place -- opened if new -- and is sent from\nthere. The same `client_message_id`, or `Idempotency-Key`, from the same\nmember is the same line: a retry sends nothing new.",
        "operationId": "contact.outreach.send",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutreachRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutreachResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such contact."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "They asked not to be written to there, or the pod has nowhere to write from."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not one of their handles, or not one that may be written to first now."
          }
        },
        "summary": "Send Outreach",
        "tags": [
          "Contact Outreach"
        ],
        "x-lemma": {
          "invalidates": [
            "contact.outreach"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "contact.outreach",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/pods/{pod_id}/conversations": {
      "get": {
        "description": "List root conversations for the current user in a pod. Omit agent_name for conversations across the pod, pass POD_DEFAULT (or pod_default) for the pod assistant's, or a name for one pod agent's. Child (sub-agent) conversations are omitted by default; pass parent_id to list one conversation's children instead. Archived conversations are omitted; pass archived=true for the archive. search keeps titles containing it (case-insensitive); in_channel=false keeps conversations of no channel (the chats list), true those in one. Ordered by last_activity_at, most recent first.",
        "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": "archived",
            "required": false,
            "schema": {
              "default": false,
              "title": "Archived",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "in_channel",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "In Channel"
            }
          },
          {
            "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/pending-interactions": {
      "get": {
        "description": "List every ask_user question, request_approval and Agent Host permission request waiting on the caller, across their own conversations in the pod, sub-agent conversations included and archived ones left out. Longest-waiting first. Resolve one through the conversation's approval decision endpoint, using tool_call_id as the approval id. A permission request drops off once the Agent Host has stopped waiting for it.",
        "operationId": "agent.conversation.pending_interaction.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": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingInteractionListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Interactions Waiting On You",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "agent.conversation.pending_interaction",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/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}/messages/append": {
      "post": {
        "description": "Append a user message without opening a Server-Sent Events stream. When a run is already active for the conversation, the message joins that run and the next harness step sees it in persisted history -- any stream already subscribed to the conversation surfaces the resulting events, so callers steering an in-flight run should attach to that stream rather than opening a second one here. When no run is active, this starts a new one like the streaming send route, unstreamed.",
        "operationId": "agent.conversation.message.append",
        "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": {
            "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"
          },
          "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": "Append Pod Conversation Message",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation.message",
          "result": "entity",
          "verb": "append"
        }
      }
    },
    "/pods/{pod_id}/conversations/{conversation_id}/messages/{message_id}": {
      "delete": {
        "description": "Take back a message sent while a run was working, before the agent has seen it. Only a message still queued can be withdrawn: one that a run has read, or that is already on its way to an Agent Host turn, is answered 409.",
        "operationId": "agent.conversation.message.withdraw",
        "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": "message_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Message Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "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 message is no longer queued"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Withdraw Queued Conversation Message",
        "tags": [
          "agent_conversations"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.conversation.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.conversation.message",
          "result": "void",
          "verb": "withdraw"
        }
      }
    },
    "/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/by-path/retry-processing": {
      "post": {
        "description": "Queue a document whose processing failed to be read and indexed again, with a fresh retry budget. A file that did not fail is returned unchanged.",
        "operationId": "file.retry_processing",
        "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": "Retry File Processing",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file",
          "result": "entity",
          "verb": "retry_processing"
        }
      }
    },
    "/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/signed-urls": {
      "get": {
        "operationId": "file.signed_url.list",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "description": "Also list links that have expired or been revoked.",
            "in": "query",
            "name": "include_dead",
            "required": false,
            "schema": {
              "default": false,
              "description": "Also list links that have expired or been revoked.",
              "title": "Include Dead",
              "type": "boolean"
            }
          },
          {
            "description": "Links per page.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Links per page.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_page_token` from the previous page.",
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_page_token` from the previous page.",
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedUrlListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List this pod's public signed URLs",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "file.signed_url",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/datastore/files/signed-urls/{code}": {
      "delete": {
        "description": "Kill a link now rather than waiting out its expiry.\n\nAnswers 200 either way: a code that is already dead, or was never this\npod's, is reported as ``revoked: false`` rather than 404, so that a caller\ncleaning up cannot use this endpoint to discover which codes exist.",
        "operationId": "file.signed_url.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "title": "Code",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedUrlRevokeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke a public signed URL",
        "tags": [
          "files"
        ],
        "x-lemma": {
          "invalidates": [
            "file.signed_url"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "file.signed_url",
          "result": "void",
          "verb": "revoke"
        }
      }
    },
    "/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/public-rows": {
      "get": {
        "description": "The open tables of the pod that the caller can read.",
        "operationId": "table.public_rows.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/OpenTablesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Tables Open To People Outside",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "table.public_rows",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/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. Results are capped at the deployment's row limit: `total` is how many rows came back, and `truncated` says whether more matched.",
        "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}/public-rows": {
      "delete": {
        "operationId": "table.public_rows.close",
        "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": "Stop People Outside Adding Rows",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table.public_rows"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table.public_rows",
          "result": "void",
          "verb": "close"
        }
      },
      "get": {
        "operationId": "table.public_rows.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/TableOpeningResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Who Outside May Add Rows",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "table.public_rows",
          "result": "entity",
          "verb": "get"
        }
      },
      "put": {
        "description": "Open the table to rows from people outside the pod -- confirmed contacts, or anyone -- for the chosen columns only. Rows are added as the member opening it, who must be able to change the table.",
        "operationId": "table.public_rows.open",
        "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/OpenTableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableOpeningResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Let People Outside Add Rows",
        "tags": [
          "tables"
        ],
        "x-lemma": {
          "invalidates": [
            "table.public_rows"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "table.public_rows",
          "result": "entity",
          "verb": "open"
        }
      }
    },
    "/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, up to 1000. Page beyond that with `page_token`.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Max number of rows to return, up to 1000. Page beyond that with `page_token`.",
              "maximum": 1000,
              "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`, `in`. `in` takes an array `value` and matches any of its members; an empty array matches nothing. `like` and `ilike` take a SQL pattern, where `%` matches any run of characters and `_` matches exactly one — to match either literally, escape it with a backslash (`price\\_usd`). Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={\"field\":\"amount\",\"op\":\"gt\",\"value\":100}`, `filter={\"field\":\"status\",\"op\":\"in\",\"value\":[\"OPEN\",\"PENDING\"]}`.",
            "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`, `in`. `in` takes an array `value` and matches any of its members; an empty array matches nothing. `like` and `ilike` take a SQL pattern, where `%` matches any run of characters and `_` matches exactly one — to match either literally, escape it with a backslash (`price\\_usd`). Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={\"field\":\"amount\",\"op\":\"gt\",\"value\":100}`, `filter={\"field\":\"status\",\"op\":\"in\",\"value\":[\"OPEN\",\"PENDING\"]}`.",
              "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). Pass `expected_updated_at` to make the patch conditional on the row not having changed since it was read; the request then answers 409 rather than overwriting another client's edit.",
        "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}/decisions": {
      "post": {
        "description": "Answer closed questions -- a choice, several choices, yes or no, a point on a scale -- about one piece of evidence. Nothing is stored: record the answer wherever it matters to you. An answer of null means the evidence did not support one. 422 means the request cannot be asked as sent; 429 and 503 mean ask again later.",
        "operationId": "decision.make",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MakeDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request body is too large."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The questions, evidence or examples are not valid."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Rate or spend limit reached; see Retry-After."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The decision provider did not answer; retry."
          }
        },
        "summary": "Make a decision",
        "tags": [
          "Decisions"
        ],
        "x-lemma": {
          "invalidates": [],
          "kind": "mutation",
          "paginates": false,
          "resource": "decision",
          "result": "entity",
          "verb": "make"
        }
      }
    },
    "/pods/{pod_id}/events": {
      "get": {
        "description": "What standing work here can start on: the platform's own events, then\nevery event on an MCP server behind one of the pod's connectors the caller\nmay use. A connected app's catalog triggers are listed per install\n(`connector.trigger.list`).",
        "operationId": "schedule.event.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/EventCatalogResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Events",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "schedule.event",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/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}/contacts": {
      "put": {
        "description": "Let a contact's conversation call this function, or stop it. A contact holds no grant and the run acts for no member: it runs as the function itself, held to its own grants, and is told the asking contact as `contact_id`, which its input schema must declare. Takes pod settings permission and either owning the function or administering the pod.",
        "operationId": "function.contacts.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/FunctionContactAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Open a Function to Contacts",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function.contacts"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function.contacts",
          "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}/revisions": {
      "get": {
        "description": "List the built revisions of a function, newest first.",
        "operationId": "function.revision.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"
            }
          },
          {
            "description": "Max revisions to return, up to 200. Page beyond that with `page_token`.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Max revisions to return, up to 200. Page beyond that with `page_token`.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_page_token` from the previous page.",
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_page_token` from the previous page.",
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionRevisionListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Function Revisions",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "function.revision",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/functions/{function_name}/revisions/{revision_ref}": {
      "get": {
        "description": "Read one revision, including its source and the schemas its code implements. A revision may be addressed by number ('r12') or hash.",
        "operationId": "function.revision.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": "revision_ref",
            "required": true,
            "schema": {
              "title": "Revision Ref",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionRevisionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Function Revision",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "function.revision",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/pods/{pod_id}/functions/{function_name}/revisions/{revision_ref}/promote": {
      "post": {
        "description": "Make an existing revision the live one. Its input/output/config schemas are restored with it, since they are the contract its code implements.",
        "operationId": "function.revision.promote",
        "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": "revision_ref",
            "required": true,
            "schema": {
              "title": "Revision Ref",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionRevisionPromoteResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Promote Function Revision",
        "tags": [
          "Functions"
        ],
        "x-lemma": {
          "invalidates": [
            "function.revision"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "function.revision",
          "result": "entity",
          "verb": "promote"
        }
      }
    },
    "/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}/inbox": {
      "get": {
        "description": "What is new for the reader across the pod: the badges, the questions\nwaiting on them, the unread lines naming them -- newest first -- and the\ncontacts waiting on a reply.",
        "operationId": "channel.inbox.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/InboxResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Get Inbox",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "channel.inbox",
          "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/{member}/notices": {
      "post": {
        "description": "Tell another member of the pod something, in their own channel. The\nsame `Idempotency-Key` from the same member is the same notice; sent with\nother text, it is refused (422). A member sends at most\n`NOTICES_PER_MINUTE` a minute (429).",
        "operationId": "agent.notice.send",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "description": "The member to tell: a pod member id, user id, or email address.",
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "description": "The member to tell: a pod member id, user id, or email address.",
              "maxLength": 320,
              "minLength": 1,
              "title": "Member",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoticeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoticeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Nobody in this pod is that member."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too many notices this minute; see Retry-After."
          }
        },
        "summary": "Send Notice",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.notice"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.notice",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/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}/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}/pod-links": {
      "get": {
        "description": "The other pods connected to this one: each may ask this pod's assistant with nobody present, and read what is Public here plus what this pod shared with it.",
        "operationId": "agent.pod_link.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/PodLinkListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pods That Can Ask This Pod",
        "tags": [
          "agent_asks"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.pod_link",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/pod-links/{asking_pod_id}": {
      "delete": {
        "description": "Stop another pod asking this one, and take back what it was shared.",
        "operationId": "agent.pod_link.disconnect",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "asking_pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Asking Pod Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The caller can't manage members of this pod"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "That pod is not connected to this one"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect A Pod From This One",
        "tags": [
          "agent_asks"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.pod_link"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.pod_link",
          "result": "void",
          "verb": "disconnect"
        }
      },
      "put": {
        "description": "Let another pod in this organization ask this one, sharing the tables and folders named for reading. Connecting again replaces what is shared. Needs pod.member.manage here, and membership of the other pod; the caller looks after the link.",
        "operationId": "agent.pod_link.connect",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "asking_pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Asking Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectPodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Something named can't be shared, or not for that"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The caller can't manage members of this pod"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The two pods can't be connected: another organization, the same pod, or the caller isn't in the other pod"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Connect A Pod To This One",
        "tags": [
          "agent_asks"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.pod_link"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.pod_link",
          "result": "void",
          "verb": "connect"
        }
      }
    },
    "/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"
            }
          },
          {
            "description": "Only runs that report this status -- the target's outcome once there is one.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ScheduleRunStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only runs that report this status -- the target's outcome once there is one.",
              "title": "Status"
            }
          },
          {
            "description": "true: only events the schedule's filter skipped. false: leave them out, which is what a busy webhook schedule's history usually needs. Omitted: both.",
            "in": "query",
            "name": "skipped",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "true: only events the schedule's filter skipped. false: leave them out, which is what a busy webhook schedule's history usually needs. Omitted: both.",
              "title": "Skipped"
            }
          }
        ],
        "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}/schedules/{schedule_id}/skips": {
      "get": {
        "description": "What the trigger let pass without firing -- e.g. the changes of a bulk\nwrite or an import it is set to skip -- newest first.",
        "operationId": "schedule.skip.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": 50,
              "maximum": 500,
              "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/TriggerSkipListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Schedule Skips",
        "tags": [
          "Schedules"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "schedule.skip",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/pods/{pod_id}/search": {
      "get": {
        "description": "Lines matching every word, newest first, in the channels the reader\nsees -- or in one of them -- each with its rank and the words around the\nmatch. An answer withheld from the reader is not found by what it said.",
        "operationId": "channel.search",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "description": "Only channels of this kind.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ChannelKind"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only channels of this kind.",
              "title": "Kind"
            }
          },
          {
            "description": "Only lines said by this person: with `sender_id`.",
            "in": "query",
            "name": "sender_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SenderKind"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only lines said by this person: with `sender_id`.",
              "title": "Sender Kind"
            }
          },
          {
            "description": "A member's user id, a contact's id or an agent's id.",
            "in": "query",
            "name": "sender_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A member's user id, a contact's id or an agent's id.",
              "title": "Sender Id"
            }
          },
          {
            "description": "Said at or after.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Said at or after.",
              "title": "Since"
            }
          },
          {
            "description": "Said before.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Said before.",
              "title": "Until"
            }
          },
          {
            "description": "Search archived channels too.",
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Search archived channels too.",
              "title": "Archived",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 30,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A cursor this API did not give."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not allowed: `INSUFFICIENT_PERMISSION`."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not there, or not the reader's to see: `CHANNEL_NOT_FOUND`, `LINE_NOT_FOUND`, `MEMBER_NOT_FOUND` ..."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not in this channel's state: `CHANNEL_ARCHIVED`, `WRONG_CHANNEL_KIND`, `LAST_OWNER`, `LAST_MEMBER`, `NOT_JOINED`, `CHANNEL_CONFLICT`."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request cannot be done as asked: `VALIDATION_ERROR`."
          }
        },
        "summary": "Search",
        "tags": [
          "Channels"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "channel",
          "result": "collection",
          "verb": "search"
        }
      }
    },
    "/pods/{pod_id}/surface-setup/slack/app-creation": {
      "get": {
        "description": "The Slack workspaces this pod's organization lets Lemma create apps in.",
        "operationId": "agent.surface.slack_app_creation.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/SlackAppWorkspaceListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Slack App Workspaces",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface.slack_app_creation",
          "result": "collection",
          "verb": "list"
        }
      },
      "put": {
        "description": "Let Lemma create Slack apps in the workspace this token is for.",
        "operationId": "agent.surface.slack_app_creation.save",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackConfigurationTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAppWorkspaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save Slack Configuration Token",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.slack_app_creation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.slack_app_creation",
          "result": "entity",
          "verb": "save"
        }
      }
    },
    "/pods/{pod_id}/surface-setup/slack/app-creation/{team_id}": {
      "delete": {
        "description": "Stop Lemma creating apps there. Apps it already made are not touched.\n\nSlack offers no way to revoke a configuration token, so it stays valid at\nSlack: revoke it on api.slack.com/apps as well.",
        "operationId": "agent.surface.slack_app_creation.forget",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "team_id",
            "required": true,
            "schema": {
              "title": "Team Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forget Slack Configuration Token",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.slack_app_creation"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.slack_app_creation",
          "result": "void",
          "verb": "forget"
        }
      }
    },
    "/pods/{pod_id}/surface-setup/slack/apps": {
      "post": {
        "description": "Create an agent's own Slack app, named after it. What is left is\nauthorising it.\n\nOne app per agent per workspace: until it is authorised, asking again\nanswers with the same app, and so does the same `Idempotency-Key` from the\nsame member for a day.",
        "operationId": "agent.surface.slack_app.create",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackAppCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackAppCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not set up, the token needs replacing, or busy."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Slack is rate-limiting app creation."
          }
        },
        "summary": "Create Slack App",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.slack_app"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.slack_app",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/surface-setup/slack/manager": {
      "get": {
        "description": "The Slack workspaces Lemma's own app manages for this pod's organization.",
        "operationId": "agent.surface.slack_manager.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/SlackManagedWorkspaceListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Slack Managed Workspaces",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface.slack_manager",
          "result": "collection",
          "verb": "list"
        }
      },
      "put": {
        "description": "Make Lemma's own app this workspace's manager. The workspace becomes the\norganization's, and the person who authorised it is known in Slack.\n\nOnly for a grant this browser finished signed in as the caller: a consent\nlink somebody else completed is refused.",
        "operationId": "agent.surface.slack_manager.bind",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackManagerBindRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackManagedWorkspaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Bind Slack Manager",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.slack_manager"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.slack_manager",
          "result": "entity",
          "verb": "bind"
        }
      }
    },
    "/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 and is the\npod-unique handle the API addresses it by. A second surface of the same\nplatform has to belong to a different agent: one agent reaches a platform in\none place — one Slack app, one WhatsApp number, one Telegram bot.",
        "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 ``pod_connector`` rebinds the surface to a different SHARED pod\nconnector -- the repair when the account it runs as is withdrawn or\nexpires. The caller must be able to use that connector and its account.",
        "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\nFor functions and workflows that message a member on one platform. Reuses\nthe member's existing thread (bots can't cold-DM), and a 404 carries the\nreason they could not be reached.",
        "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. Readable with ``AGENT_READ``; the org's\nown shared secrets in it are not. For the pre-creation checklist (before any\nsurface 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}/web-widgets": {
      "get": {
        "operationId": "agent.web_widget.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/WebWidgetListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Widgets",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.web_widget",
          "result": "collection",
          "verb": "list"
        }
      },
      "post": {
        "operationId": "agent.web_widget.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/WebWidgetCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebWidgetCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Widget",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.web_widget"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.web_widget",
          "result": "entity",
          "verb": "create"
        }
      }
    },
    "/pods/{pod_id}/web-widgets/{widget_id}": {
      "delete": {
        "operationId": "agent.web_widget.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "widget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Widget Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Widget",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.web_widget"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.web_widget",
          "result": "void",
          "verb": "delete"
        }
      },
      "patch": {
        "operationId": "agent.web_widget.update",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "widget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Widget Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebWidgetUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebWidgetResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Widget",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.web_widget"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.web_widget",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/pods/{pod_id}/web-widgets/{widget_id}/secret": {
      "post": {
        "description": "Mint a new signing secret. Tokens signed with the old one stop working.\n\nSo do the sessions they started: a host session is the old secret's word\nfor who somebody is, and a secret is reissued because that word is no\nlonger trusted.",
        "operationId": "agent.web_widget.reissue",
        "parameters": [
          {
            "in": "path",
            "name": "pod_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Pod Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "widget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Widget Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebWidgetSecretResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reissue Widget",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.web_widget"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.web_widget",
          "result": "entity",
          "verb": "reissue"
        }
      }
    },
    "/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) and `workflow_id`. Each run carries its `title` and, while it has one, the active wait as `waiting_on`.",
        "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": "workflow_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workflow Id"
            }
          },
          {
            "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}/retry": {
      "post": {
        "description": "Resume a failed run from the node that failed, keeping every earlier node's output -- an agent step's answer is not produced again. Allowed when the failed node is a function, decision, loop or wait-until node; any other run, or one that has not failed, returns 409.",
        "operationId": "workflow.run.retry",
        "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": "Retry Workflow Run",
        "tags": [
          "workflows"
        ],
        "x-lemma": {
          "invalidates": [
            "workflow.run"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workflow.run",
          "result": "entity",
          "verb": "retry"
        }
      }
    },
    "/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. Send an `Idempotency-Key` header to make a retry safe: the same key, from the same person, for the same workflow, returns the run it already created.",
        "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"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "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"
        }
      }
    },
    "/public/web/{public_key}/challenge": {
      "get": {
        "description": "A proof-of-work to solve before starting a session or asking for a code.\n\n``{\"enabled\": false}`` when the deployment has bot protection off.",
        "operationId": "public.web.challenge.read",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "purpose",
            "required": false,
            "schema": {
              "default": "session",
              "pattern": "^(session|code)$",
              "title": "Purpose",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Public.Web.Challenge.Read",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Challenge",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "public.web.challenge",
          "result": "entity",
          "verb": "read"
        }
      }
    },
    "/public/web/{public_key}/code": {
      "post": {
        "operationId": "public.web.code.send",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Send Code",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "invalidates": [
            "public.web.code"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "public.web.code",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/public/web/{public_key}/code/verify": {
      "post": {
        "description": "Confirm an email address: the session becomes a contact's, under a new\nsecret and a new access token, which replace the old ones.",
        "operationId": "public.web.code.verify",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Verify Code",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "invalidates": [
            "public.web.code"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "public.web.code",
          "result": "entity",
          "verb": "verify"
        }
      }
    },
    "/public/web/{public_key}/history": {
      "get": {
        "operationId": "public.web.history.read",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": -1,
              "minimum": -1,
              "title": "After",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Read History",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "public.web.history",
          "result": "entity",
          "verb": "read"
        }
      }
    },
    "/public/web/{public_key}/messages": {
      "post": {
        "operationId": "public.web.message.send",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Send Message",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "invalidates": [
            "public.web.message"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "public.web.message",
          "result": "entity",
          "verb": "send"
        }
      }
    },
    "/public/web/{public_key}/rows": {
      "get": {
        "description": "Read a table the pod marked Public: every row, at most 500.\n\nThe same reading the pod's chat does for this visitor -- Public, and\nnothing else. A booking page reads its free slots here.",
        "operationId": "public.web.rows.read",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "table",
            "required": true,
            "schema": {
              "maxLength": 255,
              "title": "Table",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "order_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Order By"
            }
          },
          {
            "in": "query",
            "name": "desc",
            "required": false,
            "schema": {
              "default": false,
              "title": "Desc",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRowsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not a Public table: missing, not Public, or per-member"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No such column to order by"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too many reads"
          }
        },
        "summary": "Web Read Rows",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "public.web.rows",
          "result": "entity",
          "verb": "read"
        }
      },
      "post": {
        "description": "Add one row to a table the pod opened to visitors. Nothing is read back.",
        "operationId": "public.web.row.add",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Add Row",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "invalidates": [
            "public.web.row"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "public.web.row",
          "result": "entity",
          "verb": "add"
        }
      }
    },
    "/public/web/{public_key}/session": {
      "post": {
        "description": "Start a session, or come back to one: either way, a new access token.\n\nOn a page Lemma hosts, a visitor nobody signed in comes back to their chat\nfrom its cookie when the page has no secret to send.",
        "operationId": "public.web.session.start",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Start Session",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "invalidates": [
            "public.web.session"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "public.web.session",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/public/web/{public_key}/stream": {
      "get": {
        "description": "The bot's answer as it is written, one JSON object per line.\n\nThe first line is ``{\"type\": \"open\"}``, a handshake that says the stream is\nup, not a frame of the conversation. Only what a visitor may see follows:\nsee ``agent.contracts.visitor_stream``. The page reconnects when it closes.\nA session holds at most two streams at once.",
        "operationId": "public.web.stream.read",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Stream Answers",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "public.web.stream",
          "result": "entity",
          "verb": "read"
        }
      }
    },
    "/public/web/{public_key}/table": {
      "get": {
        "description": "What a page may ask for on a table the pod opened to visitors.\n\nThe open columns only, in order: enough to draw a form, and nothing else\nabout the table or its rows.",
        "operationId": "public.web.table.read",
        "parameters": [
          {
            "in": "path",
            "name": "public_key",
            "required": true,
            "schema": {
              "title": "Public Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "table",
            "required": true,
            "schema": {
              "maxLength": 255,
              "title": "Table",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Web Read Table",
        "tags": [
          "Agent Surfaces (Web)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "public.web.table",
          "result": "entity",
          "verb": "read"
        }
      }
    },
    "/surface-setup/slack/install": {
      "get": {
        "description": "Whether Lemma's own Slack app is set up on this server, so \"Add to\nSlack\" can work -- checked before a person with no organization is given\none for it.",
        "operationId": "agent.surface.slack_install.availability",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackInstallAvailabilityResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Slack Install Availability",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface.slack_install",
          "result": "entity",
          "verb": "availability"
        }
      },
      "post": {
        "description": "Add Lemma to a Slack workspace from \"Add to Slack\", for this organization.\n\nAnswers with Slack's consent page for Lemma's own app, asking for its bot\nalone. Refused before anything is made when Slack isn't set up here, or\nthe caller may not add the organization's installs. When the grant comes\nback to this same signed-in browser, the workspace becomes the\norganization's and Lemma's app says hello there; a grant finished anywhere\nelse adopts nothing.",
        "operationId": "agent.surface.slack_install.start",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackInstallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackInstallResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Slack Install Flow",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.slack_install"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.slack_install",
          "result": "entity",
          "verb": "start"
        }
      }
    },
    "/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: the\nagent name is supplied by the caller and echoed back, never read from one.",
        "operationId": "agent.surface.slack_manifest",
        "parameters": [
          {
            "description": "Name the app after this agent, so a bot made for one agent arrives already called by its name. Defaults to Lemma.",
            "in": "query",
            "name": "agent_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Name the app after this agent, so a bot made for one agent arrives already called by its name. Defaults to Lemma.",
              "title": "Agent Name"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Agent.Surface.Slack Manifest",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Slack App Manifest",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "agent.surface",
          "result": "entity",
          "verb": "slack_manifest"
        }
      }
    },
    "/surface-setup/slack/people/sign-in": {
      "post": {
        "description": "Start Sign in with Slack for the signed-in person, to prove they are the\nSlack user their App Home's link was for.\n\nConnects nothing. The callback connects only when it sees this same Lemma\nsession and Slack names this same Slack user and workspace.",
        "operationId": "agent.surface.slack_person.sign_in",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackSignInRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackSignInResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Slack Sign In",
        "tags": [
          "Agent Surfaces"
        ],
        "x-lemma": {
          "invalidates": [
            "agent.surface.slack_person"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "agent.surface.slack_person",
          "result": "entity",
          "verb": "sign_in"
        }
      }
    },
    "/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/whatsapp/numbers/{phone_number_id}": {
      "get": {
        "description": "Webhook verification endpoint for one pooled WhatsApp number.",
        "operationId": "surface.webhook.verify_whatsapp_number",
        "parameters": [
          {
            "in": "path",
            "name": "phone_number_id",
            "required": true,
            "schema": {
              "title": "Phone Number 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 a pooled WhatsApp number's own callback URL",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "verify_whatsapp_number"
        }
      },
      "post": {
        "description": "Handle a delivery to one pooled WhatsApp number's own callback URL.",
        "operationId": "surface.webhook.handle_whatsapp_number",
        "parameters": [
          {
            "in": "path",
            "name": "phone_number_id",
            "required": true,
            "schema": {
              "title": "Phone Number 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 a webhook delivered to one pooled WhatsApp number",
        "tags": [
          "Agent Surfaces (Ingress)"
        ],
        "x-lemma": {
          "invalidates": [
            "surface.webhook"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "surface.webhook",
          "result": "entity",
          "verb": "handle_whatsapp_number"
        }
      }
    },
    "/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/me/events": {
      "get": {
        "operationId": "usage.me.events.list",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Organization Id"
            }
          },
          {
            "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": 50,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          }
        ],
        "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": "My Events",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.me.events",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/usage/me/limits": {
      "get": {
        "operationId": "usage.me.limits.get",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Organization Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyUsageLimitsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "My Limits",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "usage.me.limits",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/usage/me/stats": {
      "get": {
        "operationId": "usage.me.stats.get",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Organization Id"
            }
          },
          {
            "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": 50,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          }
        ],
        "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": "My Stats",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.me.stats",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/usage/me/summary": {
      "get": {
        "operationId": "usage.me.summary.get",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Organization Id"
            }
          },
          {
            "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": 50,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          }
        ],
        "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": "My Summary",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "usage.me.summary",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/usage/organizations/{organization_id}/contacts-cap": {
      "get": {
        "description": "The organization's cap on what answering contacts may cost a month.",
        "operationId": "usage.organization.contacts_cap.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/ContactsCapResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Contacts Cap",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "usage.organization.contacts_cap",
          "result": "entity",
          "verb": "get"
        }
      },
      "put": {
        "description": "Set the cap, or remove it for no limit. Organization owners only.\n\nContacts are never billed, so this is the ceiling on what people outside\nthe organization can cost it: past it, its bots stop answering them until\nthe month turns, and hand their conversations to members. Billing is an\nowner's, and so is this.",
        "operationId": "usage.organization.contacts_cap.update",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactsCapUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsCapResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Contacts Cap",
        "tags": [
          "Usage"
        ],
        "x-lemma": {
          "invalidates": [
            "usage.organization.contacts_cap"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "usage.organization.contacts_cap",
          "result": "entity",
          "verb": "update"
        }
      }
    },
    "/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": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          },
          {
            "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": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          },
          {
            "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": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          },
          {
            "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": "agent_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Run Id"
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          },
          {
            "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/email-delivery": {
      "get": {
        "description": "Whether this local installation can send email. Local installations only; 404 elsewhere.",
        "operationId": "user.email_delivery.get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailDeliveryStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Email Delivery Status",
        "tags": [
          "Users"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "user.email_delivery",
          "result": "entity",
          "verb": "get"
        }
      }
    },
    "/users/me/email-delivery/test": {
      "post": {
        "description": "Send a short test email to the signed-in user's own address with this installation's email settings. Local installations only; 404 elsewhere.",
        "operationId": "user.email_delivery.test",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailDeliveryTestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too many test emails; see Retry-After"
          }
        },
        "summary": "Send A Test Email",
        "tags": [
          "Users"
        ],
        "x-lemma": {
          "invalidates": [
            "user.email_delivery"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "user.email_delivery",
          "result": "entity",
          "verb": "test"
        }
      }
    },
    "/users/me/first-workspace": {
      "post": {
        "description": "Select an eligible organization and idempotently ensure the current user has a private pod and assistant.",
        "operationId": "users.ensure_first_workspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/FirstWorkspaceRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirstWorkspaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Ensure The Current User Has A Workspace",
        "tags": [
          "Users"
        ],
        "x-lemma": {
          "invalidates": [
            "users"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "users",
          "result": "entity",
          "verb": "ensure_first_workspace"
        }
      }
    },
    "/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"
        }
      }
    },
    "/web-logins": {
      "delete": {
        "operationId": "web_login.delete",
        "parameters": [
          {
            "description": "The site to forget, as an origin or a host.",
            "in": "query",
            "name": "origin",
            "required": true,
            "schema": {
              "description": "The site to forget, as an origin or a host.",
              "title": "Origin",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForgetResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign your browser out of a site",
        "tags": [
          "Web Logins"
        ],
        "x-lemma": {
          "invalidates": [
            "web_login"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "web_login",
          "result": "void",
          "verb": "delete"
        }
      },
      "get": {
        "operationId": "web_login.list",
        "parameters": [
          {
            "description": "Start the computer if it is paused. Off by default so that rendering this list is never what wakes one.",
            "in": "query",
            "name": "wake",
            "required": false,
            "schema": {
              "default": false,
              "description": "Start the computer if it is paused. Off by default so that rendering this list is never what wakes one.",
              "title": "Wake",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebLoginListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the sites your browser is signed in to",
        "tags": [
          "Web Logins"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "web_login",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/web-logins/sign-ins/{conversation_id}/{tool_call_id}": {
      "get": {
        "operationId": "web_login.sign_in.pending",
        "parameters": [
          {
            "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/PendingSignInResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "What a sign-in link is asking for",
        "tags": [
          "Web Logins"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "web_login.sign_in",
          "result": "entity",
          "verb": "pending"
        }
      }
    },
    "/web-logins/sign-ins/{conversation_id}/{tool_call_id}/answer": {
      "post": {
        "description": "Let the waiting run carry on, and check the site while they are here.\n\nNothing is captured: the browser keeps its own profile, so finishing a\nsign-in is the person finishing it. What this does do is look at the site\nstraight afterwards, while they are still present -- so \"it still wants a\nlogin\" is something they hear now rather than the agent discovering it.\n\nOne route for both answers because it is one answer. Two routes meant two\nstatus writes with two different guards, and the weaker one let a stale tab\noverwrite a decision the agent had already been given.",
        "operationId": "web_login.sign_in.answer",
        "parameters": [
          {
            "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"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerSignInRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignInOutcomeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Say whether you signed in",
        "tags": [
          "Web Logins"
        ],
        "x-lemma": {
          "invalidates": [
            "web_login.sign_in"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "web_login.sign_in",
          "result": "entity",
          "verb": "answer"
        }
      }
    },
    "/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"
        }
      }
    },
    "/workspace/browser/current-page-url": {
      "get": {
        "description": "Polled by the sign-in page while its VNC pane is open.\n\nVNC is pixels, not events -- it carries no navigation signal the way the\nJSON stream this replaced did with its `url` message on every\nnavigation. This is what the anti-phishing host display on\n`sign-in-to-site/[conversationId]/[toolCallId]/page.tsx` reads instead,\nso a person mid-SSO-redirect still sees which site they are actually on.",
        "operationId": "workspace.browser.current_page_url",
        "parameters": [
          {
            "in": "query",
            "name": "origin",
            "required": true,
            "schema": {
              "title": "Origin",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentPageUrlResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "What page a sign-in's browser is actually showing",
        "tags": [
          "Workspace Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workspace.browser",
          "result": "entity",
          "verb": "current_page_url"
        }
      }
    },
    "/workspace/browser/display-size": {
      "post": {
        "description": "Resize the sandbox display so the picture matches the pane.\n\nThe alternative, and what this replaces, is one fixed display scaled to\nfit: a 3:2 screen letterboxed into whatever box it lands in, small and\nringed with dead space. Resizing the display itself means the pixels sent\nare the pixels shown -- and a narrow pane gets a narrow *viewport*, so a\nsite serves its mobile layout to somebody signing in on a phone.\n\nA failure here is not an error for the person: they keep the display they\nhad. So an unreachable or sleeping sandbox answers with no size rather\nthan a status code the pane would have to special-case.",
        "operationId": "workspace.browser.resize_display",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplaySizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplaySizeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Fit the workspace display to the pane showing it",
        "tags": [
          "Workspace Apps"
        ],
        "x-lemma": {
          "invalidates": [
            "workspace.browser"
          ],
          "kind": "mutation",
          "paginates": false,
          "resource": "workspace.browser",
          "result": "entity",
          "verb": "resize_display"
        }
      }
    },
    "/workspace/browser/status": {
      "get": {
        "operationId": "workspace.browser.status",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Whether the workspace browser can be watched",
        "tags": [
          "Workspace Apps"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workspace.browser",
          "result": "entity",
          "verb": "status"
        }
      }
    },
    "/workspace/files": {
      "get": {
        "operationId": "workspace.files.list",
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Path"
            }
          },
          {
            "description": "Start the workspace if it is paused. Off by default.",
            "in": "query",
            "name": "wake",
            "required": false,
            "schema": {
              "default": false,
              "description": "Start the workspace if it is paused. Off by default.",
              "title": "Wake",
              "type": "boolean"
            }
          },
          {
            "description": "Continue after this entry's path, from a previous response's `next_after`.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Continue after this entry's path, from a previous response's `next_after`.",
              "title": "After"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceFileListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List workspace files",
        "tags": [
          "Workspace"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "workspace.files",
          "result": "collection",
          "verb": "list"
        }
      }
    },
    "/workspace/files:content": {
      "get": {
        "operationId": "workspace.files.content",
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "maxLength": 4096,
              "minLength": 1,
              "title": "Path",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "length",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 8388608,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Length"
            }
          },
          {
            "in": "header",
            "name": "Range",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Range"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-None-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read workspace file content",
        "tags": [
          "Workspace"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": true,
          "resource": "workspace.files",
          "result": "entity",
          "verb": "content"
        }
      }
    },
    "/workspace/files:stat": {
      "get": {
        "operationId": "workspace.files.stat",
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "maxLength": 4096,
              "minLength": 1,
              "title": "Path",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceFileEntry"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stat one workspace file",
        "tags": [
          "Workspace"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workspace.files",
          "result": "entity",
          "verb": "stat"
        }
      }
    },
    "/workspace/status": {
      "get": {
        "operationId": "workspace.status",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Whether your computer is ready",
        "tags": [
          "Workspace"
        ],
        "x-lemma": {
          "kind": "query",
          "paginates": false,
          "resource": "workspace",
          "result": "entity",
          "verb": "status"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.lemma.work",
      "description": "Lemma Cloud API"
    }
  ]
}
