{
  "openapi": "3.0.3",
  "info": {
    "title": "朝夕智能平台 API",
    "version": "1.0.0",
    "description": "商业授权本地部署平台的接口参考。请求发往企业自己的实例；功能和权限以安装版本为准。"
  },
  "servers": [
    {
      "url": "/",
      "description": "客户部署实例的根地址"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Capabilities"
    },
    {
      "name": "Workflows"
    },
    {
      "name": "WorkflowRuns"
    },
    {
      "name": "Tools"
    },
    {
      "name": "Agents"
    },
    {
      "name": "AgentRuns"
    },
    {
      "name": "Knowledge"
    },
    {
      "name": "Files"
    },
    {
      "name": "AgentSurface"
    },
    {
      "name": "Applications"
    },
    {
      "name": "Environments"
    },
    {
      "name": "Spaces"
    },
    {
      "name": "Organization"
    }
  ],
  "paths": {
    "/api/v1/applications/organization/list": {
      "post": {
        "operationId": "listApplicationOrganization",
        "tags": [
          "Applications",
          "Organization"
        ],
        "summary": "List authorized applications at a directory position",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationOrganizationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current visible directory entries",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOrganizationPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/organization/place": {
      "post": {
        "operationId": "placeApplicationOrganization",
        "tags": [
          "Applications",
          "Organization"
        ],
        "summary": "Change directory placement without changing team ownership or resource grants",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationOrganizationMutation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current placement after idempotent revision-checked mutation",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOrganizationEntry"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/collaboration/detail": {
      "post": {
        "operationId": "getApplicationCollaboration",
        "tags": [
          "Applications"
        ],
        "summary": "Read visible collaboration definitions and the current administrator draft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCollaborationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized visible configuration",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCollaborationView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/collaboration/check": {
      "post": {
        "operationId": "checkApplicationCollaboration",
        "tags": [
          "Applications"
        ],
        "summary": "Check a saved relationship with the current account without executing work",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCollaborationCheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Advisory checks without commands or access grants",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCollaborationCheckResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/collaboration/history": {
      "post": {
        "operationId": "getApplicationCollaborationHistory",
        "tags": [
          "Applications"
        ],
        "summary": "Read immutable publication history with current application visibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCollaborationHistoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visible publication history without live grants",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCollaborationHistory"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/collaboration/change": {
      "post": {
        "operationId": "changeApplicationCollaboration",
        "tags": [
          "Applications"
        ],
        "summary": "Save publish rebase revoke or explicitly adopt collaboration rules with revision CAS",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCollaborationMutation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current authorized configuration after mutation",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCollaborationView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/memories/list": {
      "post": {
        "operationId": "listApplicationMemories",
        "tags": [
          "Applications"
        ],
        "summary": "List current scene memories within an authorized application binding",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMemoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized memory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMemoryPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/memories/detail": {
      "post": {
        "operationId": "getApplicationMemory",
        "tags": [
          "Applications"
        ],
        "summary": "Read a scene memory and paginated immutable revisions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMemoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized memory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMemory"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/memories/mutate": {
      "post": {
        "operationId": "mutateApplicationMemory",
        "tags": [
          "Applications"
        ],
        "summary": "Save stop restore or explicitly forget memory with current audience authorization and revision CAS",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMemoryMutation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized memory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMemory"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/detail": {
      "post": {
        "operationId": "getApplicationRecord",
        "tags": [
          "Applications"
        ],
        "summary": "Read an application-owned record within the current binding scope",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized record",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecord"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/list": {
      "post": {
        "operationId": "listApplicationRecords",
        "tags": [
          "Applications"
        ],
        "summary": "List application-owned records without crossing binding or creator scopes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized records in descending creation order",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/save": {
      "post": {
        "operationId": "saveApplicationRecord",
        "tags": [
          "Applications"
        ],
        "summary": "Save a creator-owned record using the declared schema, current binding and CAS",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordSaveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durable write receipt, not an AI execution result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordWriteResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/delete": {
      "post": {
        "operationId": "deleteApplicationRecord",
        "tags": [
          "Applications"
        ],
        "summary": "Clear record content and retain a tombstone against delayed write replay",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durable deletion receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordWriteResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/grants/list": {
      "post": {
        "operationId": "listApplicationRecordGrants",
        "tags": [
          "Applications"
        ],
        "summary": "List explicit collaborators for a creator-owned application record",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Record collaborators",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordGrantList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/candidates/list": {
      "post": {
        "operationId": "listApplicationRecordCandidates",
        "tags": [
          "Applications"
        ],
        "summary": "List binding-authorized identities eligible to collaborate on a record",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordCandidateListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Eligible record collaborators",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordCandidatePage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/grants/change": {
      "post": {
        "operationId": "changeApplicationRecordGrant",
        "tags": [
          "Applications"
        ],
        "summary": "Grant, change, or revoke explicit record collaboration access",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordGrantChangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current persisted grant",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordGrant"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/channel-principal-grants/targets": {
      "post": {
        "operationId": "listApplicationRecordChannelPrincipalGrantTargets",
        "tags": [
          "Applications"
        ],
        "summary": "List observed same-install channel principals eligible for an explicit record share",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalTargetListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current active same-application principal targets; external subjects are never returned",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalTargetPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/channel-principal-grants/list": {
      "post": {
        "operationId": "listApplicationRecordChannelPrincipalGrants",
        "tags": [
          "Applications"
        ],
        "summary": "List explicit channel-principal shares for a creator-owned record",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrantListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current and stale grants for the selected record",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrantPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/channel-principal-grants/grant": {
      "post": {
        "operationId": "grantApplicationRecordToChannelPrincipal",
        "tags": [
          "Applications"
        ],
        "summary": "Explicitly share the exact current record revision with a verified channel principal",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durable explicit share receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrantResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/channel-principal-grants/revoke": {
      "post": {
        "operationId": "revokeApplicationRecordChannelPrincipalGrant",
        "tags": [
          "Applications"
        ],
        "summary": "Revoke an explicit channel-principal record share",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrantRevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durable revoke receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrantResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/meeting-native-actions/targets": {
      "post": {
        "operationId": "listMeetingNativeActionTargets",
        "tags": [
          "Applications"
        ],
        "summary": "List same-install native task, calendar and meeting destinations available to the current meeting-record editor",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMeetingNativeActionTargetsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Eligible installations resolved from the authenticated user's active identity mapping",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMeetingNativeActionTargetsResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/meeting-native-actions/list": {
      "post": {
        "operationId": "listMeetingNativeActions",
        "tags": [
          "Applications"
        ],
        "summary": "List persisted provider receipts for one exact meeting record",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMeetingNativeActionListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Receipts scoped to the authenticated record editor, with stale revisions marked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMeetingNativeActionListResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/meeting-native-actions/execute": {
      "post": {
        "operationId": "executeMeetingNativeAction",
        "tags": [
          "Applications"
        ],
        "summary": "Explicitly confirm one adopted task, calendar event or online meeting from the exact persisted meeting revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMeetingNativeActionExecuteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durable provider execution receipt; unknown provider outcomes are never retried automatically",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMeetingNativeActionReceipt"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/meeting-native-actions/verify": {
      "post": {
        "operationId": "verifyMeetingNativeAction",
        "tags": [
          "Applications"
        ],
        "summary": "Read one exact native action from its authorized provider installation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMeetingNativeActionVerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durable provider readback snapshot; no external mutation is performed",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMeetingNativeActionOperationReceipt"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/meeting-native-actions/lifecycle": {
      "post": {
        "operationId": "applyMeetingNativeActionLifecycle",
        "tags": [
          "Applications"
        ],
        "summary": "Update, cancel or safely retry one exact persisted meeting native-action receipt",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMeetingNativeActionLifecycleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Append-only provider lifecycle receipt with exact actor, source and action revisions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMeetingNativeActionOperationReceipt"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/confirm": {
      "post": {
        "operationId": "confirmApplicationRecord",
        "tags": [
          "Applications"
        ],
        "summary": "Record an identity-backed confirmation for one exact record revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordConfirmRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Immutable confirmation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordConfirmationResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/records/confirmations/list": {
      "post": {
        "operationId": "listApplicationRecordConfirmations",
        "tags": [
          "Applications"
        ],
        "summary": "List identity-backed confirmations for readable record revisions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRecordConfirmationListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Record confirmations",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationRecordConfirmationList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/business-actions/create": {
      "post": {
        "operationId": "createApplicationBusinessAction",
        "tags": [
          "Applications"
        ],
        "summary": "Create formal accountable human work from an exact record revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBusinessActionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persisted business action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBusinessAction"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/business-actions/suggest-assignees": {
      "post": {
        "operationId": "suggestApplicationBusinessActionAssignees",
        "tags": [
          "Applications"
        ],
        "summary": "Rank authorized assignees from versioned responsibility profiles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBusinessActionSuggestionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Explainable responsibility matches; no assignment is changed",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBusinessActionSuggestionResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/business-actions/detail": {
      "post": {
        "operationId": "getApplicationBusinessAction",
        "tags": [
          "Applications"
        ],
        "summary": "Read an assigned or created business action",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBusinessActionIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized business action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBusinessAction"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/business-actions/list": {
      "post": {
        "operationId": "listApplicationBusinessActions",
        "tags": [
          "Applications"
        ],
        "summary": "List formal business actions created by or assigned to the current identity",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBusinessActionListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized business actions",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBusinessActionPage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/business-actions/transition": {
      "post": {
        "operationId": "transitionApplicationBusinessAction",
        "tags": [
          "Applications"
        ],
        "summary": "Start, complete, accept, return, or cancel a business action using CAS",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBusinessActionTransitionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated business action",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBusinessAction"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/units/create": {
      "post": {
        "operationId": "createOrganizationUnit",
        "tags": [
          "Organization"
        ],
        "summary": "Create a manual directory unit without granting access",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/units/detail": {
      "post": {
        "operationId": "getOrganizationUnit",
        "tags": [
          "Organization"
        ],
        "summary": "Read a Workspace directory entry and its bounded parent path",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/units/list": {
      "post": {
        "operationId": "listOrganizationUnits",
        "tags": [
          "Organization"
        ],
        "summary": "Page direct child units; parent membership is never inherited",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/units/update": {
      "post": {
        "operationId": "updateOrganizationUnit",
        "tags": [
          "Organization"
        ],
        "summary": "Update directory metadata at the expected revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/units/move": {
      "post": {
        "operationId": "moveOrganizationUnit",
        "tags": [
          "Organization"
        ],
        "summary": "Move the directory entry without changing Team identity or access",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationMoveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/units/transition": {
      "post": {
        "operationId": "transitionOrganizationUnit",
        "tags": [
          "Organization"
        ],
        "summary": "Disable or enable a unit; old Team references require explicit reassociation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationTransitionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/members/list": {
      "post": {
        "operationId": "listOrganizationMembers",
        "tags": [
          "Organization"
        ],
        "summary": "Read direct members without contact details or inherited permissions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationMemberList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/members/candidates": {
      "post": {
        "operationId": "listOrganizationMemberCandidates",
        "tags": [
          "Organization"
        ],
        "summary": "List eligible existing Workspace accounts for manual directory membership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationMemberCandidatesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceMemberCandidateList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/members/update": {
      "post": {
        "operationId": "updateOrganizationMember",
        "tags": [
          "Organization"
        ],
        "summary": "Maintain direct membership or directory leadership, never permission grants",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationMemberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationUnitView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/responsibilities/list": {
      "post": {
        "operationId": "listOrganizationResponsibilities",
        "tags": [
          "Organization"
        ],
        "summary": "List versioned responsibility profiles without granting resource access",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationResponsibilityListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized responsibility profile page",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationResponsibilityProfilePage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/responsibilities/import": {
      "post": {
        "operationId": "importOrganizationResponsibilities",
        "tags": [
          "Organization"
        ],
        "summary": "Atomically import responsibility profiles at explicit expected revisions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationResponsibilityImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Imported responsibility profiles and immutable receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationResponsibilityImportResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/teams/list": {
      "post": {
        "operationId": "listOrganizationTeams",
        "tags": [
          "Organization"
        ],
        "summary": "Page linked Teams using current Team membership before pagination",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/teams/detail": {
      "post": {
        "operationId": "getTeamOrganization",
        "tags": [
          "Organization"
        ],
        "summary": "Read the primary directory reference of an authorized Team",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamOrganizationIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamOrganizationView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/teams/update": {
      "post": {
        "operationId": "updateTeamOrganization",
        "tags": [
          "Organization"
        ],
        "summary": "Explicitly link or unlink an authorized Team using its current revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamOrganizationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamOrganizationView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/organization/audit/list": {
      "post": {
        "operationId": "listOrganizationAudit",
        "tags": [
          "Organization"
        ],
        "summary": "Page immutable directory change events",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persisted directory result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/OrganizationAuditList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/transition": {
      "post": {
        "operationId": "transitionSpace",
        "tags": [
          "Spaces"
        ],
        "summary": "Change lifecycle with an explicit in-flight work plan and revision check",
        "description": "Cancellation decisions are not execution; use the original runtime authorization. Restore revalidates enabled bindings and never starts runs or replays events.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceTransitionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persisted lifecycle result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/work/list": {
      "post": {
        "operationId": "listSpaceWork",
        "tags": [
          "Spaces"
        ],
        "summary": "Managers inspect unresolved work identities without private run contents",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paginated authoritative runtime work state",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceWorkList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/tasks/list": {
      "post": {
        "operationId": "listSpaceTasks",
        "tags": [
          "Spaces"
        ],
        "summary": "Members inspect collaboration responsibility and runtime facts without private task contents",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paginated original task identities and states",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceTaskList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/office/projects/create": {
      "post": {
        "operationId": "createOfficeProject",
        "tags": [
          "Spaces"
        ],
        "summary": "Create current-team office projects using existing spaces",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficeProjectCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized office project state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/office/projects/list": {
      "post": {
        "operationId": "listOfficeProjects",
        "tags": [
          "Spaces"
        ],
        "summary": "List current-team office projects using existing spaces",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficeProjectListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized office project state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/office/projects/update": {
      "post": {
        "operationId": "updateOfficeProject",
        "tags": [
          "Spaces"
        ],
        "summary": "Update current-team office projects using existing spaces",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficeProjectUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized office project state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/office/projects/archive": {
      "post": {
        "operationId": "archiveOfficeProject",
        "tags": [
          "Spaces"
        ],
        "summary": "Archive current-team office projects using existing spaces",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficeProjectArchiveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized office project state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/create": {
      "post": {
        "operationId": "createSpace",
        "tags": [
          "Spaces"
        ],
        "summary": "Create an independent team or project inside the Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/detail": {
      "post": {
        "operationId": "getSpace",
        "tags": [
          "Spaces"
        ],
        "summary": "Read a space only through current membership and Workspace permissions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/list": {
      "post": {
        "operationId": "listSpaces",
        "tags": [
          "Spaces"
        ],
        "summary": "List currently joined spaces without inheriting participation membership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/update": {
      "post": {
        "operationId": "updateSpace",
        "tags": [
          "Spaces"
        ],
        "summary": "Update space metadata with a current revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/members/list": {
      "post": {
        "operationId": "listSpaceMembers",
        "tags": [
          "Spaces"
        ],
        "summary": "List membership sources for an authorized space manager",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceMemberList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/resource-folders/list": {
      "post": {
        "operationId": "listSpaceResourceFolders",
        "tags": [
          "Spaces"
        ],
        "summary": "List persistent resource folders in a Team",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Team resource folders",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceResourceFolderList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/resource-folders/create": {
      "post": {
        "operationId": "createSpaceResourceFolder",
        "tags": [
          "Spaces"
        ],
        "summary": "Create a persistent resource folder in a Team",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceResourceFolderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created Team resource folder",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceResourceFolder"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/resource-files/placements/list": {
      "post": {
        "operationId": "listSpaceResourceFilePlacements",
        "tags": [
          "Spaces"
        ],
        "summary": "List non-root Team resource file placements",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Team resource file placements",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceResourceFilePlacementList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/resource-files/move": {
      "post": {
        "operationId": "moveSpaceResourceFile",
        "tags": [
          "Spaces"
        ],
        "summary": "Move a Team resource file to a persistent folder or root",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceResourceFileMoveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Team resource file placement",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceResourceFilePlacement"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/members/candidates": {
      "post": {
        "operationId": "listSpaceMemberCandidates",
        "tags": [
          "Spaces"
        ],
        "summary": "List eligible identities in the same Workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceMemberCandidateList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/members/update": {
      "post": {
        "operationId": "updateSpaceMember",
        "tags": [
          "Spaces"
        ],
        "summary": "Change a manual grant or the explicit membership revocation veto",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceMemberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/owner/transfer": {
      "post": {
        "operationId": "transferSpaceOwner",
        "tags": [
          "Spaces"
        ],
        "summary": "Transfer space responsibility to an eligible existing member",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceOwnerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/participation/update": {
      "post": {
        "operationId": "updateSpaceParticipation",
        "tags": [
          "Spaces"
        ],
        "summary": "Record team participation without granting membership or data access",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceParticipationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/work-context/list": {
      "post": {
        "operationId": "listSpaceWorkContext",
        "tags": [
          "Spaces"
        ],
        "summary": "List human-maintained shared notes and decisions for a space",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceWorkContextListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Shared work context entries",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceWorkContextList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/work-context/save": {
      "post": {
        "operationId": "saveSpaceWorkContext",
        "tags": [
          "Spaces"
        ],
        "summary": "Create or update a human-maintained shared note or decision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceWorkContextSaveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved work context entry",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceWorkContextEntry"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/work-context/retire": {
      "post": {
        "operationId": "retireSpaceWorkContext",
        "tags": [
          "Spaces"
        ],
        "summary": "Retire a shared note or decision without deleting history",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceWorkContextRetireRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Retired work context entry",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceWorkContextEntry"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/participation/teams": {
      "post": {
        "operationId": "listSpaceParticipatingTeams",
        "tags": [
          "Spaces"
        ],
        "summary": "Read participating teams that the actor is authorized to see",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceTeamList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/participation/invite": {
      "post": {
        "operationId": "inviteSpaceEmployee",
        "tags": [
          "Spaces"
        ],
        "summary": "Invite a Team or Application employee into a project without granting membership or source ownership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceEmployeeInviteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized space result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/participation/employees": {
      "post": {
        "operationId": "listSpaceEmployees",
        "tags": [
          "Spaces"
        ],
        "summary": "List project digital employees with sources and current status",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project employee participation",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceEmployeeList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/spaces/participation/employee-candidates": {
      "post": {
        "operationId": "listSpaceEmployeeCandidates",
        "tags": [
          "Spaces"
        ],
        "summary": "List applications that a project manager may invite as digital employees",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceMemberListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invite candidates",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SpaceEmployeeCandidateList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/schedules/create": {
      "post": {
        "operationId": "createApplicationSchedule",
        "tags": [
          "Applications"
        ],
        "summary": "Schedule create for the authenticated user's current digital employee or project",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationScheduleSaveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persistent schedule state; command intake rechecks current authority and the confirmed binding revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/schedules/update": {
      "post": {
        "operationId": "updateApplicationSchedule",
        "tags": [
          "Applications"
        ],
        "summary": "Schedule update for the authenticated user's current digital employee or project",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationScheduleSaveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persistent schedule state; command intake rechecks current authority and the confirmed binding revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/schedules/list": {
      "post": {
        "operationId": "listApplicationSchedules",
        "tags": [
          "Applications"
        ],
        "summary": "Schedule list for the authenticated user's current digital employee or project",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationScheduleListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persistent schedule state; command intake rechecks current authority and the confirmed binding revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/schedules/state": {
      "post": {
        "operationId": "changeApplicationScheduleState",
        "tags": [
          "Applications"
        ],
        "summary": "Schedule state for the authenticated user's current digital employee or project",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationScheduleStateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized persistent schedule state; command intake rechecks current authority and the confirmed binding revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/title": {
      "post": {
        "operationId": "updateApplicationConversationTitle",
        "tags": [
          "Applications"
        ],
        "summary": "Summarize an authorized digital employee conversation or explicitly rename it",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "workspace_id",
                  "command_id"
                ],
                "properties": {
                  "workspace_id": {
                    "type": "string"
                  },
                  "command_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Explicit user rename; omitted to generate a concise AI summary title"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persisted title for the authenticated owner's exact conversation; later automatic requests retain it and never replace an explicit rename",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "required": [
                            "conversation_id",
                            "title"
                          ],
                          "properties": {
                            "conversation_id": {
                              "type": "integer",
                              "format": "int64"
                            },
                            "title": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/representative/starter-questions": {
      "post": {
        "operationId": "generateApplicationStarterQuestions",
        "tags": [
          "Applications"
        ],
        "summary": "Generate three opening questions using the installed application's published Agent model without a business run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationStarterQuestionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Questions generated by the exact installed Agent model; no conversation or business command is created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationStarterQuestions"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/representative/run": {
      "post": {
        "operationId": "runApplicationEmployee",
        "tags": [
          "Applications"
        ],
        "summary": "Run the application's digital employee with its governed MCP business toolset",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationEmployeeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Original Agent run and application command receipt; business tool commands remain separately observable",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCommandView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/projects/agent/run": {
      "post": {
        "operationId": "runApplicationProjectAgent",
        "tags": [
          "Applications"
        ],
        "summary": "Explicitly start the current Project representative Agent as an authorized project manager",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationProjectAgentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Trusted Project Agent Command and Run receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCommandView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/submit": {
      "post": {
        "operationId": "submitApplicationCommand",
        "tags": [
          "Applications"
        ],
        "summary": "Atomically admit an application command and its domain run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCommandRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application command receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCommandView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/human-input": {
      "post": {
        "operationId": "submitApplicationHumanInput",
        "tags": [
          "Applications"
        ],
        "summary": "Answer the exact pending question of an authorized digital employee command",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationHumanInputRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Original command after durable answer admission",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCommandView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/detail": {
      "post": {
        "operationId": "getApplicationCommand",
        "tags": [
          "Applications"
        ],
        "summary": "Read an authorized application command and original domain run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCommandIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application command receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCommandView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/stream": {
      "post": {
        "operationId": "streamApplicationCommand",
        "tags": [
          "Applications"
        ],
        "summary": "Subscribe to the original Agent run for an authorized application command",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCommandIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application command Agent run server-sent event stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/list": {
      "post": {
        "operationId": "listApplicationCommands",
        "tags": [
          "Applications"
        ],
        "summary": "List own application command receipts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCommandListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application command receipt",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCommandList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/commands/work": {
      "post": {
        "operationId": "listApplicationWork",
        "tags": [
          "Applications"
        ],
        "summary": "List the current actor's application work under current authorization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationWorkListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized personal application work page",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationWorkList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/deployments/revisions/create": {
      "post": {
        "operationId": "createApplicationDeploymentRevision",
        "tags": [
          "Applications"
        ],
        "summary": "Create an immutable deployment revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationDeployRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application deployment result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationDeploymentResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/deployments/list": {
      "post": {
        "operationId": "listApplicationDeployments",
        "tags": [
          "Applications"
        ],
        "summary": "List owned application deployments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationDeploymentListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application deployment result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationDeploymentList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/deployments/revisions/list": {
      "post": {
        "operationId": "listApplicationDeploymentRevisions",
        "tags": [
          "Applications"
        ],
        "summary": "List immutable deployment revisions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationDeploymentRevisionListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application deployment result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationDeploymentRevisionList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/deployments/installation-contract": {
      "post": {
        "operationId": "getApplicationInstallationContract",
        "tags": [
          "Applications"
        ],
        "summary": "Read pinned installation slots and sealed source schemas without data grants",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "workspace_id",
                  "deployment_revision_id"
                ],
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "deployment_revision_id": {
                    "type": "string",
                    "pattern": "^adrev_[a-f0-9]{32}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Immutable source schema for installation by the authorized deployment owner; not target compatibility certification",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationInstallationContract"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/participation-bindings/update": {
      "post": {
        "operationId": "updateApplicationParticipationBinding",
        "tags": [
          "Applications"
        ],
        "summary": "Create or switch a Workspace participation binding with CAS",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBindingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application deployment result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBindingResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/participation-bindings/list": {
      "post": {
        "operationId": "listApplicationParticipationBindings",
        "tags": [
          "Applications"
        ],
        "summary": "List authorized application participation bindings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBindingListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application deployment result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBindingList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/participation-bindings/detail": {
      "post": {
        "operationId": "getApplicationParticipationBinding",
        "tags": [
          "Applications"
        ],
        "summary": "Read an authorized participation binding",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBindingIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application deployment result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationBindingView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/versions/publish": {
      "post": {
        "operationId": "publishEnvironmentVersion",
        "tags": [
          "Environments"
        ],
        "summary": "Publish an immutable environment version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentPublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Environment control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnvironmentPublishResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/detail": {
      "post": {
        "operationId": "getEnvironment",
        "tags": [
          "Environments"
        ],
        "summary": "Read an owned environment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Environment control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Environment"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/list": {
      "post": {
        "operationId": "listEnvironments",
        "tags": [
          "Environments"
        ],
        "summary": "List owned environments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Environment control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnvironmentList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/versions/list": {
      "post": {
        "operationId": "listEnvironmentVersions",
        "tags": [
          "Environments"
        ],
        "summary": "List immutable environment versions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentVersionListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Environment control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnvironmentVersionList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/state/update": {
      "post": {
        "operationId": "updateEnvironmentState",
        "tags": [
          "Environments"
        ],
        "summary": "Enable or disable an environment using CAS",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentStateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Environment control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Environment"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/create": {
      "post": {
        "operationId": "createApplication",
        "tags": [
          "Applications"
        ],
        "summary": "Create an owned application draft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Application"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/team/affiliate": {
      "post": {
        "operationId": "affiliateApplicationTeam",
        "tags": [
          "Applications"
        ],
        "summary": "Affiliate an unaffiliated application to a Team without guessing historical ownership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationTeamAffiliateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application with Team affiliation",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Application"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/representatives/update": {
      "post": {
        "operationId": "updateLayerRepresentative",
        "tags": [
          "Applications"
        ],
        "summary": "Bind or revoke the representative digital employee for a workspace, team, project, or application",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LayerRepresentativeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Layer representative binding",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LayerRepresentativeBinding"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/representatives/detail": {
      "post": {
        "operationId": "getLayerRepresentative",
        "tags": [
          "Applications"
        ],
        "summary": "Read the current representative digital employee for a layer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LayerRepresentativeListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Layer representative binding",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LayerRepresentativeBinding"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/representatives/list": {
      "post": {
        "operationId": "listLayerRepresentatives",
        "tags": [
          "Applications"
        ],
        "summary": "List representative digital employees in a workspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LayerRepresentativeListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Layer representative bindings",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LayerRepresentativeList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/detail": {
      "post": {
        "operationId": "getApplication",
        "tags": [
          "Applications"
        ],
        "summary": "Read an authorized application draft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Application"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/drafts/delete": {
      "post": {
        "operationId": "deleteApplicationDraft",
        "tags": [
          "Applications"
        ],
        "summary": "Delete a never-published digital employee draft while retaining audit and source resources",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The draft is removed from management views; audit records and source resources are retained",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "required": [
                            "application_id",
                            "deleted"
                          ],
                          "properties": {
                            "application_id": {
                              "type": "string"
                            },
                            "deleted": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/resources/agent-inventory": {
      "post": {
        "operationId": "getApplicationAgentResourceInventory",
        "tags": [
          "Applications"
        ],
        "summary": "List resources pinned by the application's Agent releases",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application Agent resource inventory",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationAgentResourceInventory"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/list": {
      "post": {
        "operationId": "listApplications",
        "tags": [
          "Applications"
        ],
        "summary": "List only authorized applications",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/catalog/list": {
      "post": {
        "operationId": "listApplicationCatalog",
        "tags": [
          "Applications"
        ],
        "summary": "List published digital employees for workspace users",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published digital employee catalog",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationCatalogList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/user-installations/list": {
      "post": {
        "operationId": "listApplicationUserInstallations",
        "tags": [
          "Applications"
        ],
        "summary": "List digital employees installed by the authenticated user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationUserInstallationListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Owner-scoped pinned digital employee installations",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationUserInstallationList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/user-installations/install": {
      "post": {
        "operationId": "installApplicationForUser",
        "tags": [
          "Applications"
        ],
        "summary": "Install and pin the current published digital employee version for the authenticated user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationUserInstallationInstallRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persisted user installation with immutable version identity",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationUserInstallation"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/user-installations/update": {
      "post": {
        "operationId": "updateApplicationUserInstallation",
        "tags": [
          "Applications"
        ],
        "summary": "Explicitly switch a user's installed digital employee and linked projects to the latest published version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationUserInstallationUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomically updated installation and linked project runtimes",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationUserInstallation"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/user-installations/projects/activate": {
      "post": {
        "operationId": "activateApplicationUserInstallationProject",
        "tags": [
          "Applications"
        ],
        "summary": "Materialize the installed version for one explicitly linked Office project",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationUserInstallationProjectActivateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Active project binding pinned to the installation version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationUserInstallationProject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/draft/update": {
      "post": {
        "operationId": "updateApplicationDraft",
        "tags": [
          "Applications"
        ],
        "summary": "Replace a draft using expected revision",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationDraftRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Application"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/draft/validate": {
      "post": {
        "operationId": "validateApplicationDraft",
        "tags": [
          "Applications"
        ],
        "summary": "Validate exact draft and authorized immutable dependencies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationValidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationValidation"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/publish-and-enable": {
      "post": {
        "operationId": "publishAndEnableApplication",
        "tags": [
          "Applications"
        ],
        "summary": "Atomically save, publish and enable one explicit participation",
        "description": "Derives frozen runtime dependencies from selected sources. Grants only initial consumption of actor-owned sources. Preserves revocations and all existing permissions. Does not execute an Agent or deploy infrastructure.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationPublishEnableRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic activation receipt; existing other bindings remain pinned",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationPublishEnableResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/versions/publish": {
      "post": {
        "operationId": "publishApplicationVersion",
        "tags": [
          "Applications"
        ],
        "summary": "Publish an immutable definition; does not deploy or execute",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationPublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationVersion"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/release-candidates/create": {
      "post": {
        "operationId": "createApplicationReleaseCandidate",
        "tags": [
          "Applications"
        ],
        "summary": "Save one pending digital employee version before publication",
        "description": "Freezes the current draft and one explicit entry scope without making it executable or changing the current published version.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationReleaseCandidateCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved pending version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationReleaseCandidate"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/release-candidates/list": {
      "post": {
        "operationId": "listApplicationReleaseCandidates",
        "tags": [
          "Applications"
        ],
        "summary": "List saved pending and completed release candidates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationReleaseCandidateListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Release candidate list",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationReleaseCandidateList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/release-candidates/update": {
      "post": {
        "operationId": "updateApplicationReleaseCandidate",
        "tags": [
          "Applications"
        ],
        "summary": "Update one unpublished digital employee version",
        "description": "Revalidates and replaces the editable release configuration of one pending candidate. Published candidates remain immutable.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationReleaseCandidateUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated pending version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationReleaseCandidate"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/release-candidates/publish": {
      "post": {
        "operationId": "publishApplicationReleaseCandidate",
        "tags": [
          "Applications"
        ],
        "summary": "Publish a previously saved digital employee version",
        "description": "Revalidates the frozen draft, publishes one immutable version and updates only the entry scope saved on the candidate.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationReleaseCandidatePublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published version and activated entry",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationPublishEnableResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/release-candidates/delete": {
      "post": {
        "operationId": "deleteApplicationReleaseCandidate",
        "tags": [
          "Applications"
        ],
        "summary": "Delete one unpublished digital employee version",
        "description": "Permanently removes only the saved pending version snapshot and its release configuration. Published versions, the editable draft and active deployments are unchanged.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationReleaseCandidateDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleted pending version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationReleaseCandidate"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/versions/list": {
      "post": {
        "operationId": "listApplicationVersions",
        "tags": [
          "Applications"
        ],
        "summary": "List immutable versions of an authorized application",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationVersionListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application control-plane result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationVersionList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/resource-grants/grant": {
      "post": {
        "operationId": "grantApplicationResource",
        "tags": [
          "Applications"
        ],
        "summary": "Explicitly permit an application to consume a pinned source version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationResourceGrantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application consumption grant",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationResourceGrant"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/resource-grants/revoke": {
      "post": {
        "operationId": "revokeApplicationResourceGrant",
        "tags": [
          "Applications"
        ],
        "summary": "Revoke an application consumption grant for a pinned source version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationResourceGrantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application consumption grant",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationResourceGrant"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/resource-grants/list": {
      "post": {
        "operationId": "listApplicationResourceGrants",
        "tags": [
          "Applications"
        ],
        "summary": "List consumption grants for an authorized application",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationResourceGrantListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Application consumption grants",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationResourceGrantList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/source-updates/preview": {
      "post": {
        "operationId": "previewApplicationSourceUpdates",
        "tags": [
          "Applications"
        ],
        "summary": "Preview authorized newer official source versions without changing bindings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationSourceUpdatePreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Source update preview",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationSourceUpdatePreview"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/source-updates/confirm": {
      "post": {
        "operationId": "confirmApplicationSourceUpdates",
        "tags": [
          "Applications"
        ],
        "summary": "Confirm source replacements and publish a new application version",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationConfirmSourceUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Newly published application version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationVersion"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/meta/discover": {
      "post": {
        "operationId": "discoverAgentSurface",
        "tags": [
          "AgentSurface"
        ],
        "summary": "Discover the typed API and governed capabilities available to an Agent surface",
        "description": "Returns a deterministic language-neutral manifest projected from the Core OpenAPI contract and Capability Registry. Schemas are omitted unless the caller explicitly requests them.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentSurfaceDiscoverRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentSurfaceManifestResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/meta/openapi": {
      "get": {
        "operationId": "getCoreOpenAPI",
        "tags": [
          "AgentSurface"
        ],
        "summary": "Get the authenticated Core API OpenAPI document",
        "responses": {
          "200": {
            "description": "Core API OpenAPI document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonObject"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/capabilities/list": {
      "post": {
        "operationId": "listCapabilities",
        "tags": [
          "Capabilities"
        ],
        "summary": "List server-authorized capabilities",
        "requestBody": {
          "$ref": "#/components/requestBodies/OptionalJsonObject"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CapabilitiesResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/create": {
      "post": {
        "operationId": "createWorkflow",
        "tags": [
          "Workflows"
        ],
        "summary": "Create a workflow working copy",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowCreateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/update": {
      "post": {
        "operationId": "updateWorkflow",
        "tags": [
          "Workflows"
        ],
        "summary": "Replace a workflow working copy with revision protection",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowUpdateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/detail": {
      "post": {
        "operationId": "getWorkflow",
        "tags": [
          "Workflows"
        ],
        "summary": "Get a workflow",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/list": {
      "post": {
        "operationId": "listWorkflows",
        "tags": [
          "Workflows"
        ],
        "summary": "List workflows",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/search": {
      "post": {
        "operationId": "searchWorkflows",
        "tags": [
          "Workflows"
        ],
        "summary": "Search workflows",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowSearchRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/delete": {
      "post": {
        "operationId": "deleteWorkflow",
        "tags": [
          "Workflows"
        ],
        "summary": "Delete a workflow",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmptyResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/publish": {
      "post": {
        "operationId": "publishWorkflow",
        "tags": [
          "Workflows"
        ],
        "summary": "Publish a workflow snapshot",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/run": {
      "post": {
        "operationId": "runWorkflow",
        "tags": [
          "WorkflowRuns"
        ],
        "summary": "Start or idempotently reuse a workflow run",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowRunRequest"
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/WorkflowRunResponse"
          },
          "200": {
            "description": "SSE stream when stream=true",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/runs/list": {
      "post": {
        "operationId": "listWorkflowRuns",
        "tags": [
          "WorkflowRuns"
        ],
        "summary": "List workflow runs",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowRunListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowRunListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/runs/detail": {
      "post": {
        "operationId": "getWorkflowRun",
        "tags": [
          "WorkflowRuns"
        ],
        "summary": "Get a workflow run",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowRunDetailRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowRunResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/runs/stream": {
      "post": {
        "operationId": "streamWorkflowRun",
        "tags": [
          "WorkflowRuns"
        ],
        "summary": "Subscribe to an existing workflow run event stream",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowRunIdentityRequest"
        },
        "responses": {
          "200": {
            "description": "Workflow run server-sent event stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/tools/update/preview": {
      "post": {
        "operationId": "previewWorkflowUpdate",
        "tags": [
          "Workflows"
        ],
        "summary": "Preview a typed workflow change set",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowToolUpdateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/tools/update/apply": {
      "post": {
        "operationId": "applyWorkflowUpdate",
        "tags": [
          "Workflows"
        ],
        "summary": "Apply a confirmed typed workflow change set",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowToolUpdateApplyRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/workflows/start-node/refs/upload": {
      "post": {
        "operationId": "uploadWorkflowStartRef",
        "tags": [
          "Workflows"
        ],
        "summary": "Upload a transient workflow start-node reference",
        "requestBody": {
          "$ref": "#/components/requestBodies/WorkflowStartRefUploadRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/http/definitions/list": {
      "post": {
        "operationId": "listHTTPToolDefinitions",
        "tags": [
          "Tools"
        ],
        "summary": "List callable HTTP tool definitions",
        "requestBody": {
          "$ref": "#/components/requestBodies/HTTPToolDefinitionListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/HTTPToolDefinitionListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/http/definitions/detail": {
      "post": {
        "operationId": "getHTTPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Get a redacted callable HTTP tool definition",
        "requestBody": {
          "$ref": "#/components/requestBodies/ToolDefinitionIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/HTTPToolDefinitionResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/http/definitions/save": {
      "post": {
        "operationId": "saveHTTPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Create or update a callable HTTP tool definition",
        "description": "Credential values are requester-supplied and write-only. Agents must never invent them.",
        "requestBody": {
          "$ref": "#/components/requestBodies/HTTPToolDefinitionSaveRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/HTTPToolDefinitionResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/http/definitions/delete": {
      "post": {
        "operationId": "deleteHTTPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Delete a callable HTTP tool definition",
        "requestBody": {
          "$ref": "#/components/requestBodies/ToolDefinitionIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmptyResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/http/definitions/test": {
      "post": {
        "operationId": "testHTTPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Test a draft HTTP tool definition against its external service",
        "requestBody": {
          "$ref": "#/components/requestBodies/HTTPToolDefinitionTestRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/mcp/definitions/list": {
      "post": {
        "operationId": "listMCPToolDefinitions",
        "tags": [
          "Tools"
        ],
        "summary": "List configured MCP server tool definitions",
        "requestBody": {
          "$ref": "#/components/requestBodies/MCPToolDefinitionListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MCPToolDefinitionListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/mcp/definitions/detail": {
      "post": {
        "operationId": "getMCPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Get an MCP server definition and persisted tool snapshot",
        "requestBody": {
          "$ref": "#/components/requestBodies/ToolDefinitionIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MCPToolDefinitionResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/mcp/definitions/save": {
      "post": {
        "operationId": "saveMCPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Create or update an MCP server definition and connect to discover its tools",
        "description": "Requires a real requester-supplied public Streamable HTTP endpoint.",
        "requestBody": {
          "$ref": "#/components/requestBodies/MCPToolDefinitionSaveRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MCPToolDefinitionResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/mcp/definitions/delete": {
      "post": {
        "operationId": "deleteMCPToolDefinition",
        "tags": [
          "Tools"
        ],
        "summary": "Delete an MCP server definition",
        "requestBody": {
          "$ref": "#/components/requestBodies/ToolDefinitionIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmptyResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/mcp/definitions/refresh": {
      "post": {
        "operationId": "refreshMCPToolDefinitionTools",
        "tags": [
          "Tools"
        ],
        "summary": "Reconnect to an MCP server and replace its persisted tool snapshot",
        "requestBody": {
          "$ref": "#/components/requestBodies/ToolDefinitionIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MCPToolDefinitionResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/tools/mcp/definitions/tools": {
      "post": {
        "operationId": "listMCPToolDefinitionTools",
        "tags": [
          "Tools"
        ],
        "summary": "List the persisted tools discovered from an MCP server definition",
        "requestBody": {
          "$ref": "#/components/requestBodies/ToolDefinitionIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MCPToolSnapshotListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/create": {
      "post": {
        "operationId": "createAgent",
        "tags": [
          "Agents"
        ],
        "summary": "Create an agent",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentCreateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/update": {
      "post": {
        "operationId": "updateAgent",
        "tags": [
          "Agents"
        ],
        "summary": "Update an agent with revision protection",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentUpdateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/detail": {
      "post": {
        "operationId": "getAgent",
        "tags": [
          "Agents"
        ],
        "summary": "Get an agent",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/list": {
      "post": {
        "operationId": "listAgents",
        "tags": [
          "Agents"
        ],
        "summary": "List agents",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/delete": {
      "post": {
        "operationId": "deleteAgent",
        "tags": [
          "Agents"
        ],
        "summary": "Delete an agent",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmptyResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/publish": {
      "post": {
        "operationId": "publishAgent",
        "tags": [
          "Agents"
        ],
        "summary": "Publish an immutable agent release",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentPublishRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/run": {
      "post": {
        "operationId": "runAgent",
        "tags": [
          "AgentRuns"
        ],
        "summary": "Run an agent",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentRunRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentRunResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/agents/run/stream": {
      "post": {
        "operationId": "streamAgentRun",
        "tags": [
          "AgentRuns"
        ],
        "summary": "Run an agent and stream structured events",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentRunRequest"
        },
        "responses": {
          "200": {
            "description": "Agent run server-sent event stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/runs/detail": {
      "post": {
        "operationId": "getAgentRun",
        "tags": [
          "AgentRuns"
        ],
        "summary": "Get an agent run",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentRunIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentRunResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/runs/list": {
      "post": {
        "operationId": "listAgentRuns",
        "tags": [
          "AgentRuns"
        ],
        "summary": "List agent runs",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentRunListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentRunListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/runs/cancel": {
      "post": {
        "operationId": "cancelAgentRun",
        "tags": [
          "AgentRuns"
        ],
        "summary": "Cancel an agent run",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentRunIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentRunResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/runs/retry": {
      "post": {
        "operationId": "retryAgentRun",
        "tags": [
          "AgentRuns"
        ],
        "summary": "Retry an agent run",
        "requestBody": {
          "$ref": "#/components/requestBodies/AgentRunIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentRunResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/assets/{asset_id}/content": {
      "get": {
        "operationId": "getKnowledgeAssetContent",
        "tags": [
          "Knowledge"
        ],
        "summary": "Read citation media or download an original source with current resource and space authorization",
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "workspace_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized image or video bytes, or an original source as an octet-stream attachment; never a redirect to a reusable storage URL",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "Authorized media byte range",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "416": {
            "description": "Requested range is not satisfiable"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/scopes/detail": {
      "post": {
        "operationId": "getKnowledgeScope",
        "tags": [
          "Knowledge"
        ],
        "summary": "getKnowledgeScope using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeScopeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/entries/list": {
      "post": {
        "operationId": "listKnowledgeEntries",
        "tags": [
          "Knowledge"
        ],
        "summary": "listKnowledgeEntries using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeEntryListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/entries/detail": {
      "post": {
        "operationId": "getKnowledgeEntry",
        "tags": [
          "Knowledge"
        ],
        "summary": "getKnowledgeEntry using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeEntryIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/entries/save": {
      "post": {
        "operationId": "saveKnowledgeEntry",
        "tags": [
          "Knowledge"
        ],
        "summary": "saveKnowledgeEntry using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeEntrySaveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/entries/state": {
      "post": {
        "operationId": "changeKnowledgeEntryState",
        "tags": [
          "Knowledge"
        ],
        "summary": "changeKnowledgeEntryState using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeEntryStateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/entries/candidates": {
      "post": {
        "operationId": "listKnowledgeCandidates",
        "tags": [
          "Knowledge"
        ],
        "summary": "listKnowledgeCandidates using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeCandidateListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/entries/review": {
      "post": {
        "operationId": "reviewKnowledgeCandidate",
        "tags": [
          "Knowledge"
        ],
        "summary": "reviewKnowledgeCandidate using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeCandidateReviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/reply-rules/match": {
      "post": {
        "operationId": "matchKnowledgeReply",
        "tags": [
          "Knowledge"
        ],
        "summary": "matchKnowledgeReply using current scope and source authority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeReplyMatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized canonical knowledge result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/JsonObject"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/bases/create": {
      "post": {
        "operationId": "createKnowledgeBase",
        "tags": [
          "Knowledge"
        ],
        "summary": "Create a knowledge base",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeBaseCreateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeBaseResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/bases/list": {
      "post": {
        "operationId": "listKnowledgeBases",
        "tags": [
          "Knowledge"
        ],
        "summary": "List knowledge bases",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeBaseListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeBaseListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/bases/detail": {
      "post": {
        "operationId": "getKnowledgeBase",
        "tags": [
          "Knowledge"
        ],
        "summary": "Get a knowledge base",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeBaseIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeBaseResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/bases/update": {
      "post": {
        "operationId": "updateKnowledgeBase",
        "tags": [
          "Knowledge"
        ],
        "summary": "Update a knowledge base",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeBaseUpdateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeBaseResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/bases/delete-precheck": {
      "post": {
        "operationId": "precheckKnowledgeBaseDelete",
        "tags": [
          "Knowledge"
        ],
        "summary": "Precheck knowledge base deletion and mint a confirmation token",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeBaseIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/bases/delete": {
      "post": {
        "operationId": "deleteKnowledgeBase",
        "tags": [
          "Knowledge"
        ],
        "summary": "Accept a confirmed knowledge base deletion",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeDeleteRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "202": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/documents/list": {
      "post": {
        "operationId": "listKnowledgeDocuments",
        "tags": [
          "Knowledge"
        ],
        "summary": "List knowledge documents",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeDocumentListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeDocumentListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/documents/detail": {
      "post": {
        "operationId": "getKnowledgeDocument",
        "tags": [
          "Knowledge"
        ],
        "summary": "Get a knowledge document",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeDocumentIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeDocumentResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/documents/update": {
      "post": {
        "operationId": "updateKnowledgeDocument",
        "tags": [
          "Knowledge"
        ],
        "summary": "Update knowledge document metadata",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeDocumentUpdateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeDocumentResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/documents/delete-precheck": {
      "post": {
        "operationId": "precheckKnowledgeDocumentDelete",
        "tags": [
          "Knowledge"
        ],
        "summary": "Precheck document deletion and mint a confirmation token",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeDocumentIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/documents/delete": {
      "post": {
        "operationId": "deleteKnowledgeDocument",
        "tags": [
          "Knowledge"
        ],
        "summary": "Accept a confirmed knowledge document deletion",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeDocumentDeleteRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "202": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/deletion-operations/detail": {
      "post": {
        "operationId": "getKnowledgeDeletionOperation",
        "tags": [
          "Knowledge"
        ],
        "summary": "Get a knowledge deletion operation",
        "requestBody": {
          "$ref": "#/components/requestBodies/JsonObject"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JsonObjectResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/search": {
      "post": {
        "operationId": "searchKnowledge",
        "tags": [
          "Knowledge"
        ],
        "summary": "Search authorized knowledge bases",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeSearchRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeSearchResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/files": {
      "post": {
        "operationId": "uploadKnowledgeDocument",
        "tags": [
          "Knowledge"
        ],
        "summary": "Upload a document to a knowledge base",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeFileUploadRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeDocumentResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/files/staged/list": {
      "post": {
        "operationId": "listKnowledgeStagedFiles",
        "tags": [
          "Knowledge"
        ],
        "summary": "List this actor's unsubmitted originals within their staging lifetime",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeStagedFileListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Original descriptors only; no storage URLs or other actors' files",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data"
                      ],
                      "properties": {
                        "data": {
                          "type": "object",
                          "required": [
                            "files"
                          ],
                          "properties": {
                            "files": {
                              "type": "array",
                              "maxItems": 30,
                              "items": {
                                "$ref": "#/components/schemas/KnowledgeStagedFile"
                              }
                            },
                            "next_before_id": {
                              "type": "integer",
                              "format": "int64",
                              "minimum": 1
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/files/staged/recheck": {
      "post": {
        "operationId": "recheckKnowledgeStagedFile",
        "tags": [
          "Knowledge"
        ],
        "summary": "Recompute current preflight from the authorized stored original without uploading again",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeStagedFileRecheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preflight plan with a commit fingerprint; no document created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data"
                      ],
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/KnowledgeDocumentPreflight"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/upload-batches/create": {
      "post": {
        "operationId": "createKnowledgeUploadBatch",
        "tags": [
          "Knowledge"
        ],
        "summary": "Create or replay a durable multi-file knowledge upload batch",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeUploadBatchCreateRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeUploadBatchResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/upload-batches/list": {
      "post": {
        "operationId": "listKnowledgeUploadBatches",
        "tags": [
          "Knowledge"
        ],
        "summary": "List durable knowledge upload batches for one knowledge base",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeUploadBatchListRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeUploadBatchListResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/upload-batches/detail": {
      "post": {
        "operationId": "getKnowledgeUploadBatch",
        "tags": [
          "Knowledge"
        ],
        "summary": "Read and reconcile one durable knowledge upload batch",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeUploadBatchIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeUploadBatchResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/upload-batches/resume": {
      "post": {
        "operationId": "resumeKnowledgeUploadBatch",
        "tags": [
          "Knowledge"
        ],
        "summary": "Resume uncommitted items after interruption or reload",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeUploadBatchIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeUploadBatchResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/upload-batches/retry": {
      "post": {
        "operationId": "retryKnowledgeUploadBatch",
        "tags": [
          "Knowledge"
        ],
        "summary": "Retry selected failed, cancelled, or partial batch items",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeUploadBatchRetryRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeUploadBatchResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/knowledge/upload-batches/cancel": {
      "post": {
        "operationId": "cancelKnowledgeUploadBatch",
        "tags": [
          "Knowledge"
        ],
        "summary": "Cancel unsettled items while retaining created documents and audit state",
        "requestBody": {
          "$ref": "#/components/requestBodies/KnowledgeUploadBatchIdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/KnowledgeUploadBatchResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/files/revisions/create": {
      "post": {
        "operationId": "reviseArtifactFile",
        "tags": [
          "Files"
        ],
        "summary": "Upload or restore an immutable human revision of an owned artifact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtifactRevisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/FileRefResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/files/revisions/cancel": {
      "post": {
        "operationId": "cancelArtifactRevision",
        "tags": [
          "Files"
        ],
        "summary": "Cancel a pending human revision without deleting the published original",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtifactRevisionCancel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pending revision cancelled; replay is idempotent"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/files/upload": {
      "post": {
        "operationId": "uploadFile",
        "tags": [
          "Files"
        ],
        "summary": "Upload a durable Argus file",
        "requestBody": {
          "$ref": "#/components/requestBodies/FileUploadRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/FileRefResponse"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/files/{file_id}/download": {
      "get": {
        "operationId": "downloadFile",
        "tags": [
          "Files"
        ],
        "summary": "Download an owned durable Argus file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "workspace_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "filename",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "mime_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "size_bytes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File bytes",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/ownership/preflight": {
      "post": {
        "operationId": "preflightApplicationOwnership",
        "tags": [
          "Applications"
        ],
        "summary": "preflightApplicationOwnership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationOwnershipPreflightRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOwnershipPreflight"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/ownership/candidates": {
      "post": {
        "operationId": "listApplicationOwnershipCandidates",
        "tags": [
          "Applications"
        ],
        "summary": "listApplicationOwnershipCandidates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationOwnershipCandidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOwnershipCandidatePage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/ownership/transfer": {
      "post": {
        "operationId": "transferApplicationOwnership",
        "tags": [
          "Applications"
        ],
        "summary": "transferApplicationOwnership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationOwnershipTransferRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOwnershipTransferResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/ownership/recover": {
      "post": {
        "operationId": "recoverApplicationOwnership",
        "tags": [
          "Applications"
        ],
        "summary": "recoverApplicationOwnership",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationOwnershipRecoverRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOwnershipTransferResult"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/ownership/history": {
      "post": {
        "operationId": "listApplicationOwnershipHistory",
        "tags": [
          "Applications"
        ],
        "summary": "listApplicationOwnershipHistory",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOwnershipHistory"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/maintainers/list": {
      "post": {
        "operationId": "listApplicationMaintainers",
        "tags": [
          "Applications"
        ],
        "summary": "listApplicationMaintainers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationIdentityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMaintainerList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/maintainers/change": {
      "post": {
        "operationId": "changeApplicationMaintainer",
        "tags": [
          "Applications"
        ],
        "summary": "changeApplicationMaintainer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationMaintainerChangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationMaintainerView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/collaborators/list": {
      "post": {
        "operationId": "listEnvironmentCollaborators",
        "tags": [
          "Environments"
        ],
        "summary": "listEnvironmentCollaborators",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentCollaboratorListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnvironmentCollaboratorList"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/collaborators/candidates": {
      "post": {
        "operationId": "listEnvironmentCollaboratorCandidates",
        "tags": [
          "Environments"
        ],
        "summary": "listEnvironmentCollaboratorCandidates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentCollaboratorCandidateListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationOwnershipCandidatePage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/environments/collaborators/change": {
      "post": {
        "operationId": "changeEnvironmentCollaborator",
        "tags": [
          "Environments"
        ],
        "summary": "changeEnvironmentCollaborator",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentCollaboratorChangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized application maintenance result; resource, environment and private business access remain independently checked",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnvironmentCollaboratorView"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/channels/prepare": {
      "post": {
        "operationId": "prepareApplicationChannels",
        "tags": [
          "Applications"
        ],
        "summary": "prepareApplicationChannels",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationChannelsPrepareRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationChannelsPrepareResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/channels/upsert": {
      "post": {
        "operationId": "upsertApplicationChannel",
        "tags": [
          "Applications"
        ],
        "summary": "upsertApplicationChannel",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationChannelUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationChannelMutationResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/channels/set-enabled": {
      "post": {
        "operationId": "setApplicationChannelEnabled",
        "tags": [
          "Applications"
        ],
        "summary": "setApplicationChannelEnabled",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationChannelSetEnabledRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ApplicationChannelMutationResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/channels/identities/list": {
      "post": {
        "operationId": "listChannelIdentities",
        "tags": [
          "Channels"
        ],
        "summary": "listChannelIdentities",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIdentityListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelIdentityListResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/channels/identities/upsert": {
      "post": {
        "operationId": "upsertChannelIdentityMapping",
        "tags": [
          "Channels"
        ],
        "summary": "upsertChannelIdentityMapping",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIdentityUserBindingPutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelIdentityUserBindingItem"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/channels/identities/revoke": {
      "post": {
        "operationId": "revokeChannelIdentityMapping",
        "tags": [
          "Channels"
        ],
        "summary": "revokeChannelIdentityMapping",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIdentityUserBindingRevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelIdentityUserBindingItem"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/channels/identities/candidates": {
      "post": {
        "operationId": "listChannelIdentityCandidates",
        "tags": [
          "Channels"
        ],
        "summary": "listChannelIdentityCandidates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIdentityListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized channel result with frozen application installation and independently mapped current actor",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelIdentityCandidatePage"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/auth/login": {
      "post": {
        "operationId": "loginCustomer",
        "summary": "loginCustomer",
        "tags": [
          "Authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "成功结果",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CustomerTokenResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerLoginRequest"
              }
            }
          }
        }
      }
    },
    "/api/auth/refresh": {
      "post": {
        "operationId": "refreshCustomerSession",
        "summary": "refreshCustomerSession",
        "tags": [
          "Authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "成功结果",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CustomerTokenResponse"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerRefreshRequest"
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "operationId": "logoutCustomer",
        "summary": "logoutCustomer",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功结果",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {}
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        }
      }
    },
    "/api/v1/applications/modules/catalog": {
      "post": {
        "operationId": "listApplicationModuleOperations",
        "summary": "listApplicationModuleOperations",
        "tags": [
          "ApplicationModules"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功结果",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "contract": {
                              "type": "string"
                            },
                            "operations": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "additionalProperties": true
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "领域操作错误。可能仅包含 code 和 message。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerModuleError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerModuleScope"
              }
            }
          }
        }
      }
    },
    "/api/v1/applications/modules/call": {
      "post": {
        "operationId": "callApplicationModuleOperation",
        "summary": "callApplicationModuleOperation",
        "tags": [
          "ApplicationModules"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功结果",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "description": "由授权领域操作的 output_schema 决定",
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "领域操作错误。可能仅包含 code 和 message。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerModuleError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerModuleRequest"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "requestBodies": {
      "OptionalJsonObject": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JsonObject"
            }
          }
        }
      },
      "JsonObject": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JsonObject"
            }
          }
        }
      },
      "WorkflowCreateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowCreateRequest"
            }
          }
        }
      },
      "WorkflowUpdateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowUpdateRequest"
            }
          }
        }
      },
      "WorkflowIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowIdentityRequest"
            }
          }
        }
      },
      "WorkflowListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowListRequest"
            }
          }
        }
      },
      "WorkflowSearchRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowSearchRequest"
            }
          }
        }
      },
      "WorkflowRunRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowRunRequest"
            }
          }
        }
      },
      "WorkflowRunIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowRunIdentityRequest"
            }
          }
        }
      },
      "WorkflowRunDetailRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowRunDetailRequest"
            }
          }
        }
      },
      "WorkflowRunListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowRunListRequest"
            }
          }
        }
      },
      "WorkflowToolUpdateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowToolUpdateRequest"
            }
          }
        }
      },
      "WorkflowToolUpdateApplyRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowToolUpdateApplyRequest"
            }
          }
        }
      },
      "WorkflowStartRefUploadRequest": {
        "required": true,
        "content": {
          "multipart/form-data": {
            "schema": {
              "$ref": "#/components/schemas/WorkflowStartRefUploadRequest"
            }
          }
        }
      },
      "HTTPToolDefinitionListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPToolDefinitionListRequest"
            }
          }
        }
      },
      "ToolDefinitionIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ToolDefinitionIdentityRequest"
            }
          }
        }
      },
      "HTTPToolDefinitionSaveRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPToolDefinitionSaveRequest"
            }
          }
        }
      },
      "HTTPToolDefinitionTestRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPToolDefinitionTestRequest"
            }
          }
        }
      },
      "MCPToolDefinitionListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MCPToolDefinitionListRequest"
            }
          }
        }
      },
      "MCPToolDefinitionSaveRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MCPToolDefinitionSaveRequest"
            }
          }
        }
      },
      "AgentCreateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentCreateRequest"
            }
          }
        }
      },
      "AgentUpdateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentUpdateRequest"
            }
          }
        }
      },
      "AgentIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentIdentityRequest"
            }
          }
        }
      },
      "AgentListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentListRequest"
            }
          }
        }
      },
      "AgentPublishRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentPublishRequest"
            }
          }
        }
      },
      "AgentRunRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentRunRequest"
            }
          }
        }
      },
      "AgentRunIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentRunIdentityRequest"
            }
          }
        }
      },
      "AgentRunListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentRunListRequest"
            }
          }
        }
      },
      "KnowledgeBaseCreateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeBaseCreateRequest"
            }
          }
        }
      },
      "KnowledgeBaseListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeBaseListRequest"
            }
          }
        }
      },
      "KnowledgeBaseIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeBaseIdentityRequest"
            }
          }
        }
      },
      "KnowledgeBaseUpdateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeBaseUpdateRequest"
            }
          }
        }
      },
      "KnowledgeDeleteRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeDeleteRequest"
            }
          }
        }
      },
      "KnowledgeDocumentListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeDocumentListRequest"
            }
          }
        }
      },
      "KnowledgeDocumentIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeDocumentIdentityRequest"
            }
          }
        }
      },
      "KnowledgeDocumentUpdateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeDocumentUpdateRequest"
            }
          }
        }
      },
      "KnowledgeDocumentDeleteRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeDocumentDeleteRequest"
            }
          }
        }
      },
      "KnowledgeSearchRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeSearchRequest"
            }
          }
        }
      },
      "KnowledgeFileUploadRequest": {
        "required": true,
        "content": {
          "multipart/form-data": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeFileUploadRequest"
            }
          }
        }
      },
      "KnowledgeUploadBatchCreateRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeUploadBatchCreateRequest"
            }
          }
        }
      },
      "KnowledgeUploadBatchIdentityRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeUploadBatchIdentityRequest"
            }
          }
        }
      },
      "KnowledgeUploadBatchListRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeUploadBatchListRequest"
            }
          }
        }
      },
      "KnowledgeUploadBatchRetryRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KnowledgeUploadBatchRetryRequest"
            }
          }
        }
      },
      "FileUploadRequest": {
        "required": true,
        "content": {
          "multipart/form-data": {
            "schema": {
              "$ref": "#/components/schemas/FileUploadRequest"
            }
          }
        }
      }
    },
    "responses": {
      "AgentSurfaceManifestResponse": {
        "description": "Agent Surface Manifest",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentSurfaceManifest"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "CapabilitiesResponse": {
        "description": "Capability manifest",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CapabilityList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "WorkflowResponse": {
        "description": "Workflow result",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workflow"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "WorkflowListResponse": {
        "description": "Workflow list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "WorkflowRunResponse": {
        "description": "Workflow run",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "WorkflowRunListResponse": {
        "description": "Workflow run list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRunList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "HTTPToolDefinitionResponse": {
        "description": "Callable HTTP tool definition with credentials redacted",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/HTTPToolDefinition"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "HTTPToolDefinitionListResponse": {
        "description": "Callable HTTP tool definition summaries",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HTTPToolDefinitionSummary"
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "MCPToolDefinitionResponse": {
        "description": "MCP server definition and persisted tool snapshot",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MCPToolDefinition"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "MCPToolDefinitionListResponse": {
        "description": "MCP server definition summaries",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MCPToolDefinitionSummary"
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "MCPToolSnapshotListResponse": {
        "description": "Persisted tools discovered from an MCP server definition",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MCPToolSnapshot"
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "AgentResponse": {
        "description": "Agent result",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Agent"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "AgentListResponse": {
        "description": "Agent list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "AgentRunResponse": {
        "description": "Agent run",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "AgentRunListResponse": {
        "description": "Agent run list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRunList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeBaseResponse": {
        "description": "Knowledge base",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeBase"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeBaseListResponse": {
        "description": "Knowledge base list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeBaseList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeDocumentResponse": {
        "description": "Knowledge document",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeDocument"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeDocumentListResponse": {
        "description": "Knowledge document list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeDocumentList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeUploadBatchResponse": {
        "description": "Durable knowledge upload batch",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeUploadBatch"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeUploadBatchListResponse": {
        "description": "Durable knowledge upload batch list",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeUploadBatchList"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "KnowledgeSearchResponse": {
        "description": "Knowledge search result",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KnowledgeSearchResult"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "FileRefResponse": {
        "description": "File reference",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FileRef"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "JsonObjectResponse": {
        "description": "Structured result",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JsonObject"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "EmptyResponse": {
        "description": "Successful operation without a resource body",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessEnvelope"
            }
          }
        }
      },
      "ErrorResponse": {
        "description": "Structured Argus error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    },
    "schemas": {
      "OrganizationIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{8,128}$",
            "description": "Stable upload retry key scoped to the authenticated user and workspace."
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          }
        }
      },
      "OrganizationCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "name",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "parent_id": {
            "type": "string",
            "pattern": "^(|org_[a-f0-9]{32})$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 2000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "OrganizationListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "parent_id": {
            "type": "string",
            "pattern": "^(|org_[a-f0-9]{32})$"
          },
          "cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "OrganizationUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id",
          "expected_revision",
          "name"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 2000
          }
        }
      },
      "OrganizationMoveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id",
          "expected_revision",
          "parent_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "parent_id": {
            "type": "string",
            "pattern": "^(|org_[a-f0-9]{32})$"
          }
        }
      },
      "OrganizationTransitionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id",
          "expected_revision",
          "action"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "action": {
            "type": "string",
            "enum": [
              "enable",
              "disable"
            ]
          }
        }
      },
      "OrganizationMemberListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "OrganizationMemberCandidatesRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "OrganizationMemberRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id",
          "expected_revision",
          "user_id",
          "action"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "type": "string",
            "enum": [
              "add",
              "remove",
              "set_leader",
              "clear_leader"
            ]
          }
        }
      },
      "OrganizationResponsibilityListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "OrganizationResponsibilityImportRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user_id",
          "expected_revision",
          "responsibilities",
          "description",
          "priority",
          "backup_user_id",
          "active",
          "im_provider",
          "im_conversation_ref"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "responsibilities": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "priority": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "backup_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991,
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "im_provider": {
            "type": "string",
            "enum": [
              "",
              "feishu"
            ]
          },
          "im_conversation_ref": {
            "type": "string",
            "maxLength": 48
          }
        }
      },
      "OrganizationResponsibilityImportRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "source_name",
          "idempotency_key",
          "rows"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "source_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "rows": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/OrganizationResponsibilityImportRow"
            }
          }
        }
      },
      "TeamOrganizationIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "team_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "team_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          }
        }
      },
      "TeamOrganizationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "team_id",
          "expected_revision",
          "org_unit_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "team_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^(|org_[a-f0-9]{32})$"
          }
        }
      },
      "OrganizationUnit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id",
          "parent_id",
          "name",
          "description",
          "status",
          "leader_id",
          "revision",
          "binding_epoch",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "parent_id": {
            "type": "string",
            "pattern": "^(|org_[a-f0-9]{32})$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 2000
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ]
          },
          "leader_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991,
            "nullable": true
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "binding_epoch": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationUnitView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "unit",
          "ancestors",
          "leader_name",
          "leader_available",
          "leader_team_owner_eligible"
        ],
        "properties": {
          "unit": {
            "$ref": "#/components/schemas/OrganizationUnit"
          },
          "ancestors": {
            "type": "array",
            "maxItems": 63,
            "items": {
              "$ref": "#/components/schemas/OrganizationUnit"
            }
          },
          "leader_name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 100
          },
          "leader_available": {
            "type": "boolean"
          },
          "leader_team_owner_eligible": {
            "type": "boolean"
          }
        }
      },
      "OrganizationUnitMember": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "org_unit_id",
          "user_id",
          "active",
          "changed_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "active": {
            "type": "boolean"
          },
          "changed_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationMemberView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "member",
          "name",
          "eligible"
        ],
        "properties": {
          "member": {
            "$ref": "#/components/schemas/OrganizationUnitMember"
          },
          "name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 100
          },
          "eligible": {
            "type": "boolean"
          }
        }
      },
      "OrganizationResponsibilityProfile": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "profile_id",
          "workspace_id",
          "user_id",
          "responsibilities",
          "description",
          "priority",
          "active",
          "revision",
          "source_type",
          "source_name",
          "im_provider",
          "im_conversation_ref",
          "changed_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "profile_id": {
            "type": "string",
            "pattern": "^orp_[a-f0-9]{32}$"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "responsibilities": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "priority": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "backup_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991,
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "source_type": {
            "type": "string",
            "enum": [
              "manual",
              "csv",
              "api"
            ]
          },
          "source_name": {
            "type": "string",
            "maxLength": 200
          },
          "im_provider": {
            "type": "string",
            "enum": [
              "",
              "feishu"
            ]
          },
          "im_conversation_ref": {
            "type": "string",
            "maxLength": 48
          },
          "changed_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationResponsibilityProfileView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "profile",
          "name",
          "eligible"
        ],
        "properties": {
          "profile": {
            "$ref": "#/components/schemas/OrganizationResponsibilityProfile"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "eligible": {
            "type": "boolean"
          }
        }
      },
      "OrganizationResponsibilityProfilePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/OrganizationResponsibilityProfileView"
            }
          },
          "next_cursor": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "OrganizationResponsibilityImportResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "import_id",
          "profiles",
          "replayed"
        ],
        "properties": {
          "import_id": {
            "type": "string",
            "pattern": "^orpi_[a-f0-9]{32}$"
          },
          "profiles": {
            "type": "array",
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/OrganizationResponsibilityProfileView"
            }
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "TeamOrganizationView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "team",
          "organization",
          "state"
        ],
        "properties": {
          "team": {
            "$ref": "#/components/schemas/SpaceView"
          },
          "organization": {
            "type": "object",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationUnitView"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "unlinked",
              "linked",
              "requires_reassociation"
            ]
          }
        }
      },
      "OrganizationAuditEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "workspace_id",
          "org_unit_id",
          "actor_id",
          "action",
          "subject_id",
          "revision",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "actor_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "action": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "subject_id": {
            "type": "string",
            "minLength": 0,
            "maxLength": 100
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationUnitList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/OrganizationUnit"
            }
          },
          "next_cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          }
        }
      },
      "OrganizationMemberList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/OrganizationMemberView"
            }
          },
          "next_cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          }
        }
      },
      "OrganizationAuditList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/OrganizationAuditEvent"
            }
          },
          "next_cursor": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          }
        }
      },
      "SpaceIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id"
        ],
        "properties": {
          "management": {
            "type": "boolean",
            "default": false,
            "description": "Requires enterprise management permission without granting runtime membership."
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          }
        }
      },
      "OfficeProjectListRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "team_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "OfficeProjectCreateRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "team_id",
          "name",
          "application_ids",
          "manager_application_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "application_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 200,
            "items": {
              "type": "string"
            }
          },
          "manager_application_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 200
          },
          "legacy_local_id": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "OfficeProjectUpdateRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "team_id",
          "project_id",
          "expected_revision",
          "name",
          "description"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "application_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 200,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OfficeProjectArchiveRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "team_id",
          "project_id",
          "expected_revision"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "SpaceCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "kind",
          "name",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "kind": {
            "type": "string",
            "enum": [
              "team",
              "project"
            ]
          },
          "org_unit_id": {
            "type": "string",
            "pattern": "^org_[a-f0-9]{32}$"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Optional explicit initial owner when creating a Team from a department. Must be the creator or the current eligible department leader. Creator retains a manual manager grant; no other directory members are copied."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "goal": {
            "type": "string",
            "maxLength": 2000
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "SpaceUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "expected_revision",
          "name"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "goal": {
            "type": "string",
            "maxLength": 2000
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "SpaceListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "management": {
            "type": "boolean",
            "default": false,
            "description": "Requires enterprise management permission without granting runtime membership."
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "kind": {
            "type": "string",
            "enum": [
              "team",
              "project"
            ]
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "SpaceMemberListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          }
        }
      },
      "SpaceMemberRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "expected_revision",
          "user_id",
          "action"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "action": {
            "type": "string",
            "enum": [
              "grant",
              "remove_manual",
              "revoke",
              "restore"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "member",
              "manager"
            ]
          }
        }
      },
      "SpaceResourceFolderCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "name"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "SpaceResourceFileMoveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "knowledge_base_id",
          "document_id",
          "folder_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "document_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "folder_id": {
            "type": "string",
            "maxLength": 48,
            "pattern": "^(|srf_[a-f0-9]{32})$"
          }
        }
      },
      "SpaceOwnerRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "expected_revision",
          "user_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "SpaceParticipationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "project_id",
          "team_id",
          "expected_revision",
          "active"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "project_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "team_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "SpaceTransitionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "expected_revision",
          "action"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "action": {
            "type": "string",
            "enum": [
              "activate",
              "close",
              "plan_work",
              "archive",
              "restore",
              "disable",
              "enable"
            ]
          },
          "work_disposition": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "command_id",
                "action"
              ],
              "properties": {
                "command_id": {
                  "type": "string",
                  "pattern": "^acmd_[a-f0-9]{32}$"
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "continue",
                    "cancel"
                  ]
                }
              }
            }
          }
        }
      },
      "SpaceTaskList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "next_cursor": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceTask"
            }
          }
        }
      },
      "SpaceTask": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "command_id",
          "participation_binding_id",
          "application_id",
          "application_name",
          "responsible_user_id",
          "responsible_user_name",
          "requesting_application_name",
          "purpose",
          "capability_key",
          "runtime_kind",
          "status",
          "output_validation",
          "created_at"
        ],
        "properties": {
          "command_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "application_name": {
            "type": "string"
          },
          "responsible_user_id": {
            "type": "integer",
            "format": "int64"
          },
          "responsible_user_name": {
            "type": "string"
          },
          "requesting_application_name": {
            "type": "string"
          },
          "parent_command_id": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "capability_key": {
            "type": "string"
          },
          "runtime_kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "output_validation": {
            "type": "string",
            "enum": [
              "pending",
              "valid",
              "schema_mismatch",
              "not_applicable"
            ]
          },
          "workbench_path": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceWorkList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "next_cursor": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "command_id",
                "participation_binding_id",
                "runtime_kind",
                "status",
                "disposition"
              ],
              "properties": {
                "command_id": {
                  "type": "string"
                },
                "participation_binding_id": {
                  "type": "string",
                  "pattern": "^abind_[a-f0-9]{32}$"
                },
                "runtime_kind": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "disposition": {
                  "type": "string",
                  "enum": [
                    "unplanned",
                    "continue",
                    "cancel"
                  ]
                }
              }
            }
          }
        }
      },
      "Space": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "space_id",
          "workspace_id",
          "kind",
          "name",
          "description",
          "goal",
          "status",
          "owner_id",
          "revision",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "team",
              "project"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "goal": {
            "type": "string",
            "maxLength": 2000
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closing",
              "archived",
              "disabled"
            ]
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "closing_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "space",
          "role",
          "can_manage"
        ],
        "properties": {
          "space": {
            "$ref": "#/components/schemas/Space"
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "member",
              "manager"
            ]
          },
          "can_manage": {
            "type": "boolean"
          }
        }
      },
      "SpaceWorkContextListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "include_retired": {
            "type": "boolean"
          }
        }
      },
      "SpaceWorkContextSaveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "kind",
          "title",
          "body",
          "source_note",
          "expected_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "entry_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "note",
              "decision"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "source_note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "SpaceWorkContextRetireRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "entry_id",
          "expected_revision"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "entry_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "SpaceWorkContextRevision": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "entry_id",
          "revision",
          "kind",
          "title",
          "body",
          "source_note",
          "status",
          "maintained_by",
          "created_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "entry_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "kind": {
            "type": "string",
            "enum": [
              "note",
              "decision"
            ]
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "source_note": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "retired"
            ]
          },
          "maintained_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceWorkContextEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entry_id",
          "workspace_id",
          "space_id",
          "kind",
          "title",
          "body",
          "source_note",
          "status",
          "revision",
          "maintained_by",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "entry_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "note",
              "decision"
            ]
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "source_note": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "retired"
            ]
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "maintained_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "retired_by": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "retired_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "revisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceWorkContextRevision"
            }
          }
        }
      },
      "SpaceWorkContextList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceWorkContextEntry"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "SpaceMembership": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "user_id",
          "revoked",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "revoked": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceMembershipSource": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "user_id",
          "source_kind",
          "source_id",
          "role",
          "active",
          "granted_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "source_kind": {
            "type": "string",
            "enum": [
              "manual",
              "org_sync"
            ]
          },
          "source_id": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "member",
              "manager"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "granted_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceMemberView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "member",
          "name",
          "role",
          "sources"
        ],
        "properties": {
          "member": {
            "$ref": "#/components/schemas/SpaceMembership"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "",
              "viewer",
              "member",
              "manager"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceMembershipSource"
            }
          }
        }
      },
      "SpaceMemberCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user_id",
          "name"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string"
          }
        }
      },
      "SpaceList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceView"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "SpaceMemberList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceMemberView"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "SpaceMemberCandidateList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceMemberCandidate"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "SpaceResourceFolder": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "folder_id",
          "workspace_id",
          "space_id",
          "name",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "folder_id": {
            "type": "string",
            "pattern": "^srf_[a-f0-9]{32}$"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceResourceFolderList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/SpaceResourceFolder"
            }
          }
        }
      },
      "SpaceResourceFilePlacement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "space_id",
          "knowledge_base_id",
          "document_id",
          "folder_id",
          "moved_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "document_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "folder_id": {
            "type": "string",
            "maxLength": 48,
            "pattern": "^(|srf_[a-f0-9]{32})$"
          },
          "moved_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SpaceResourceFilePlacementList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 5000,
            "items": {
              "$ref": "#/components/schemas/SpaceResourceFilePlacement"
            }
          }
        }
      },
      "SpaceTeamList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceView"
            }
          }
        }
      },
      "SpaceEmployeeInviteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "project_id",
          "expected_revision",
          "subject_kind",
          "subject_id",
          "active"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "project_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "subject_kind": {
            "type": "string",
            "enum": [
              "team",
              "application"
            ]
          },
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "source_team_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "source_kind": {
            "type": "string",
            "enum": [
              "team",
              "direct"
            ]
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "SpaceEmployeeSource": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_kind",
          "source_id",
          "source_name",
          "active"
        ],
        "properties": {
          "source_kind": {
            "type": "string",
            "enum": [
              "team",
              "direct"
            ]
          },
          "source_id": {
            "type": "string"
          },
          "source_name": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "SpaceEmployee": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application_id",
          "application_name",
          "team_id",
          "active",
          "representative",
          "available",
          "availability_reason",
          "sources"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "application_name": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "representative": {
            "type": "boolean"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "availability_reason": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceEmployeeSource"
            }
          }
        }
      },
      "SpaceEmployeeList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceEmployee"
            }
          }
        }
      },
      "SpaceEmployeeCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application_id",
          "name",
          "team_id"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          }
        }
      },
      "SpaceEmployeeCandidateList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceEmployeeCandidate"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationCommandRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "expected_binding_revision_id",
          "surface_key",
          "action_key",
          "inputs",
          "idempotency_key"
        ],
        "properties": {
          "disable_knowledge_capture": {
            "type": "boolean",
            "default": false,
            "description": "Immutable per-command opt-out from declared business capture"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "expected_binding_revision_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "surface_key": {
            "type": "string",
            "enum": [
              "workbench",
              "representative"
            ]
          },
          "action_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "inputs": {
            "type": "object",
            "additionalProperties": true
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationCommandIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "command_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "command_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          }
        }
      },
      "ApplicationCommandListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "ApplicationCommandPurpose": {
        "type": "string",
        "enum": [
          "execute",
          "employee"
        ]
      },
      "ApplicationCommandOriginSurface": {
        "type": "string",
        "enum": [
          "workbench",
          "representative"
        ]
      },
      "ApplicationCommandRuntimeKind": {
        "type": "string",
        "enum": [
          "workflow",
          "agent"
        ]
      },
      "ApplicationCommandViewOutputValidation": {
        "type": "string",
        "enum": [
          "pending",
          "valid",
          "schema_mismatch"
        ]
      },
      "TaskOutputFormat": {
        "type": "string",
        "enum": [
          "markdown",
          "csv",
          "xlsx",
          "docx",
          "pptx",
          "pdf",
          "html"
        ]
      },
      "TaskOutputRequirement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "requirement_id",
          "format"
        ],
        "properties": {
          "requirement_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{0,63}$"
          },
          "format": {
            "$ref": "#/components/schemas/TaskOutputFormat"
          },
          "filename_hint": {
            "type": "string",
            "maxLength": 240,
            "description": "Safe leaf filename with the matching format extension; server also checks the UTF-8 byte length."
          }
        }
      },
      "TaskOutputResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "requirement",
          "status"
        ],
        "properties": {
          "requirement": {
            "$ref": "#/components/schemas/TaskOutputRequirement"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "fulfilled",
              "unfulfilled"
            ]
          },
          "file_id": {
            "type": "string",
            "description": "Only present after an authorized active stored file and generation receipt satisfy this requirement."
          }
        }
      },
      "TaskSubjectRef": {
        "type": "object",
        "nullable": true,
        "additionalProperties": false,
        "description": "Server-derived original subject. An empty historical object means unresolved identity, never the execution account or a shared audience.",
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "platform",
              "im"
            ]
          },
          "provider": {
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "ApplicationKnowledgeAccess": {
        "type": "object",
        "nullable": true,
        "additionalProperties": false,
        "description": "Omission preserves previous or legacy configuration. An explicit empty object selects no extra knowledge bases. The default write base must also be in read_base_ids. Server-issued capture authority is never client input.",
        "properties": {
          "read_base_ids": {
            "type": "array",
            "nullable": true,
            "maxItems": 128,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "default_write_base_id": {
            "type": "string"
          },
          "auto_capture": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ApplicationKnowledgeCaptureReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "command_id",
          "scope_id",
          "disabled_by_user",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "command_id": {
            "type": "string"
          },
          "scope_id": {
            "type": "string"
          },
          "disabled_by_user": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "reason_code": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "command_id",
          "workspace_id",
          "participation_binding_id",
          "participation_binding_revision_id",
          "application_version_id",
          "environment_version_id",
          "capability_key",
          "origin_surface",
          "action_key",
          "created_by",
          "input_digest",
          "runtime_kind",
          "runtime_run_id",
          "created_at"
        ],
        "properties": {
          "conversation_id": {
            "type": "integer",
            "format": "int64",
            "description": "Lightweight employee directory identity; no messages"
          },
          "conversation_title": {
            "type": "string",
            "description": "Employee conversation directory title"
          },
          "runtime_status": {
            "type": "string",
            "description": "Employee directory run status"
          },
          "scheduled": {
            "type": "boolean",
            "description": "Original scheduled intake confirmed by its scoped occurrence; directory metadata only"
          },
          "disable_knowledge_capture": {
            "type": "boolean"
          },
          "subject_ref": {
            "$ref": "#/components/schemas/TaskSubjectRef"
          },
          "output_requirements": {
            "type": "array",
            "nullable": true,
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/TaskOutputRequirement"
            }
          },
          "read_only": {
            "type": "boolean",
            "description": "Server-enforced read-only delegation inherited by descendants"
          },
          "command_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "application_version_id": {
            "type": "string"
          },
          "environment_version_id": {
            "type": "string"
          },
          "capability_key": {
            "type": "string"
          },
          "origin_surface": {
            "$ref": "#/components/schemas/ApplicationCommandOriginSurface"
          },
          "action_key": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "input_digest": {
            "type": "string"
          },
          "runtime_kind": {
            "$ref": "#/components/schemas/ApplicationCommandRuntimeKind"
          },
          "purpose": {
            "$ref": "#/components/schemas/ApplicationCommandPurpose"
          },
          "runtime_run_id": {
            "type": "string"
          },
          "parent_command_id": {
            "type": "string"
          },
          "context_snapshot_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationHumanInputRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "command_id",
          "continuation_id",
          "idempotency_key",
          "answer",
          "skipped"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "command_id": {
            "type": "string"
          },
          "continuation_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "answer": {
            "type": "string",
            "maxLength": 8000
          },
          "skipped": {
            "type": "boolean"
          }
        }
      },
      "ApplicationHumanInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "continuation_id",
          "status",
          "question",
          "options",
          "expires_at"
        ],
        "properties": {
          "continuation_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "submitted",
              "resuming"
            ]
          },
          "question": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationCommandView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "command",
          "output_validation"
        ],
        "properties": {
          "human_input": {
            "$ref": "#/components/schemas/ApplicationHumanInput"
          },
          "output_deliverables": {
            "type": "array",
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/TaskOutputResult"
            }
          },
          "knowledge_capture": {
            "$ref": "#/components/schemas/ApplicationKnowledgeCaptureReceipt"
          },
          "command": {
            "$ref": "#/components/schemas/ApplicationCommand"
          },
          "context_snapshot": {
            "$ref": "#/components/schemas/RuntimeContextSnapshot"
          },
          "workflow_run": {
            "$ref": "#/components/schemas/WorkflowRun"
          },
          "agent_run": {
            "$ref": "#/components/schemas/AgentRun"
          },
          "output_validation": {
            "$ref": "#/components/schemas/ApplicationCommandViewOutputValidation"
          },
          "related_commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCommand"
            }
          },
          "employee_turns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationEmployeeTurn"
            }
          }
        }
      },
      "RuntimeContextSnapshot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "context_snapshot_id",
          "workspace_id",
          "actor_id",
          "participation_binding_id",
          "participation_binding_revision_id",
          "application_version_id",
          "environment_version_id",
          "scope_type",
          "scope_id",
          "space_revision",
          "space_role",
          "source_refs",
          "policy_revision",
          "digest",
          "created_at"
        ],
        "properties": {
          "context_snapshot_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "actor_id": {
            "type": "integer",
            "format": "int64"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "application_version_id": {
            "type": "string"
          },
          "environment_version_id": {
            "type": "string"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string"
          },
          "space_revision": {
            "type": "integer",
            "format": "int64"
          },
          "space_role": {
            "type": "string"
          },
          "source_refs": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "source_selection": {
                "$ref": "#/components/schemas/TaskSourceSelection"
              },
              "executor": {
                "$ref": "#/components/schemas/ApplicationRuntimeRef"
              },
              "main_entry": {
                "$ref": "#/components/schemas/ApplicationRuntimeRef"
              },
              "resource_bindings": {
                "$ref": "#/components/schemas/JsonObject"
              },
              "work_context": {
                "$ref": "#/components/schemas/ApplicationWorkContext"
              }
            }
          }
        }
      },
      "ApplicationWorkContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "scope_type",
          "scope_id",
          "entries"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "space_work_context/v1"
            ]
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string"
          },
          "space_revision": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationWorkContextEntry"
            }
          }
        }
      },
      "ApplicationWorkContextEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entry_id",
          "kind",
          "title",
          "body",
          "source_note",
          "revision",
          "maintained_by",
          "updated_at"
        ],
        "properties": {
          "entry_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "note",
              "decision"
            ]
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "source_note": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "maintained_by": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string"
          },
          "policy_revision": {
            "type": "string"
          },
          "digest": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationEmployeeTurn": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "command_id",
          "user_input",
          "answer",
          "status"
        ],
        "properties": {
          "user_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "human_inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationHumanInputHistory"
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileRef"
            }
          },
          "command_id": {
            "type": "string"
          },
          "user_input": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "ApplicationHumanInputHistory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "continuation_id",
          "question",
          "options",
          "answer",
          "skipped",
          "answered_at"
        ],
        "properties": {
          "continuation_id": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "answer": {
            "type": "string"
          },
          "skipped": {
            "type": "boolean"
          },
          "answered_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationStarterQuestionsRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "expected_binding_revision_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[a-f0-9]{32}$"
          },
          "project_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          }
        }
      },
      "ApplicationStarterQuestions": {
        "type": "object",
        "required": [
          "questions",
          "application_version_id",
          "participation_binding_revision_id",
          "model_config_id",
          "generated_at"
        ],
        "properties": {
          "questions": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "application_version_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "model_config_id": {
            "type": "integer",
            "format": "int64"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationEmployeeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "expected_binding_revision_id",
          "user_input",
          "idempotency_key"
        ],
        "properties": {
          "source_selection": {
            "$ref": "#/components/schemas/TaskSourceSelection"
          },
          "disable_knowledge_capture": {
            "type": "boolean",
            "default": false
          },
          "output_requirements": {
            "type": "array",
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/TaskOutputRequirement"
            }
          },
          "files": {
            "type": "array",
            "maxItems": 32,
            "description": "Explicit empty array clears previous turn file selection; omission preserves it.",
            "items": {
              "$ref": "#/components/schemas/FileRef"
            }
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "expected_binding_revision_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "user_input": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "previous_command_id": {
            "type": "string",
            "pattern": "^acmd_[a-f0-9]{32}$"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "TaskSourceSelection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "mode",
          "selected_refs"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "automatic",
              "selected_only"
            ]
          },
          "selected_refs": {
            "type": "array",
            "maxItems": 64,
            "uniqueItems": true,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "kind",
                "id"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "file",
                    "knowledge_base"
                  ]
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,119}$"
                }
              }
            }
          }
        }
      },
      "ApplicationProjectAgentRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "project_id",
          "participation_binding_id",
          "expected_binding_revision_id",
          "user_input",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "project_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[a-f0-9]{32}$"
          },
          "user_input": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "previous_command_id": {
            "type": "string",
            "pattern": "^acmd_[a-f0-9]{32}$"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationCommandList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCommand"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationWorkListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "human_task_pending": {
            "type": "boolean",
            "description": "Filter authorized current-epoch pending human tasks before pagination"
          },
          "runtime_status": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "ApplicationWorkItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "command_id",
          "participation_binding_id",
          "application_id",
          "application_name",
          "scope_type",
          "scope_id",
          "scope_name",
          "capability_key",
          "capability_title",
          "action_key",
          "origin_surface",
          "runtime_kind",
          "runtime_run_id",
          "runtime_status",
          "purpose",
          "output_validation",
          "human_task_pending",
          "created_at"
        ],
        "properties": {
          "command_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "application_name": {
            "type": "string"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string"
          },
          "scope_name": {
            "type": "string"
          },
          "capability_key": {
            "type": "string"
          },
          "capability_title": {
            "type": "string"
          },
          "action_key": {
            "type": "string"
          },
          "origin_surface": {
            "$ref": "#/components/schemas/ApplicationCommandOriginSurface"
          },
          "runtime_kind": {
            "$ref": "#/components/schemas/ApplicationCommandRuntimeKind"
          },
          "runtime_run_id": {
            "type": "string"
          },
          "runtime_status": {
            "type": "string"
          },
          "purpose": {
            "$ref": "#/components/schemas/ApplicationCommandPurpose"
          },
          "parent_command_id": {
            "type": "string"
          },
          "output_validation": {
            "$ref": "#/components/schemas/ApplicationCommandViewOutputValidation"
          },
          "human_task_pending": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationWorkList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationWorkItem"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationPublishEnableRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_draft_revision",
          "name",
          "manifest",
          "scope_type",
          "scope_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "expected_draft_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          },
          "runtime_configuration": {
            "$ref": "#/components/schemas/ApplicationReleaseRuntimeConfiguration"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "team_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "expected_binding_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "release_note": {
            "type": "string",
            "maxLength": 1000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationPublishEnableResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application",
          "version",
          "deployment_revision",
          "binding_revision"
        ],
        "properties": {
          "application": {
            "$ref": "#/components/schemas/Application"
          },
          "version": {
            "$ref": "#/components/schemas/ApplicationVersion"
          },
          "deployment_revision": {
            "$ref": "#/components/schemas/ApplicationDeploymentRevision"
          },
          "binding_revision": {
            "$ref": "#/components/schemas/ApplicationParticipationBindingRevision"
          },
          "deployment_revisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationDeploymentRevision"
            }
          },
          "binding_revisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationParticipationBindingRevision"
            }
          }
        }
      },
      "ApplicationReleaseCandidateCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_draft_revision",
          "version_label",
          "scope_type",
          "scope_id",
          "release_note",
          "runtime_configuration",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "expected_draft_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "version_label": {
            "type": "string",
            "pattern": "^[0-9A-Za-z][0-9A-Za-z._-]{0,31}$"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "team_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "expected_binding_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "release_note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          },
          "runtime_configuration": {
            "$ref": "#/components/schemas/ApplicationReleaseRuntimeConfiguration"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationReleaseRuntimeConfiguration": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "environment_version_id",
          "entry_enabled"
        ],
        "properties": {
          "environment_version_id": {
            "type": "string",
            "pattern": "^envv_[a-f0-9]{32}$"
          },
          "deployment_id": {
            "type": "string",
            "pattern": "^adep_[a-f0-9]{32}$"
          },
          "expected_deployment_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "entry_enabled": {
            "type": "boolean"
          },
          "knowledge_mappings": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationKnowledgeMapping"
            }
          },
          "dataset_mappings": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationDatasetMapping"
            }
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          }
        }
      },
      "ApplicationReleaseDefaults": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "environment_version_id"
        ],
        "properties": {
          "environment_version_id": {
            "type": "string",
            "pattern": "^envv_[a-f0-9]{32}$"
          },
          "deployment_id": {
            "type": "string",
            "pattern": "^adep_[a-f0-9]{32}$"
          },
          "expected_deployment_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "ApplicationReleaseCandidatePublishRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "candidate_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "candidate_id": {
            "type": "string",
            "pattern": "^acand_[a-f0-9]{32}$"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationReleaseCandidateUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "candidate_id",
          "expected_draft_revision",
          "version_label",
          "scope_type",
          "scope_id",
          "release_note",
          "runtime_configuration"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "candidate_id": {
            "type": "string",
            "pattern": "^acand_[a-f0-9]{32}$"
          },
          "expected_draft_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "version_label": {
            "type": "string",
            "pattern": "^[0-9A-Za-z][0-9A-Za-z._-]{0,31}$"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "team_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "expected_binding_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "release_note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          },
          "runtime_configuration": {
            "$ref": "#/components/schemas/ApplicationReleaseRuntimeConfiguration"
          }
        }
      },
      "ApplicationReleaseCandidateDeleteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "candidate_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "candidate_id": {
            "type": "string",
            "pattern": "^acand_[a-f0-9]{32}$"
          }
        }
      },
      "ApplicationReleaseCandidateListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          }
        }
      },
      "ApplicationReleaseCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "candidate_id",
          "workspace_id",
          "application_id",
          "version",
          "version_label",
          "draft_revision",
          "name",
          "manifest",
          "scope_type",
          "scope_id",
          "release_note",
          "status",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "candidate_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "version_label": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "participation_binding_id": {
            "type": "string"
          },
          "expected_binding_revision": {
            "type": "integer",
            "format": "int64"
          },
          "release_note": {
            "type": "string"
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          },
          "runtime_configuration": {
            "$ref": "#/components/schemas/ApplicationReleaseRuntimeConfiguration"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "published"
            ]
          },
          "published_version_id": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationReleaseCandidateList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationReleaseCandidate"
            }
          }
        }
      },
      "ApplicationDeployRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "application_version_id",
          "environment_version_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "application_version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "environment_version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "deployment_id": {
            "type": "string",
            "maxLength": 48
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationDeploymentListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "ApplicationDeploymentRevisionListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "deployment_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "deployment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "before_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "ApplicationBindingRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "deployment_revision_id",
          "scope_type",
          "scope_id",
          "enabled",
          "idempotency_key"
        ],
        "properties": {
          "delegate_resources": {
            "type": "boolean",
            "default": false,
            "description": "Explicitly delegates only installed read resources to members of the selected team or project. Does not grant source management or database write access."
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "maxLength": 48
          },
          "deployment_revision_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "knowledge_mappings": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationKnowledgeMapping"
            }
          },
          "dataset_mappings": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationDatasetMapping"
            }
          }
        }
      },
      "ApplicationBindingIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          }
        }
      },
      "ApplicationDeployment": {
        "type": "object",
        "required": [
          "deployment_id",
          "workspace_id",
          "application_id",
          "environment_id",
          "created_by",
          "revision",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "deployment_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "environment_id": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationDeploymentRevision": {
        "type": "object",
        "required": [
          "deployment_revision_id",
          "workspace_id",
          "deployment_id",
          "application_id",
          "revision",
          "application_version_id",
          "environment_version_id",
          "digest",
          "created_by",
          "created_at"
        ],
        "properties": {
          "deployment_revision_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "deployment_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "application_version_id": {
            "type": "string"
          },
          "environment_version_id": {
            "type": "string"
          },
          "digest": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationParticipationBinding": {
        "type": "object",
        "required": [
          "participation_binding_id",
          "workspace_id",
          "deployment_id",
          "scope_type",
          "scope_id",
          "active_revision_id",
          "revision",
          "enabled",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "participation_binding_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "deployment_id": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "scope_id": {
            "type": "string"
          },
          "active_revision_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "enabled": {
            "type": "boolean"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationParticipationBindingRevision": {
        "type": "object",
        "required": [
          "participation_binding_revision_id",
          "workspace_id",
          "participation_binding_id",
          "deployment_id",
          "revision",
          "deployment_revision_id",
          "enabled",
          "digest",
          "created_by",
          "created_at"
        ],
        "properties": {
          "delegate_resources": {
            "type": "boolean"
          },
          "knowledge_access": {
            "$ref": "#/components/schemas/ApplicationKnowledgeAccess"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "deployment_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "deployment_revision_id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "digest": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "knowledge_mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationKnowledgeMapping"
            }
          },
          "dataset_mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationDatasetMapping"
            }
          }
        }
      },
      "ApplicationDeploymentResult": {
        "type": "object",
        "required": [
          "deployment",
          "revision"
        ],
        "properties": {
          "deployment": {
            "$ref": "#/components/schemas/ApplicationDeployment"
          },
          "revision": {
            "$ref": "#/components/schemas/ApplicationDeploymentRevision"
          }
        }
      },
      "ApplicationBindingResult": {
        "type": "object",
        "required": [
          "binding",
          "revision"
        ],
        "properties": {
          "binding": {
            "$ref": "#/components/schemas/ApplicationParticipationBinding"
          },
          "revision": {
            "$ref": "#/components/schemas/ApplicationParticipationBindingRevision"
          }
        }
      },
      "ApplicationBindingView": {
        "type": "object",
        "required": [
          "binding",
          "revision",
          "deployment_revision",
          "application_name",
          "manifest",
          "can_manage",
          "available"
        ],
        "properties": {
          "binding": {
            "$ref": "#/components/schemas/ApplicationParticipationBinding"
          },
          "revision": {
            "$ref": "#/components/schemas/ApplicationParticipationBindingRevision"
          },
          "deployment_revision": {
            "$ref": "#/components/schemas/ApplicationDeploymentRevision"
          },
          "application_name": {
            "type": "string"
          },
          "employee_application_id": {
            "type": "string"
          },
          "home_team_id": {
            "type": "string"
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "can_manage": {
            "type": "boolean"
          },
          "available": {
            "type": "boolean"
          }
        }
      },
      "ApplicationDeploymentList": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationDeployment"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationDeploymentRevisionList": {
        "type": "object",
        "required": [
          "items",
          "next_before_revision"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationDeploymentRevision"
            }
          },
          "next_before_revision": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationInstallationContract": {
        "type": "object",
        "required": [
          "deployment_revision",
          "manifest",
          "dataset_contracts"
        ],
        "properties": {
          "deployment_revision": {
            "$ref": "#/components/schemas/ApplicationDeploymentRevision"
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "dataset_contracts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "slot_key",
                "dataset_ref",
                "columns"
              ],
              "properties": {
                "slot_key": {
                  "type": "string"
                },
                "dataset_ref": {
                  "$ref": "#/components/schemas/ApplicationDatasetRef"
                },
                "columns": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "data_column_id",
                      "ordinal",
                      "name",
                      "description",
                      "data_type",
                      "nullable",
                      "enum_values"
                    ],
                    "properties": {
                      "data_column_id": {
                        "type": "string"
                      },
                      "ordinal": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "data_type": {
                        "type": "string"
                      },
                      "nullable": {
                        "type": "boolean"
                      },
                      "enum_values": {
                        "type": "array",
                        "nullable": true,
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ApplicationBindingList": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationBindingView"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "EnvironmentKnowledgeModels": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "embedding_model_config_id"
        ],
        "description": "Explicit knowledge model roles, each referencing model_config_ids in the same immutable environment version. No workspace-default fallback.",
        "properties": {
          "embedding_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "visual_embedding_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "rerank_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "visual_rerank_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "document_parser_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "ocr_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "vlm_model_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "EnvironmentPublishRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "name",
          "stage",
          "model_config_ids",
          "max_concurrent_runs",
          "run_timeout_seconds",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "maxLength": 48
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "stage": {
            "type": "string",
            "enum": [
              "development",
              "test",
              "production"
            ]
          },
          "knowledge_models": {
            "$ref": "#/components/schemas/EnvironmentKnowledgeModels"
          },
          "allow_registered_agent_tools": {
            "type": "boolean",
            "default": false,
            "description": "Allow pinned registered read-only tools of direct Application Agents with per-invocation authorization."
          },
          "model_config_ids": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          "max_concurrent_runs": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "run_timeout_seconds": {
            "type": "integer",
            "minimum": 30,
            "maximum": 1800
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "EnvironmentIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          }
        }
      },
      "EnvironmentListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "EnvironmentVersionListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "before_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "EnvironmentStateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id",
          "expected_revision",
          "enabled"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "Environment": {
        "type": "object",
        "required": [
          "environment_id",
          "workspace_id",
          "name",
          "created_by",
          "current_version",
          "revision",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "environment_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "current_version": {
            "type": "integer",
            "format": "int64"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnvironmentVersion": {
        "type": "object",
        "required": [
          "environment_version_id",
          "environment_id",
          "workspace_id",
          "version",
          "stage",
          "runtime_target",
          "network_policy",
          "model_config_ids",
          "max_concurrent_runs",
          "run_timeout_seconds",
          "digest",
          "created_by",
          "created_at"
        ],
        "properties": {
          "environment_version_id": {
            "type": "string"
          },
          "environment_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "stage": {
            "type": "string"
          },
          "runtime_target": {
            "type": "string"
          },
          "network_policy": {
            "type": "string"
          },
          "knowledge_models": {
            "$ref": "#/components/schemas/EnvironmentKnowledgeModels"
          },
          "model_config_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "max_concurrent_runs": {
            "type": "integer"
          },
          "run_timeout_seconds": {
            "type": "integer"
          },
          "digest": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnvironmentPublishResult": {
        "type": "object",
        "required": [
          "environment",
          "version"
        ],
        "properties": {
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "version": {
            "$ref": "#/components/schemas/EnvironmentVersion"
          }
        }
      },
      "EnvironmentList": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Environment"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "EnvironmentVersionList": {
        "type": "object",
        "required": [
          "items",
          "next_before_version"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvironmentVersion"
            }
          },
          "next_before_version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationRuntimeRef": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "resource_id",
          "version_id"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "Executable kinds are agent and workflow; unsupported kinds remain unpublishable drafts."
          },
          "resource_id": {
            "type": "string",
            "maxLength": 100
          },
          "version_id": {
            "type": "integer",
            "format": "int64",
            "description": "Original domain immutable release or snapshot primary key"
          }
        }
      },
      "ApplicationCapability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "title",
          "executor",
          "input_schema",
          "output_schema"
        ],
        "properties": {
          "knowledge_capture": {
            "type": "array",
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/ApplicationKnowledgeCapture"
            }
          },
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "Business purpose, at most 500 Unicode code points after trimming Unicode whitespace. Optional in drafts and historical versions; required on new publications only for capabilities exposed as Agent tools."
          },
          "executor": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "input_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "output_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "context_input_key": {
            "type": "string",
            "description": "Optional Workflow object input field that receives server-compiled work context"
          }
        }
      },
      "ApplicationRepresentative": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "role_id",
          "name",
          "primary",
          "agent_release",
          "capability_keys",
          "toolset_mode"
        ],
        "properties": {
          "channel_action_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "output_formats": {
            "type": "array",
            "maxItems": 7,
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/TaskOutputFormat"
            }
          },
          "role_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "primary": {
            "type": "boolean"
          },
          "agent_release": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "toolset_mode": {
            "type": "string",
            "enum": [
              "agent_native"
            ]
          },
          "capability_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApplicationSurfaceBinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "surface_key",
          "action_key",
          "capability_key"
        ],
        "properties": {
          "surface_key": {
            "type": "string"
          },
          "action_key": {
            "type": "string"
          },
          "capability_key": {
            "type": "string"
          }
        }
      },
      "ApplicationManifest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "main_entry",
          "capabilities",
          "representatives",
          "surface_bindings"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": [
              "application/v1"
            ]
          },
          "cover_file": {
            "$ref": "#/components/schemas/ApplicationCoverFile"
          },
          "workbench": {
            "$ref": "#/components/schemas/ApplicationWorkbench"
          },
          "record_collections": {
            "type": "array",
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/ApplicationRecordCollection"
            }
          },
          "main_entry": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "capabilities": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "$ref": "#/components/schemas/ApplicationCapability"
            }
          },
          "representatives": {
            "type": "array",
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/ApplicationRepresentative"
            }
          },
          "surface_bindings": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationSurfaceBinding"
            }
          },
          "enabled_modules": {
            "type": "array",
            "maxItems": 5,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "agent",
                "workflow",
                "knowledge",
                "data",
                "skill"
              ]
            }
          },
          "knowledge_slots": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationKnowledgeSlot"
            }
          },
          "dataset_slots": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "$ref": "#/components/schemas/ApplicationDatasetSlot"
            }
          }
        }
      },
      "ApplicationCoverFile": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "__type",
          "file_id",
          "filename",
          "mime_type",
          "size_bytes"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "file_ref"
            ]
          },
          "file_id": {
            "type": "string",
            "pattern": "^file_[A-Za-z0-9_-]{1,115}$"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 2097152
          }
        }
      },
      "ApplicationWorkbench": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "package",
          "version"
        ],
        "properties": {
          "package": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "version": {
            "type": "string",
            "maxLength": 40,
            "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
          }
        }
      },
      "ApplicationCollaborationCheckRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "edge_id",
          "source_binding_id",
          "target_binding_id",
          "mode",
          "expected_published_revision",
          "expected_draft_revision"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "project_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "edge_id": {
            "type": "string",
            "pattern": "^aedge_[a-f0-9]{32}$"
          },
          "source_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "target_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ]
          },
          "expected_published_revision": {
            "type": "string",
            "pattern": "^(agraph_[a-f0-9]{32})?$"
          },
          "expected_draft_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "test_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Administrative admission check only; requires organization and RBAC management for a different user."
          }
        }
      },
      "ApplicationCollaborationCheckResult": {
        "type": "object",
        "required": [
          "effective",
          "checked_at",
          "active_revision_id",
          "draft_revision",
          "checks"
        ],
        "properties": {
          "effective": {
            "type": "boolean"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "active_revision_id": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "test_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "passed"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "passed": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "ApplicationCollaborationHistoryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "revision_id": {
            "type": "string",
            "pattern": "^agraph_[a-f0-9]{32}$"
          },
          "before_publication": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          }
        }
      },
      "ApplicationCollaborationRevisionHeader": {
        "type": "object",
        "required": [
          "revision_id",
          "publication_no",
          "created_at"
        ],
        "properties": {
          "revision_id": {
            "type": "string"
          },
          "publication_no": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationCollaborationHistoricalEdge": {
        "type": "object",
        "required": [
          "edge_id",
          "source_application_id",
          "target_application_id",
          "target_application_version_id",
          "scope",
          "capability",
          "purpose",
          "source_name",
          "target_name",
          "published_epoch"
        ],
        "properties": {
          "edge_id": {
            "type": "string"
          },
          "source_application_id": {
            "type": "string"
          },
          "target_application_id": {
            "type": "string"
          },
          "target_application_version_id": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "company",
              "project"
            ]
          },
          "capability": {
            "type": "string",
            "enum": [
              "employee.query"
            ]
          },
          "purpose": {
            "type": "string"
          },
          "target_binding_id": {
            "type": "string"
          },
          "source_name": {
            "type": "string"
          },
          "target_name": {
            "type": "string"
          },
          "published_epoch": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationCollaborationRevisionDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApplicationCollaborationRevisionHeader"
          },
          {
            "type": "object",
            "required": [
              "edges"
            ],
            "properties": {
              "edges": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApplicationCollaborationHistoricalEdge"
                }
              }
            }
          }
        ]
      },
      "ApplicationCollaborationHistory": {
        "type": "object",
        "required": [
          "versions"
        ],
        "properties": {
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCollaborationRevisionHeader"
            }
          },
          "next_before_publication": {
            "type": "integer",
            "format": "int64"
          },
          "detail": {
            "$ref": "#/components/schemas/ApplicationCollaborationRevisionDetail"
          }
        }
      },
      "ApplicationCollaborationRequest": {
        "type": "object",
        "required": [
          "workspace_id"
        ],
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "project_id": {
            "type": "string"
          }
        }
      },
      "CollaborationDefinition": {
        "type": "object",
        "required": [
          "edge_id",
          "source_application_id",
          "target_application_id",
          "target_application_version_id",
          "scope",
          "capability",
          "purpose"
        ],
        "additionalProperties": false,
        "properties": {
          "edge_id": {
            "type": "string",
            "pattern": "^aedge_[a-f0-9]{32}$"
          },
          "source_application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "target_application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "target_application_version_id": {
            "type": "string",
            "pattern": "^aver_[a-f0-9]{32}$"
          },
          "scope": {
            "type": "string",
            "enum": [
              "company",
              "project"
            ]
          },
          "capability": {
            "type": "string",
            "enum": [
              "employee.query"
            ]
          },
          "purpose": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "target_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          }
        }
      },
      "ApplicationCollaborationMutation": {
        "type": "object",
        "required": [
          "workspace_id",
          "operation",
          "expected_revision",
          "expected_base",
          "idempotency_key"
        ],
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "project_id": {
            "type": "string"
          },
          "operation": {
            "type": "string",
            "enum": [
              "save",
              "publish",
              "rebase",
              "revoke",
              "adopt"
            ]
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "expected_base": {
            "type": "string"
          },
          "expected_published_revision": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "upsert": {
            "type": "array",
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/CollaborationDefinition"
            }
          },
          "remove": {
            "type": "array",
            "maxItems": 500,
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          },
          "reenable": {
            "type": "array",
            "maxItems": 500,
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          },
          "edge_id": {
            "type": "string"
          },
          "expected_epoch": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "disabled_edges": {
            "type": "array",
            "maxItems": 500,
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApplicationCollaborationEdgeView": {
        "type": "object",
        "required": [
          "edge_id",
          "source_application_id",
          "target_application_id",
          "target_application_version_id",
          "scope",
          "capability",
          "purpose",
          "source_name",
          "target_name",
          "epoch",
          "enabled"
        ],
        "properties": {
          "edge_id": {
            "type": "string"
          },
          "source_application_id": {
            "type": "string"
          },
          "target_application_id": {
            "type": "string"
          },
          "target_application_version_id": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "company",
              "project"
            ]
          },
          "capability": {
            "type": "string",
            "enum": [
              "employee.query"
            ]
          },
          "purpose": {
            "type": "string"
          },
          "target_binding_id": {
            "type": "string"
          },
          "source_name": {
            "type": "string"
          },
          "target_name": {
            "type": "string"
          },
          "epoch": {
            "type": "integer",
            "format": "int64"
          },
          "enabled": {
            "type": "boolean"
          },
          "reenable_pending": {
            "type": "boolean"
          },
          "effective": {
            "type": "boolean"
          }
        }
      },
      "ApplicationCollaborationView": {
        "type": "object",
        "required": [
          "active_revision_id",
          "publication_no",
          "draft_revision",
          "draft_base",
          "can_edit",
          "draft",
          "published"
        ],
        "properties": {
          "active_revision_id": {
            "type": "string"
          },
          "publication_no": {
            "type": "integer",
            "format": "int64"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "draft_base": {
            "type": "string"
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_test_subjects": {
            "type": "boolean"
          },
          "draft": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCollaborationEdgeView"
            }
          },
          "published": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCollaborationEdgeView"
            }
          },
          "adoption": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string"
              },
              "revision": {
                "type": "integer",
                "format": "int64"
              },
              "graph_revision_id": {
                "type": "string"
              },
              "disabled_edges": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "string"
                }
              },
              "changed_by": {
                "type": "integer",
                "format": "int64"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApplicationOrganizationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "org_unit_id": {
            "type": "string",
            "maxLength": 48,
            "description": "Omit for all visible entries; empty selects company-level entries."
          },
          "application_id": {
            "type": "string",
            "maxLength": 48
          },
          "cursor": {
            "type": "string",
            "maxLength": 100
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "ApplicationOrganizationMutation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "org_unit_id",
          "expected_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "pattern": "^app_[a-f0-9]{32}$"
          },
          "org_unit_id": {
            "type": "string",
            "maxLength": 48,
            "description": "Empty places the employee at company level."
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationOrganizationEntry": {
        "type": "object",
        "required": [
          "application_id",
          "name",
          "team_id",
          "org_unit_id",
          "org_unit_name",
          "org_unit_available",
          "revision",
          "can_edit"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "org_unit_id": {
            "type": "string"
          },
          "org_unit_name": {
            "type": "string"
          },
          "org_unit_available": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "can_edit": {
            "type": "boolean"
          }
        }
      },
      "ApplicationOrganizationPage": {
        "type": "object",
        "required": [
          "items",
          "can_place"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOrganizationEntry"
            }
          },
          "next_cursor": {
            "type": "string"
          },
          "can_place": {
            "type": "boolean"
          }
        }
      },
      "ApplicationMemoryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "scene"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "scene": {
            "type": "string",
            "enum": [
              "employee",
              "project",
              "direct"
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "manual",
              "automatic"
            ],
            "description": "Optional source selector; never an authorization grant."
          },
          "memory_id": {
            "type": "string"
          },
          "before": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "active_only": {
            "type": "boolean"
          },
          "view": {
            "type": "string",
            "enum": [
              "items",
              "timeline"
            ],
            "description": "List projection; omit for detail. Timeline includes changes to currently accessible non-deleted memories."
          }
        }
      },
      "ApplicationMemoryMutation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "scene",
          "expected_binding_revision_id",
          "idempotency_key",
          "operation"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "scene": {
            "type": "string",
            "enum": [
              "employee",
              "project",
              "direct"
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "manual",
              "automatic"
            ],
            "description": "Optional source selector; never an authorization grant."
          },
          "memory_id": {
            "type": "string"
          },
          "before": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "active_only": {
            "type": "boolean"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "expected_revision_id": {
            "type": "string"
          },
          "source_revision_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "operation": {
            "type": "string",
            "enum": [
              "save",
              "stop",
              "restore",
              "forget"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 120
          },
          "content": {
            "type": "string",
            "maxLength": 8000
          },
          "reason": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "ApplicationMemoryVersion": {
        "type": "object",
        "required": [
          "revision_id",
          "revision_no",
          "title",
          "content",
          "operation",
          "created_at"
        ],
        "properties": {
          "revision_id": {
            "type": "string"
          },
          "revision_no": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationMemory": {
        "type": "object",
        "required": [
          "memory_id",
          "scene",
          "status",
          "current"
        ],
        "properties": {
          "memory_id": {
            "type": "string"
          },
          "scene": {
            "type": "string"
          },
          "origin": {
            "type": "string",
            "enum": [
              "automatic"
            ]
          },
          "status": {
            "type": "string"
          },
          "current": {
            "$ref": "#/components/schemas/ApplicationMemoryVersion"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMemoryVersion"
            }
          },
          "next_history_cursor": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationMemoryPage": {
        "type": "object",
        "required": [
          "items",
          "can_edit"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMemory"
            }
          },
          "can_edit": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "integer",
            "format": "int64"
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "memory_id",
                "version"
              ],
              "properties": {
                "memory_id": {
                  "type": "string"
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "automatic"
                  ]
                },
                "version": {
                  "$ref": "#/components/schemas/ApplicationMemoryVersion"
                }
              }
            }
          }
        }
      },
      "ApplicationRecordCollection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "title",
          "schema",
          "read_scope"
        ],
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "schema": {
            "type": "object",
            "additionalProperties": true
          },
          "read_scope": {
            "type": "string",
            "enum": [
              "creator",
              "collaborators",
              "binding"
            ]
          }
        }
      },
      "ApplicationRecordIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          }
        }
      },
      "ApplicationRecordListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 40,
            "default": 20
          }
        }
      },
      "ApplicationRecordSaveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_revision",
          "idempotency_key",
          "data"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ApplicationRecordDeleteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationRecord": {
        "type": "object",
        "required": [
          "workspace_id",
          "application_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "revision",
          "read_scope",
          "created_by",
          "data",
          "created_at",
          "updated_at",
          "can_edit",
          "can_manage_access"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string"
          },
          "record_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "read_scope": {
            "type": "string",
            "enum": [
              "creator",
              "collaborators",
              "binding"
            ]
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_manage_access": {
            "type": "boolean"
          }
        }
      },
      "ApplicationRecordPage": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationRecord"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationRecordWriteResult": {
        "type": "object",
        "required": [
          "record_id",
          "revision",
          "deleted",
          "replayed"
        ],
        "properties": {
          "record_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "deleted": {
            "type": "boolean"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "ApplicationRecordCandidateListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 40,
            "default": 20
          }
        }
      },
      "ApplicationRecordGrantChangeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "user_id",
          "role",
          "active",
          "expected_grant_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "editor"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "expected_grant_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationRecordConfirmRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_revision",
          "kind",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "kind": {
            "type": "string",
            "enum": [
              "reviewed"
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationRecordConfirmationListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740990
          }
        }
      },
      "ApplicationRecordCandidate": {
        "type": "object",
        "required": [
          "user_id",
          "name"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApplicationRecordCandidatePage": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationRecordCandidate"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationRecordGrant": {
        "type": "object",
        "required": [
          "workspace_id",
          "application_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "user_id",
          "role",
          "active",
          "revision",
          "granted_by",
          "created_at",
          "updated_at",
          "name"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string"
          },
          "record_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "format": "int64"
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "editor"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "granted_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApplicationRecordGrantList": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationRecordGrant"
            }
          }
        }
      },
      "ApplicationRecordChannelPrincipalTargetListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          }
        }
      },
      "ApplicationRecordChannelPrincipalTarget": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "delegation_id",
          "delegation_revision",
          "provider",
          "connection_id",
          "identity_ref",
          "display_label",
          "first_seen_at",
          "publication_version_id",
          "application_version_id",
          "binding_revision_id",
          "installation_id",
          "installation_name"
        ],
        "properties": {
          "delegation_id": {
            "type": "string",
            "pattern": "^acpd_[0-9a-f]{32}$"
          },
          "delegation_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "provider": {
            "type": "string",
            "enum": [
              "feishu",
              "dingtalk",
              "wecom_intelligent_bot"
            ]
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "identity_ref": {
            "type": "string",
            "pattern": "^chi_[0-9a-f]{32}$",
            "description": "Internal observed identity reference. Never a provider account ID."
          },
          "display_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "description": "Masked label for the observed identity."
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "publication_version_id": {
            "type": "string",
            "pattern": "^pver_[0-9a-f]{32}$"
          },
          "application_version_id": {
            "type": "string",
            "pattern": "^aver_[0-9a-f]{32}$"
          },
          "binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "installation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "installation_name": {
            "type": "string",
            "maxLength": 120
          }
        }
      },
      "ApplicationRecordChannelPrincipalTargetPage": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalTarget"
            }
          }
        }
      },
      "ApplicationRecordChannelPrincipalGrantListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalTargetListRequest"
          }
        ]
      },
      "ApplicationRecordChannelPrincipalGrantRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision",
          "delegation_id",
          "delegation_revision",
          "publication_version_id",
          "application_version_id",
          "binding_revision_id",
          "confirm_share",
          "expected_grant_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "delegation_id": {
            "type": "string",
            "pattern": "^acpd_[0-9a-f]{32}$"
          },
          "delegation_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "publication_version_id": {
            "type": "string",
            "pattern": "^pver_[0-9a-f]{32}$"
          },
          "application_version_id": {
            "type": "string",
            "pattern": "^aver_[0-9a-f]{32}$"
          },
          "binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "confirm_share": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Explicit confirmation by the authenticated record owner."
          },
          "expected_grant_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationRecordChannelPrincipalGrantRevokeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision",
          "grant_id",
          "expected_grant_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "grant_id": {
            "type": "string",
            "pattern": "^acprg_[0-9a-f]{32}$"
          },
          "expected_grant_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationRecordChannelPrincipalGrant": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "grant_id",
          "provider",
          "connection_id",
          "identity_ref",
          "delegation_id",
          "delegation_revision",
          "publication_version_id",
          "application_version_id",
          "binding_revision_id",
          "record_revision",
          "active",
          "revision",
          "stale",
          "granted_at"
        ],
        "properties": {
          "grant_id": {
            "type": "string",
            "pattern": "^acprg_[0-9a-f]{32}$"
          },
          "provider": {
            "type": "string",
            "enum": [
              "feishu",
              "dingtalk",
              "wecom_intelligent_bot"
            ]
          },
          "connection_id": {
            "type": "string"
          },
          "identity_ref": {
            "type": "string",
            "pattern": "^chi_[0-9a-f]{32}$"
          },
          "display_label": {
            "type": "string",
            "maxLength": 160,
            "description": "Masked label; omitted when the identity is no longer currently observable."
          },
          "delegation_id": {
            "type": "string",
            "pattern": "^acpd_[0-9a-f]{32}$"
          },
          "delegation_revision": {
            "type": "integer",
            "format": "int64"
          },
          "publication_version_id": {
            "type": "string",
            "pattern": "^pver_[0-9a-f]{32}$"
          },
          "application_version_id": {
            "type": "string",
            "pattern": "^aver_[0-9a-f]{32}$"
          },
          "binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "record_revision": {
            "type": "integer",
            "format": "int64"
          },
          "active": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "stale": {
            "type": "boolean"
          },
          "granted_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "ApplicationRecordChannelPrincipalGrantPage": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrant"
            }
          }
        }
      },
      "ApplicationRecordChannelPrincipalGrantResult": {
        "type": "object",
        "required": [
          "grant",
          "replayed"
        ],
        "properties": {
          "grant": {
            "$ref": "#/components/schemas/ApplicationRecordChannelPrincipalGrant"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "ApplicationMeetingNativeActionTargetsRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "enum": [
              "meetings"
            ]
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          }
        }
      },
      "ApplicationMeetingNativeActionListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApplicationMeetingNativeActionTargetsRequest"
          }
        ]
      },
      "ApplicationMeetingNativeActionExecuteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision",
          "plan_action_index",
          "publication_binding_id",
          "publication_binding_version",
          "confirm",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "enum": [
              "meetings"
            ]
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "plan_action_index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 7
          },
          "publication_binding_id": {
            "type": "string",
            "pattern": "^(fpb|wpb|dtpb)_[0-9a-f]{32}$"
          },
          "publication_binding_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "start_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "end_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "assignee_user_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "attendee_user_ids": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          },
          "confirm": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Explicit confirmation by the current logged-in user."
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationMeetingNativeActionLifecycleRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision",
          "action_id",
          "expected_action_revision",
          "operation",
          "confirm",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "enum": [
              "meetings"
            ]
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "action_id": {
            "type": "string",
            "pattern": "^mact_[0-9a-f]{32}$"
          },
          "expected_action_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "operation": {
            "type": "string",
            "enum": [
              "update",
              "cancel",
              "retry_attendees"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "nullable": true
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "nullable": true
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "start_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "end_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "confirm": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Explicit confirmation by the current logged-in user."
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationMeetingNativeActionVerifyRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision",
          "action_id",
          "expected_action_revision",
          "operation",
          "confirm",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[0-9a-f]{32}$"
          },
          "collection": {
            "type": "string",
            "enum": [
              "meetings"
            ]
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "action_id": {
            "type": "string",
            "pattern": "^mact_[0-9a-f]{32}$"
          },
          "expected_action_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "operation": {
            "type": "string",
            "enum": [
              "verify"
            ]
          },
          "confirm": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationMeetingNativeActionTarget": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "publication_binding_id",
          "publication_binding_version",
          "publication_id",
          "publication_version_id",
          "application_version_id",
          "provider",
          "installation_id",
          "installation_name",
          "supports_self_task",
          "supports_self_event",
          "supports_self_meeting",
          "people"
        ],
        "properties": {
          "publication_binding_id": {
            "type": "string",
            "pattern": "^(fpb|wpb|dtpb)_[0-9a-f]{32}$"
          },
          "publication_binding_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "publication_id": {
            "type": "string",
            "pattern": "^pub_[0-9a-f]{32}$"
          },
          "publication_version_id": {
            "type": "string",
            "pattern": "^pver_[0-9a-f]{32}$"
          },
          "application_version_id": {
            "type": "string",
            "pattern": "^aver_[0-9a-f]{32}$"
          },
          "provider": {
            "type": "string",
            "enum": [
              "feishu",
              "wecom_intelligent_bot",
              "dingtalk"
            ]
          },
          "installation_id": {
            "type": "string",
            "maxLength": 40
          },
          "installation_name": {
            "type": "string",
            "maxLength": 100
          },
          "supports_self_task": {
            "type": "boolean"
          },
          "supports_self_event": {
            "type": "boolean"
          },
          "supports_self_meeting": {
            "type": "boolean"
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMeetingNativeActionPerson"
            }
          }
        }
      },
      "ApplicationMeetingNativeActionPerson": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user_id",
          "name",
          "current_user"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "current_user": {
            "type": "boolean"
          }
        }
      },
      "ApplicationMeetingNativeActionTargetsResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMeetingNativeActionTarget"
            }
          }
        }
      },
      "ApplicationMeetingNativeActionReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "action_id",
          "source_record_id",
          "source_record_revision",
          "source_snapshot_revision",
          "plan_command_id",
          "plan_action_index",
          "binding_revision_id",
          "application_version_id",
          "publication_binding_id",
          "publication_binding_version",
          "publication_id",
          "publication_version_id",
          "installation_id",
          "provider",
          "kind",
          "status",
          "action_revision",
          "operations",
          "stale",
          "replayed",
          "confirmed_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "action_id": {
            "type": "string",
            "pattern": "^mact_[0-9a-f]{32}$"
          },
          "source_record_id": {
            "type": "string"
          },
          "source_record_revision": {
            "type": "integer",
            "format": "int64"
          },
          "source_snapshot_revision": {
            "type": "integer",
            "format": "int64"
          },
          "plan_command_id": {
            "type": "string",
            "pattern": "^acmd_[0-9a-f]{32}$"
          },
          "plan_action_index": {
            "type": "integer",
            "minimum": 0
          },
          "binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[0-9a-f]{32}$"
          },
          "application_version_id": {
            "type": "string",
            "pattern": "^aver_[0-9a-f]{32}$"
          },
          "publication_binding_id": {
            "type": "string",
            "pattern": "^(fpb|wpb|dtpb)_[0-9a-f]{32}$"
          },
          "publication_binding_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "publication_id": {
            "type": "string",
            "pattern": "^pub_[0-9a-f]{32}$"
          },
          "publication_version_id": {
            "type": "string",
            "pattern": "^pver_[0-9a-f]{32}$"
          },
          "installation_id": {
            "type": "string",
            "maxLength": 40
          },
          "provider": {
            "type": "string",
            "enum": [
              "feishu",
              "wecom_intelligent_bot",
              "dingtalk"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "channel_create_task",
              "channel_create_event",
              "channel_create_meeting"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "partial",
              "uncertain"
            ]
          },
          "action_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "object_state": {
            "type": "string"
          },
          "provider_object_id": {
            "type": "string"
          },
          "provider_link": {
            "type": "string",
            "format": "uri"
          },
          "provider_calendar_id": {
            "type": "string"
          },
          "attendees_status": {
            "type": "string"
          },
          "attendee_count": {
            "type": "integer",
            "minimum": 0
          },
          "video_meeting_status": {
            "type": "string"
          },
          "safe_error_code": {
            "type": "string"
          },
          "requested_details": {
            "type": "object",
            "additionalProperties": true
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMeetingNativeActionOperationReceipt"
            }
          },
          "stale": {
            "type": "boolean"
          },
          "replayed": {
            "type": "boolean"
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationMeetingNativeActionOperationReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "operation_id",
          "operation",
          "status",
          "expected_revision",
          "result_revision",
          "replayed",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "operation_id": {
            "type": "string",
            "pattern": "^mop_[0-9a-f]{32}$"
          },
          "operation": {
            "type": "string",
            "enum": [
              "verify",
              "update",
              "cancel",
              "retry_attendees"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "partial",
              "uncertain"
            ]
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "result_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "object_state": {
            "type": "string"
          },
          "provider_link": {
            "type": "string",
            "format": "uri"
          },
          "safe_error_code": {
            "type": "string"
          },
          "requested_details": {
            "type": "object",
            "additionalProperties": true
          },
          "provider_snapshot": {
            "type": "object",
            "additionalProperties": true
          },
          "replayed": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationMeetingNativeActionListResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMeetingNativeActionReceipt"
            }
          }
        }
      },
      "ApplicationRecordConfirmation": {
        "type": "object",
        "required": [
          "confirmation_id",
          "workspace_id",
          "application_id",
          "participation_binding_id",
          "actor_id",
          "collection",
          "record_id",
          "record_revision",
          "kind",
          "created_at",
          "actor_name"
        ],
        "properties": {
          "confirmation_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "actor_id": {
            "type": "integer",
            "format": "int64"
          },
          "collection": {
            "type": "string"
          },
          "record_id": {
            "type": "string"
          },
          "record_revision": {
            "type": "integer",
            "format": "int64"
          },
          "kind": {
            "type": "string",
            "enum": [
              "reviewed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "actor_name": {
            "type": "string"
          }
        }
      },
      "ApplicationRecordConfirmationResult": {
        "type": "object",
        "required": [
          "confirmation",
          "replayed"
        ],
        "properties": {
          "confirmation": {
            "$ref": "#/components/schemas/ApplicationRecordConfirmation"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "ApplicationRecordConfirmationList": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationRecordConfirmation"
            }
          }
        }
      },
      "ApplicationBusinessActionCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_binding_revision_id",
          "expected_record_revision",
          "title",
          "description",
          "assignee_id",
          "auto_assign",
          "requires_acceptance",
          "notify_in_im",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "assignee_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "auto_assign": {
            "type": "boolean"
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "requires_acceptance": {
            "type": "boolean"
          },
          "notify_in_im": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationBusinessActionSuggestionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "collection",
          "record_id",
          "expected_record_revision",
          "title",
          "description"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "expected_record_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          }
        }
      },
      "ApplicationBusinessActionSuggestion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user_id",
          "name",
          "score",
          "reason",
          "matched_tags",
          "profile_revision",
          "im_configured"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "score": {
            "type": "integer",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          },
          "matched_tags": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "type": "string",
              "maxLength": 80
            }
          },
          "profile_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "im_configured": {
            "type": "boolean"
          }
        }
      },
      "ApplicationBusinessActionSuggestionResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "auto_assignable"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/ApplicationBusinessActionSuggestion"
            }
          },
          "auto_assignable": {
            "type": "boolean"
          }
        }
      },
      "ApplicationBusinessActionIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "action_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "action_id": {
            "type": "string"
          }
        }
      },
      "ApplicationBusinessActionListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string"
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string"
          },
          "source_collection": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "source_record_id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "assigned",
              "in_progress",
              "pending_acceptance",
              "completed",
              "cancelled"
            ]
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 40,
            "default": 20
          }
        }
      },
      "ApplicationBusinessActionTransitionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "action_id",
          "expected_revision",
          "transition",
          "completion_note",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "action_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "transition": {
            "type": "string",
            "enum": [
              "start",
              "complete",
              "accept",
              "return",
              "cancel"
            ]
          },
          "completion_note": {
            "type": "string",
            "maxLength": 4000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationBusinessAction": {
        "type": "object",
        "required": [
          "action_id",
          "workspace_id",
          "application_id",
          "participation_binding_id",
          "source_collection",
          "source_record_id",
          "source_revision",
          "title",
          "description",
          "assignee_id",
          "assignment_source",
          "assignment_profile_revision",
          "assignment_score",
          "assignment_reason",
          "created_by",
          "status",
          "revision",
          "requires_acceptance",
          "notify_in_im",
          "im_delivery_id",
          "im_delivery_status",
          "im_last_event",
          "completion_note",
          "created_at",
          "updated_at",
          "application_name",
          "assignee_name",
          "created_by_name",
          "scope_type",
          "scope_id",
          "scope_name",
          "source_readable",
          "can_start",
          "can_complete",
          "can_accept",
          "can_return",
          "can_cancel"
        ],
        "properties": {
          "action_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "source_collection": {
            "type": "string"
          },
          "source_record_id": {
            "type": "string"
          },
          "source_revision": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "assignee_id": {
            "type": "integer",
            "format": "int64"
          },
          "assignment_source": {
            "type": "string",
            "enum": [
              "manual",
              "responsibility_profile"
            ]
          },
          "assignment_profile_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "assignment_score": {
            "type": "integer",
            "minimum": 0
          },
          "assignment_reason": {
            "type": "string",
            "maxLength": 500
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "enum": [
              "assigned",
              "in_progress",
              "pending_acceptance",
              "completed",
              "cancelled"
            ]
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "requires_acceptance": {
            "type": "boolean"
          },
          "notify_in_im": {
            "type": "boolean"
          },
          "im_delivery_id": {
            "type": "string",
            "maxLength": 48
          },
          "im_delivery_status": {
            "type": "string",
            "enum": [
              "disabled",
              "pending",
              "not_configured",
              "unavailable",
              "failed",
              "accepted",
              "failed_retryable",
              "failed_permanent",
              "uncertain",
              "sending"
            ]
          },
          "im_last_event": {
            "type": "string",
            "maxLength": 32
          },
          "completion_note": {
            "type": "string"
          },
          "completed_by": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "accepted_by": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "application_name": {
            "type": "string"
          },
          "assignee_name": {
            "type": "string"
          },
          "created_by_name": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "scope_id": {
            "type": "string"
          },
          "scope_name": {
            "type": "string"
          },
          "source_readable": {
            "type": "boolean"
          },
          "can_start": {
            "type": "boolean"
          },
          "can_complete": {
            "type": "boolean"
          },
          "can_accept": {
            "type": "boolean"
          },
          "can_return": {
            "type": "boolean"
          },
          "can_cancel": {
            "type": "boolean"
          }
        }
      },
      "ApplicationBusinessActionPage": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationBusinessAction"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationDatasetRef": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "__type",
          "ref_version",
          "dataset_id",
          "dataset_version"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "dataset_ref"
            ]
          },
          "ref_version": {
            "type": "string",
            "enum": [
              "v1"
            ]
          },
          "dataset_id": {
            "type": "string",
            "pattern": "^ds_[a-f0-9]{32}$"
          },
          "dataset_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "ApplicationKnowledgeSlot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "title",
          "executor",
          "knowledge_base_id"
        ],
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "executor": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "ApplicationDatasetSlot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "title",
          "executor",
          "binding_key",
          "dataset_ref"
        ],
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "executor": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "binding_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "dataset_ref": {
            "$ref": "#/components/schemas/ApplicationDatasetRef"
          }
        }
      },
      "ApplicationKnowledgeMapping": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slot_key",
          "knowledge_base_id"
        ],
        "properties": {
          "slot_key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "ApplicationDatasetMapping": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slot_key",
          "dataset_ref",
          "column_mappings"
        ],
        "properties": {
          "slot_key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
          },
          "dataset_ref": {
            "$ref": "#/components/schemas/ApplicationDatasetRef"
          },
          "column_mappings": {
            "type": "object",
            "maxProperties": 1024,
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          }
        }
      },
      "ApplicationIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          }
        }
      },
      "ApplicationDeleteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_revision"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "ApplicationCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "name",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "team_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$",
            "description": "Optional home Team; omitted for unaffiliated drafts. Historical applications are not guessed."
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationTeamAffiliateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "team_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "LayerRepresentativeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "layer_kind",
          "layer_id",
          "application_id",
          "active",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "layer_kind": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project",
              "application"
            ]
          },
          "layer_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "LayerRepresentativeListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "layer_kind": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project",
              "application"
            ]
          },
          "layer_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "LayerRepresentativeBinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "representative_binding_id",
          "workspace_id",
          "layer_kind",
          "layer_id",
          "application_id",
          "status",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "representative_binding_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "layer_kind": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project",
              "application"
            ]
          },
          "layer_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LayerRepresentativeList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LayerRepresentativeBinding"
            }
          }
        }
      },
      "ApplicationBindingListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "description": "Scope fields must be supplied together. Omission preserves workspace-only listing; explicit space selection is authorized and filtered before pagination.",
        "properties": {
          "management": {
            "type": "boolean",
            "default": false,
            "description": "Requires unified management permission; includes disabled bindings for configuration without granting runtime membership."
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "workspace",
              "team",
              "project"
            ]
          },
          "scope_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "ApplicationListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "ApplicationDraftRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_revision",
          "name",
          "manifest"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "release_defaults": {
            "$ref": "#/components/schemas/ApplicationReleaseDefaults"
          }
        }
      },
      "ApplicationValidateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "draft_revision"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "ApplicationPublishRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "draft_revision",
          "validation_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "validation_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "release_note": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "ApplicationVersionListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "before_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "Application": {
        "type": "object",
        "required": [
          "application_id",
          "workspace_id",
          "name",
          "created_by",
          "draft_revision",
          "draft_manifest",
          "current_version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "draft_manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "release_defaults": {
            "$ref": "#/components/schemas/ApplicationReleaseDefaults"
          },
          "current_version": {
            "type": "integer",
            "format": "int64",
            "description": "Definition version only; zero means unpublished"
          },
          "team_id": {
            "type": "string",
            "description": "Home Team space ID; empty when unaffiliated"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationAgentResourceSource": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "agent_id",
          "agent_release_id",
          "release_version",
          "name"
        ],
        "properties": {
          "agent_id": {
            "type": "integer",
            "format": "int64"
          },
          "agent_release_id": {
            "type": "integer",
            "format": "int64"
          },
          "release_version": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApplicationAgentResourceItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "resource_id",
          "version",
          "name",
          "description",
          "detail",
          "sources"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceSource"
            }
          }
        }
      },
      "ApplicationAgentResourceInventory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "agents",
          "workflows",
          "knowledge_bases",
          "datasets",
          "tools",
          "skills"
        ],
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceSource"
            }
          },
          "workflows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceItem"
            }
          },
          "knowledge_bases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceItem"
            }
          },
          "datasets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceItem"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceItem"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationAgentResourceItem"
            }
          }
        }
      },
      "ApplicationDependency": {
        "type": "object",
        "required": [
          "reference",
          "digest"
        ],
        "properties": {
          "reference": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "digest": {
            "type": "string"
          }
        }
      },
      "ApplicationVersion": {
        "type": "object",
        "required": [
          "version_id",
          "workspace_id",
          "application_id",
          "version",
          "draft_revision",
          "manifest",
          "dependencies",
          "digest",
          "release_note",
          "created_by",
          "created_at"
        ],
        "properties": {
          "version_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationDependency"
            }
          },
          "digest": {
            "type": "string"
          },
          "release_note": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationValidation": {
        "type": "object",
        "required": [
          "validation_id",
          "workspace_id",
          "application_id",
          "draft_revision",
          "draft_digest",
          "dependencies",
          "checks",
          "publishable",
          "created_by",
          "created_at"
        ],
        "properties": {
          "validation_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "draft_digest": {
            "type": "string"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationDependency"
            }
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "path"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "message": {
                  "type": "string",
                  "description": "Optional safe field validation detail"
                }
              }
            }
          },
          "publishable": {
            "type": "boolean"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationList": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationCatalogItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application_id",
          "name",
          "current_version",
          "version_sequence",
          "version_label",
          "version_id",
          "manifest",
          "published_at"
        ],
        "properties": {
          "core_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Core capabilities of the pinned primary Agent release"
          },
          "application_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "current_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "version_sequence": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Internal immutable sequence used for optimistic and relational consistency"
          },
          "version_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "Public digital employee release label"
          },
          "version_id": {
            "type": "string"
          },
          "release_note": {
            "type": "string",
            "maxLength": 1000
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationCatalogList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCatalogItem"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationVersionSnapshot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version_id",
          "version_sequence",
          "version_label",
          "name",
          "manifest",
          "published_at"
        ],
        "properties": {
          "core_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Core capabilities of the pinned primary Agent release"
          },
          "version_id": {
            "type": "string"
          },
          "version_sequence": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Internal immutable version sequence"
          },
          "version_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "Public digital employee release label"
          },
          "release_note": {
            "type": "string",
            "maxLength": 1000
          },
          "name": {
            "type": "string"
          },
          "manifest": {
            "$ref": "#/components/schemas/ApplicationManifest"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationUserInstallationBinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deployment_id",
          "participation_binding_id",
          "participation_binding_revision_id"
        ],
        "properties": {
          "deployment_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          }
        }
      },
      "ApplicationUserInstallation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "installation_id",
          "revision",
          "application_id",
          "installed_version",
          "latest_version",
          "update_available",
          "personal_binding",
          "linked_project_count"
        ],
        "properties": {
          "installation_id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "application_id": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "maxLength": 100
          },
          "installed_version": {
            "$ref": "#/components/schemas/ApplicationVersionSnapshot"
          },
          "latest_version": {
            "$ref": "#/components/schemas/ApplicationVersionSnapshot"
          },
          "update_available": {
            "type": "boolean"
          },
          "personal_binding": {
            "$ref": "#/components/schemas/ApplicationUserInstallationBinding"
          },
          "linked_project_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ApplicationUserInstallationList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationUserInstallation"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationUserInstallationListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "ApplicationUserInstallationInstallRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "maxLength": 100
          },
          "existing_participation_binding_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationUserInstallationUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "installation_id",
          "expected_revision",
          "expected_current_version_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "installation_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expected_current_version_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationUserInstallationProjectActivateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "installation_id",
          "project_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "installation_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationUserInstallationProject": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "installation_id",
          "project_id",
          "participation_binding_id",
          "participation_binding_revision_id",
          "active"
        ],
        "properties": {
          "installation_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "ApplicationVersionList": {
        "type": "object",
        "required": [
          "items",
          "next_before_version"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationVersion"
            }
          },
          "next_before_version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationResourceGrantRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "source_kind",
          "source_id",
          "source_version",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "source_kind": {
            "type": "string",
            "enum": [
              "agent",
              "workflow"
            ]
          },
          "source_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "source_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationResourceGrantListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          }
        }
      },
      "ApplicationResourceGrant": {
        "type": "object",
        "required": [
          "workspace_id",
          "application_id",
          "source_kind",
          "source_id",
          "source_version",
          "status",
          "granted_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "source_kind": {
            "type": "string"
          },
          "source_id": {
            "type": "string"
          },
          "source_version": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "granted_by": {
            "type": "integer",
            "format": "int64"
          },
          "revoked_by": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "revoked_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationResourceGrantList": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationResourceGrant"
            }
          }
        }
      },
      "ApplicationSourceUpdatePreviewRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          }
        }
      },
      "ApplicationSourceUpdateItem": {
        "type": "object",
        "required": [
          "reference",
          "target_version",
          "affected_capabilities",
          "content_changed",
          "schema_breaking",
          "compatibility",
          "incompatible",
          "detail"
        ],
        "properties": {
          "reference": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "target_version": {
            "type": "integer",
            "format": "int64"
          },
          "affected_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "content_changed": {
            "type": "boolean"
          },
          "schema_breaking": {
            "type": "boolean"
          },
          "compatibility": {
            "type": "string",
            "enum": [
              "unconfirmed",
              "schema_breaking"
            ]
          },
          "incompatible": {
            "type": "boolean",
            "description": "True only when input/output schema breaking is proven"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "ApplicationPinnedLocation": {
        "type": "object",
        "required": [
          "participation_binding_id",
          "scope_type",
          "scope_id",
          "application_version_id",
          "deployment_revision_id",
          "enabled"
        ],
        "properties": {
          "participation_binding_id": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "scope_id": {
            "type": "string"
          },
          "application_version_id": {
            "type": "string"
          },
          "deployment_revision_id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "ApplicationSourceUpdatePreview": {
        "type": "object",
        "required": [
          "application_id",
          "draft_revision",
          "current_version",
          "updates",
          "pinned_locations"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "draft_revision": {
            "type": "integer",
            "format": "int64"
          },
          "current_version": {
            "type": "integer",
            "format": "int64"
          },
          "updates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationSourceUpdateItem"
            }
          },
          "pinned_locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationPinnedLocation"
            }
          }
        }
      },
      "ApplicationConfirmSourceUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_revision",
          "replacements",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "replacements": {
            "type": "array",
            "minItems": 1,
            "maxItems": 32,
            "items": {
              "$ref": "#/components/schemas/ApplicationRuntimeRef"
            }
          },
          "release_note": {
            "type": "string",
            "maxLength": 1000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "JsonObject": {
        "type": "object",
        "additionalProperties": true
      },
      "SuccessEnvelope": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "status": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "data": {}
        }
      },
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "status": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error": {},
          "data": {},
          "request_id": {
            "type": "string"
          }
        }
      },
      "PageRequest": {
        "type": "object",
        "properties": {
          "before_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          }
        }
      },
      "ToolDefinitionIdentityRequest": {
        "type": "object",
        "required": [
          "plugin_key"
        ],
        "properties": {
          "plugin_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "additionalProperties": false
      },
      "HTTPToolDefinitionListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "$ref": "#/components/schemas/ToolDefinitionStatus"
              }
            }
          }
        ]
      },
      "HTTPToolParameter": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "type": {
            "type": "string",
            "maxLength": 80,
            "default": "string",
            "description": "Supported types: string, integer, number, boolean, array, object."
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "value": {
            "type": "string",
            "description": "Non-secret default. Non-string types use JSON text (for example 3, true, or [\"A\",\"B\"]). Defaults are applied before execution validation; schema mode does not apply JSON Schema defaults."
          }
        },
        "additionalProperties": false
      },
      "HTTPToolRequestMapping": {
        "type": "object",
        "required": [
          "source",
          "location",
          "name"
        ],
        "properties": {
          "source": {
            "type": "string",
            "maxLength": 1024,
            "description": "RFC 6901 pointer into tool input, such as /filter/ids. Empty string selects the entire input."
          },
          "location": {
            "type": "string",
            "enum": [
              "query",
              "body"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 256,
            "description": "Query key or top-level JSON body key. Empty name selects the entire body; cannot be mixed with other body mappings."
          },
          "encoding": {
            "type": "string",
            "enum": [
              "scalar",
              "json",
              "repeat"
            ],
            "description": "Query defaults to scalar. repeat sends an array as repeated keys; json encodes one JSON value. Body always preserves JSON types."
          },
          "required": {
            "type": "boolean",
            "default": false,
            "description": "Fail if the source pointer is absent; otherwise omit that destination. Null is a present JSON value."
          }
        },
        "additionalProperties": false
      },
      "HTTPToolHeaderInput": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "value": {
            "type": "string",
            "description": "Requester-supplied value. Sensitive values are write-only."
          },
          "sensitive": {
            "type": "boolean",
            "default": false
          }
        },
        "additionalProperties": false
      },
      "HTTPToolHeader": {
        "type": "object",
        "required": [
          "name",
          "sensitive",
          "configured"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string",
            "description": "Omitted when the stored header is sensitive."
          },
          "sensitive": {
            "type": "boolean"
          },
          "configured": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "HTTPToolCredentialAction": {
        "type": "string",
        "enum": [
          "keep",
          "replace",
          "clear"
        ],
        "description": "Explicit edit intent for write-only credential headers."
      },
      "HTTPToolMethod": {
        "type": "string",
        "enum": [
          "GET",
          "POST",
          "PUT",
          "PATCH",
          "DELETE"
        ]
      },
      "ToolDefinitionStatus": {
        "type": "string",
        "enum": [
          "ready"
        ]
      },
      "HTTPToolDefinitionSaveRequest": {
        "type": "object",
        "required": [
          "name",
          "method",
          "url"
        ],
        "properties": {
          "plugin_key": {
            "type": "string",
            "maxLength": 160,
            "description": "Omit when creating a definition."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "method": {
            "$ref": "#/components/schemas/HTTPToolMethod"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 2048
          },
          "params": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/HTTPToolParameter"
            }
          },
          "input_schema": {
            "type": "object",
            "additionalProperties": true,
            "description": "Full JSON Schema 2020-12 with object root and local references, at most 16 KiB. Omit/empty for simple params; nonempty input_schema and params are mutually exclusive."
          },
          "output_schema": {
            "type": "object",
            "additionalProperties": true,
            "description": "Full response envelope schema (status_code, headers, body, raw_body), at most 16 KiB. Customize body and local definitions; omit/empty for the standard unrestricted body."
          },
          "request_mapping": {
            "type": "array",
            "maxItems": 64,
            "items": {
              "$ref": "#/components/schemas/HTTPToolRequestMapping"
            },
            "description": "Separate HTTP mapping, available with input_schema. GET/DELETE allow query only. No mappings means direct input keys to query or a JSON body. URL/method/headers/credentials remain fixed."
          },
          "headers": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/HTTPToolHeaderInput"
            }
          },
          "credential_action": {
            "$ref": "#/components/schemas/HTTPToolCredentialAction"
          },
          "status": {
            "$ref": "#/components/schemas/ToolDefinitionStatus"
          }
        },
        "additionalProperties": false
      },
      "HTTPToolDefinitionTestRequest": {
        "type": "object",
        "required": [
          "definition"
        ],
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/HTTPToolDefinitionSaveRequest"
          },
          "input": {
            "$ref": "#/components/schemas/JsonObject"
          }
        },
        "additionalProperties": false
      },
      "HTTPToolDefinitionSummary": {
        "type": "object",
        "required": [
          "plugin_key",
          "name",
          "description",
          "method",
          "url",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "plugin_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ToolDefinitionStatus"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "HTTPToolDefinition": {
        "type": "object",
        "required": [
          "plugin_key",
          "name",
          "description",
          "method",
          "url",
          "params",
          "headers",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "plugin_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "params": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HTTPToolParameter"
            }
          },
          "input_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "output_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "request_mapping": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HTTPToolRequestMapping"
            }
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HTTPToolHeader"
            }
          },
          "status": {
            "$ref": "#/components/schemas/ToolDefinitionStatus"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "MCPToolDefinitionListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "$ref": "#/components/schemas/ToolDefinitionStatus"
              }
            }
          }
        ]
      },
      "MCPToolTransport": {
        "type": "string",
        "enum": [
          "streamableHttp"
        ]
      },
      "MCPToolServer": {
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/MCPToolTransport"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "additionalProperties": false
      },
      "MCPToolServerConfig": {
        "type": "object",
        "required": [
          "mcpServers"
        ],
        "properties": {
          "mcpServers": {
            "type": "object",
            "minProperties": 1,
            "maxProperties": 1,
            "additionalProperties": {
              "$ref": "#/components/schemas/MCPToolServer"
            }
          }
        },
        "additionalProperties": false
      },
      "MCPToolDefinitionSaveRequest": {
        "type": "object",
        "required": [
          "name",
          "server_config"
        ],
        "properties": {
          "plugin_key": {
            "type": "string",
            "maxLength": 160,
            "description": "Omit when creating a definition."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "server_config": {
            "$ref": "#/components/schemas/MCPToolServerConfig"
          },
          "status": {
            "$ref": "#/components/schemas/ToolDefinitionStatus"
          }
        },
        "additionalProperties": false
      },
      "MCPToolSnapshot": {
        "type": "object",
        "required": [
          "name",
          "inputSchema"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "outputSchema": {},
          "annotations": {},
          "icons": {}
        },
        "additionalProperties": false
      },
      "MCPToolDefinitionSummary": {
        "type": "object",
        "required": [
          "plugin_key",
          "name",
          "description",
          "tool_count",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "plugin_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tool_count": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "$ref": "#/components/schemas/ToolDefinitionStatus"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "MCPToolDefinition": {
        "type": "object",
        "required": [
          "plugin_key",
          "name",
          "description",
          "server_config",
          "tools_snapshot",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "plugin_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "server_config": {
            "$ref": "#/components/schemas/MCPToolServerConfig"
          },
          "tools_snapshot": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MCPToolSnapshot"
            }
          },
          "tools_refreshed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ToolDefinitionStatus"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WorkflowIdentityRequest": {
        "type": "object",
        "required": [
          "workflow_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "workflow_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "WorkflowCreateRequest": {
        "$ref": "#/components/schemas/WorkflowConfigurationRequest"
      },
      "WorkflowConfigurationRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "contract_version": {
            "type": "integer",
            "enum": [
              2
            ],
            "default": 2
          },
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "canvas_metadata": {
            "$ref": "#/components/schemas/JsonObject"
          }
        }
      },
      "WorkflowUpdateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WorkflowConfigurationRequest"
          },
          {
            "type": "object",
            "required": [
              "workflow_id"
            ],
            "properties": {
              "workflow_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "expected_edit_revision": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        ]
      },
      "WorkflowListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "maxLength": 100
              }
            }
          }
        ]
      },
      "WorkflowSearchRequest": {
        "type": "object",
        "required": [
          "query"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          }
        }
      },
      "WorkflowRunRequest": {
        "type": "object",
        "required": [
          "workflow_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "workflow_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "trigger_type": {
            "type": "string",
            "maxLength": 50
          },
          "request_id": {
            "type": "string",
            "maxLength": 200
          },
          "stream": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "WorkflowRunIdentityRequest": {
        "type": "object",
        "required": [
          "workflow_run_id"
        ],
        "properties": {
          "workflow_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "WorkflowRunDetailRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WorkflowRunIdentityRequest"
          },
          {
            "type": "object",
            "properties": {
              "include_definition_snapshot": {
                "type": "boolean",
                "default": false,
                "description": "Read the exact immutable publication after current definition-read authorization. Omitted for ordinary status polls."
              }
            }
          }
        ]
      },
      "WorkflowRunListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "maxLength": 100
              },
              "workflow_id": {
                "type": "string",
                "maxLength": 100
              },
              "status": {
                "type": "string",
                "maxLength": 50
              }
            }
          }
        ]
      },
      "WorkflowToolOperation": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "setWorkflowMetadata",
              "addNode",
              "updateNodeConfig",
              "updateNode",
              "renameNode",
              "setNodeParameter",
              "removeNode",
              "addConnection",
              "removeConnection",
              "setNodePosition",
              "setWorkflowInputs",
              "setWorkflowOutputs"
            ]
          },
          "node_id": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "node_type": {
            "type": "string"
          },
          "node_version": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "value": {},
          "from_node_id": {
            "type": "string"
          },
          "to_node_id": {
            "type": "string"
          },
          "config": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "fields": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "position": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          }
        }
      },
      "WorkflowToolUpdateRequest": {
        "type": "object",
        "required": [
          "workflow_id",
          "operations"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "workflow_id": {
            "type": "string",
            "minLength": 1
          },
          "version_token": {
            "type": "string",
            "maxLength": 500
          },
          "operations": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/WorkflowToolOperation"
            }
          }
        }
      },
      "WorkflowToolUpdateApplyRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WorkflowToolUpdateRequest"
          },
          {
            "type": "object",
            "required": [
              "confirm",
              "idempotency_key"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            }
          }
        ]
      },
      "WorkflowStartRefUploadRequest": {
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          },
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "workflow_id": {
            "type": "string",
            "maxLength": 100
          },
          "node_id": {
            "type": "string",
            "maxLength": 100
          },
          "input_key": {
            "type": "string",
            "maxLength": 100
          },
          "metadata": {
            "type": "string",
            "description": "JSON object encoded as a string"
          }
        }
      },
      "Workflow": {
        "type": "object",
        "required": [
          "id",
          "workflow_id",
          "workspace_id",
          "name",
          "edit_revision",
          "contract_version"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workflow_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "edit_revision": {
            "type": "integer"
          },
          "contract_version": {
            "type": "integer"
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "nodes": {
            "type": "array",
            "items": {}
          },
          "edges": {
            "type": "array",
            "items": {}
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "canvas_metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "published_snapshot_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "published_version": {
            "type": "integer"
          },
          "has_published_snapshot": {
            "type": "boolean"
          },
          "has_unpublished_changes": {
            "type": "boolean"
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_save": {
            "type": "boolean"
          },
          "can_publish": {
            "type": "boolean"
          },
          "can_run": {
            "type": "boolean"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "WorkflowList": {
        "type": "object",
        "required": [
          "workflows",
          "has_more"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "workflows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workflow"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_before_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "WorkflowRunBase": {
        "type": "object",
        "required": [
          "workflow_run_id",
          "workflow_id",
          "workspace_id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workflow_run_id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "workflow_version": {
            "type": "integer"
          },
          "workflow_snapshot_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "trigger_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "node_runs": {
            "type": "array",
            "items": {}
          },
          "node_outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "usage": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "error": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkflowRun": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WorkflowRunBase"
          },
          {
            "type": "object",
            "properties": {
              "definition_snapshot": {
                "$ref": "#/components/schemas/WorkflowRunDefinitionSnapshotView"
              },
              "interpretation": {
                "$ref": "#/components/schemas/WorkflowRunInterpretation"
              },
              "sub_workflow_runs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowSubRun"
                }
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "WorkflowRunDefinitionSnapshotView": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "available",
              "unavailable"
            ]
          },
          "definition": {
            "$ref": "#/components/schemas/WorkflowRunDefinitionSnapshot"
          }
        },
        "additionalProperties": false
      },
      "WorkflowRunDefinitionSnapshot": {
        "type": "object",
        "required": [
          "workflow_snapshot_id",
          "workflow_version",
          "workspace_id",
          "workflow_id",
          "contract_version",
          "source_edit_revision",
          "inputs",
          "nodes",
          "edges",
          "outputs",
          "canvas_metadata"
        ],
        "properties": {
          "workflow_snapshot_id": {
            "type": "integer",
            "format": "int64"
          },
          "workflow_version": {
            "type": "integer"
          },
          "workspace_id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "contract_version": {
            "type": "integer",
            "enum": [
              2
            ]
          },
          "source_edit_revision": {
            "type": "integer"
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "nodes": {
            "type": "array",
            "items": {}
          },
          "edges": {
            "type": "array",
            "items": {}
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "canvas_metadata": {
            "$ref": "#/components/schemas/JsonObject"
          }
        },
        "additionalProperties": false
      },
      "WorkflowSubRun": {
        "type": "object",
        "required": [
          "workflow_run_id",
          "workflow_id",
          "workflow_version",
          "status"
        ],
        "properties": {
          "workflow_run_id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "workflow_version": {
            "type": "integer"
          },
          "workflow_snapshot_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "cancellation_kind": {
            "type": "string",
            "enum": [
              "user_cancelled",
              "ancestor_cancelled",
              "unknown_cancelled"
            ]
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "error": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WorkflowRunListItem": {
        "type": "object",
        "required": [
          "id",
          "workflow_run_id",
          "workflow_id",
          "workspace_id",
          "workflow_version",
          "workflow_snapshot_id",
          "trigger_type",
          "status",
          "current_execution_epoch",
          "inputs",
          "outputs",
          "usage",
          "error",
          "created_by",
          "started_at",
          "ended_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workflow_run_id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "workflow_version": {
            "type": "integer"
          },
          "workflow_snapshot_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "trigger_type": {
            "type": "string"
          },
          "rerun_of_workflow_run_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "current_execution_epoch": {
            "type": "integer"
          },
          "inputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "outputs": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "usage": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "error": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WorkflowRunList": {
        "type": "object",
        "required": [
          "runs",
          "has_more"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowRunListItem"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_before_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "WorkflowRunInterpretation": {
        "type": "object",
        "required": [
          "interpretation_version",
          "effective_status",
          "terminal",
          "available_actions"
        ],
        "properties": {
          "interpretation_version": {
            "type": "string",
            "enum": [
              "workflow_run_interpretation_v1"
            ]
          },
          "effective_status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "waiting",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "terminal": {
            "type": "boolean"
          },
          "available_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowRunActionSuggestion"
            }
          },
          "failure_kind": {
            "type": "string",
            "enum": [
              "retryable_execution_failed",
              "non_retryable_failed"
            ]
          },
          "cancellation_kind": {
            "type": "string",
            "enum": [
              "user_cancelled",
              "unknown_cancelled"
            ]
          },
          "waiting_kind": {
            "type": "string",
            "enum": [
              "human_task_pending",
              "human_task_timeout_submitted"
            ]
          }
        },
        "additionalProperties": false
      },
      "WorkflowRunActionSuggestion": {
        "type": "object",
        "required": [
          "action_type"
        ],
        "properties": {
          "action_type": {
            "type": "string",
            "enum": [
              "cancel",
              "rerun",
              "retry_failed"
            ]
          }
        },
        "additionalProperties": false
      },
      "AgentIdentityRequest": {
        "type": "object",
        "required": [
          "agent_id"
        ],
        "properties": {
          "agent_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "AgentCreateRequest": {
        "$ref": "#/components/schemas/AgentConfigurationRequest"
      },
      "AgentConfigurationRequest": {
        "type": "object",
        "required": [
          "name",
          "system_prompt",
          "llm_config_id"
        ],
        "properties": {
          "web_search_enabled": {
            "type": "boolean",
            "description": "Allow the Agent to search and read public web pages. Defaults to false on create; omission preserves the current value on update."
          },
          "workspace_id": {
            "type": "string",
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "description": {
            "type": "string"
          },
          "system_prompt": {
            "type": "string",
            "minLength": 1
          },
          "knowledge_base_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "llm_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "model_overrides": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "structured_output": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "attachment_enhancement": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "presentation_config": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "plugin_config": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "dataset_bindings": {
            "type": "array",
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "workflow_bindings": {
            "type": "array",
            "nullable": true,
            "description": "Desired complete set of Workflow bindings. On update, omission or null keeps the current set; an empty array appends disabled versions for enabled bindings. A semantic change appends an immutable version. Binding identity, version and side effect are assigned by Go. The fixed published snapshot is checked again on save and publish; waiting or unknown capabilities are rejected. This field is independent of plugin_config.enabled. Read back the server result after saving.",
            "items": {
              "$ref": "#/components/schemas/AgentWorkflowBindingWriteRequest"
            }
          }
        }
      },
      "AgentUpdateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AgentConfigurationRequest"
          },
          {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "agent_id": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "status": {
                "type": "string",
                "maxLength": 50
              },
              "expected_config_revision": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        ]
      },
      "AgentListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "maxLength": 100
              },
              "status": {
                "type": "string",
                "maxLength": 50
              }
            }
          }
        ]
      },
      "AgentWorkflowBindingWriteRequest": {
        "type": "object",
        "required": [
          "workflow_id",
          "workflow_snapshot_id",
          "display_name",
          "confirmation_policy"
        ],
        "properties": {
          "workflow_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "workflow_snapshot_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Fixed published Workflow snapshot; never resolved to the latest snapshot."
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "User-facing Workflow tool name. The server derives the model-visible tool_name from the binding identity."
          },
          "enabled": {
            "type": "boolean",
            "nullable": true,
            "default": false,
            "description": "Omission or null is treated as false."
          },
          "confirmation_policy": {
            "type": "string",
            "enum": [
              "none",
              "required"
            ],
            "description": "Go derives side effect from the fixed snapshot. Non-idempotent writes require required; read-only and idempotent writes may use either policy."
          }
        },
        "additionalProperties": false
      },
      "AgentWorkflowBindingResponse": {
        "type": "object",
        "required": [
          "binding_id",
          "binding_version",
          "workflow_id",
          "workflow_snapshot_id",
          "display_name",
          "tool_name",
          "enabled",
          "side_effect",
          "confirmation_policy"
        ],
        "properties": {
          "binding_id": {
            "type": "string",
            "minLength": 1
          },
          "binding_version": {
            "type": "integer",
            "minimum": 1
          },
          "workflow_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "workflow_snapshot_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "tool_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9_-]+$"
          },
          "enabled": {
            "type": "boolean"
          },
          "side_effect": {
            "type": "string",
            "enum": [
              "read_only",
              "idempotent_write",
              "non_idempotent_write"
            ]
          },
          "confirmation_policy": {
            "type": "string",
            "enum": [
              "none",
              "required"
            ]
          }
        },
        "additionalProperties": false
      },
      "AgentPublishRequest": {
        "type": "object",
        "description": "Freezes the enabled Workflow binding references in the Agent Release. A later binding edit does not replace these references. Stale derived capability facts require a configuration update before publication; publishing never silently appends binding versions.",
        "required": [
          "agent_id",
          "expected_config_revision"
        ],
        "properties": {
          "agent_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expected_config_revision": {
            "type": "integer",
            "minimum": 1
          },
          "release_note": {
            "type": "string",
            "maxLength": 1000
          },
          "approval_request_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "AgentRunRequest": {
        "type": "object",
        "required": [
          "agent_id",
          "conversation_id",
          "user_input"
        ],
        "properties": {
          "idempotency_key": {
            "type": "string",
            "maxLength": 128
          },
          "agent_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "conversation_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "user_input": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "files": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "$ref": "#/components/schemas/FileRef"
            }
          },
          "debug_prompt_enabled": {
            "type": "boolean"
          },
          "run_mode": {
            "type": "string",
            "enum": [
              "debug",
              "published"
            ],
            "description": "Debug freezes the current enabled Workflow binding versions. Published freezes the selected Release references after checking that their latest logical bindings are still enabled. Existing Runs retain their assigned versions after later configuration changes."
          },
          "agent_release_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Existing Agent Release selected for published execution; not a Workflow snapshot ID."
          },
          "invocation_source": {
            "type": "string",
            "enum": [
              "web",
              "api",
              "workflow",
              "share",
              "channel"
            ],
            "description": "Workflow tools are assembled only for eligible authenticated top-level web or api Runs. Share, channel and workflow Runs receive no Workflow tools; a client-supplied source alone never grants execution authority."
          },
          "workflow_run_id": {
            "type": "string",
            "maxLength": 100
          },
          "workflow_node_id": {
            "type": "string",
            "maxLength": 100
          }
        }
      },
      "AgentRunIdentityRequest": {
        "type": "object",
        "required": [
          "run_id"
        ],
        "properties": {
          "run_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "AgentRunListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "agent_id": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "agent_release_id": {
                "type": "integer",
                "format": "int64",
                "minimum": 1
              },
              "invocation_source": {
                "type": "string",
                "enum": [
                  "web",
                  "api",
                  "workflow",
                  "share",
                  "channel"
                ]
              },
              "status": {
                "type": "string",
                "maxLength": 50
              }
            }
          }
        ]
      },
      "Agent": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "name",
          "status",
          "config_revision",
          "workflow_bindings"
        ],
        "properties": {
          "web_search_enabled": {
            "type": "boolean",
            "default": false
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workspace_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "system_prompt": {
            "type": "string"
          },
          "knowledge_base_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "llm_config_id": {
            "type": "integer",
            "format": "int64"
          },
          "model_overrides": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "structured_output": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "attachment_enhancement": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "status": {
            "type": "string"
          },
          "config_revision": {
            "type": "integer"
          },
          "presentation_config": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "plugin_config": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "dataset_bindings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "workflow_bindings": {
            "type": "array",
            "description": "Latest immutable version of each binding, including disabled entries; empty when no binding exists.",
            "items": {
              "$ref": "#/components/schemas/AgentWorkflowBindingResponse"
            }
          },
          "current_release_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "published_version": {
            "type": "integer"
          },
          "has_published_release": {
            "type": "boolean"
          },
          "has_unpublished_changes": {
            "type": "boolean"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "AgentList": {
        "type": "object",
        "required": [
          "agents",
          "has_more"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Agent"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_before_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "AgentRun": {
        "type": "object",
        "required": [
          "run_id",
          "agent_id",
          "conversation_id",
          "status"
        ],
        "properties": {
          "run_id": {
            "type": "integer",
            "format": "int64"
          },
          "workspace_id": {
            "type": "string"
          },
          "agent_id": {
            "type": "integer",
            "format": "int64"
          },
          "conversation_id": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "description": "Agent run lifecycle status. A succeeded run ended normally; it does not by itself verify a broader business outcome."
          },
          "answer": {
            "type": "string"
          },
          "answer_format": {
            "type": "string"
          },
          "structured_output": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "citations": {
            "type": "array",
            "items": {}
          },
          "visual_evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "trace_steps": {
            "type": "array",
            "items": {}
          },
          "execution_summary": {
            "$ref": "#/components/schemas/AgentExecutionSummary"
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "agent_release_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "release_version": {
            "type": "integer"
          },
          "run_mode": {
            "type": "string"
          },
          "invocation_source": {
            "type": "string"
          },
          "workflow_run_id": {
            "type": "string"
          },
          "workflow_node_id": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "AgentExecutionSummary": {
        "type": "object",
        "required": [
          "stop_reason"
        ],
        "description": "Runtime facts about the model/tool loop. Tool failures remain visible in calls and do not automatically redefine a normally ended Agent run as a failed business task.",
        "properties": {
          "configured_strategy": {
            "type": "string",
            "enum": [
              "auto",
              "direct",
              "agentic"
            ]
          },
          "actual_strategy": {
            "type": "string",
            "enum": [
              "direct",
              "agentic"
            ]
          },
          "tool_rounds": {
            "type": "integer",
            "minimum": 0
          },
          "tool_calls": {
            "type": "integer",
            "minimum": 0
          },
          "tool_attempts": {
            "type": "integer",
            "minimum": 0
          },
          "total_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "stop_reason": {
            "type": "string",
            "enum": [
              "completed",
              "final_output",
              "waiting",
              "cancelled",
              "failed",
              "max_tool_calls",
              "max_tool_rounds",
              "tool_budget_exhausted",
              "max_total_tokens",
              "active_runtime_ms",
              "final_output_invalid"
            ]
          },
          "calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "decision_mode": {
            "type": "string",
            "enum": [
              "direct",
              "knowledge",
              "tool",
              "both"
            ]
          },
          "knowledge_calls": {
            "type": "integer",
            "minimum": 0
          },
          "business_tool_calls": {
            "type": "integer",
            "minimum": 0
          },
          "web_calls": {
            "type": "integer",
            "minimum": 0
          },
          "knowledge_unavailable_reason": {
            "type": "string",
            "nullable": true
          },
          "final_evidence_selection": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "model_round_count": {
            "type": "integer",
            "minimum": 0
          },
          "model_round_timings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "context_plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          }
        },
        "additionalProperties": true
      },
      "AgentRunList": {
        "type": "object",
        "required": [
          "agent_id",
          "runs",
          "has_more"
        ],
        "properties": {
          "agent_id": {
            "type": "integer",
            "format": "int64"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentRun"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_before_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "KnowledgeBaseIdentityRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "knowledge_base_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "KnowledgeBaseCreateRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "name"
        ],
        "properties": {
          "space_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48,
            "description": "Optional immutable team or project space ownership."
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "upload_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "search_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "KnowledgeBaseListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "required": [
              "workspace_id"
            ],
            "properties": {
              "space_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 48
              },
              "workspace_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "status": {
                "type": "string",
                "maxLength": 50
              }
            }
          }
        ]
      },
      "KnowledgeBaseUpdateRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "knowledge_base_id",
          "name"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "status": {
            "type": "string",
            "maxLength": 50
          },
          "upload_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "nullable": true
          },
          "search_config_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "nullable": true
          }
        }
      },
      "KnowledgeDeleteRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KnowledgeBaseIdentityRequest"
          },
          {
            "type": "object",
            "required": [
              "confirmation_token",
              "request_id"
            ],
            "properties": {
              "confirmation_token": {
                "type": "string",
                "minLength": 1
              },
              "request_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              }
            }
          }
        ]
      },
      "KnowledgeDocumentIdentityRequest": {
        "type": "object",
        "required": [
          "document_id"
        ],
        "properties": {
          "document_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "KnowledgeDocumentListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PageRequest"
          },
          {
            "type": "object",
            "required": [
              "workspace_id"
            ],
            "properties": {
              "workspace_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "knowledge_base_id": {
                "type": "string",
                "maxLength": 160
              },
              "status": {
                "type": "string",
                "maxLength": 50
              }
            }
          }
        ]
      },
      "KnowledgeDocumentUpdateRequest": {
        "type": "object",
        "required": [
          "document_id",
          "title"
        ],
        "properties": {
          "document_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          }
        }
      },
      "KnowledgeDocumentDeleteRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "document_id",
          "confirmation_token",
          "request_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "document_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "confirmation_token": {
            "type": "string",
            "minLength": 1
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        }
      },
      "KnowledgeSearchRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "knowledge_base_ids",
          "query"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "query": {
            "type": "string",
            "minLength": 1
          },
          "filters": {
            "$ref": "#/components/schemas/JsonObject"
          }
        }
      },
      "KnowledgeFileUploadRequest": {
        "type": "object",
        "required": [
          "file",
          "workspace_id",
          "knowledge_base_id"
        ],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "parse_mode": {
            "type": "string",
            "maxLength": 50
          },
          "metadata": {
            "type": "string",
            "description": "JSON object encoded as a string"
          }
        }
      },
      "KnowledgeStagedFileListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "knowledge_base_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "before_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "KnowledgeStagedFileRecheckRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "knowledge_base_id",
          "file_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        }
      },
      "KnowledgeStagedFile": {
        "type": "object",
        "required": [
          "file_id",
          "filename",
          "mime_type",
          "size_bytes",
          "sha256",
          "expires_at",
          "preflight_fingerprint"
        ],
        "properties": {
          "file_id": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "sha256": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "preflight_fingerprint": {
            "type": "string"
          }
        }
      },
      "KnowledgeDocumentPreflight": {
        "type": "object",
        "required": [
          "schema_version",
          "source",
          "resolved_parse_mode",
          "profile",
          "capability_plan",
          "page_plan",
          "planned_document_parser_calls",
          "planned_ocr_calls",
          "planned_vlm_calls",
          "model_snapshots",
          "estimate",
          "execution_budget",
          "staged_file"
        ],
        "properties": {
          "schema_version": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "requested_parse_mode": {
            "type": "string"
          },
          "resolved_parse_mode": {
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "capability_plan": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "page_plan": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "page_number",
                "primary_method",
                "native_text_chars",
                "media_count",
                "quality_score",
                "planned_methods",
                "reason_codes"
              ],
              "properties": {
                "page_number": {
                  "type": "integer"
                },
                "primary_method": {
                  "type": "string"
                },
                "native_text_chars": {
                  "type": "integer"
                },
                "media_count": {
                  "type": "integer"
                },
                "quality_score": {
                  "type": "number"
                },
                "planned_methods": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reason_codes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "planned_document_parser_calls": {
            "type": "integer"
          },
          "planned_ocr_calls": {
            "type": "integer"
          },
          "planned_vlm_calls": {
            "type": "integer"
          },
          "model_snapshots": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "estimate": {
            "type": "object",
            "required": [
              "status",
              "minimum_cost",
              "maximum_cost",
              "duration_ms_min",
              "duration_ms_max",
              "reason_codes"
            ],
            "properties": {
              "status": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "minimum_cost": {
                "type": "number",
                "nullable": true
              },
              "maximum_cost": {
                "type": "number",
                "nullable": true
              },
              "duration_ms_min": {
                "type": "integer",
                "format": "int64",
                "nullable": true
              },
              "duration_ms_max": {
                "type": "integer",
                "format": "int64",
                "nullable": true
              },
              "reason_codes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "execution_budget": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "staged_file": {
            "$ref": "#/components/schemas/KnowledgeStagedFile"
          }
        }
      },
      "KnowledgeStagedFileCommit": {
        "type": "object",
        "required": [
          "file_id",
          "preflight_fingerprint"
        ],
        "properties": {
          "file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "preflight_fingerprint": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{64}$"
          }
        }
      },
      "KnowledgeUploadBatchItemCreate": {
        "type": "object",
        "required": [
          "staged_file"
        ],
        "properties": {
          "staged_file": {
            "$ref": "#/components/schemas/KnowledgeStagedFileCommit"
          },
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "execution_budget": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "native_options": {
            "$ref": "#/components/schemas/KnowledgeNativeUploadOptions"
          }
        }
      },
      "KnowledgeNativeUploadOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "revision": {
            "$ref": "#/components/schemas/KnowledgeFileRevisionTarget"
          },
          "tag_ids": {
            "type": "array",
            "maxItems": 64,
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "process_config": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "enable_multimodel": {
            "type": "boolean"
          }
        }
      },
      "KnowledgeFileRevisionTarget": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "document_id",
          "expected_revision_id",
          "expected_attempt"
        ],
        "properties": {
          "document_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expected_revision_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 36
          },
          "expected_attempt": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "KnowledgeUploadDestination": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "space_id",
          "folder_id"
        ],
        "description": "Frozen team upload target; only newly created files are registered here. Existing deduplicated files retain their location.",
        "properties": {
          "space_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$",
            "maxLength": 48
          },
          "folder_id": {
            "type": "string",
            "maxLength": 48,
            "description": "Empty means team root."
          }
        }
      },
      "KnowledgeUploadBatchCreateRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "knowledge_base_id",
          "request_id",
          "items"
        ],
        "properties": {
          "destination": {
            "$ref": "#/components/schemas/KnowledgeUploadDestination"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 30,
            "items": {
              "$ref": "#/components/schemas/KnowledgeUploadBatchItemCreate"
            }
          }
        }
      },
      "KnowledgeUploadBatchIdentityRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "batch_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "batch_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        }
      },
      "KnowledgeUploadBatchListRequest": {
        "type": "object",
        "required": [
          "workspace_id",
          "knowledge_base_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "knowledge_base_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "active_only": {
            "type": "boolean",
            "default": false
          },
          "cursor": {
            "type": "string",
            "maxLength": 32
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 10
          }
        }
      },
      "KnowledgeUploadBatchRetryRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KnowledgeUploadBatchIdentityRequest"
          },
          {
            "type": "object",
            "properties": {
              "request_id": {
                "type": "string",
                "maxLength": 120,
                "description": "Required for native file retries; replay the same identity when the response is uncertain."
              },
              "expected_actions": {
                "type": "object",
                "maxProperties": 30,
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Native item ID to currently observed native_request_id; stale actions are rejected."
              },
              "item_ids": {
                "type": "array",
                "maxItems": 30,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              }
            }
          }
        ]
      },
      "KnowledgeBase": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "knowledge_base_id",
          "name",
          "status"
        ],
        "properties": {
          "space_id": {
            "type": "string",
            "maxLength": 48
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "upload_config_id": {
            "type": "integer",
            "format": "int64"
          },
          "search_config_id": {
            "type": "integer",
            "format": "int64"
          },
          "document_count": {
            "type": "integer",
            "format": "int64"
          },
          "indexing_count": {
            "type": "integer",
            "format": "int64"
          },
          "completed_count": {
            "type": "integer",
            "format": "int64"
          },
          "failed_count": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "KnowledgeBaseList": {
        "type": "object",
        "required": [
          "knowledge_bases",
          "has_more"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "knowledge_bases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeBase"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_before_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "KnowledgeDocument": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "knowledge_base_id",
          "title",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "parse_mode": {
            "type": "string"
          },
          "source_asset_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "processing_stage": {
            "type": "string"
          },
          "attempt_id": {
            "type": "string"
          },
          "attempt_no": {
            "type": "integer"
          },
          "attempt_status": {
            "type": "string"
          },
          "chunk_count": {
            "type": "integer"
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "retryable": {
            "type": "boolean"
          },
          "error": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "created_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "KnowledgeDocumentList": {
        "type": "object",
        "required": [
          "documents",
          "has_more"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeDocument"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_before_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "KnowledgeUploadBatchCounts": {
        "type": "object",
        "required": [
          "total",
          "pending",
          "processing",
          "completed",
          "partial_success",
          "failed",
          "cancelled",
          "deduplicated"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "pending": {
            "type": "integer",
            "minimum": 0
          },
          "processing": {
            "type": "integer",
            "minimum": 0
          },
          "completed": {
            "type": "integer",
            "minimum": 0
          },
          "partial_success": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "cancelled": {
            "type": "integer",
            "minimum": 0
          },
          "deduplicated": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "KnowledgeUploadBatchItem": {
        "type": "object",
        "required": [
          "item_id",
          "ordinal",
          "filename",
          "mime_type",
          "size_bytes",
          "source_sha256",
          "status",
          "deduplicated"
        ],
        "properties": {
          "native_request_id": {
            "type": "string"
          },
          "native_document_id": {
            "type": "string"
          },
          "native_attempt": {
            "type": "integer",
            "minimum": 1
          },
          "staged_expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "item_id": {
            "type": "string"
          },
          "ordinal": {
            "type": "integer",
            "minimum": 1
          },
          "filename": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "source_sha256": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "committing",
              "processing",
              "completed",
              "partial_success",
              "failed",
              "cancel_requested",
              "cancelled",
              "deduplicated"
            ]
          },
          "deduplicated": {
            "type": "boolean"
          },
          "knowledge_document_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "processing_attempt_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "document": {
            "$ref": "#/components/schemas/KnowledgeDocument"
          },
          "error": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "KnowledgeUploadBatch": {
        "type": "object",
        "required": [
          "batch_id",
          "workspace_id",
          "knowledge_base_id",
          "request_id",
          "status",
          "replay",
          "counts",
          "items",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "destination": {
            "$ref": "#/components/schemas/KnowledgeUploadDestination"
          },
          "engine": {
            "type": "string",
            "enum": [
              "",
              "weknora"
            ]
          },
          "batch_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "partial_success",
              "failed",
              "cancel_requested",
              "cancelled"
            ]
          },
          "replay": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/KnowledgeUploadBatchCounts"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeUploadBatchItem"
            }
          },
          "cancel_requested_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "KnowledgeUploadBatchList": {
        "type": "object",
        "required": [
          "batches"
        ],
        "properties": {
          "batches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeUploadBatch"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "KnowledgeSearchCitation": {
        "type": "object",
        "required": [
          "citation_id",
          "source_type",
          "content"
        ],
        "properties": {
          "citation_id": {
            "type": "string"
          },
          "source_type": {
            "type": "string"
          },
          "document_id": {
            "type": "string"
          },
          "chunk_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          },
          "source_locator": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JsonObject"
            }
          }
        }
      },
      "KnowledgeSearchResult": {
        "type": "object",
        "required": [
          "workspace_id",
          "knowledge_base_ids",
          "query",
          "citations"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "type": "string"
          },
          "retrieval_mode": {
            "type": "string"
          },
          "top_k": {
            "type": "integer"
          },
          "citations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeSearchCitation"
            }
          },
          "provider": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/JsonObject"
          }
        }
      },
      "ArtifactRevisionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "expected_file_id",
          "source_file_id",
          "request_id",
          "operation"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expected_file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "source_file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_-]+$"
          },
          "operation": {
            "type": "string",
            "enum": [
              "upload",
              "restore"
            ]
          }
        }
      },
      "ArtifactRevisionCancel": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "expected_file_id",
          "request_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expected_file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_-]+$"
          }
        }
      },
      "FileRef": {
        "type": "object",
        "required": [
          "__type",
          "file_id",
          "filename",
          "mime_type",
          "size_bytes"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "file_ref"
            ]
          },
          "file_id": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "FileUploadRequest": {
        "type": "object",
        "required": [
          "file",
          "workspace_id"
        ],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "AgentSurfaceDiscoverRequest": {
        "type": "object",
        "properties": {
          "surface": {
            "type": "string",
            "enum": [
              "api",
              "sdk",
              "cli",
              "mcp",
              "copilot_ai",
              "web"
            ],
            "description": "Return only operations that may be projected to this surface."
          },
          "resource": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Return one exact normalized resource type."
          },
          "operation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Return one exact operation ID, action, or capability key."
          },
          "include_schemas": {
            "type": "boolean",
            "default": false,
            "description": "Inline request and response schemas when true."
          }
        },
        "additionalProperties": false
      },
      "AgentSurfaceManifest": {
        "type": "object",
        "required": [
          "version",
          "spec_url",
          "surfaces",
          "resources"
        ],
        "properties": {
          "version": {
            "type": "string"
          },
          "spec_url": {
            "type": "string"
          },
          "surfaces": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "api",
                "sdk",
                "cli",
                "mcp",
                "copilot_ai",
                "web"
              ]
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentSurfaceResource"
            }
          }
        }
      },
      "AgentSurfaceResource": {
        "type": "object",
        "required": [
          "name",
          "operations"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentSurfaceOperation"
            }
          }
        }
      },
      "AgentSurfaceOperation": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "title",
          "resource",
          "action",
          "risk_level",
          "approval_policy",
          "idempotent",
          "asynchronous",
          "streaming",
          "deprecated",
          "surfaces"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "api_operation",
              "capability",
              "api_capability"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "capability_key": {
            "type": "string"
          },
          "risk_level": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "approval_policy": {
            "type": "string",
            "enum": [
              "none",
              "confirm",
              "formal"
            ]
          },
          "idempotent": {
            "type": "boolean"
          },
          "asynchronous": {
            "type": "boolean"
          },
          "streaming": {
            "type": "boolean"
          },
          "deprecated": {
            "type": "boolean"
          },
          "surfaces": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "api",
                "sdk",
                "cli",
                "mcp",
                "copilot_ai",
                "web"
              ]
            }
          },
          "transport": {
            "$ref": "#/components/schemas/AgentSurfaceTransport"
          },
          "input_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "output_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "required_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AgentSurfaceTransport": {
        "type": "object",
        "required": [
          "method",
          "path"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS",
              "TRACE"
            ]
          },
          "path": {
            "type": "string"
          }
        }
      },
      "CapabilityDescriptor": {
        "type": "object",
        "required": [
          "key",
          "version",
          "title",
          "risk_level",
          "approval_policy",
          "input_schema",
          "output_schema"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          },
          "risk_level": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "approval_policy": {
            "type": "string",
            "enum": [
              "none",
              "confirm",
              "formal"
            ]
          },
          "idempotent": {
            "type": "boolean"
          },
          "input_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "output_schema": {
            "$ref": "#/components/schemas/JsonObject"
          },
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "web",
                "cli",
                "mcp",
                "copilot_ai"
              ]
            }
          }
        }
      },
      "CapabilityList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/CapabilityDescriptor"
        }
      },
      "KnowledgeScopeRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id"
        ]
      },
      "KnowledgeEntryListRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "query": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "produced_by_application_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id"
        ]
      },
      "KnowledgeEntryIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "entry_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "knowledge_base_id",
          "entry_id"
        ]
      },
      "KnowledgeEntrySaveRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "entry_id": {
            "type": "string"
          },
          "expected_revision_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "fact",
              "preference",
              "constraint",
              "experience"
            ]
          },
          "applicability": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "source_note": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "replace_pending": {
            "type": "boolean"
          },
          "effective_from": {
            "type": "string",
            "format": "date-time"
          },
          "effective_to": {
            "type": "string",
            "format": "date-time"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "workspace_id",
          "idempotency_key",
          "content"
        ]
      },
      "KnowledgeEntryStateRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "entry_id": {
            "type": "string"
          },
          "expected_revision_id": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "operation": {
            "type": "string",
            "enum": [
              "retire",
              "restore",
              "delete",
              "cancel_schedule",
              "retry_index"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "knowledge_base_id",
          "entry_id",
          "expected_revision_id",
          "idempotency_key",
          "operation"
        ]
      },
      "KnowledgeCandidateListRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "query": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "produced_by_application_id": {
            "type": "string"
          },
          "all_scopes": {
            "type": "boolean"
          }
        },
        "required": [
          "workspace_id"
        ]
      },
      "KnowledgeCandidateReviewRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "knowledge_base_id": {
            "type": "string"
          },
          "candidate_id": {
            "type": "string"
          },
          "expected_revision_id": {
            "type": "string"
          },
          "operation": {
            "type": "string",
            "enum": [
              "approve",
              "reject"
            ]
          },
          "reason": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "knowledge_base_id",
          "candidate_id",
          "operation",
          "reason",
          "idempotency_key"
        ]
      },
      "KnowledgeReplyMatchRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "question_type_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id"
        ]
      },
      "ApplicationKnowledgeCapture": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "fact",
              "preference",
              "constraint",
              "experience"
            ]
          },
          "content_field": {
            "type": "string"
          },
          "title_field": {
            "type": "string"
          },
          "entity_key_field": {
            "type": "string"
          },
          "predicate": {
            "type": "string"
          },
          "applicability_field": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "kind",
          "content_field"
        ]
      },
      "ApplicationOwnershipPreflightRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "target_owner_user_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "target_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        }
      },
      "ApplicationOwnershipCandidateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "ApplicationOwnershipCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user_id",
          "name"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipCandidatePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOwnershipCandidate"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipSourceGap": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "reference",
          "reason"
        ],
        "properties": {
          "reference": {
            "$ref": "#/components/schemas/ApplicationRuntimeRef"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipEnvironmentGap": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "environment_id",
          "environment_version_id",
          "deployment_id",
          "binding_id",
          "scope_type",
          "scope_id",
          "required_access",
          "reason"
        ],
        "properties": {
          "environment_id": {
            "type": "string"
          },
          "environment_version_id": {
            "type": "string"
          },
          "deployment_id": {
            "type": "string"
          },
          "binding_id": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "scope_id": {
            "type": "string"
          },
          "current_access": {
            "type": "string"
          },
          "required_access": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipPrivateBinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "binding_id",
          "created_by",
          "disposition"
        ],
        "properties": {
          "binding_id": {
            "type": "string"
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "disposition": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipPreflight": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "current_owner_user_id",
          "target_owner_user_id",
          "target_is_workspace_member",
          "target_is_team_member",
          "can_transfer",
          "missing_application_permissions",
          "missing_sources",
          "missing_environments",
          "preserved_workspace_bindings",
          "preflight_digest"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "current_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "target_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "target_is_workspace_member": {
            "type": "boolean"
          },
          "target_is_team_member": {
            "type": "boolean"
          },
          "can_transfer": {
            "type": "boolean"
          },
          "missing_application_permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missing_sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOwnershipSourceGap"
            }
          },
          "missing_environments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOwnershipEnvironmentGap"
            }
          },
          "preserved_workspace_bindings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOwnershipPrivateBinding"
            }
          },
          "preflight_digest": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipTransferRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_owner_user_id",
          "target_owner_user_id",
          "preflight_digest",
          "accept_gaps",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expected_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "target_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "preflight_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "accept_gaps": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationOwnershipRecoverRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "transfer_id",
          "expected_owner_user_id",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "transfer_id": {
            "type": "string"
          },
          "expected_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationOwnershipTransferView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "transfer_id",
          "from_owner_user_id",
          "to_owner_user_id",
          "actor_id",
          "created_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "transfer_id": {
            "type": "string"
          },
          "from_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "to_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "actor_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "reverse_of_transfer_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "ApplicationOwnershipHistory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOwnershipTransferView"
            }
          }
        }
      },
      "ApplicationOwnershipTransferResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application_id",
          "current_owner_user_id",
          "transfer"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "current_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "transfer": {
            "$ref": "#/components/schemas/ApplicationOwnershipTransferView"
          },
          "preflight_digest": {
            "type": "string"
          }
        }
      },
      "ApplicationMaintainerChangeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "expected_owner_user_id",
          "user_id",
          "active",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expected_owner_user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "active": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "ApplicationMaintainerView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "user_id",
          "active",
          "granted_by",
          "granted_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "active": {
            "type": "boolean"
          },
          "granted_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "revoked_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "granted_at": {
            "type": "string"
          },
          "revoked_at": {
            "type": "string"
          }
        }
      },
      "ApplicationMaintainerList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationMaintainerView"
            }
          }
        }
      },
      "EnvironmentCollaboratorListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "EnvironmentCollaboratorCandidateListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "EnvironmentCollaboratorChangeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id",
          "user_id",
          "access_level",
          "active",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "access_level": {
            "type": "string",
            "enum": [
              "reader",
              "manager"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        }
      },
      "EnvironmentCollaboratorView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "environment_id",
          "user_id",
          "access_level",
          "active",
          "granted_by",
          "granted_at"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "environment_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "access_level": {
            "type": "string",
            "enum": [
              "reader",
              "manager"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "granted_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "revoked_by": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "granted_at": {
            "type": "string"
          },
          "revoked_at": {
            "type": "string"
          }
        }
      },
      "EnvironmentCollaboratorList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvironmentCollaboratorView"
            }
          }
        }
      },
      "ApplicationChannelsPrepareRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          }
        }
      },
      "ApplicationChannelsPrepareResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application_id",
          "supported_channels",
          "targets",
          "connections",
          "items"
        ],
        "properties": {
          "application_id": {
            "type": "string"
          },
          "supported_channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationChannelTargetOption"
            }
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationChannelConnectionStatusResponse"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationChannelPublicationItem"
            }
          }
        }
      },
      "ApplicationChannelTargetOption": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "application_version_id",
          "version",
          "participation_binding_id",
          "participation_binding_revision_id",
          "deployment_revision_id",
          "scope_type",
          "scope_id"
        ],
        "properties": {
          "application_version_id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "deployment_revision_id": {
            "type": "string"
          },
          "scope_type": {
            "type": "string"
          },
          "scope_id": {
            "type": "string"
          }
        }
      },
      "PublicationConnectionStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "installation_id",
          "provider",
          "name",
          "desired_state",
          "readiness_status",
          "runtime_status",
          "health_status",
          "scope_status",
          "granted_scopes",
          "missing_scopes",
          "config_version",
          "credential_version"
        ],
        "properties": {
          "installation_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "desired_state": {
            "type": "string"
          },
          "readiness_status": {
            "type": "string"
          },
          "runtime_status": {
            "type": "string"
          },
          "health_status": {
            "type": "string"
          },
          "scope_status": {
            "type": "string"
          },
          "granted_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missing_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "safe_error_code": {
            "type": "string"
          },
          "config_version": {
            "type": "integer",
            "format": "int64"
          },
          "credential_version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationChannelPublicationItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "channel_type",
          "installation_id",
          "connection_id",
          "publication_id",
          "publication_version_ref",
          "application_version_id",
          "participation_binding_id",
          "participation_binding_revision_id",
          "binding_id",
          "enabled",
          "direct_message_enabled",
          "group_message_enabled",
          "group_mention_required",
          "binding_version",
          "publication_version",
          "updated_at"
        ],
        "properties": {
          "channel_type": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "publication_id": {
            "type": "string"
          },
          "publication_version_ref": {
            "type": "string"
          },
          "application_version_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "binding_id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "direct_message_enabled": {
            "type": "boolean"
          },
          "group_message_enabled": {
            "type": "boolean"
          },
          "group_mention_required": {
            "type": "boolean"
          },
          "binding_version": {
            "type": "integer",
            "format": "int64"
          },
          "publication_version": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationChannelUpsertRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "channel_type",
          "installation_id",
          "application_version_id",
          "participation_binding_id",
          "participation_binding_revision_id",
          "direct_message_enabled",
          "group_message_enabled",
          "group_mention_required",
          "expected_binding_version",
          "idempotency_key"
        ],
        "properties": {
          "legacy_migration": {
            "type": "object",
            "description": "Explicit one-way migration of an existing Agent Binding. Requires expected_binding_version > 0, an explicit sender allowlist, and no publication_id. Preserves enabled state; records the old target in audit. No reverse migration.",
            "additionalProperties": false,
            "required": [
              "binding_id",
              "publication_version_ref"
            ],
            "properties": {
              "binding_id": {
                "type": "string"
              },
              "publication_version_ref": {
                "type": "string"
              }
            }
          },
          "allowed_sender_identity_ids": {
            "type": "array",
            "description": "Explicit external consumer allowlist scoped by the server to workspace, provider and connection. Empty denies all senders.",
            "items": {
              "type": "string"
            }
          },
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "channel_type": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "publication_id": {
            "type": "string"
          },
          "application_version_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "direct_message_enabled": {
            "type": "boolean"
          },
          "group_message_enabled": {
            "type": "boolean"
          },
          "group_mention_required": {
            "type": "boolean"
          },
          "expected_binding_version": {
            "type": "integer",
            "format": "int64"
          },
          "idempotency_key": {
            "type": "string"
          }
        }
      },
      "ApplicationChannelMutationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "publication",
          "binding"
        ],
        "properties": {
          "publication": {
            "$ref": "#/components/schemas/PublicationResponse"
          },
          "binding": {
            "$ref": "#/components/schemas/PublicationBindingStatusResponse"
          }
        }
      },
      "PublicationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "publication_id",
          "workspace_id",
          "channel_type",
          "name",
          "current_version",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "publication_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "channel_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "current_version": {
            "type": "integer",
            "format": "int64"
          },
          "enabled": {
            "type": "boolean"
          },
          "version_status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "$ref": "#/components/schemas/PublicationVersionResponse"
          }
        }
      },
      "PublicationVersionResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "publication_version_ref",
          "publication_id",
          "version",
          "target_type",
          "target_id",
          "memory_policy",
          "tool_allowlist",
          "knowledge_scope",
          "timeout_ms",
          "cancel_policy",
          "page_policy",
          "security_policy",
          "created_at"
        ],
        "properties": {
          "publication_version_ref": {
            "type": "string"
          },
          "publication_id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "target_type": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "target_version": {
            "type": "string"
          },
          "snapshot_ref": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "application_version_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "participation_binding_revision_id": {
            "type": "string"
          },
          "memory_policy": {},
          "tool_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "knowledge_scope": {},
          "timeout_ms": {
            "type": "integer",
            "format": "int64"
          },
          "cancel_policy": {},
          "page_policy": {},
          "security_policy": {},
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublicationBindingStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "binding_id",
          "installation_id",
          "publication_version_ref",
          "enabled",
          "direct_message_enabled",
          "group_message_enabled",
          "group_mention_required",
          "binding_version"
        ],
        "properties": {
          "binding_id": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "publication_version_ref": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "direct_message_enabled": {
            "type": "boolean"
          },
          "group_message_enabled": {
            "type": "boolean"
          },
          "group_mention_required": {
            "type": "boolean"
          },
          "binding_version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApplicationChannelSetEnabledRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "application_id",
          "channel_type",
          "installation_id",
          "binding_id",
          "enabled",
          "expected_binding_version"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "channel_type": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "binding_id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "expected_binding_version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ChannelIdentityListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "connection_id",
          "provider",
          "cursor",
          "limit"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ChannelIdentityListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelIdentityUserBindingItem"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ChannelIdentityUserBindingItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "identity_id",
          "provider",
          "display_label",
          "first_seen_at",
          "status",
          "revision",
          "match_status"
        ],
        "properties": {
          "identity_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "display_label": {
            "type": "string"
          },
          "first_seen_at": {
            "type": "string"
          },
          "binding_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "format": "int64"
          },
          "user_name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "match_status": {
            "type": "string"
          }
        }
      },
      "ChannelIdentityUserBindingPutRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "connection_id",
          "provider",
          "identity_id",
          "user_id",
          "external_subject_confirmation",
          "expected_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "identity_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "format": "int64"
          },
          "external_subject_confirmation": {
            "type": "string",
            "writeOnly": true,
            "description": "Exact external subject confirmation; transient input only, never persisted or logged."
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64"
          },
          "idempotency_key": {
            "type": "string"
          }
        }
      },
      "ChannelIdentityUserBindingRevokeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "connection_id",
          "provider",
          "identity_id",
          "expected_revision",
          "idempotency_key"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "identity_id": {
            "type": "string"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64"
          },
          "idempotency_key": {
            "type": "string"
          }
        }
      },
      "ChannelIdentityCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user_id",
          "name"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ChannelIdentityCandidatePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_cursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelIdentityCandidate"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "ApplicationChannelConnectionStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "installation_id",
          "provider",
          "name",
          "desired_state",
          "readiness_status",
          "runtime_status",
          "health_status",
          "scope_status",
          "granted_scopes",
          "missing_scopes",
          "config_version",
          "credential_version",
          "connection_id"
        ],
        "properties": {
          "installation_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "desired_state": {
            "type": "string"
          },
          "readiness_status": {
            "type": "string"
          },
          "runtime_status": {
            "type": "string"
          },
          "health_status": {
            "type": "string"
          },
          "scope_status": {
            "type": "string"
          },
          "granted_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missing_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "safe_error_code": {
            "type": "string"
          },
          "config_version": {
            "type": "integer",
            "format": "int64"
          },
          "credential_version": {
            "type": "integer",
            "format": "int64"
          },
          "connection_id": {
            "type": "string"
          }
        }
      },
      "ApplicationScheduleSpec": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "frequency",
          "timezone"
        ],
        "properties": {
          "frequency": {
            "type": "string",
            "enum": [
              "once",
              "daily",
              "weekdays",
              "weekly",
              "monthly"
            ]
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "time": {
            "type": "string",
            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
          },
          "weekday": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "month_day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 28
          },
          "run_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApplicationScheduleSaveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "expected_binding_revision_id",
          "title",
          "user_input",
          "schedule",
          "enabled",
          "mutation_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "schedule_id": {
            "type": "string",
            "pattern": "^asched_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "expected_binding_revision_id": {
            "type": "string",
            "pattern": "^abrev_[a-f0-9]{32}$"
          },
          "project_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "user_input": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "schedule": {
            "$ref": "#/components/schemas/ApplicationScheduleSpec"
          },
          "enabled": {
            "type": "boolean"
          },
          "mutation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        }
      },
      "ApplicationScheduleListRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "participation_binding_id": {
            "type": "string",
            "pattern": "^abind_[a-f0-9]{32}$"
          },
          "project_id": {
            "type": "string",
            "pattern": "^space_[a-f0-9]{32}$"
          },
          "archived": {
            "type": "boolean"
          },
          "cursor": {
            "type": "string",
            "pattern": "^(|[1-9][0-9]{0,18})$"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          }
        }
      },
      "ApplicationScheduleStateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "schedule_id",
          "expected_revision",
          "state",
          "mutation_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "schedule_id": {
            "type": "string",
            "pattern": "^asched_[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "enabled",
              "paused",
              "archived"
            ]
          },
          "mutation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        }
      },
      "CustomerLoginRequest": {
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true
          }
        }
      },
      "CustomerRefreshRequest": {
        "type": "object",
        "required": [
          "refresh_token"
        ],
        "properties": {
          "refresh_token": {
            "type": "string",
            "writeOnly": true
          }
        }
      },
      "CustomerTokenResponse": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "CustomerModuleScope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "expected_binding_revision_id"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "expected_binding_revision_id": {
            "type": "string"
          }
        }
      },
      "CustomerModuleRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workspace_id",
          "participation_binding_id",
          "expected_binding_revision_id",
          "operation",
          "arguments"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "participation_binding_id": {
            "type": "string"
          },
          "expected_binding_revision_id": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "arguments": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CustomerModuleError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
