components:
  parameters: {}
  schemas:
    AdminConsoleConfig:
      properties:
        componentEmbeddings:
          additionalProperties:
            properties:
              coordinate:
                additionalProperties:
                  type: number
                type: object
              threshold:
                type: number
            required:
              - coordinate
            type: object
          type: object
        deterministic:
          properties:
            axes:
              properties:
                expertise:
                  properties:
                    eventRules:
                      items:
                        properties:
                          conditions:
                            items:
                              properties:
                                field:
                                  minLength: 1
                                  type: string
                                operator:
                                  enum:
                                    - ==
                                    - "!="
                                    - contains
                                    - in
                                    - exists
                                    - notExists
                                  type: string
                                value:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                    - items:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                      type: array
                              required:
                                - field
                                - operator
                              type: object
                            type: array
                          description:
                            minLength: 1
                            type: string
                          enabled:
                            type: boolean
                          eventType:
                            minLength: 1
                            type: string
                          id:
                            minLength: 1
                            type: string
                          weights:
                            additionalProperties:
                              type: number
                            type: object
                        required:
                          - id
                          - description
                          - eventType
                          - weights
                        type: object
                      type: array
                    heuristics:
                      items:
                        properties:
                          description:
                            minLength: 1
                            type: string
                          enabled:
                            type: boolean
                          eventType:
                            type: string
                          id:
                            minLength: 1
                            type: string
                          metric:
                            enum:
                              - totalEvents
                              - eventCount
                            type: string
                          operator:
                            enum:
                              - <
                              - <=
                              - ">"
                              - ">="
                              - ==
                              - "!="
                            type: string
                          value:
                            type: number
                          weights:
                            additionalProperties:
                              type: number
                            type: object
                        required:
                          - id
                          - description
                          - metric
                          - operator
                          - value
                          - weights
                        type: object
                      type: array
                    initialCounts:
                      additionalProperties:
                        type: number
                      type: object
                    personas:
                      items:
                        minLength: 1
                        type: string
                      minItems: 1
                      type: array
                  required:
                    - personas
                    - initialCounts
                    - eventRules
                    - heuristics
                  type: object
                modality:
                  properties:
                    eventRules:
                      items:
                        properties:
                          conditions:
                            items:
                              properties:
                                field:
                                  minLength: 1
                                  type: string
                                operator:
                                  enum:
                                    - ==
                                    - "!="
                                    - contains
                                    - in
                                    - exists
                                    - notExists
                                  type: string
                                value:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                    - items:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                      type: array
                              required:
                                - field
                                - operator
                              type: object
                            type: array
                          description:
                            minLength: 1
                            type: string
                          enabled:
                            type: boolean
                          eventType:
                            minLength: 1
                            type: string
                          id:
                            minLength: 1
                            type: string
                          weights:
                            additionalProperties:
                              type: number
                            type: object
                        required:
                          - id
                          - description
                          - eventType
                          - weights
                        type: object
                      type: array
                    heuristics:
                      items:
                        properties:
                          description:
                            minLength: 1
                            type: string
                          enabled:
                            type: boolean
                          eventType:
                            type: string
                          id:
                            minLength: 1
                            type: string
                          metric:
                            enum:
                              - totalEvents
                              - eventCount
                            type: string
                          operator:
                            enum:
                              - <
                              - <=
                              - ">"
                              - ">="
                              - ==
                              - "!="
                            type: string
                          value:
                            type: number
                          weights:
                            additionalProperties:
                              type: number
                            type: object
                        required:
                          - id
                          - description
                          - metric
                          - operator
                          - value
                          - weights
                        type: object
                      type: array
                    initialCounts:
                      additionalProperties:
                        type: number
                      type: object
                    personas:
                      items:
                        minLength: 1
                        type: string
                      minItems: 1
                      type: array
                  required:
                    - personas
                    - initialCounts
                    - eventRules
                    - heuristics
                  type: object
              required:
                - modality
                - expertise
              type: object
            policy:
              properties:
                epsilon:
                  maximum: 1
                  minimum: 0
                  type: number
                variantMapping:
                  additionalProperties:
                    type: string
                  type: object
              required:
                - epsilon
              type: object
          required:
            - axes
            - policy
          type: object
        feedbackWeights:
          properties:
            creationWeight:
              type: number
            deletionPenalty:
              minimum: 0
              type: number
            hiddenToolPenalty:
              minimum: 0
              type: number
            modificationWeight:
              type: number
            textAdditionWeight:
              type: number
          required:
            - creationWeight
            - textAdditionWeight
            - modificationWeight
            - deletionPenalty
            - hiddenToolPenalty
          type: object
        mcp:
          properties:
            axes:
              properties:
                expertiseResources:
                  items:
                    properties:
                      actions:
                        items:
                          properties:
                            description:
                              minLength: 1
                              type: string
                            id:
                              minLength: 1
                              type: string
                            isSafeFallback:
                              type: boolean
                            uiState:
                              additionalProperties: {}
                              properties:
                                canvasActions:
                                  properties:
                                    clearCanvas:
                                      type: boolean
                                    saveAsImage:
                                      type: boolean
                                    saveToActiveFile:
                                      type: boolean
                                    toggleTheme:
                                      type: boolean
                                  type: object
                                mainMenu:
                                  properties:
                                    allowedItems:
                                      items:
                                        type: string
                                      type: array
                                  required:
                                    - allowedItems
                                  type: object
                                mainMenuItems:
                                  items:
                                    type: string
                                  type: array
                                showWelcomeScreen:
                                  type: boolean
                                toolbar:
                                  properties:
                                    mode:
                                      enum:
                                        - allowlist
                                        - blocklist
                                      type: string
                                    tools:
                                      items:
                                        type: string
                                      type: array
                                  required:
                                    - mode
                                    - tools
                                  type: object
                                variant:
                                  type: string
                              required:
                                - variant
                              type: object
                          required:
                            - id
                            - description
                            - uiState
                          type: object
                        minItems: 1
                        type: array
                      decisionHints:
                        items:
                          type: string
                        type: array
                      description:
                        minLength: 1
                        type: string
                      id:
                        minLength: 1
                        type: string
                      name:
                        minLength: 1
                        type: string
                      scoring:
                        properties:
                          baseWeight:
                            type: number
                          signals:
                            items:
                              properties:
                                description:
                                  minLength: 1
                                  type: string
                                elementType:
                                  type: string
                                eventType:
                                  type: string
                                id:
                                  minLength: 1
                                  type: string
                                metric:
                                  enum:
                                    - totalEvents
                                    - eventCount
                                    - eventRatio
                                    - elementCount
                                    - toolDiversity
                                    - textToShapeRatio
                                    - timeToFirstEventMs
                                    - timeSinceLastEventMs
                                    - recentEventType
                                  type: string
                                operator:
                                  enum:
                                    - <
                                    - <=
                                    - ">"
                                    - ">="
                                    - ==
                                    - "!="
                                    - contains
                                    - notContains
                                  type: string
                                value:
                                  anyOf:
                                    - type: number
                                    - type: string
                                weight:
                                  type: number
                              required:
                                - id
                                - description
                                - metric
                                - operator
                                - value
                                - weight
                              type: object
                            type: array
                        required:
                          - signals
                        type: object
                    required:
                      - id
                      - name
                      - description
                      - scoring
                      - actions
                    type: object
                  minItems: 1
                  type: array
                modalityResources:
                  items:
                    properties:
                      actions:
                        items:
                          properties:
                            description:
                              minLength: 1
                              type: string
                            id:
                              minLength: 1
                              type: string
                            isSafeFallback:
                              type: boolean
                            uiState:
                              additionalProperties: {}
                              properties:
                                canvasActions:
                                  properties:
                                    clearCanvas:
                                      type: boolean
                                    saveAsImage:
                                      type: boolean
                                    saveToActiveFile:
                                      type: boolean
                                    toggleTheme:
                                      type: boolean
                                  type: object
                                mainMenu:
                                  properties:
                                    allowedItems:
                                      items:
                                        type: string
                                      type: array
                                  required:
                                    - allowedItems
                                  type: object
                                mainMenuItems:
                                  items:
                                    type: string
                                  type: array
                                showWelcomeScreen:
                                  type: boolean
                                toolbar:
                                  properties:
                                    mode:
                                      enum:
                                        - allowlist
                                        - blocklist
                                      type: string
                                    tools:
                                      items:
                                        type: string
                                      type: array
                                  required:
                                    - mode
                                    - tools
                                  type: object
                                variant:
                                  type: string
                              required:
                                - variant
                              type: object
                          required:
                            - id
                            - description
                            - uiState
                          type: object
                        minItems: 1
                        type: array
                      decisionHints:
                        items:
                          type: string
                        type: array
                      description:
                        minLength: 1
                        type: string
                      id:
                        minLength: 1
                        type: string
                      name:
                        minLength: 1
                        type: string
                      scoring:
                        properties:
                          baseWeight:
                            type: number
                          signals:
                            items:
                              properties:
                                description:
                                  minLength: 1
                                  type: string
                                elementType:
                                  type: string
                                eventType:
                                  type: string
                                id:
                                  minLength: 1
                                  type: string
                                metric:
                                  enum:
                                    - totalEvents
                                    - eventCount
                                    - eventRatio
                                    - elementCount
                                    - toolDiversity
                                    - textToShapeRatio
                                    - timeToFirstEventMs
                                    - timeSinceLastEventMs
                                    - recentEventType
                                  type: string
                                operator:
                                  enum:
                                    - <
                                    - <=
                                    - ">"
                                    - ">="
                                    - ==
                                    - "!="
                                    - contains
                                    - notContains
                                  type: string
                                value:
                                  anyOf:
                                    - type: number
                                    - type: string
                                weight:
                                  type: number
                              required:
                                - id
                                - description
                                - metric
                                - operator
                                - value
                                - weight
                              type: object
                            type: array
                        required:
                          - signals
                        type: object
                    required:
                      - id
                      - name
                      - description
                      - scoring
                      - actions
                    type: object
                  minItems: 1
                  type: array
              required:
                - modalityResources
                - expertiseResources
              type: object
            bandit:
              default: {}
              properties:
                banditEvidenceK:
                  default: 3
                  exclusiveMinimum: 0
                  type: number
                decay:
                  default: {}
                  properties:
                    effectiveWindow:
                      default: 200
                      exclusiveMinimum: 1
                      type: number
                    enabled:
                      default: true
                      type: boolean
                  type: object
                enabled:
                  default: true
                  type: boolean
                keepReward:
                  default: 1
                  maximum: 1
                  minimum: 0
                  type: number
                passiveRewardWeight:
                  default: 0.25
                  maximum: 1
                  minimum: 0
                  type: number
                priorAlpha:
                  default: 1
                  exclusiveMinimum: 0
                  type: number
                priorBeta:
                  default: 1
                  exclusiveMinimum: 0
                  type: number
                revertReward:
                  default: 0
                  maximum: 1
                  minimum: 0
                  type: number
              type: object
            fallbackVariant:
              minLength: 1
              type: string
            gate:
              default: {}
              properties:
                lockMargin:
                  default: 0.15
                  maximum: 1
                  minimum: 0
                  type: number
                lockMinEvents:
                  default: 2
                  minimum: 0
                  type: integer
              type: object
            minConfidence:
              maximum: 1
              minimum: 0
              type: number
          required:
            - axes
            - minConfidence
            - fallbackVariant
          type: object
        mode:
          properties:
            decisionApplication:
              enum:
                - immediate
                - next-refresh
              type: string
            defaultMode:
              enum:
                - deterministic
                - mcp
              type: string
            minEventsBeforeLock:
              exclusiveMinimum: 0
              type: integer
            persistenceMode:
              enum:
                - memory
                - tab
                - browser
              type: string
            pollingIntervalMs:
              exclusiveMinimum: 0
              type: integer
            presentationMode:
              enum:
                - prototype
                - production
              type: string
          required:
            - defaultMode
            - presentationMode
            - decisionApplication
            - persistenceMode
            - minEventsBeforeLock
            - pollingIntervalMs
          type: object
        ui:
          properties:
            supportedMenuItems:
              items:
                type: string
              type: array
            supportedTools:
              items:
                type: string
              type: array
          required:
            - supportedTools
            - supportedMenuItems
          type: object
        updatedAt:
          minLength: 1
          type: string
        version:
          enum:
            - 1
          type: number
      required:
        - version
        - updatedAt
        - mode
        - deterministic
        - mcp
        - ui
        - feedbackWeights
      type: object
    DionysysApiError:
      properties:
        error:
          properties:
            code:
              type: string
            details: {}
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
    DionysysConnectorDecision:
      properties:
        actionId:
          type: string
        confidence:
          maximum: 1
          minimum: 0
          type: number
        metadata:
          additionalProperties: {}
          type: object
        personaId:
          type: string
        rationale:
          type: string
      required:
        - personaId
        - actionId
        - confidence
      type: object
    DionysysDecision:
      properties:
        id:
          type: string
        metadata:
          additionalProperties: {}
          type: object
        mode:
          enum:
            - deterministic
            - mcp
          type: string
        rationale:
          type: string
        scores:
          additionalProperties:
            type: number
          type: object
        selectedPersona:
          properties:
            confidence:
              type: number
            id:
              type: string
          required:
            - id
            - confidence
          type: object
        sessionId:
          type: string
        uiState:
          additionalProperties: {}
          type: object
        variant:
          type: string
      required:
        - id
        - sessionId
        - mode
        - variant
        - selectedPersona
        - scores
      type: object
    DionysysDecisionResolve:
      additionalProperties: {}
      properties:
        metadata:
          additionalProperties: {}
          type: object
        sessionId:
          minLength: 1
          type: string
      required:
        - sessionId
      type: object
    DionysysEvent:
      properties:
        action:
          type: string
        metadata:
          additionalProperties: {}
          type: object
        payload:
          additionalProperties: {}
          type: object
        sessionId:
          type: string
        subject:
          type: string
        timestamp:
          anyOf:
            - type: number
            - type: string
            - type: string
        type:
          minLength: 1
          type: string
        userId:
          type: string
      required:
        - type
      type: object
    DionysysSession:
      properties:
        createdAt:
          anyOf:
            - type: number
            - type: string
            - type: string
        id:
          minLength: 1
          type: string
        metadata:
          additionalProperties: {}
          type: object
        updatedAt:
          anyOf:
            - type: number
            - type: string
            - type: string
      required:
        - id
      type: object
    DionysysSessionCreate:
      properties:
        id:
          type: string
        metadata:
          additionalProperties: {}
          type: object
      type: object
    DionysysSessionUpdate:
      properties:
        metadata:
          additionalProperties: {}
          type: object
      type: object
