{
  "openapi": "3.1.1",
  "info": {
    "title": "Mira general counseling workflow API — counselor",
    "version": "2026-10-30",
    "description": "Existing counselor/client API contracts, not an OAuth or MCP server. Session credentials carry the user’s existing account permissions. Public docs do not authorize data access. Agent approval annotations are connector policy guidance, not additional backend enforcement."
  },
  "servers": [
    {
      "url": "/api",
      "description": "Same-origin API. Resolve against the verified documentation origin."
    }
  ],
  "security": [
    {
      "sessionBearer": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Service health",
        "description": "No credentials needed.",
        "tags": [
          "health"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/auth/login": {
      "post": {
        "operationId": "login",
        "summary": "Sign in and obtain a session bearer token",
        "description": "Opaque token expires after 24 hours; no refresh-token or OAuth endpoint. Prefer a human-provided session held in a trusted connector, not model context.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: LoginResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Login"
              }
            }
          }
        }
      }
    },
    "/auth/signup/config": {
      "get": {
        "operationId": "practiceSignupConfig",
        "summary": "Read public signup availability and verification configuration",
        "description": "Returns only availability, the public Turnstile site key and acknowledgment version, never provider secrets.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: SignupConfig",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupConfig"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/signup.ts"
      }
    },
    "/auth/signup": {
      "post": {
        "operationId": "practiceSignupRequest",
        "summary": "Request a verification email for a new isolated practice",
        "description": "Human-operated signup. Requires Turnstile action practice_signup on the trusted app hostname, authority confirmation and privacy acknowledgment. Generic reply for eligible/existing/invited/suppressed/rate-limited email addresses. No workspace, account, password or session is created yet. Replacing a signup invalidates earlier links. 3 requests/email and 5/IP/15 minutes, 10/IP/day; globally capped at 250/day.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: SignupRequestResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupRequestResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/signup.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PracticeSignup"
              }
            }
          }
        }
      }
    },
    "/auth/signup/complete": {
      "post": {
        "operationId": "practiceSignupComplete",
        "summary": "Verify an email capability and create its isolated practice",
        "description": "Human-operated, single-use 24-hour email capability plus a new password. Creates a fresh workspace and fixed owner/clinical admin account scoped only to that practice, then signs in. Cannot choose role, workspace, or join an existing practice. Existing account/invitation emails must use sign-in/invitation flows instead. Booking remains unpublished and optional notifications off. Never put signup capabilities or passwords into model context.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: SignupResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/signup.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteSignup"
              }
            }
          }
        }
      }
    },
    "/auth/forgot-password": {
      "post": {
        "operationId": "passwordResetRequest",
        "summary": "Request a private password reset email",
        "description": "Always returns the same generic response for unknown, disabled, rate-limited or email-disabled accounts. No token in response. Email is limited to three requests/address and twenty/IP per 15 minutes. Requires configured, enabled workspace email.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/password-reset.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequest"
              }
            }
          }
        }
      }
    },
    "/auth/reset-password": {
      "post": {
        "operationId": "passwordReset",
        "summary": "Choose a new password with a reset capability",
        "description": "Human-controlled, single-use reset token from email fragment; expires in 30 minutes. Revokes all browser sessions, agent tokens and other reset links. Never log tokens or passwords.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/password-reset.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordReset"
              }
            }
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "operationId": "identity",
        "summary": "Verify current identity and workspace",
        "description": "",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/auth/token": {
      "post": {
        "operationId": "sessionToken",
        "summary": "Export the current session token",
        "description": "Human-operated Settings → Mira token reveal/copy. Returns the current session, not a new or refreshed token. Cookie requests require an approved Origin. Sign out to revoke; never log the response or include it in model context.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: SessionToken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionToken"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/auth/agent-tokens": {
      "get": {
        "operationId": "agentTokensList",
        "summary": "List your named agent tokens",
        "description": "Browser/login session required, not an agent token. Lists only your token metadata; never returns secrets or hashes. Includes expired tokens.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: AgentTokenList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTokenList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      },
      "post": {
        "operationId": "agentTokensCreate",
        "summary": "Create a named agent token",
        "description": "Human-operated browser/login session required. Secret is returned once. Default expiry 30 days, allowed 1–90 days. Maximum 50 tokens including expired ones; delete unused tokens. Store as MIRA_TOKEN in the connector secret store. Does not affect browser sessions.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: AgentTokenCreated; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTokenCreated"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTokenCreate"
              }
            }
          }
        }
      }
    },
    "/auth/agent-tokens/{id}": {
      "delete": {
        "operationId": "agentTokensDelete",
        "summary": "Delete your agent token",
        "description": "Human-operated browser/login session required. Immediately revokes only this owned token, without signing you out. Foreign or already deleted IDs return 404.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/auth/logout": {
      "post": {
        "operationId": "logout",
        "summary": "Revoke the current session",
        "description": "Revokes the supplied token only.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/auth/password": {
      "post": {
        "operationId": "passwordChange",
        "summary": "Change your account password",
        "description": "Client: invalidates all client sessions, response also contains sign_in_again:true. Counselor: invalidates other sessions, retains current one. Password entry should remain human-controlled.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          }
        }
      }
    },
    "/auth/staff/activate": {
      "post": {
        "operationId": "counselorActivate",
        "summary": "Activate an invitation",
        "description": "24-hour, single-use invitation token, NOT a session bearer token.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/onboarding.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Activation"
              }
            }
          }
        }
      }
    },
    "/clients": {
      "get": {
        "operationId": "clientsList",
        "summary": "List your clients",
        "description": "Own assigned contacts only. Archive is not erasure; scheduled bookings block archiving. Reassignment is not supported. Archiving disables linked client portal access. Maximum 5000; no pagination/filter query supported. Filter locally.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: ClientList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "clientsCreate",
        "summary": "Create a client",
        "description": "Own assigned contacts only. Archive is not erasure; scheduled bookings block archiving. Reassignment is not supported. Archiving disables linked client portal access.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: ClientResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientCreate"
              }
            }
          }
        }
      }
    },
    "/clients/{id}": {
      "get": {
        "operationId": "clientsRead",
        "summary": "Read a client",
        "description": "Own assigned contacts only. Archive is not erasure; scheduled bookings block archiving. Reassignment is not supported. Archiving disables linked client portal access.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: ClientResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      },
      "patch": {
        "operationId": "clientsUpdate",
        "summary": "Update a client",
        "description": "Own assigned contacts only. Archive is not erasure; scheduled bookings block archiving. Reassignment is not supported. Archiving disables linked client portal access. Re-read after 409; preserve every writable field you are not changing.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: ClientResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "clientsDelete",
        "summary": "Archive a client contact",
        "description": "Own assigned contacts only. Archive is not erasure; scheduled bookings block archiving. Reassignment is not supported. Archiving disables linked client portal access.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/bookings": {
      "get": {
        "operationId": "bookingsList",
        "summary": "List your bookings",
        "description": "Own bookings only. End must be after start; active client must belong to this counselor. Type selection may recalculate end/duration; buffers, overlap and daily limits apply. PATCH sends a complete writable body, not a sparse patch. Maximum 5000; no pagination/filter query supported. Filter locally.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: BookingList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "bookingsCreate",
        "summary": "Create a booking",
        "description": "Own bookings only. End must be after start; active client must belong to this counselor. Type selection may recalculate end/duration; buffers, overlap and daily limits apply. PATCH sends a complete writable body, not a sparse patch.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: BookingResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingCreate"
              }
            }
          }
        }
      }
    },
    "/bookings/{id}": {
      "get": {
        "operationId": "bookingsRead",
        "summary": "Read a booking",
        "description": "Own bookings only. End must be after start; active client must belong to this counselor. Type selection may recalculate end/duration; buffers, overlap and daily limits apply. PATCH sends a complete writable body, not a sparse patch.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: BookingResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      },
      "patch": {
        "operationId": "bookingsUpdate",
        "summary": "Update a booking",
        "description": "Own bookings only. End must be after start; active client must belong to this counselor. Type selection may recalculate end/duration; buffers, overlap and daily limits apply. PATCH sends a complete writable body, not a sparse patch. Re-read after 409; preserve every writable field you are not changing.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: BookingResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "bookingsDelete",
        "summary": "Soft-delete a booking",
        "description": "A booking with a session cannot be deleted. Cancel it with a full PATCH instead. Deleted records remain stored.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/counselors": {
      "get": {
        "operationId": "counselorsList",
        "summary": "List active workflow staff in your workspace",
        "description": "Directory access only; no counselor POST/PATCH/DELETE permission.",
        "tags": [
          "counselors"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: CounselorList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounselorList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/counselors/{id}": {
      "get": {
        "operationId": "counselorsRead",
        "summary": "Read workspace staff directory details",
        "description": "Cannot edit or assign roles.",
        "tags": [
          "counselors"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CounselorResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounselorResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/index.ts"
      }
    },
    "/clients/{id}/history": {
      "get": {
        "operationId": "clientHistory",
        "summary": "Read client booking and session history",
        "description": "Own client only; private counselor notes are not exposed by this response.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: ClientHistory",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientHistory"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/sessions.ts"
      }
    },
    "/clients/{id}/journey": {
      "get": {
        "operationId": "clientJourney",
        "summary": "Read client workflow/CRM associations",
        "description": "Own client only.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Journey",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Journey"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/clients/{id}/tags": {
      "put": {
        "operationId": "clientTagsReplace",
        "summary": "Replace all client tags associations",
        "description": "Replacement, not append. Empty ids clears the associations. Read journey first, merge deliberately; use unique IDs owned by the same counselor.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Ids"
              }
            }
          }
        }
      }
    },
    "/clients/{id}/consultation-types": {
      "put": {
        "operationId": "clientTypesReplace",
        "summary": "Replace all client consultation-types associations",
        "description": "Replacement, not append. Empty ids clears the associations. Read journey first, merge deliberately; use unique IDs owned by the same counselor.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Ids"
              }
            }
          }
        }
      }
    },
    "/sessions": {
      "get": {
        "operationId": "sessionsList",
        "summary": "List your sessions",
        "description": "Maximum 5000; no pagination. Session timestamps snapshot booking creation.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: SessionList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/sessions.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "sessionsCreate",
        "summary": "Create or reopen a booking session",
        "description": "Scheduled/completed booking and non-archived client required. One session per booking. Existing session returns 200 without replacing its title. Create response contains item only; GET also contains notes.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: SessionResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResult"
                }
              }
            }
          },
          "201": {
            "description": "Success: SessionResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "same-booking-id",
        "x-mira-source": "worker/sessions.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCreate"
              }
            }
          }
        }
      }
    },
    "/sessions/{id}": {
      "get": {
        "operationId": "sessionsRead",
        "summary": "Read a session with its private notes",
        "description": "Private counselor workspace content, not client portal content.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: SessionResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/sessions.ts"
      },
      "patch": {
        "operationId": "sessionsUpdate",
        "summary": "Update, complete, or reopen a session",
        "description": "Full body required. Future sessions cannot be completed. PATCH returns item only. No session DELETE endpoint.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: SessionResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/sessions.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionUpdate"
              }
            }
          }
        }
      }
    },
    "/sessions/{id}/notes": {
      "get": {
        "operationId": "notesList",
        "summary": "List private notes",
        "description": "Plain text is supported. Content must be non-whitespace and at most 12000 characters. Rich-format strings exist; agents should not invent their encoding.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: NoteList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoteList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/sessions.ts"
      },
      "post": {
        "operationId": "notesCreate",
        "summary": "Create a private note",
        "description": "Plain text is supported. Content must be non-whitespace and at most 12000 characters. Rich-format strings exist; agents should not invent their encoding.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "201": {
            "description": "Success: NoteResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoteResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/sessions.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteCreate"
              }
            }
          }
        }
      }
    },
    "/notes/{id}": {
      "get": {
        "operationId": "notesRead",
        "summary": "Read a private note",
        "description": "No client access.",
        "tags": [
          "notes"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: NoteResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoteResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/sessions.ts"
      },
      "patch": {
        "operationId": "notesUpdate",
        "summary": "Replace note title and content",
        "description": "Requires current version. Resets review_status to draft.",
        "tags": [
          "notes"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: NoteResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoteResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/sessions.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "notesDelete",
        "summary": "Soft-delete a private note",
        "description": "Preserves stored history; not permanent erasure.",
        "tags": [
          "notes"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/sessions.ts"
      }
    },
    "/notes/{id}/review": {
      "post": {
        "operationId": "notesReview",
        "summary": "Mark a note reviewed",
        "description": "Human review required; an agent must not imply counselor approval without it.",
        "tags": [
          "notes"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/audio.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Version"
              }
            }
          }
        }
      }
    },
    "/sessions/{id}/tasks": {
      "get": {
        "operationId": "sessionTasksList",
        "summary": "List session-linked tasks",
        "description": "Also includes client_id and counselor_id. Updates/deletes use /crm/followups/{id}.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tasks"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/sessions.ts"
      },
      "post": {
        "operationId": "sessionTasksCreate",
        "summary": "Create a session-linked task",
        "description": "client_visible defaults false. Setting true exposes the title to this client; confirm sharing. note_id must be a saved note in this session.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "201": {
            "description": "Success: RecordResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/sessions.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionTask"
              }
            }
          }
        }
      }
    },
    "/bookings/series": {
      "post": {
        "operationId": "bookingSeriesCreate",
        "summary": "Create follow-up or recurring appointments",
        "description": "Duration 5–240 minutes. Recurrence count 2–12, interval 1–12; uses counselor timezone and preserves local time across DST. Session route derives client/counselor; series route requires both. All writes are transactional. No series read/update/delete endpoint; manage each returned booking.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: SeriesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeriesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/booking-series.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FollowupBooking"
              }
            }
          }
        }
      }
    },
    "/sessions/{id}/bookings": {
      "post": {
        "operationId": "sessionBookingsCreate",
        "summary": "Create follow-up or recurring appointments",
        "description": "Duration 5–240 minutes. Recurrence count 2–12, interval 1–12; uses counselor timezone and preserves local time across DST. Session route derives client/counselor; series route requires both. All writes are transactional. No series read/update/delete endpoint; manage each returned booking.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "201": {
            "description": "Success: SeriesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeriesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/booking-series.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FollowupBooking"
              }
            }
          }
        }
      }
    },
    "/consultation-types": {
      "get": {
        "operationId": "ConsultationTypesList",
        "summary": "List consultation-types",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "consultation-types"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: ConsultationTypesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultationTypesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "ConsultationTypesCreate",
        "summary": "Create consultation-types",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code.",
        "tags": [
          "consultation-types"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: ConsultationTypesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultationTypesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsultationTypesCreate"
              }
            }
          }
        }
      }
    },
    "/consultation-types/{id}": {
      "get": {
        "operationId": "ConsultationTypesRead",
        "summary": "Read consultation-types",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code.",
        "tags": [
          "consultation-types"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: ConsultationTypesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultationTypesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "ConsultationTypesUpdate",
        "summary": "Update consultation-types",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "consultation-types"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: ConsultationTypesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultationTypesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsultationTypesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "ConsultationTypesDelete",
        "summary": "Delete/archive consultation-types",
        "description": "Archive (history remains).",
        "tags": [
          "consultation-types"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/availability-rules": {
      "get": {
        "operationId": "AvailabilityRulesList",
        "summary": "List availability-rules",
        "description": "weekday 0=Sunday through 6=Saturday. opens_at/closes_at are HH:mm, same-day increasing; type must belong to you. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "availability-rules"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: AvailabilityRulesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityRulesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "AvailabilityRulesCreate",
        "summary": "Create availability-rules",
        "description": "weekday 0=Sunday through 6=Saturday. opens_at/closes_at are HH:mm, same-day increasing; type must belong to you.",
        "tags": [
          "availability-rules"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: AvailabilityRulesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityRulesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailabilityRulesCreate"
              }
            }
          }
        }
      }
    },
    "/availability-rules/{id}": {
      "get": {
        "operationId": "AvailabilityRulesRead",
        "summary": "Read availability-rules",
        "description": "weekday 0=Sunday through 6=Saturday. opens_at/closes_at are HH:mm, same-day increasing; type must belong to you.",
        "tags": [
          "availability-rules"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: AvailabilityRulesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityRulesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "AvailabilityRulesUpdate",
        "summary": "Update availability-rules",
        "description": "weekday 0=Sunday through 6=Saturday. opens_at/closes_at are HH:mm, same-day increasing; type must belong to you. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "availability-rules"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: AvailabilityRulesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityRulesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailabilityRulesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "AvailabilityRulesDelete",
        "summary": "Delete/archive availability-rules",
        "description": "Hard-delete; tags also lose client associations.",
        "tags": [
          "availability-rules"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/date-overrides": {
      "get": {
        "operationId": "DateOverridesList",
        "summary": "List date-overrides",
        "description": "day YYYY-MM-DD. Closed day permits null times; open day requires increasing HH:mm times. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "date-overrides"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DateOverridesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateOverridesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "DateOverridesCreate",
        "summary": "Create date-overrides",
        "description": "day YYYY-MM-DD. Closed day permits null times; open day requires increasing HH:mm times.",
        "tags": [
          "date-overrides"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: DateOverridesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateOverridesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DateOverridesCreate"
              }
            }
          }
        }
      }
    },
    "/date-overrides/{id}": {
      "get": {
        "operationId": "DateOverridesRead",
        "summary": "Read date-overrides",
        "description": "day YYYY-MM-DD. Closed day permits null times; open day requires increasing HH:mm times.",
        "tags": [
          "date-overrides"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DateOverridesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateOverridesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "DateOverridesUpdate",
        "summary": "Update date-overrides",
        "description": "day YYYY-MM-DD. Closed day permits null times; open day requires increasing HH:mm times. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "date-overrides"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DateOverridesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateOverridesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DateOverridesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DateOverridesDelete",
        "summary": "Delete/archive date-overrides",
        "description": "Hard-delete; tags also lose client associations.",
        "tags": [
          "date-overrides"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/blocked-times": {
      "get": {
        "operationId": "BlockedTimesList",
        "summary": "List blocked-times",
        "description": "UTC end must be after start. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "blocked-times"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: BlockedTimesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockedTimesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "BlockedTimesCreate",
        "summary": "Create blocked-times",
        "description": "UTC end must be after start.",
        "tags": [
          "blocked-times"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: BlockedTimesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockedTimesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlockedTimesCreate"
              }
            }
          }
        }
      }
    },
    "/blocked-times/{id}": {
      "get": {
        "operationId": "BlockedTimesRead",
        "summary": "Read blocked-times",
        "description": "UTC end must be after start.",
        "tags": [
          "blocked-times"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: BlockedTimesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockedTimesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "BlockedTimesUpdate",
        "summary": "Update blocked-times",
        "description": "UTC end must be after start. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "blocked-times"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: BlockedTimesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockedTimesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlockedTimesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "BlockedTimesDelete",
        "summary": "Delete/archive blocked-times",
        "description": "Hard-delete; tags also lose client associations.",
        "tags": [
          "blocked-times"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/pipelines": {
      "get": {
        "operationId": "CrmPipelinesList",
        "summary": "List crm/pipelines",
        "description": "Create also creates seven default stages and booking/session-stage associations. Set stage references only after creation. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmPipelinesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmPipelinesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "CrmPipelinesCreate",
        "summary": "Create crm/pipelines",
        "description": "Create also creates seven default stages and booking/session-stage associations. Set stage references only after creation.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CrmPipelinesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmPipelinesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmPipelinesCreate"
              }
            }
          }
        }
      }
    },
    "/crm/pipelines/{id}": {
      "get": {
        "operationId": "CrmPipelinesRead",
        "summary": "Read crm/pipelines",
        "description": "Create also creates seven default stages and booking/session-stage associations. Set stage references only after creation.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmPipelinesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmPipelinesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "CrmPipelinesUpdate",
        "summary": "Update crm/pipelines",
        "description": "Create also creates seven default stages and booking/session-stage associations. Set stage references only after creation. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmPipelinesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmPipelinesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmPipelinesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CrmPipelinesDelete",
        "summary": "Delete/archive crm/pipelines",
        "description": "Archive (history remains).",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/stages": {
      "get": {
        "operationId": "CrmStagesList",
        "summary": "List crm/stages",
        "description": "Derived counselor from pipeline. Cannot move pipeline. A won stage must have probability=100, lost=0; cannot be both. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmStagesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmStagesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "CrmStagesCreate",
        "summary": "Create crm/stages",
        "description": "Derived counselor from pipeline. Cannot move pipeline. A won stage must have probability=100, lost=0; cannot be both.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CrmStagesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmStagesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmStagesCreate"
              }
            }
          }
        }
      }
    },
    "/crm/stages/{id}": {
      "get": {
        "operationId": "CrmStagesRead",
        "summary": "Read crm/stages",
        "description": "Derived counselor from pipeline. Cannot move pipeline. A won stage must have probability=100, lost=0; cannot be both.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmStagesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmStagesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "CrmStagesUpdate",
        "summary": "Update crm/stages",
        "description": "Derived counselor from pipeline. Cannot move pipeline. A won stage must have probability=100, lost=0; cannot be both. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmStagesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmStagesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmStagesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CrmStagesDelete",
        "summary": "Delete/archive crm/stages",
        "description": "Archive (history remains).",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/opportunities": {
      "get": {
        "operationId": "CrmOpportunitiesList",
        "summary": "List crm/opportunities",
        "description": "Client, pipeline, stage and optional type must belong to you; stage must be in pipeline. Stage changes record history and may set closed_at. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmOpportunitiesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmOpportunitiesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "CrmOpportunitiesCreate",
        "summary": "Create crm/opportunities",
        "description": "Client, pipeline, stage and optional type must belong to you; stage must be in pipeline. Stage changes record history and may set closed_at.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CrmOpportunitiesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmOpportunitiesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmOpportunitiesCreate"
              }
            }
          }
        }
      }
    },
    "/crm/opportunities/{id}": {
      "get": {
        "operationId": "CrmOpportunitiesRead",
        "summary": "Read crm/opportunities",
        "description": "Client, pipeline, stage and optional type must belong to you; stage must be in pipeline. Stage changes record history and may set closed_at.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmOpportunitiesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmOpportunitiesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "CrmOpportunitiesUpdate",
        "summary": "Update crm/opportunities",
        "description": "Client, pipeline, stage and optional type must belong to you; stage must be in pipeline. Stage changes record history and may set closed_at. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmOpportunitiesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmOpportunitiesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmOpportunitiesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CrmOpportunitiesDelete",
        "summary": "Delete/archive crm/opportunities",
        "description": "Soft-delete (history remains).",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/activities": {
      "get": {
        "operationId": "CrmActivitiesList",
        "summary": "List crm/activities",
        "description": "kind=email/message logs an activity; does NOT send an email or portal message. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmActivitiesList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmActivitiesList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "CrmActivitiesCreate",
        "summary": "Create crm/activities",
        "description": "kind=email/message logs an activity; does NOT send an email or portal message.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CrmActivitiesResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmActivitiesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmActivitiesCreate"
              }
            }
          }
        }
      }
    },
    "/crm/activities/{id}": {
      "get": {
        "operationId": "CrmActivitiesRead",
        "summary": "Read crm/activities",
        "description": "kind=email/message logs an activity; does NOT send an email or portal message.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmActivitiesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmActivitiesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "CrmActivitiesUpdate",
        "summary": "Update crm/activities",
        "description": "kind=email/message logs an activity; does NOT send an email or portal message. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmActivitiesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmActivitiesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmActivitiesUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CrmActivitiesDelete",
        "summary": "Delete/archive crm/activities",
        "description": "Soft-delete (history remains).",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/followups": {
      "get": {
        "operationId": "CrmFollowupsList",
        "summary": "List crm/followups",
        "description": "client_visible defaults false. Setting true shares the task title; source_session_id/source_note_id are preserved server metadata, not writable here. No automatic task email. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmFollowupsList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmFollowupsList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "CrmFollowupsCreate",
        "summary": "Create crm/followups",
        "description": "client_visible defaults false. Setting true shares the task title; source_session_id/source_note_id are preserved server metadata, not writable here. No automatic task email.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CrmFollowupsResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmFollowupsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmFollowupsCreate"
              }
            }
          }
        }
      }
    },
    "/crm/followups/{id}": {
      "get": {
        "operationId": "CrmFollowupsRead",
        "summary": "Read crm/followups",
        "description": "client_visible defaults false. Setting true shares the task title; source_session_id/source_note_id are preserved server metadata, not writable here. No automatic task email.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmFollowupsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmFollowupsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "CrmFollowupsUpdate",
        "summary": "Update crm/followups",
        "description": "client_visible defaults false. Setting true shares the task title; source_session_id/source_note_id are preserved server metadata, not writable here. No automatic task email. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmFollowupsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmFollowupsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmFollowupsUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CrmFollowupsDelete",
        "summary": "Delete/archive crm/followups",
        "description": "Soft-delete (history remains).",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/tags": {
      "get": {
        "operationId": "CrmTagsList",
        "summary": "List crm/tags",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code. Maximum 5000; archived rows may appear. Optional counselor_id must equal your user.id.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your counselor user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmTagsList",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmTagsList"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts",
        "x-mira-list-limit": 5000
      },
      "post": {
        "operationId": "CrmTagsCreate",
        "summary": "Create crm/tags",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CrmTagsResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmTagsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmTagsCreate"
              }
            }
          }
        }
      }
    },
    "/crm/tags/{id}": {
      "get": {
        "operationId": "CrmTagsRead",
        "summary": "Read crm/tags",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmTagsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmTagsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "patch": {
        "operationId": "CrmTagsUpdate",
        "summary": "Update crm/tags",
        "description": "Items belong to your counselor account; currency uses uppercase three-letter code. Full writable body and current version required; no owner reassignment.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: CrmTagsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmTagsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmTagsUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CrmTagsDelete",
        "summary": "Delete/archive crm/tags",
        "description": "Hard-delete; tags also lose client associations.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/booking-settings": {
      "get": {
        "operationId": "bookingSettingsRead",
        "summary": "Read private booking profile and public URL",
        "description": "Unsaved defaults have version=0. Public page is available only if enabled.",
        "tags": [
          "booking-settings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your user.id; defaults to current user.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: BookingSettingsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingSettingsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      },
      "put": {
        "operationId": "bookingSettingsReplace",
        "summary": "Save complete booking settings",
        "description": "Full replacement. Saved settings require current version; first save may use 0. Also updates counselor timezone. meeting_early_minutes/meeting_late_minutes are stored settings, not a current meeting-join time restriction.",
        "tags": [
          "booking-settings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: BookingSettingsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingSettingsResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/practice.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingSettings"
              }
            }
          }
        }
      }
    },
    "/crm/reminders": {
      "get": {
        "operationId": "crmDueCount",
        "summary": "Count your due pending followups",
        "description": "Returns {count}. Does not send notifications.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/crm/metrics": {
      "get": {
        "operationId": "crmMetrics",
        "summary": "Read your workflow metrics",
        "description": "Currency totals stay separated; rates are fractions, not percentages.",
        "tags": [
          "crm"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "counselor_id",
            "schema": {
              "type": "string"
            },
            "description": "Your user.id only.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Metrics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metrics"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/practice.ts"
      }
    },
    "/clients/{id}/messages": {
      "get": {
        "operationId": "counselorMessagesList",
        "summary": "Read portal conversation",
        "description": "Stored conversation, distinct from temporary meeting chat. Latest 200 messages returned in chronological order. Sending is externally visible; 30 per user per minute. No message edit/delete route.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Messages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Messages"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/collaboration.ts",
        "x-mira-list-limit": 200
      },
      "post": {
        "operationId": "counselorMessagesCreate",
        "summary": "Send a portal message",
        "description": "Stored conversation, distinct from temporary meeting chat. Latest 200 messages returned in chronological order. Sending is externally visible; 30 per user per minute. No message edit/delete route.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "201": {
            "description": "Success: Ok; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/collaboration.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          }
        }
      }
    },
    "/clients/{id}/documents": {
      "get": {
        "operationId": "counselorDocumentsList",
        "summary": "List shared documents",
        "description": "Two-phase upload: initialize metadata, then PUT original bytes to /documents/{id}/file. UUID upload_id enables safe initialization retries. PDF max 10 MiB, 1–100 pages, unencrypted/readable. Client cannot request a signature. Listing returns current consent_text/version. Upload limit 10/user/minute.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Documents"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/collaboration.ts",
        "x-mira-list-limit": 1000
      },
      "post": {
        "operationId": "counselorDocumentsCreate",
        "summary": "Initialize a PDF upload",
        "description": "Two-phase upload: initialize metadata, then PUT original bytes to /documents/{id}/file. UUID upload_id enables safe initialization retries. PDF max 10 MiB, 1–100 pages, unencrypted/readable. Client cannot request a signature. Listing returns current consent_text/version. Upload limit 10/user/minute.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DocumentResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResult"
                }
              }
            }
          },
          "201": {
            "description": "Success: DocumentResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "same-upload-id-and-file",
        "x-mira-source": "worker/collaboration.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentCreate"
              }
            }
          }
        }
      }
    },
    "/documents/{id}": {
      "get": {
        "operationId": "documentsRead",
        "summary": "Read permitted document metadata",
        "description": "Client: only their own documents; cannot read another uploader’s pending upload or revoked document.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DocumentResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/collaboration.ts"
      },
      "patch": {
        "operationId": "documentsUpdate",
        "summary": "Change whether a shared document requires signature",
        "description": "Only shared documents; current version required. Does not replace file/title.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DocumentResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/collaboration.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "documentsDelete",
        "summary": "Revoke or discard a document",
        "description": "Counselor: revoke their client document. Client: discard only own pending upload (status uploading). Not permanent blob erasure.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "version",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Current version from a fresh read; optimistic concurrency token.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/collaboration.ts"
      }
    },
    "/documents/{id}/file": {
      "get": {
        "operationId": "documentsDownload",
        "summary": "Download original or signed PDF",
        "description": "Only shared/signed status. Signed copy requires signed_key. Raw bytes, not JSON; access is audited.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "copy",
            "schema": {
              "type": "string",
              "enum": [
                "original",
                "signed"
              ]
            },
            "description": "Defaults to original; signed selects acknowledged copy.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Record",
            "content": {
              "application/pdf": {
                "schema": {
                  "contentMediaType": "application/pdf"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/collaboration.ts"
      },
      "put": {
        "operationId": "documentsUpload",
        "summary": "Upload the exact initialized PDF bytes",
        "description": "Only original uploader. SHA-256 and exact byte count must match initialization. Finishing the upload shares it with the other party. Do not base64 or multipart encode.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DocumentResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "same-file-and-document-id",
        "x-mira-source": "worker/collaboration.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/pdf": {
              "schema": {
                "contentMediaType": "application/pdf"
              }
            }
          }
        }
      }
    },
    "/documents/{id}/events": {
      "get": {
        "operationId": "documentEvents",
        "summary": "Read permitted document audit events and acknowledgment",
        "description": "Only a document this user may access. Includes actor metadata and signature attribution.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: DocumentEvents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentEvents"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/collaboration.ts"
      }
    },
    "/clients/{id}/account": {
      "get": {
        "operationId": "clientAccountRead",
        "summary": "Read client portal access status",
        "description": "Own non-archived client with a valid unique email. Active access must be disabled before replacement; replacement invalidates old invitations/sessions. send_email requires configured, enabled Resend. Account invitation is not an appointment link.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: AccountResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/accounts.ts"
      },
      "post": {
        "operationId": "clientAccountInvite",
        "summary": "Issue or replace client activation invitation",
        "description": "Own non-archived client with a valid unique email. Active access must be disabled before replacement; replacement invalidates old invitations/sessions. send_email requires configured, enabled Resend. Account invitation is not an appointment link.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: InvitationResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/accounts.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendInvitation"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "clientAccountDisable",
        "summary": "Disable client portal access",
        "description": "Own non-archived client with a valid unique email. Active access must be disabled before replacement; replacement invalidates old invitations/sessions. send_email requires configured, enabled Resend. Account invitation is not an appointment link.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/accounts.ts"
      }
    },
    "/clients/{id}/email-preferences": {
      "get": {
        "operationId": "counselorEmailRead",
        "summary": "Read reminder email preference",
        "description": "Enabling requires actual permission and consent_confirmed=true. Bound to current contact email; mismatched account email blocks client opt-in. Disabling needs no consent flag.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: EmailPermissionResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailPermissionResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/email.ts"
      },
      "put": {
        "operationId": "counselorEmailUpdate",
        "summary": "Set reminder email permission",
        "description": "Enabling requires actual permission and consent_confirmed=true. Bound to current contact email; mismatched account email blocks client opt-in. Disabling needs no consent flag.",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/email.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailPermission"
              }
            }
          }
        }
      }
    },
    "/notifications/preferences": {
      "get": {
        "operationId": "notificationPreferencesRead",
        "summary": "Manage own client/counselor reminder offsets",
        "description": "Up to five unique offsets, 1–10080 whole minutes. Empty arrays disable an audience. Does not enable workspace email sending; only admin can do that.",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: ReminderPreferencesResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderPreferencesResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/email.ts"
      },
      "put": {
        "operationId": "notificationPreferencesUpdate",
        "summary": "Manage own client/counselor reminder offsets",
        "description": "Up to five unique offsets, 1–10080 whole minutes. Empty arrays disable an audience. Does not enable workspace email sending; only admin can do that.",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/email.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReminderPreferences"
              }
            }
          }
        }
      }
    },
    "/notifications/reminders": {
      "get": {
        "operationId": "scheduledRemindersList",
        "summary": "List your scheduled generic reminders",
        "description": "Maximum 100. due_at is epoch milliseconds here (write accepts ISO timestamp). Includes terminal states.",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Reminders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reminders"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/email.ts",
        "x-mira-list-limit": 100
      },
      "post": {
        "operationId": "scheduledRemindersCreate",
        "summary": "Schedule a generic client or counselor email reminder",
        "description": "Client audience requires own client_id. Due time >1 minute and <366 days away. Internal label is not emailed; share instructions separately. Email preferences, permission and workspace delivery must be enabled.",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success: CreatedId; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedId"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/email.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Reminder"
              }
            }
          }
        }
      }
    },
    "/notifications/reminders/{id}": {
      "delete": {
        "operationId": "scheduledReminderCancel",
        "summary": "Cancel a pending reminder",
        "description": "No edit endpoint. Accepted mail cannot be recalled.",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/email.ts"
      }
    },
    "/notifications/deliveries": {
      "get": {
        "operationId": "emailActivity",
        "summary": "Read your permitted email job activity",
        "description": "Maximum 100; accepted does not mean delivered. Timestamps are epoch milliseconds, provider errors are codes only.",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deliveries"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/email.ts",
        "x-mira-list-limit": 100
      }
    },
    "/invitations": {
      "get": {
        "operationId": "invitationsList",
        "summary": "List own client portal invitation statuses",
        "description": "Maximum 100 client accounts; no counselor staff-invitation CRUD. Client invites managed via /clients/{id}/account.",
        "tags": [
          "invitations"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Invitations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitations"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/onboarding.ts",
        "x-mira-list-limit": 100
      }
    },
    "/onboarding": {
      "get": {
        "operationId": "onboardingRead",
        "summary": "Read/update your setup checklist",
        "description": "Per-account checklist, not verification or authorization.",
        "tags": [
          "onboarding"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: OnboardingResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/onboarding.ts"
      },
      "put": {
        "operationId": "onboardingUpdate",
        "summary": "Read/update your setup checklist",
        "description": "Per-account checklist, not verification or authorization.",
        "tags": [
          "onboarding"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/onboarding.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Onboarding"
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/meeting": {
      "post": {
        "operationId": "bookingMeeting",
        "summary": "Create/get or restore own booking meeting invitation",
        "description": "Scheduled/completed booking required. Can restore a previously ended invitation. Does not join call/media. Treat guest_url as a secret capability.",
        "tags": [
          "bookings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: MeetingLink",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingLink"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/meetings.ts"
      }
    },
    "/meetings/{id}/join": {
      "post": {
        "operationId": "meetingJoin",
        "summary": "Obtain short-lived WebRTC signaling configuration",
        "description": "Counselor can use bearer alone for own room; this may create the booking session. Client/anonymous needs the invitation token in body, even with client bearer. Ticket expires in two minutes. Use stable per-tab UUID peer_id; joining checks two-person capacity. No media capture via REST.",
        "tags": [
          "meetings"
        ],
        "security": [
          {},
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: MeetingConfig",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingConfig"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/meetings.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeetingJoin"
              }
            }
          }
        }
      }
    },
    "/meetings/{id}/end": {
      "post": {
        "operationId": "meetingEnd",
        "summary": "End own meeting for everyone",
        "description": "Explicitly disconnects participants and ends the invitation. Leaving a browser call alone does not invoke this.",
        "tags": [
          "meetings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/meetings.ts"
      }
    },
    "/meetings/{id}/socket": {
      "get": {
        "operationId": "meetingSocket",
        "summary": "Upgrade a ticket-authenticated signaling WebSocket",
        "description": "NOT session bearer authentication. Upgrade: websocket; Sec-WebSocket-Protocol: mira, auth.<ticket>. Ticket came from meetingJoin. Real WebRTC browser transport required; no generic JSON GET. See meeting protocol guide.",
        "tags": [
          "meetings"
        ],
        "security": [
          {
            "meetingTicket": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "101": {
            "description": "WebSocket protocol upgrade"
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor",
          "client"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/meetings.ts"
      }
    },
    "/audio/config": {
      "get": {
        "operationId": "audioConfig",
        "summary": "Check optional storage/transcription/AI configuration",
        "description": "Provider host must be reconfirmed before each consent-dependent operation.",
        "tags": [
          "audio"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: AudioConfig",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioConfig"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/audio.ts"
      }
    },
    "/sessions/{id}/recordings": {
      "get": {
        "operationId": "recordingsList",
        "summary": "List recording metadata",
        "description": "No client portal access.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Recordings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recordings"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/audio.ts"
      },
      "post": {
        "operationId": "recordingsCreate",
        "summary": "Register a consented segmented recording",
        "description": "Explicit recording and cloud-processing consent required. Max 2 hours; 1–60 contiguous parts, each non-final part 120000 ms. UUID id supplied by caller makes registration safely resumable; same session only.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: RecordingResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingResult"
                }
              }
            }
          },
          "201": {
            "description": "Success: RecordingResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "same-recording-id-and-manifest",
        "x-mira-source": "worker/audio.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordingCreate"
              }
            }
          }
        }
      }
    },
    "/recordings/{id}": {
      "get": {
        "operationId": "recordingsRead",
        "summary": "Read recording and part metadata",
        "description": "Requires private recording storage.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: RecordingResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/audio.ts"
      },
      "delete": {
        "operationId": "recordingsDelete",
        "summary": "Delete recording metadata access and stored recording objects",
        "description": "Destructive blob cleanup; existing notes generated from it are not deleted.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/audio.ts"
      }
    },
    "/recordings/{id}/parts/{index}": {
      "get": {
        "operationId": "recordingPartRead",
        "summary": "Download permitted recording WAV part",
        "description": "Raw audio, not JSON. Removed audio returns 404.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 59
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Record",
            "content": {
              "audio/wav": {
                "schema": {
                  "contentMediaType": "audio/wav"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/audio.ts"
      },
      "put": {
        "operationId": "recordingPartUpload",
        "summary": "Upload exact WAV part",
        "description": "16 kHz stereo 16-bit PCM WAV, max 8000000 bytes; duration within 2 ms of manifest. Same bytes safe to retry; different existing bytes cause 409. Not multipart/base64.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 59
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "same-recording-part-bytes",
        "x-mira-source": "worker/audio.ts",
        "requestBody": {
          "required": true,
          "content": {
            "audio/wav": {
              "schema": {
                "contentMediaType": "audio/wav"
              }
            }
          }
        }
      }
    },
    "/recordings/{id}/transcribe/{index}": {
      "post": {
        "operationId": "recordingTranscribe",
        "summary": "Transcribe a consented uploaded recording part",
        "description": "provider must equal transcription_provider hostname from audioConfig. Calls configured external provider; confirm before transmission. Processing lock may return 409; inspect state before retry.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 59
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/audio.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Transcribe"
              }
            }
          }
        }
      }
    },
    "/recordings/{id}/finalize-transcript": {
      "post": {
        "operationId": "transcriptFinalize",
        "summary": "Assemble all transcribed parts",
        "description": "All parts must be transcribed. If retain_audio=false, removes source audio after finalization.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Transcript",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transcript"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/audio.ts"
      }
    },
    "/recordings/{id}/transcript": {
      "get": {
        "operationId": "transcriptRead",
        "summary": "Read finalized transcript",
        "description": "Raw JSON object, no item wrapper; 409 if not ready.",
        "tags": [
          "recordings"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Transcript",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transcript"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/audio.ts"
      }
    },
    "/sessions/{id}/analysis": {
      "post": {
        "operationId": "analysisCreate",
        "summary": "Generate workflow drafts from transcript and manual notes",
        "description": "Requires transcript from this session. provider must equal ai_provider hostname. Transmits transcript and manual notes to configured provider; creates draft notes and proposed actions, not human-approved conclusions. Same input/provider/model may return cached run.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "201": {
            "description": "Success: AnalysisResult; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/audio.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Analysis"
              }
            }
          }
        }
      }
    },
    "/sessions/{id}/actions": {
      "get": {
        "operationId": "actionsList",
        "summary": "List session proposed actions",
        "description": "Separate from CRM/client-visible tasks.",
        "tags": [
          "sessions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Actions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Actions"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/audio.ts"
      }
    },
    "/actions/{id}": {
      "patch": {
        "operationId": "actionsUpdate",
        "summary": "Approve, complete or dismiss a proposed action",
        "description": "Current version required. Must be approved before marking done. Human approval must not be inferred from model output.",
        "tags": [
          "actions"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/audio.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionUpdate"
              }
            }
          }
        }
      }
    },
    "/auth/wechat/config": {
      "get": {
        "operationId": "wechatConfig",
        "summary": "Check WeChat login availability",
        "description": "Public.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: WeChatConfig",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeChatConfig"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/wechat.ts"
      }
    },
    "/auth/wechat/login": {
      "post": {
        "operationId": "wechatLogin",
        "summary": "Exchange linked WeChat code for session",
        "description": "Only linked staff identities, not client accounts. Real WeChat miniapp login code required; no generic bot-login alternative.",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: LoginResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResult"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/wechat.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WeChatCode"
              }
            }
          }
        }
      }
    },
    "/auth/wechat/status": {
      "get": {
        "operationId": "wechatStatus",
        "summary": "Read own WeChat link status",
        "description": "No client endpoint.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: WeChatStatus",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeChatStatus"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/wechat.ts"
      }
    },
    "/auth/wechat/link": {
      "post": {
        "operationId": "wechatLink",
        "summary": "link own WeChat identity",
        "description": "Human password reconfirmation required. Unlink revokes sessions authenticated through WeChat.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/wechat.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WeChatLink"
              }
            }
          }
        }
      }
    },
    "/auth/wechat/unlink": {
      "post": {
        "operationId": "wechatUnlink",
        "summary": "unlink own WeChat identity",
        "description": "Human password reconfirmation required. Unlink revokes sessions authenticated through WeChat.",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "sessionBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [
          "counselor"
        ],
        "x-mira-public": false,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/wechat.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WeChatUnlink"
              }
            }
          }
        }
      }
    },
    "/public/{slug}": {
      "get": {
        "operationId": "publicProfile",
        "summary": "Read enabled public booking profile",
        "description": "Does not verify an email or confer account access.",
        "tags": [
          "public"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: PublicProfile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicProfile"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/public-booking.ts"
      }
    },
    "/public/{slug}/slots": {
      "get": {
        "operationId": "publicSlots",
        "summary": "Read availability for a published consultation type",
        "description": "Date in profile timezone and published today/last_date window.",
        "tags": [
          "public"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "type",
            "schema": {
              "type": "string"
            },
            "description": "Published type ID.",
            "required": true,
            "in": "query"
          },
          {
            "name": "date",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Local YYYY-MM-DD.",
            "required": true,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Slots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Slots"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/public-booking.ts"
      }
    },
    "/public/{slug}/next": {
      "get": {
        "operationId": "publicNext",
        "summary": "Find next available appointment date",
        "description": "Searches up to 60 days per call. If none, use searched_until to choose another permitted window, bounded by last_date.",
        "tags": [
          "public"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          },
          {
            "name": "type",
            "schema": {
              "type": "string"
            },
            "description": "Published type ID.",
            "required": true,
            "in": "query"
          },
          {
            "name": "from",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Optional local YYYY-MM-DD; default today.",
            "required": false,
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success: NextSlots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NextSlots"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": false,
        "x-mira-retry": "bounded-read",
        "x-mira-source": "worker/public-booking.ts"
      }
    },
    "/public/{slug}/book": {
      "post": {
        "operationId": "publicBookingCreate",
        "summary": "Book as a public visitor",
        "description": "No email verification; contact consent required. Authenticated client agents should use clientBookingCreate instead. 20 bookings/IP/counselor/hour. Meeting invitation returned. email_updates opts into generic appointment confirmations/changes/cancellations when workspace email is enabled, not reminders. Never claim delivery from the booking response.",
        "tags": [
          "public"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "201": {
            "description": "Success: Booked; 201 means created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booked"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/public-booking.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicBook"
              }
            }
          }
        }
      }
    },
    "/public-bookings/{id}/cancel": {
      "post": {
        "operationId": "publicBookingCancel",
        "summary": "Cancel with appointment invitation capability",
        "description": "id is MEETING ID, not booking ID. Body token from meeting_url fragment. Scheduled status and notice deadline enforced.",
        "tags": [
          "public-bookings"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID from an authorized API response; never guess identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/public-booking.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Token"
              }
            }
          }
        }
      }
    },
    "/email/unsubscribe": {
      "post": {
        "operationId": "emailUnsubscribe",
        "summary": "Disable reminders using signed preference capability",
        "description": "Token from preference link, not session/meeting token. Does not cancel bookings.",
        "tags": [
          "email"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success: Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Failure; inspect {error}. Status semantics and safe retry rules are in the agent guide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-mira-roles": [],
        "x-mira-public": true,
        "x-mira-human-approval": true,
        "x-mira-retry": "reconcile-before-retry",
        "x-mira-source": "worker/email.ts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Unsubscribe"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sessionBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "opaque session token",
        "description": "24-hour session from login, never a JWT/API key. No refresh endpoint."
      },
      "meetingTicket": {
        "type": "apiKey",
        "in": "header",
        "name": "Sec-WebSocket-Protocol",
        "description": "mira, auth.<two-minute ticket>, with WebSocket Upgrade; not a session bearer."
      }
    },
    "schemas": {
      "AgentTokenCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "expires_in_days": {
            "default": 30,
            "type": "integer",
            "minimum": 1,
            "maximum": 90
          }
        },
        "required": [
          "name"
        ]
      },
      "PasswordResetRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "email"
        ]
      },
      "PasswordReset": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 128
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 256
          }
        },
        "required": [
          "token",
          "password"
        ]
      },
      "PracticeSignup": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "practice_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "timezone": {
            "type": "string",
            "maxLength": 80
          },
          "privacy_acknowledged": {
            "type": "boolean",
            "const": true
          },
          "authority_confirmed": {
            "type": "boolean",
            "const": true
          },
          "consent_version": {
            "type": "string",
            "const": "mira-practice-signup-v1"
          },
          "turnstile_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "website": {
            "default": "",
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "name",
          "practice_name",
          "email",
          "timezone",
          "privacy_acknowledged",
          "authority_confirmed",
          "consent_version",
          "turnstile_token"
        ],
        "additionalProperties": false
      },
      "CompleteSignup": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 128
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 256
          }
        },
        "required": [
          "token",
          "password"
        ],
        "additionalProperties": false
      },
      "Login": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "email",
          "password"
        ]
      },
      "Activation": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 128
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 256
          }
        },
        "required": [
          "token",
          "password"
        ]
      },
      "PasswordChange": {
        "type": "object",
        "properties": {
          "current": {
            "type": "string",
            "maxLength": 256
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 256
          }
        },
        "required": [
          "current",
          "password"
        ]
      },
      "ClientCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254,
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "string",
                "const": ""
              }
            ]
          },
          "phone": {
            "type": "string",
            "maxLength": 40
          },
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          }
        },
        "required": [
          "name",
          "email",
          "phone",
          "counselor_id",
          "status"
        ]
      },
      "ClientUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254,
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "string",
                "const": ""
              }
            ]
          },
          "phone": {
            "type": "string",
            "maxLength": 40
          },
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "email",
          "phone",
          "counselor_id",
          "status",
          "version"
        ]
      },
      "BookingCreate": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "location": {
            "type": "string",
            "maxLength": 500
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "completed",
              "canceled",
              "no_show"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "client_id",
          "counselor_id",
          "starts_at",
          "ends_at",
          "location",
          "status"
        ]
      },
      "BookingUpdate": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "location": {
            "type": "string",
            "maxLength": 500
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "completed",
              "canceled",
              "no_show"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "client_id",
          "counselor_id",
          "starts_at",
          "ends_at",
          "location",
          "status",
          "version"
        ]
      },
      "SessionCreate": {
        "type": "object",
        "properties": {
          "booking_id": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "default": "",
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "booking_id"
        ]
      },
      "SessionUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 120
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "completed"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "title",
          "status",
          "version"
        ]
      },
      "NoteCreate": {
        "type": "object",
        "properties": {
          "title": {
            "default": "",
            "type": "string",
            "maxLength": 120
          },
          "content": {
            "type": "string",
            "maxLength": 12000
          }
        },
        "required": [
          "content"
        ]
      },
      "NoteUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "default": "",
            "type": "string",
            "maxLength": 120
          },
          "content": {
            "type": "string",
            "maxLength": 12000
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "content",
          "version"
        ]
      },
      "Version": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "version"
        ]
      },
      "SessionTask": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "note_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "client_visible": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "title",
          "due_at"
        ]
      },
      "FollowupBooking": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "location": {
            "default": "",
            "type": "string",
            "maxLength": 500
          },
          "recurrence": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "daily",
                      "weekly",
                      "monthly"
                    ]
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 12
                  }
                },
                "required": [
                  "frequency",
                  "interval",
                  "count"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "starts_at",
          "ends_at"
        ]
      },
      "BookingSettings": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]{2,63}$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "bio": {
            "default": "",
            "type": "string",
            "maxLength": 1000
          },
          "timezone": {
            "type": "string",
            "maxLength": 80
          },
          "enabled": {
            "type": "boolean"
          },
          "slot_step": {
            "type": "integer",
            "minimum": 5,
            "maximum": 60
          },
          "min_notice_minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20160
          },
          "max_ahead_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          },
          "max_daily": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "meeting_early_minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1440
          },
          "meeting_late_minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1440
          },
          "pipeline_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "slug",
          "display_name",
          "timezone",
          "enabled",
          "slot_step",
          "min_notice_minutes",
          "max_ahead_days",
          "max_daily",
          "meeting_early_minutes",
          "meeting_late_minutes"
        ]
      },
      "Ids": {
        "type": "object",
        "properties": {
          "ids": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "ids"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "required": [
          "content"
        ]
      },
      "ClientBook": {
        "type": "object",
        "properties": {
          "type_id": {
            "type": "string",
            "minLength": 1
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "contact_consent": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "type_id",
          "starts_at",
          "contact_consent"
        ]
      },
      "PublicBook": {
        "type": "object",
        "properties": {
          "type_id": {
            "type": "string",
            "minLength": 1
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "phone": {
            "default": "",
            "type": "string",
            "maxLength": 40
          },
          "contact_consent": {
            "type": "boolean",
            "const": true
          },
          "email_updates": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "type_id",
          "starts_at",
          "name",
          "email",
          "contact_consent"
        ]
      },
      "EmailPermission": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "booking_updates": {
            "type": "boolean"
          },
          "portal_updates": {
            "type": "boolean"
          },
          "consent_confirmed": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ReminderPreferences": {
        "type": "object",
        "properties": {
          "client_minutes": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10080
            }
          },
          "counselor_minutes": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10080
            }
          },
          "counselor_enabled": {
            "type": "boolean"
          },
          "booking_updates": {
            "type": "boolean"
          },
          "portal_updates": {
            "type": "boolean"
          }
        },
        "required": [
          "client_minutes",
          "counselor_minutes",
          "counselor_enabled"
        ]
      },
      "Reminder": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "audience": {
            "type": "string",
            "enum": [
              "client",
              "counselor"
            ]
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "label",
          "audience",
          "due_at"
        ]
      },
      "SendInvitation": {
        "type": "object",
        "properties": {
          "send_email": {
            "default": false,
            "type": "boolean"
          }
        }
      },
      "Onboarding": {
        "type": "object",
        "properties": {
          "step": {
            "type": "string",
            "enum": [
              "security",
              "privacy",
              "profile",
              "availability",
              "team",
              "test-booking",
              "portal",
              "landing-dismissed"
            ]
          },
          "completed": {
            "type": "boolean"
          }
        },
        "required": [
          "step",
          "completed"
        ]
      },
      "DocumentCreate": {
        "type": "object",
        "properties": {
          "upload_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 150
          },
          "bytes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 10485760
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "require_signature": {
            "default": false,
            "type": "boolean"
          },
          "cloud_consent": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "title",
          "filename",
          "bytes",
          "sha256",
          "cloud_consent"
        ]
      },
      "DocumentUpdate": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "require_signature": {
            "type": "boolean"
          }
        },
        "required": [
          "version",
          "require_signature"
        ]
      },
      "DocumentSign": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "original_sha256": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "consent": {
            "type": "boolean",
            "const": true
          },
          "consent_version": {
            "type": "string",
            "const": "mira-electronic-consent-v1"
          }
        },
        "required": [
          "version",
          "original_sha256",
          "name",
          "password",
          "consent",
          "consent_version"
        ]
      },
      "MeetingJoin": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 128
          },
          "peer_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        }
      },
      "Token": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 128
          }
        },
        "required": [
          "token"
        ]
      },
      "Unsubscribe": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 20,
            "maxLength": 2000
          }
        },
        "required": [
          "token"
        ]
      },
      "RecordingCreate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "consent_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "duration_ms": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 7200000
          },
          "parts": {
            "minItems": 1,
            "maxItems": 60,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 59
                },
                "offset_ms": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 120000
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 44,
                  "maximum": 8000000
                }
              },
              "required": [
                "index",
                "offset_ms",
                "duration_ms",
                "bytes"
              ]
            }
          },
          "cloud_consent": {
            "type": "boolean",
            "const": true
          },
          "retain_audio": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "started_at",
          "consent_at",
          "duration_ms",
          "parts",
          "cloud_consent"
        ]
      },
      "Transcribe": {
        "type": "object",
        "properties": {
          "cloud_consent": {
            "type": "boolean",
            "const": true
          },
          "provider": {
            "type": "string"
          }
        },
        "required": [
          "cloud_consent",
          "provider"
        ]
      },
      "Analysis": {
        "type": "object",
        "properties": {
          "recording_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "cloud_consent": {
            "type": "boolean",
            "const": true
          },
          "provider": {
            "type": "string"
          }
        },
        "required": [
          "recording_id",
          "cloud_consent",
          "provider"
        ]
      },
      "ActionUpdate": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "approved",
              "done",
              "dismissed"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "status",
          "version"
        ]
      },
      "WeChatCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 5,
            "maxLength": 1024
          }
        },
        "required": [
          "code"
        ]
      },
      "WeChatLink": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 5,
            "maxLength": 1024
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "code",
          "password"
        ]
      },
      "WeChatUnlink": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "password"
        ]
      },
      "ConsultationTypesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "duration_minutes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 240
          },
          "buffer_before": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "buffer_after": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "description": {
            "default": "",
            "type": "string",
            "maxLength": 1000
          },
          "fee_cents": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        },
        "required": [
          "counselor_id",
          "name",
          "duration_minutes"
        ]
      },
      "ConsultationTypesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "duration_minutes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 240
          },
          "buffer_before": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "buffer_after": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "description": {
            "default": "",
            "type": "string",
            "maxLength": 1000
          },
          "fee_cents": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        },
        "required": [
          "counselor_id",
          "version",
          "name",
          "duration_minutes"
        ]
      },
      "AvailabilityRulesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "weekday": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "opens_at": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "closes_at": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          }
        },
        "required": [
          "counselor_id",
          "weekday",
          "opens_at",
          "closes_at"
        ]
      },
      "AvailabilityRulesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "weekday": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "opens_at": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "closes_at": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          }
        },
        "required": [
          "counselor_id",
          "version",
          "weekday",
          "opens_at",
          "closes_at"
        ]
      },
      "DateOverridesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "day": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "is_closed": {
            "type": "boolean"
          },
          "opens_at": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              {
                "type": "null"
              }
            ]
          },
          "closes_at": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "day",
          "is_closed"
        ]
      },
      "DateOverridesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "day": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "is_closed": {
            "type": "boolean"
          },
          "opens_at": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              {
                "type": "null"
              }
            ]
          },
          "closes_at": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "version",
          "day",
          "is_closed"
        ]
      },
      "BlockedTimesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "label": {
            "default": "",
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "counselor_id",
          "starts_at",
          "ends_at"
        ]
      },
      "BlockedTimesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "label": {
            "default": "",
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "counselor_id",
          "version",
          "starts_at",
          "ends_at"
        ]
      },
      "CrmPipelinesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "booking_stage_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "session_stage_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "name"
        ]
      },
      "CrmPipelinesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "booking_stage_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "session_stage_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "version",
          "name"
        ]
      },
      "CrmStagesCreate": {
        "type": "object",
        "properties": {
          "pipeline_id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "probability": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "is_won": {
            "default": false,
            "type": "boolean"
          },
          "is_lost": {
            "default": false,
            "type": "boolean"
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "pipeline_id",
          "name",
          "position",
          "probability"
        ]
      },
      "CrmStagesUpdate": {
        "type": "object",
        "properties": {
          "pipeline_id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "probability": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "is_won": {
            "default": false,
            "type": "boolean"
          },
          "is_lost": {
            "default": false,
            "type": "boolean"
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "pipeline_id",
          "name",
          "position",
          "probability",
          "version"
        ]
      },
      "CrmOpportunitiesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "pipeline_id": {
            "type": "string",
            "minLength": 1
          },
          "stage_id": {
            "type": "string",
            "minLength": 1
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_cents": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "source": {
            "default": "manual",
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        },
        "required": [
          "counselor_id",
          "client_id",
          "pipeline_id",
          "stage_id",
          "title"
        ]
      },
      "CrmOpportunitiesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "pipeline_id": {
            "type": "string",
            "minLength": 1
          },
          "stage_id": {
            "type": "string",
            "minLength": 1
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_cents": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "source": {
            "default": "manual",
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        },
        "required": [
          "counselor_id",
          "version",
          "client_id",
          "pipeline_id",
          "stage_id",
          "title"
        ]
      },
      "CrmActivitiesCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "opportunity_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "default": "note",
            "type": "string",
            "enum": [
              "note",
              "call",
              "email",
              "meeting",
              "message"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "content": {
            "default": "",
            "type": "string",
            "maxLength": 5000
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "counselor_id",
          "client_id",
          "title",
          "occurred_at"
        ]
      },
      "CrmActivitiesUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "opportunity_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "default": "note",
            "type": "string",
            "enum": [
              "note",
              "call",
              "email",
              "meeting",
              "message"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "content": {
            "default": "",
            "type": "string",
            "maxLength": 5000
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "counselor_id",
          "version",
          "client_id",
          "title",
          "occurred_at"
        ]
      },
      "CrmFollowupsCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "opportunity_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "status": {
            "default": "pending",
            "type": "string",
            "enum": [
              "pending",
              "done",
              "dismissed"
            ]
          },
          "client_visible": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "client_id",
          "title",
          "due_at"
        ]
      },
      "CrmFollowupsUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "opportunity_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "status": {
            "default": "pending",
            "type": "string",
            "enum": [
              "pending",
              "done",
              "dismissed"
            ]
          },
          "client_visible": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              }
            ]
          }
        },
        "required": [
          "counselor_id",
          "version",
          "client_id",
          "title",
          "due_at"
        ]
      },
      "CrmTagsCreate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "color": {
            "default": "#c7ee82",
            "type": "string",
            "pattern": "^#[a-f0-9]{6}$"
          }
        },
        "required": [
          "counselor_id",
          "name"
        ]
      },
      "CrmTagsUpdate": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "color": {
            "default": "#c7ee82",
            "type": "string",
            "pattern": "^#[a-f0-9]{6}$"
          }
        },
        "required": [
          "counselor_id",
          "version",
          "name"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": true
      },
      "Ok": {
        "type": "object",
        "properties": {
          "ok": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": true
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "counselor",
              "receptionist",
              "supervisor",
              "client"
            ]
          },
          "timezone": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "supervised_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "practice_owner": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "email",
          "role",
          "timezone"
        ],
        "additionalProperties": true
      },
      "LoginResult": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Secret opaque 24-hour session credential. Never log or include in prompts."
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "token",
          "user"
        ],
        "additionalProperties": true
      },
      "SignupConfig": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "turnstile_site_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "consent_version": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "turnstile_site_key",
          "consent_version"
        ],
        "additionalProperties": true
      },
      "SignupRequestResult": {
        "type": "object",
        "properties": {
          "ok": {
            "const": true,
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "message"
        ],
        "additionalProperties": true
      },
      "SignupResult": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Secret session credential after verified signup. Never log."
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": true
          },
          "practice_owner": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "token",
          "user",
          "workspace",
          "practice_owner"
        ],
        "additionalProperties": true
      },
      "SessionToken": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Secret current session credential. Store outside model context."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "token",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "AgentToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "expires_at",
          "last_used_at"
        ],
        "additionalProperties": true
      },
      "AgentTokenList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentToken"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "AgentTokenCreated": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Secret shown only in this creation response; stored hashed on the server. Never log."
          },
          "item": {
            "$ref": "#/components/schemas/AgentToken"
          }
        },
        "required": [
          "token",
          "item"
        ],
        "additionalProperties": true
      },
      "Identity": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "user",
          "workspace"
        ],
        "additionalProperties": true
      },
      "Client": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "counselor_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "version": {
            "type": "integer"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "counselor_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "status": {
            "enum": [
              "scheduled",
              "completed",
              "canceled",
              "no_show"
            ]
          },
          "location": {
            "type": "string"
          },
          "consultation_type_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": "integer"
          },
          "series_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Counselor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "cal_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Session": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "booking_id": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "counselor_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "enum": [
              "draft",
              "completed"
            ]
          },
          "version": {
            "type": "integer"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "note_count": {
            "type": "integer"
          },
          "number": {
            "type": "integer"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Note": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "source": {
            "enum": [
              "manual",
              "ai"
            ]
          },
          "review_status": {
            "enum": [
              "draft",
              "reviewed"
            ]
          },
          "author_name": {
            "type": "string"
          },
          "editor_name": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          },
          "original_sha256": {
            "type": "string"
          },
          "signed_sha256": {
            "type": [
              "string",
              "null"
            ]
          },
          "require_signature": {
            "type": [
              "integer",
              "boolean"
            ]
          },
          "status": {
            "enum": [
              "uploading",
              "shared",
              "signed",
              "revoked"
            ]
          },
          "version": {
            "type": "integer"
          },
          "uploader_id": {
            "type": "string"
          },
          "can_resume": {
            "type": "boolean"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "MessageRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sender_id": {
            "type": "string"
          },
          "sender_role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "due_at": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "done",
              "dismissed"
            ]
          },
          "version": {
            "type": "integer"
          },
          "client_visible": {
            "type": [
              "integer",
              "boolean"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Recording": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "started_at": {
            "type": "string"
          },
          "consent_at": {
            "type": "string"
          },
          "cloud_consent_at": {
            "type": "string"
          },
          "duration_ms": {
            "type": "integer"
          },
          "part_count": {
            "type": "integer"
          },
          "retain_audio": {
            "type": [
              "integer",
              "boolean"
            ]
          },
          "status": {
            "enum": [
              "uploading",
              "ready",
              "transcribed",
              "deleted"
            ]
          },
          "audio_deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "transcript_key": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "RecordingPart": {
        "type": "object",
        "properties": {
          "part_index": {
            "type": "integer"
          },
          "offset_ms": {
            "type": "integer"
          },
          "duration_ms": {
            "type": "integer"
          },
          "bytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "uploading",
              "uploaded",
              "processing",
              "transcribed",
              "failed"
            ]
          }
        },
        "required": [
          "part_index",
          "offset_ms",
          "duration_ms",
          "status"
        ],
        "additionalProperties": true
      },
      "Action": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "ai_run_id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "status": {
            "enum": [
              "proposed",
              "approved",
              "done",
              "dismissed"
            ]
          },
          "version": {
            "type": "integer"
          },
          "reviewed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "reviewed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "ScheduledReminder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "audience": {
            "enum": [
              "client",
              "counselor"
            ]
          },
          "client_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": "integer",
            "description": "Unix epoch milliseconds."
          },
          "status": {
            "enum": [
              "pending",
              "canceled",
              "sent",
              "skipped",
              "failed",
              "expired"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "EmailActivity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "event": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "processing",
              "accepted",
              "failed",
              "skipped"
            ]
          },
          "delivery": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer",
            "description": "Epoch milliseconds."
          },
          "accepted_at": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "InvitationStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "client",
              "staff"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "activated",
              "expired",
              "revoked"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "PublicConsultation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "duration_minutes": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "fee_cents": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "PublicBookingProfile": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "max_ahead_days": {
            "type": "integer"
          },
          "min_notice_minutes": {
            "type": "integer"
          },
          "today": {
            "type": "string"
          },
          "last_date": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "display_name",
          "bio",
          "timezone",
          "max_ahead_days",
          "min_notice_minutes",
          "today",
          "last_date"
        ],
        "additionalProperties": true
      },
      "Slot": {
        "type": "object",
        "properties": {
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "starts_at",
          "ends_at",
          "label"
        ],
        "additionalProperties": true
      },
      "DashboardBooking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "series_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "counselor_name": {
            "type": "string"
          },
          "consultation": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Record": {
        "type": "object",
        "additionalProperties": true,
        "description": "Resource row. Server-generated metadata may be added; do not send it back as an update."
      },
      "Records": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Tasks": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Messages": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Documents": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            }
          },
          "consent_text": {
            "type": "string"
          },
          "consent_version": {
            "type": "string"
          }
        },
        "required": [
          "items",
          "consent_text",
          "consent_version"
        ],
        "additionalProperties": true
      },
      "DocumentResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Document"
          },
          "already_uploaded": {
            "type": "boolean"
          },
          "already_signed": {
            "type": "boolean"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "DocumentEvents": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "signature": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Record"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "signature"
        ],
        "additionalProperties": true
      },
      "Dashboard": {
        "type": "object",
        "properties": {
          "client": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "counselor_id": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "email",
              "phone",
              "counselor_id"
            ],
            "additionalProperties": true
          },
          "bookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardBooking"
            }
          },
          "profile": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug",
                  "display_name",
                  "timezone"
                ],
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "client",
          "bookings",
          "profile"
        ],
        "additionalProperties": true
      },
      "ClientHistory": {
        "type": "object",
        "properties": {
          "client": {
            "$ref": "#/components/schemas/Client"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          },
          "bookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            }
          }
        },
        "required": [
          "client",
          "sessions",
          "bookings"
        ],
        "additionalProperties": true
      },
      "Journey": {
        "type": "object",
        "properties": {
          "opportunities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "followups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "consultation_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          }
        },
        "required": [
          "opportunities",
          "activities",
          "followups",
          "history",
          "tags",
          "consultation_types"
        ],
        "additionalProperties": true
      },
      "BookingSettingsResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Record"
          },
          "public_url": {
            "type": "string"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "SeriesResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "series_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "series_id"
        ],
        "additionalProperties": true
      },
      "AccountResult": {
        "type": "object",
        "properties": {
          "account": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "status"
                ],
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "account"
        ],
        "additionalProperties": true
      },
      "InvitationResult": {
        "type": "object",
        "properties": {
          "invitation_url": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_in_hours": {
            "type": "integer"
          },
          "email_queued": {
            "type": "boolean"
          }
        },
        "required": [
          "invitation_url",
          "email",
          "expires_in_hours",
          "email_queued"
        ],
        "additionalProperties": true
      },
      "EmailPermissionResult": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "booking_updates": {
            "type": "boolean"
          },
          "portal_updates": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "enabled",
          "booking_updates",
          "portal_updates",
          "email",
          "updated_at"
        ],
        "additionalProperties": true
      },
      "ReminderPreferencesResult": {
        "type": "object",
        "properties": {
          "client_minutes": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "counselor_minutes": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "counselor_enabled": {
            "type": "boolean"
          },
          "booking_updates": {
            "type": "boolean"
          },
          "portal_updates": {
            "type": "boolean"
          },
          "sending_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "client_minutes",
          "counselor_minutes",
          "counselor_enabled",
          "booking_updates",
          "portal_updates",
          "sending_enabled"
        ],
        "additionalProperties": true
      },
      "OnboardingResult": {
        "type": "object",
        "properties": {
          "completed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "completed"
        ],
        "additionalProperties": true
      },
      "CreatedId": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "MeetingLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "host_url": {
            "type": "string"
          },
          "guest_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "host_url",
          "guest_url"
        ],
        "additionalProperties": true
      },
      "GuestLink": {
        "type": "object",
        "properties": {
          "guest_url": {
            "type": "string"
          }
        },
        "required": [
          "guest_url"
        ],
        "additionalProperties": true
      },
      "MeetingConfig": {
        "type": "object",
        "properties": {
          "room_id": {
            "type": "string"
          },
          "peer_id": {
            "type": "string"
          },
          "booking_id": {
            "type": "string"
          },
          "role": {
            "enum": [
              "host",
              "guest"
            ]
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "host_name": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ticket": {
            "type": "string"
          },
          "ice_servers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "relay_configured": {
            "type": "boolean"
          }
        },
        "required": [
          "room_id",
          "peer_id",
          "booking_id",
          "role",
          "session_id",
          "host_name",
          "starts_at",
          "ticket",
          "ice_servers",
          "relay_configured"
        ],
        "additionalProperties": true
      },
      "PublicProfile": {
        "type": "object",
        "properties": {
          "profile": {
            "$ref": "#/components/schemas/PublicBookingProfile"
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicConsultation"
            }
          },
          "weekly_hours": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "weekday": {
                  "type": "integer"
                },
                "opens_at": {
                  "type": "string"
                },
                "closes_at": {
                  "type": "string"
                },
                "consultation_type_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "weekday",
                "opens_at",
                "closes_at",
                "consultation_type_id"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "profile",
          "types",
          "weekly_hours"
        ],
        "additionalProperties": true
      },
      "Slots": {
        "type": "object",
        "properties": {
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            }
          },
          "timezone": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "slots",
          "timezone",
          "reason"
        ],
        "additionalProperties": true
      },
      "NextSlots": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            }
          },
          "timezone": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "searched_until": {
            "type": "string"
          }
        },
        "required": [
          "date",
          "slots",
          "timezone",
          "reason"
        ],
        "additionalProperties": true
      },
      "Booked": {
        "type": "object",
        "properties": {
          "booking_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "consultation": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "meeting_url": {
            "type": "string"
          }
        },
        "required": [
          "booking_id",
          "starts_at",
          "ends_at",
          "consultation",
          "timezone",
          "meeting_url"
        ],
        "additionalProperties": true
      },
      "AudioConfig": {
        "type": "object",
        "properties": {
          "storage": {
            "type": "boolean"
          },
          "transcription": {
            "type": "boolean"
          },
          "ai": {
            "type": "boolean"
          },
          "transcription_provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "ai_provider": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "storage",
          "transcription",
          "ai",
          "transcription_provider",
          "ai_provider"
        ],
        "additionalProperties": true
      },
      "RecordingResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Recording"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecordingPart"
            }
          }
        },
        "required": [
          "item",
          "parts"
        ],
        "additionalProperties": true
      },
      "Recordings": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Recording"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Actions": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Action"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Reminders": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledReminder"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Deliveries": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailActivity"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Invitations": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationStatus"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "Transcript": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "end",
                "text"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "text"
        ],
        "additionalProperties": true
      },
      "AnalysisResult": {
        "type": "object",
        "properties": {
          "ok": {
            "const": true
          },
          "run_id": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "run_id"
        ],
        "additionalProperties": true
      },
      "WeChatConfig": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          }
        },
        "required": [
          "configured"
        ],
        "additionalProperties": true
      },
      "WeChatStatus": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "linked": {
            "type": "boolean"
          },
          "linked_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "configured",
          "linked",
          "linked_at"
        ],
        "additionalProperties": true
      },
      "Metrics": {
        "type": "object",
        "additionalProperties": true,
        "description": "total, won, lost, open, conversion_rate, closed_win_rate, average_conversion_days, revenue_cents and weighted_pipeline_cents maps by currency, stages counts, due_followups."
      },
      "ClientResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Client"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "ClientList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "BookingResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Booking"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "BookingList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CounselorResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Counselor"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CounselorList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Counselor"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "SessionResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Session"
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Note"
            }
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "SessionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "NoteResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Note"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "NoteList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Note"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "RecordResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Record"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "RecordList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Record"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "ConsultationTypesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "duration_minutes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 240
          },
          "buffer_before": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "buffer_after": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "description": {
            "default": "",
            "type": "string",
            "maxLength": 1000
          },
          "fee_cents": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "ConsultationTypesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/ConsultationTypesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "ConsultationTypesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsultationTypesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "AvailabilityRulesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "weekday": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "opens_at": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "closes_at": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "AvailabilityRulesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/AvailabilityRulesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "AvailabilityRulesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityRulesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "DateOverridesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "day": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "is_closed": {
            "type": [
              "integer",
              "boolean"
            ],
            "description": "Database responses may encode booleans as 0/1."
          },
          "opens_at": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              {
                "type": "null"
              }
            ]
          },
          "closes_at": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "DateOverridesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/DateOverridesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "DateOverridesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DateOverridesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "BlockedTimesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "label": {
            "default": "",
            "type": "string",
            "maxLength": 120
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "BlockedTimesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/BlockedTimesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "BlockedTimesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockedTimesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CrmPipelinesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "booking_stage_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "session_stage_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "CrmPipelinesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CrmPipelinesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CrmPipelinesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmPipelinesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CrmStagesRow": {
        "type": "object",
        "properties": {
          "pipeline_id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "probability": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "is_won": {
            "type": [
              "integer",
              "boolean"
            ],
            "description": "Database responses may encode booleans as 0/1."
          },
          "is_lost": {
            "type": [
              "integer",
              "boolean"
            ],
            "description": "Database responses may encode booleans as 0/1."
          },
          "status": {
            "default": "active",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "version": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "CrmStagesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CrmStagesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CrmStagesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmStagesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CrmOpportunitiesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "pipeline_id": {
            "type": "string",
            "minLength": 1
          },
          "stage_id": {
            "type": "string",
            "minLength": 1
          },
          "consultation_type_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "value_cents": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "source": {
            "default": "manual",
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "CrmOpportunitiesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CrmOpportunitiesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CrmOpportunitiesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmOpportunitiesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CrmActivitiesRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "opportunity_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "default": "note",
            "type": "string",
            "enum": [
              "note",
              "call",
              "email",
              "meeting",
              "message"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "content": {
            "default": "",
            "type": "string",
            "maxLength": 5000
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "CrmActivitiesResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CrmActivitiesRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CrmActivitiesList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmActivitiesRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CrmFollowupsRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "client_id": {
            "type": "string",
            "minLength": 1
          },
          "opportunity_id": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "status": {
            "default": "pending",
            "type": "string",
            "enum": [
              "pending",
              "done",
              "dismissed"
            ]
          },
          "client_visible": {
            "type": [
              "integer",
              "boolean"
            ],
            "description": "Database responses may encode booleans as 0/1."
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "CrmFollowupsResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CrmFollowupsRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CrmFollowupsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmFollowupsRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      },
      "CrmTagsRow": {
        "type": "object",
        "properties": {
          "counselor_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "color": {
            "default": "#c7ee82",
            "type": "string",
            "pattern": "^#[a-f0-9]{6}$"
          },
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "version"
        ],
        "additionalProperties": true
      },
      "CrmTagsResult": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/CrmTagsRow"
          }
        },
        "required": [
          "item"
        ],
        "additionalProperties": true
      },
      "CrmTagsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmTagsRow"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": true
      }
    }
  },
  "externalDocs": {
    "url": "/agent-guide.md",
    "description": "Read workflows, safety boundaries and limitations before execution."
  }
}