info:
  description: REST API for the Dionysys adaptive UI SDK. Provides session
    management, event ingestion, adaptive decision resolution, user feedback,
    and admin configuration.
  title: Dionysys API
  version: 1.1.0
openapi: 3.1.0
paths:
  /api/dionysys/admin/bandit:
    get:
      responses:
        "200":
          description: Bandit overview
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Inspect bandit arms (posterior mean, credible interval, P(best),
        evidence weight) and an optional decision trace
      tags:
        - Admin
  /api/dionysys/admin/bandit/decay:
    post:
      responses:
        "200":
          description: Number of arms decayed
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Decay all bandit arms toward their priors once (discounted Thompson
        sampling)
      tags:
        - Admin
  /api/dionysys/admin/bandit/export:
    get:
      responses:
        "200":
          description: Bandit snapshot (exportedAt + arms)
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Export a snapshot of learned bandit arms
      tags:
        - Admin
  /api/dionysys/admin/bandit/import:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                arms:
                  items:
                    additionalProperties: {}
                    type: object
                  type: array
              required:
                - arms
              type: object
      responses:
        "200":
          description: Number of arms imported
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Restore bandit arms from a snapshot
      tags:
        - Admin
  /api/dionysys/admin/bandit/reset:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                stateId:
                  type: string
                variant:
                  type: string
              type: object
      responses:
        "200":
          description: Number of arms reset
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Reset a bandit arm, a whole context, or all arms to their priors
      tags:
        - Admin
  /api/dionysys/admin/config:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  config:
                    properties:
                      componentEmbeddings:
                        additionalProperties:
                          properties:
                            coordinate:
                              additionalProperties:
                                type: number
                              type: object
                            threshold:
                              type: number
                          required:
                            - coordinate
                          type: object
                        type: object
                      deterministic:
                        properties:
                          axes:
                            properties:
                              expertise:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                              modality:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                            required:
                              - modality
                              - expertise
                            type: object
                          policy:
                            properties:
                              epsilon:
                                maximum: 1
                                minimum: 0
                                type: number
                              variantMapping:
                                additionalProperties:
                                  type: string
                                type: object
                            required:
                              - epsilon
                            type: object
                        required:
                          - axes
                          - policy
                        type: object
                      feedbackWeights:
                        properties:
                          creationWeight:
                            type: number
                          deletionPenalty:
                            minimum: 0
                            type: number
                          hiddenToolPenalty:
                            minimum: 0
                            type: number
                          modificationWeight:
                            type: number
                          textAdditionWeight:
                            type: number
                        required:
                          - creationWeight
                          - textAdditionWeight
                          - modificationWeight
                          - deletionPenalty
                          - hiddenToolPenalty
                        type: object
                      mcp:
                        properties:
                          axes:
                            properties:
                              expertiseResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                              modalityResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                            required:
                              - modalityResources
                              - expertiseResources
                            type: object
                          bandit:
                            default: {}
                            properties:
                              banditEvidenceK:
                                default: 3
                                exclusiveMinimum: 0
                                type: number
                              decay:
                                default: {}
                                properties:
                                  effectiveWindow:
                                    default: 200
                                    exclusiveMinimum: 1
                                    type: number
                                  enabled:
                                    default: true
                                    type: boolean
                                type: object
                              enabled:
                                default: true
                                type: boolean
                              keepReward:
                                default: 1
                                maximum: 1
                                minimum: 0
                                type: number
                              passiveRewardWeight:
                                default: 0.25
                                maximum: 1
                                minimum: 0
                                type: number
                              priorAlpha:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              priorBeta:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              revertReward:
                                default: 0
                                maximum: 1
                                minimum: 0
                                type: number
                            type: object
                          fallbackVariant:
                            minLength: 1
                            type: string
                          gate:
                            default: {}
                            properties:
                              lockMargin:
                                default: 0.15
                                maximum: 1
                                minimum: 0
                                type: number
                              lockMinEvents:
                                default: 2
                                minimum: 0
                                type: integer
                            type: object
                          minConfidence:
                            maximum: 1
                            minimum: 0
                            type: number
                        required:
                          - axes
                          - minConfidence
                          - fallbackVariant
                        type: object
                      mode:
                        properties:
                          decisionApplication:
                            enum:
                              - immediate
                              - next-refresh
                            type: string
                          defaultMode:
                            enum:
                              - deterministic
                              - mcp
                            type: string
                          minEventsBeforeLock:
                            exclusiveMinimum: 0
                            type: integer
                          persistenceMode:
                            enum:
                              - memory
                              - tab
                              - browser
                            type: string
                          pollingIntervalMs:
                            exclusiveMinimum: 0
                            type: integer
                          presentationMode:
                            enum:
                              - prototype
                              - production
                            type: string
                        required:
                          - defaultMode
                          - presentationMode
                          - decisionApplication
                          - persistenceMode
                          - minEventsBeforeLock
                          - pollingIntervalMs
                        type: object
                      ui:
                        properties:
                          supportedMenuItems:
                            items:
                              type: string
                            type: array
                          supportedTools:
                            items:
                              type: string
                            type: array
                        required:
                          - supportedTools
                          - supportedMenuItems
                        type: object
                      updatedAt:
                        minLength: 1
                        type: string
                      version:
                        enum:
                          - 1
                        type: number
                    required:
                      - version
                      - updatedAt
                      - mode
                      - deterministic
                      - mcp
                      - ui
                      - feedbackWeights
                    type: object
                  success:
                    type: boolean
                required:
                  - success
                  - config
                type: object
          description: Current admin configuration object
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Read admin configuration
      tags:
        - Admin
    put:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                config:
                  properties:
                    componentEmbeddings:
                      additionalProperties:
                        properties:
                          coordinate:
                            additionalProperties:
                              type: number
                            type: object
                          threshold:
                            type: number
                        required:
                          - coordinate
                        type: object
                      type: object
                    deterministic:
                      properties:
                        axes:
                          properties:
                            expertise:
                              properties:
                                eventRules:
                                  items:
                                    properties:
                                      conditions:
                                        items:
                                          properties:
                                            field:
                                              minLength: 1
                                              type: string
                                            operator:
                                              enum:
                                                - ==
                                                - "!="
                                                - contains
                                                - in
                                                - exists
                                                - notExists
                                              type: string
                                            value:
                                              anyOf:
                                                - type: string
                                                - type: number
                                                - type: boolean
                                                - items:
                                                    anyOf:
                                                      - type: string
                                                      - type: number
                                                      - type: boolean
                                                  type: array
                                          required:
                                            - field
                                            - operator
                                          type: object
                                        type: array
                                      description:
                                        minLength: 1
                                        type: string
                                      enabled:
                                        type: boolean
                                      eventType:
                                        minLength: 1
                                        type: string
                                      id:
                                        minLength: 1
                                        type: string
                                      weights:
                                        additionalProperties:
                                          type: number
                                        type: object
                                    required:
                                      - id
                                      - description
                                      - eventType
                                      - weights
                                    type: object
                                  type: array
                                heuristics:
                                  items:
                                    properties:
                                      description:
                                        minLength: 1
                                        type: string
                                      enabled:
                                        type: boolean
                                      eventType:
                                        type: string
                                      id:
                                        minLength: 1
                                        type: string
                                      metric:
                                        enum:
                                          - totalEvents
                                          - eventCount
                                        type: string
                                      operator:
                                        enum:
                                          - <
                                          - <=
                                          - ">"
                                          - ">="
                                          - ==
                                          - "!="
                                        type: string
                                      value:
                                        type: number
                                      weights:
                                        additionalProperties:
                                          type: number
                                        type: object
                                    required:
                                      - id
                                      - description
                                      - metric
                                      - operator
                                      - value
                                      - weights
                                    type: object
                                  type: array
                                initialCounts:
                                  additionalProperties:
                                    type: number
                                  type: object
                                personas:
                                  items:
                                    minLength: 1
                                    type: string
                                  minItems: 1
                                  type: array
                              required:
                                - personas
                                - initialCounts
                                - eventRules
                                - heuristics
                              type: object
                            modality:
                              properties:
                                eventRules:
                                  items:
                                    properties:
                                      conditions:
                                        items:
                                          properties:
                                            field:
                                              minLength: 1
                                              type: string
                                            operator:
                                              enum:
                                                - ==
                                                - "!="
                                                - contains
                                                - in
                                                - exists
                                                - notExists
                                              type: string
                                            value:
                                              anyOf:
                                                - type: string
                                                - type: number
                                                - type: boolean
                                                - items:
                                                    anyOf:
                                                      - type: string
                                                      - type: number
                                                      - type: boolean
                                                  type: array
                                          required:
                                            - field
                                            - operator
                                          type: object
                                        type: array
                                      description:
                                        minLength: 1
                                        type: string
                                      enabled:
                                        type: boolean
                                      eventType:
                                        minLength: 1
                                        type: string
                                      id:
                                        minLength: 1
                                        type: string
                                      weights:
                                        additionalProperties:
                                          type: number
                                        type: object
                                    required:
                                      - id
                                      - description
                                      - eventType
                                      - weights
                                    type: object
                                  type: array
                                heuristics:
                                  items:
                                    properties:
                                      description:
                                        minLength: 1
                                        type: string
                                      enabled:
                                        type: boolean
                                      eventType:
                                        type: string
                                      id:
                                        minLength: 1
                                        type: string
                                      metric:
                                        enum:
                                          - totalEvents
                                          - eventCount
                                        type: string
                                      operator:
                                        enum:
                                          - <
                                          - <=
                                          - ">"
                                          - ">="
                                          - ==
                                          - "!="
                                        type: string
                                      value:
                                        type: number
                                      weights:
                                        additionalProperties:
                                          type: number
                                        type: object
                                    required:
                                      - id
                                      - description
                                      - metric
                                      - operator
                                      - value
                                      - weights
                                    type: object
                                  type: array
                                initialCounts:
                                  additionalProperties:
                                    type: number
                                  type: object
                                personas:
                                  items:
                                    minLength: 1
                                    type: string
                                  minItems: 1
                                  type: array
                              required:
                                - personas
                                - initialCounts
                                - eventRules
                                - heuristics
                              type: object
                          required:
                            - modality
                            - expertise
                          type: object
                        policy:
                          properties:
                            epsilon:
                              maximum: 1
                              minimum: 0
                              type: number
                            variantMapping:
                              additionalProperties:
                                type: string
                              type: object
                          required:
                            - epsilon
                          type: object
                      required:
                        - axes
                        - policy
                      type: object
                    feedbackWeights:
                      properties:
                        creationWeight:
                          type: number
                        deletionPenalty:
                          minimum: 0
                          type: number
                        hiddenToolPenalty:
                          minimum: 0
                          type: number
                        modificationWeight:
                          type: number
                        textAdditionWeight:
                          type: number
                      required:
                        - creationWeight
                        - textAdditionWeight
                        - modificationWeight
                        - deletionPenalty
                        - hiddenToolPenalty
                      type: object
                    mcp:
                      properties:
                        axes:
                          properties:
                            expertiseResources:
                              items:
                                properties:
                                  actions:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        isSafeFallback:
                                          type: boolean
                                        uiState:
                                          additionalProperties: {}
                                          properties:
                                            canvasActions:
                                              properties:
                                                clearCanvas:
                                                  type: boolean
                                                saveAsImage:
                                                  type: boolean
                                                saveToActiveFile:
                                                  type: boolean
                                                toggleTheme:
                                                  type: boolean
                                              type: object
                                            mainMenu:
                                              properties:
                                                allowedItems:
                                                  items:
                                                    type: string
                                                  type: array
                                              required:
                                                - allowedItems
                                              type: object
                                            mainMenuItems:
                                              items:
                                                type: string
                                              type: array
                                            showWelcomeScreen:
                                              type: boolean
                                            toolbar:
                                              properties:
                                                mode:
                                                  enum:
                                                    - allowlist
                                                    - blocklist
                                                  type: string
                                                tools:
                                                  items:
                                                    type: string
                                                  type: array
                                              required:
                                                - mode
                                                - tools
                                              type: object
                                            variant:
                                              type: string
                                          required:
                                            - variant
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - uiState
                                      type: object
                                    minItems: 1
                                    type: array
                                  decisionHints:
                                    items:
                                      type: string
                                    type: array
                                  description:
                                    minLength: 1
                                    type: string
                                  id:
                                    minLength: 1
                                    type: string
                                  name:
                                    minLength: 1
                                    type: string
                                  scoring:
                                    properties:
                                      baseWeight:
                                        type: number
                                      signals:
                                        items:
                                          properties:
                                            description:
                                              minLength: 1
                                              type: string
                                            elementType:
                                              type: string
                                            eventType:
                                              type: string
                                            id:
                                              minLength: 1
                                              type: string
                                            metric:
                                              enum:
                                                - totalEvents
                                                - eventCount
                                                - eventRatio
                                                - elementCount
                                                - toolDiversity
                                                - textToShapeRatio
                                                - timeToFirstEventMs
                                                - timeSinceLastEventMs
                                                - recentEventType
                                              type: string
                                            operator:
                                              enum:
                                                - <
                                                - <=
                                                - ">"
                                                - ">="
                                                - ==
                                                - "!="
                                                - contains
                                                - notContains
                                              type: string
                                            value:
                                              anyOf:
                                                - type: number
                                                - type: string
                                            weight:
                                              type: number
                                          required:
                                            - id
                                            - description
                                            - metric
                                            - operator
                                            - value
                                            - weight
                                          type: object
                                        type: array
                                    required:
                                      - signals
                                    type: object
                                required:
                                  - id
                                  - name
                                  - description
                                  - scoring
                                  - actions
                                type: object
                              minItems: 1
                              type: array
                            modalityResources:
                              items:
                                properties:
                                  actions:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        isSafeFallback:
                                          type: boolean
                                        uiState:
                                          additionalProperties: {}
                                          properties:
                                            canvasActions:
                                              properties:
                                                clearCanvas:
                                                  type: boolean
                                                saveAsImage:
                                                  type: boolean
                                                saveToActiveFile:
                                                  type: boolean
                                                toggleTheme:
                                                  type: boolean
                                              type: object
                                            mainMenu:
                                              properties:
                                                allowedItems:
                                                  items:
                                                    type: string
                                                  type: array
                                              required:
                                                - allowedItems
                                              type: object
                                            mainMenuItems:
                                              items:
                                                type: string
                                              type: array
                                            showWelcomeScreen:
                                              type: boolean
                                            toolbar:
                                              properties:
                                                mode:
                                                  enum:
                                                    - allowlist
                                                    - blocklist
                                                  type: string
                                                tools:
                                                  items:
                                                    type: string
                                                  type: array
                                              required:
                                                - mode
                                                - tools
                                              type: object
                                            variant:
                                              type: string
                                          required:
                                            - variant
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - uiState
                                      type: object
                                    minItems: 1
                                    type: array
                                  decisionHints:
                                    items:
                                      type: string
                                    type: array
                                  description:
                                    minLength: 1
                                    type: string
                                  id:
                                    minLength: 1
                                    type: string
                                  name:
                                    minLength: 1
                                    type: string
                                  scoring:
                                    properties:
                                      baseWeight:
                                        type: number
                                      signals:
                                        items:
                                          properties:
                                            description:
                                              minLength: 1
                                              type: string
                                            elementType:
                                              type: string
                                            eventType:
                                              type: string
                                            id:
                                              minLength: 1
                                              type: string
                                            metric:
                                              enum:
                                                - totalEvents
                                                - eventCount
                                                - eventRatio
                                                - elementCount
                                                - toolDiversity
                                                - textToShapeRatio
                                                - timeToFirstEventMs
                                                - timeSinceLastEventMs
                                                - recentEventType
                                              type: string
                                            operator:
                                              enum:
                                                - <
                                                - <=
                                                - ">"
                                                - ">="
                                                - ==
                                                - "!="
                                                - contains
                                                - notContains
                                              type: string
                                            value:
                                              anyOf:
                                                - type: number
                                                - type: string
                                            weight:
                                              type: number
                                          required:
                                            - id
                                            - description
                                            - metric
                                            - operator
                                            - value
                                            - weight
                                          type: object
                                        type: array
                                    required:
                                      - signals
                                    type: object
                                required:
                                  - id
                                  - name
                                  - description
                                  - scoring
                                  - actions
                                type: object
                              minItems: 1
                              type: array
                          required:
                            - modalityResources
                            - expertiseResources
                          type: object
                        bandit:
                          default: {}
                          properties:
                            banditEvidenceK:
                              default: 3
                              exclusiveMinimum: 0
                              type: number
                            decay:
                              default: {}
                              properties:
                                effectiveWindow:
                                  default: 200
                                  exclusiveMinimum: 1
                                  type: number
                                enabled:
                                  default: true
                                  type: boolean
                              type: object
                            enabled:
                              default: true
                              type: boolean
                            keepReward:
                              default: 1
                              maximum: 1
                              minimum: 0
                              type: number
                            passiveRewardWeight:
                              default: 0.25
                              maximum: 1
                              minimum: 0
                              type: number
                            priorAlpha:
                              default: 1
                              exclusiveMinimum: 0
                              type: number
                            priorBeta:
                              default: 1
                              exclusiveMinimum: 0
                              type: number
                            revertReward:
                              default: 0
                              maximum: 1
                              minimum: 0
                              type: number
                          type: object
                        fallbackVariant:
                          minLength: 1
                          type: string
                        gate:
                          default: {}
                          properties:
                            lockMargin:
                              default: 0.15
                              maximum: 1
                              minimum: 0
                              type: number
                            lockMinEvents:
                              default: 2
                              minimum: 0
                              type: integer
                          type: object
                        minConfidence:
                          maximum: 1
                          minimum: 0
                          type: number
                      required:
                        - axes
                        - minConfidence
                        - fallbackVariant
                      type: object
                    mode:
                      properties:
                        decisionApplication:
                          enum:
                            - immediate
                            - next-refresh
                          type: string
                        defaultMode:
                          enum:
                            - deterministic
                            - mcp
                          type: string
                        minEventsBeforeLock:
                          exclusiveMinimum: 0
                          type: integer
                        persistenceMode:
                          enum:
                            - memory
                            - tab
                            - browser
                          type: string
                        pollingIntervalMs:
                          exclusiveMinimum: 0
                          type: integer
                        presentationMode:
                          enum:
                            - prototype
                            - production
                          type: string
                      required:
                        - defaultMode
                        - presentationMode
                        - decisionApplication
                        - persistenceMode
                        - minEventsBeforeLock
                        - pollingIntervalMs
                      type: object
                    ui:
                      properties:
                        supportedMenuItems:
                          items:
                            type: string
                          type: array
                        supportedTools:
                          items:
                            type: string
                          type: array
                      required:
                        - supportedTools
                        - supportedMenuItems
                      type: object
                    updatedAt:
                      minLength: 1
                      type: string
                    version:
                      enum:
                        - 1
                      type: number
                  required:
                    - version
                    - updatedAt
                    - mode
                    - deterministic
                    - mcp
                    - ui
                    - feedbackWeights
                  type: object
              required:
                - config
              type: object
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  config:
                    properties:
                      componentEmbeddings:
                        additionalProperties:
                          properties:
                            coordinate:
                              additionalProperties:
                                type: number
                              type: object
                            threshold:
                              type: number
                          required:
                            - coordinate
                          type: object
                        type: object
                      deterministic:
                        properties:
                          axes:
                            properties:
                              expertise:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                              modality:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                            required:
                              - modality
                              - expertise
                            type: object
                          policy:
                            properties:
                              epsilon:
                                maximum: 1
                                minimum: 0
                                type: number
                              variantMapping:
                                additionalProperties:
                                  type: string
                                type: object
                            required:
                              - epsilon
                            type: object
                        required:
                          - axes
                          - policy
                        type: object
                      feedbackWeights:
                        properties:
                          creationWeight:
                            type: number
                          deletionPenalty:
                            minimum: 0
                            type: number
                          hiddenToolPenalty:
                            minimum: 0
                            type: number
                          modificationWeight:
                            type: number
                          textAdditionWeight:
                            type: number
                        required:
                          - creationWeight
                          - textAdditionWeight
                          - modificationWeight
                          - deletionPenalty
                          - hiddenToolPenalty
                        type: object
                      mcp:
                        properties:
                          axes:
                            properties:
                              expertiseResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                              modalityResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                            required:
                              - modalityResources
                              - expertiseResources
                            type: object
                          bandit:
                            default: {}
                            properties:
                              banditEvidenceK:
                                default: 3
                                exclusiveMinimum: 0
                                type: number
                              decay:
                                default: {}
                                properties:
                                  effectiveWindow:
                                    default: 200
                                    exclusiveMinimum: 1
                                    type: number
                                  enabled:
                                    default: true
                                    type: boolean
                                type: object
                              enabled:
                                default: true
                                type: boolean
                              keepReward:
                                default: 1
                                maximum: 1
                                minimum: 0
                                type: number
                              passiveRewardWeight:
                                default: 0.25
                                maximum: 1
                                minimum: 0
                                type: number
                              priorAlpha:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              priorBeta:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              revertReward:
                                default: 0
                                maximum: 1
                                minimum: 0
                                type: number
                            type: object
                          fallbackVariant:
                            minLength: 1
                            type: string
                          gate:
                            default: {}
                            properties:
                              lockMargin:
                                default: 0.15
                                maximum: 1
                                minimum: 0
                                type: number
                              lockMinEvents:
                                default: 2
                                minimum: 0
                                type: integer
                            type: object
                          minConfidence:
                            maximum: 1
                            minimum: 0
                            type: number
                        required:
                          - axes
                          - minConfidence
                          - fallbackVariant
                        type: object
                      mode:
                        properties:
                          decisionApplication:
                            enum:
                              - immediate
                              - next-refresh
                            type: string
                          defaultMode:
                            enum:
                              - deterministic
                              - mcp
                            type: string
                          minEventsBeforeLock:
                            exclusiveMinimum: 0
                            type: integer
                          persistenceMode:
                            enum:
                              - memory
                              - tab
                              - browser
                            type: string
                          pollingIntervalMs:
                            exclusiveMinimum: 0
                            type: integer
                          presentationMode:
                            enum:
                              - prototype
                              - production
                            type: string
                        required:
                          - defaultMode
                          - presentationMode
                          - decisionApplication
                          - persistenceMode
                          - minEventsBeforeLock
                          - pollingIntervalMs
                        type: object
                      ui:
                        properties:
                          supportedMenuItems:
                            items:
                              type: string
                            type: array
                          supportedTools:
                            items:
                              type: string
                            type: array
                        required:
                          - supportedTools
                          - supportedMenuItems
                        type: object
                      updatedAt:
                        minLength: 1
                        type: string
                      version:
                        enum:
                          - 1
                        type: number
                    required:
                      - version
                      - updatedAt
                      - mode
                      - deterministic
                      - mcp
                      - ui
                      - feedbackWeights
                    type: object
                  success:
                    type: boolean
                required:
                  - success
                  - config
                type: object
          description: Updated admin configuration object
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Update admin configuration at runtime
      tags:
        - Admin
  /api/dionysys/admin/config/export:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  config:
                    properties:
                      componentEmbeddings:
                        additionalProperties:
                          properties:
                            coordinate:
                              additionalProperties:
                                type: number
                              type: object
                            threshold:
                              type: number
                          required:
                            - coordinate
                          type: object
                        type: object
                      deterministic:
                        properties:
                          axes:
                            properties:
                              expertise:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                              modality:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                            required:
                              - modality
                              - expertise
                            type: object
                          policy:
                            properties:
                              epsilon:
                                maximum: 1
                                minimum: 0
                                type: number
                              variantMapping:
                                additionalProperties:
                                  type: string
                                type: object
                            required:
                              - epsilon
                            type: object
                        required:
                          - axes
                          - policy
                        type: object
                      feedbackWeights:
                        properties:
                          creationWeight:
                            type: number
                          deletionPenalty:
                            minimum: 0
                            type: number
                          hiddenToolPenalty:
                            minimum: 0
                            type: number
                          modificationWeight:
                            type: number
                          textAdditionWeight:
                            type: number
                        required:
                          - creationWeight
                          - textAdditionWeight
                          - modificationWeight
                          - deletionPenalty
                          - hiddenToolPenalty
                        type: object
                      mcp:
                        properties:
                          axes:
                            properties:
                              expertiseResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                              modalityResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                            required:
                              - modalityResources
                              - expertiseResources
                            type: object
                          bandit:
                            default: {}
                            properties:
                              banditEvidenceK:
                                default: 3
                                exclusiveMinimum: 0
                                type: number
                              decay:
                                default: {}
                                properties:
                                  effectiveWindow:
                                    default: 200
                                    exclusiveMinimum: 1
                                    type: number
                                  enabled:
                                    default: true
                                    type: boolean
                                type: object
                              enabled:
                                default: true
                                type: boolean
                              keepReward:
                                default: 1
                                maximum: 1
                                minimum: 0
                                type: number
                              passiveRewardWeight:
                                default: 0.25
                                maximum: 1
                                minimum: 0
                                type: number
                              priorAlpha:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              priorBeta:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              revertReward:
                                default: 0
                                maximum: 1
                                minimum: 0
                                type: number
                            type: object
                          fallbackVariant:
                            minLength: 1
                            type: string
                          gate:
                            default: {}
                            properties:
                              lockMargin:
                                default: 0.15
                                maximum: 1
                                minimum: 0
                                type: number
                              lockMinEvents:
                                default: 2
                                minimum: 0
                                type: integer
                            type: object
                          minConfidence:
                            maximum: 1
                            minimum: 0
                            type: number
                        required:
                          - axes
                          - minConfidence
                          - fallbackVariant
                        type: object
                      mode:
                        properties:
                          decisionApplication:
                            enum:
                              - immediate
                              - next-refresh
                            type: string
                          defaultMode:
                            enum:
                              - deterministic
                              - mcp
                            type: string
                          minEventsBeforeLock:
                            exclusiveMinimum: 0
                            type: integer
                          persistenceMode:
                            enum:
                              - memory
                              - tab
                              - browser
                            type: string
                          pollingIntervalMs:
                            exclusiveMinimum: 0
                            type: integer
                          presentationMode:
                            enum:
                              - prototype
                              - production
                            type: string
                        required:
                          - defaultMode
                          - presentationMode
                          - decisionApplication
                          - persistenceMode
                          - minEventsBeforeLock
                          - pollingIntervalMs
                        type: object
                      ui:
                        properties:
                          supportedMenuItems:
                            items:
                              type: string
                            type: array
                          supportedTools:
                            items:
                              type: string
                            type: array
                        required:
                          - supportedTools
                          - supportedMenuItems
                        type: object
                      updatedAt:
                        minLength: 1
                        type: string
                      version:
                        enum:
                          - 1
                        type: number
                    required:
                      - version
                      - updatedAt
                      - mode
                      - deterministic
                      - mcp
                      - ui
                      - feedbackWeights
                    type: object
                  exportedAt:
                    type: string
                  success:
                    type: boolean
                required:
                  - success
                  - exportedAt
                  - config
                type: object
          description: Admin configuration export including exportedAt timestamp
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Export admin configuration as JSON
      tags:
        - Admin
  /api/dionysys/admin/config/reset:
    post:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  config:
                    properties:
                      componentEmbeddings:
                        additionalProperties:
                          properties:
                            coordinate:
                              additionalProperties:
                                type: number
                              type: object
                            threshold:
                              type: number
                          required:
                            - coordinate
                          type: object
                        type: object
                      deterministic:
                        properties:
                          axes:
                            properties:
                              expertise:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                              modality:
                                properties:
                                  eventRules:
                                    items:
                                      properties:
                                        conditions:
                                          items:
                                            properties:
                                              field:
                                                minLength: 1
                                                type: string
                                              operator:
                                                enum:
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - in
                                                  - exists
                                                  - notExists
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: string
                                                  - type: number
                                                  - type: boolean
                                                  - items:
                                                      anyOf:
                                                        - type: string
                                                        - type: number
                                                        - type: boolean
                                                    type: array
                                            required:
                                              - field
                                              - operator
                                            type: object
                                          type: array
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          minLength: 1
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - eventType
                                        - weights
                                      type: object
                                    type: array
                                  heuristics:
                                    items:
                                      properties:
                                        description:
                                          minLength: 1
                                          type: string
                                        enabled:
                                          type: boolean
                                        eventType:
                                          type: string
                                        id:
                                          minLength: 1
                                          type: string
                                        metric:
                                          enum:
                                            - totalEvents
                                            - eventCount
                                          type: string
                                        operator:
                                          enum:
                                            - <
                                            - <=
                                            - ">"
                                            - ">="
                                            - ==
                                            - "!="
                                          type: string
                                        value:
                                          type: number
                                        weights:
                                          additionalProperties:
                                            type: number
                                          type: object
                                      required:
                                        - id
                                        - description
                                        - metric
                                        - operator
                                        - value
                                        - weights
                                      type: object
                                    type: array
                                  initialCounts:
                                    additionalProperties:
                                      type: number
                                    type: object
                                  personas:
                                    items:
                                      minLength: 1
                                      type: string
                                    minItems: 1
                                    type: array
                                required:
                                  - personas
                                  - initialCounts
                                  - eventRules
                                  - heuristics
                                type: object
                            required:
                              - modality
                              - expertise
                            type: object
                          policy:
                            properties:
                              epsilon:
                                maximum: 1
                                minimum: 0
                                type: number
                              variantMapping:
                                additionalProperties:
                                  type: string
                                type: object
                            required:
                              - epsilon
                            type: object
                        required:
                          - axes
                          - policy
                        type: object
                      feedbackWeights:
                        properties:
                          creationWeight:
                            type: number
                          deletionPenalty:
                            minimum: 0
                            type: number
                          hiddenToolPenalty:
                            minimum: 0
                            type: number
                          modificationWeight:
                            type: number
                          textAdditionWeight:
                            type: number
                        required:
                          - creationWeight
                          - textAdditionWeight
                          - modificationWeight
                          - deletionPenalty
                          - hiddenToolPenalty
                        type: object
                      mcp:
                        properties:
                          axes:
                            properties:
                              expertiseResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                              modalityResources:
                                items:
                                  properties:
                                    actions:
                                      items:
                                        properties:
                                          description:
                                            minLength: 1
                                            type: string
                                          id:
                                            minLength: 1
                                            type: string
                                          isSafeFallback:
                                            type: boolean
                                          uiState:
                                            additionalProperties: {}
                                            properties:
                                              canvasActions:
                                                properties:
                                                  clearCanvas:
                                                    type: boolean
                                                  saveAsImage:
                                                    type: boolean
                                                  saveToActiveFile:
                                                    type: boolean
                                                  toggleTheme:
                                                    type: boolean
                                                type: object
                                              mainMenu:
                                                properties:
                                                  allowedItems:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - allowedItems
                                                type: object
                                              mainMenuItems:
                                                items:
                                                  type: string
                                                type: array
                                              showWelcomeScreen:
                                                type: boolean
                                              toolbar:
                                                properties:
                                                  mode:
                                                    enum:
                                                      - allowlist
                                                      - blocklist
                                                    type: string
                                                  tools:
                                                    items:
                                                      type: string
                                                    type: array
                                                required:
                                                  - mode
                                                  - tools
                                                type: object
                                              variant:
                                                type: string
                                            required:
                                              - variant
                                            type: object
                                        required:
                                          - id
                                          - description
                                          - uiState
                                        type: object
                                      minItems: 1
                                      type: array
                                    decisionHints:
                                      items:
                                        type: string
                                      type: array
                                    description:
                                      minLength: 1
                                      type: string
                                    id:
                                      minLength: 1
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    scoring:
                                      properties:
                                        baseWeight:
                                          type: number
                                        signals:
                                          items:
                                            properties:
                                              description:
                                                minLength: 1
                                                type: string
                                              elementType:
                                                type: string
                                              eventType:
                                                type: string
                                              id:
                                                minLength: 1
                                                type: string
                                              metric:
                                                enum:
                                                  - totalEvents
                                                  - eventCount
                                                  - eventRatio
                                                  - elementCount
                                                  - toolDiversity
                                                  - textToShapeRatio
                                                  - timeToFirstEventMs
                                                  - timeSinceLastEventMs
                                                  - recentEventType
                                                type: string
                                              operator:
                                                enum:
                                                  - <
                                                  - <=
                                                  - ">"
                                                  - ">="
                                                  - ==
                                                  - "!="
                                                  - contains
                                                  - notContains
                                                type: string
                                              value:
                                                anyOf:
                                                  - type: number
                                                  - type: string
                                              weight:
                                                type: number
                                            required:
                                              - id
                                              - description
                                              - metric
                                              - operator
                                              - value
                                              - weight
                                            type: object
                                          type: array
                                      required:
                                        - signals
                                      type: object
                                  required:
                                    - id
                                    - name
                                    - description
                                    - scoring
                                    - actions
                                  type: object
                                minItems: 1
                                type: array
                            required:
                              - modalityResources
                              - expertiseResources
                            type: object
                          bandit:
                            default: {}
                            properties:
                              banditEvidenceK:
                                default: 3
                                exclusiveMinimum: 0
                                type: number
                              decay:
                                default: {}
                                properties:
                                  effectiveWindow:
                                    default: 200
                                    exclusiveMinimum: 1
                                    type: number
                                  enabled:
                                    default: true
                                    type: boolean
                                type: object
                              enabled:
                                default: true
                                type: boolean
                              keepReward:
                                default: 1
                                maximum: 1
                                minimum: 0
                                type: number
                              passiveRewardWeight:
                                default: 0.25
                                maximum: 1
                                minimum: 0
                                type: number
                              priorAlpha:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              priorBeta:
                                default: 1
                                exclusiveMinimum: 0
                                type: number
                              revertReward:
                                default: 0
                                maximum: 1
                                minimum: 0
                                type: number
                            type: object
                          fallbackVariant:
                            minLength: 1
                            type: string
                          gate:
                            default: {}
                            properties:
                              lockMargin:
                                default: 0.15
                                maximum: 1
                                minimum: 0
                                type: number
                              lockMinEvents:
                                default: 2
                                minimum: 0
                                type: integer
                            type: object
                          minConfidence:
                            maximum: 1
                            minimum: 0
                            type: number
                        required:
                          - axes
                          - minConfidence
                          - fallbackVariant
                        type: object
                      mode:
                        properties:
                          decisionApplication:
                            enum:
                              - immediate
                              - next-refresh
                            type: string
                          defaultMode:
                            enum:
                              - deterministic
                              - mcp
                            type: string
                          minEventsBeforeLock:
                            exclusiveMinimum: 0
                            type: integer
                          persistenceMode:
                            enum:
                              - memory
                              - tab
                              - browser
                            type: string
                          pollingIntervalMs:
                            exclusiveMinimum: 0
                            type: integer
                          presentationMode:
                            enum:
                              - prototype
                              - production
                            type: string
                        required:
                          - defaultMode
                          - presentationMode
                          - decisionApplication
                          - persistenceMode
                          - minEventsBeforeLock
                          - pollingIntervalMs
                        type: object
                      ui:
                        properties:
                          supportedMenuItems:
                            items:
                              type: string
                            type: array
                          supportedTools:
                            items:
                              type: string
                            type: array
                        required:
                          - supportedTools
                          - supportedMenuItems
                        type: object
                      updatedAt:
                        minLength: 1
                        type: string
                      version:
                        enum:
                          - 1
                        type: number
                    required:
                      - version
                      - updatedAt
                      - mode
                      - deterministic
                      - mcp
                      - ui
                      - feedbackWeights
                    type: object
                  success:
                    type: boolean
                required:
                  - success
                  - config
                type: object
          description: Reset admin configuration object
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Admin console is disabled
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Reset admin configuration to file defaults
      tags:
        - Admin
  /api/dionysys/decisions:resolve:
    post:
      description: Preferred SDK route. The server also accepts
        /api/dionysys/decisions/resolve as a compatibility alias.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DionysysDecisionResolve"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysDecision"
          description: Resolved decision
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Resolve an adaptive decision
      tags:
        - Decisions
  /api/dionysys/events:
    post:
      description: Accepts a single event object or an array of events.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DionysysEvent"
      responses:
        "202":
          description: Events accepted
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Ingest events
      tags:
        - Events
  /api/dionysys/feedback:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                comment:
                  type: string
                sentiment:
                  enum:
                    - helpful
                    - in_the_way
                  type: string
                sessionId:
                  minLength: 1
                  type: string
              required:
                - sessionId
                - sentiment
              type: object
      responses:
        "200":
          description: Feedback submitted and graph recommendation returned
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: No applied decision found for session
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Submit explicit user feedback
      tags:
        - Feedback
  /api/dionysys/feedback/evaluate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              properties:
                sessionId:
                  minLength: 1
                  type: string
              required:
                - sessionId
              type: object
      responses:
        "200":
          description: Evaluation result
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: No applied decision found for session
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Trigger passive feedback evaluation
      tags:
        - Feedback
  /api/dionysys/sessions:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DionysysSessionCreate"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysSession"
          description: Created session
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Create a session
      tags:
        - Sessions
  /api/dionysys/sessions/{sessionId}:
    delete:
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        "204":
          description: Session deleted
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Delete a session
      tags:
        - Sessions
    get:
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysSession"
          description: Session found
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Session not found
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Get a session
      tags:
        - Sessions
    patch:
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DionysysSessionUpdate"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysSession"
          description: Updated session
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Validation error
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Session not found
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: Update session metadata
      tags:
        - Sessions
  /api/dionysys/sessions/{sessionId}/end:
    post:
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysSession"
          description: Ended session
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Session not found
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DionysysApiError"
          description: Internal error
      summary: End a session
      tags:
        - Sessions
servers:
  - description: Dionysys backend
    url: "{baseUrl}"
    variables:
      baseUrl:
        default: http://localhost:3001
        description: Base URL of the Dionysys backend server.
webhooks: {}
