{
  "asyncapi": "3.0.0",
  "info": {
    "title": "CapWorks 实时 API",
    "version": "1.0.0",
    "description": "会话事件、成果协作和实时转写 WebSocket 协议。连接沿用 Better Auth 会话 Cookie。"
  },
  "servers": {
    "production": {
      "host": "capworks-api-docs.pages.dev",
      "pathname": "/proxy/capworks",
      "protocol": "wss",
      "security": [
        {
          "$ref": "#/components/securitySchemes/cookieAuth"
        }
      ]
    },
    "local": {
      "host": "localhost:8787",
      "protocol": "ws",
      "security": [
        {
          "$ref": "#/components/securitySchemes/cookieAuth"
        }
      ]
    }
  },
  "channels": {
    "sessionEvents": {
      "address": "/v1/sessions/{sessionId}/events",
      "parameters": {
        "sessionId": {
          "description": "会话 ID"
        }
      },
      "messages": {
        "clientMessage": {
          "$ref": "#/components/messages/sessionClientMessage"
        },
        "serverMessage": {
          "$ref": "#/components/messages/sessionServerMessage"
        }
      }
    },
    "conversationEvents": {
      "address": "/v1/conversations/{conversationId}/events",
      "parameters": {
        "conversationId": {
          "description": "对话 ID"
        }
      },
      "messages": {
        "clientMessage": {
          "$ref": "#/components/messages/sessionClientMessage"
        },
        "serverMessage": {
          "$ref": "#/components/messages/workServerMessage"
        }
      }
    },
    "transcriptionStream": {
      "address": "/v1/sessions/{sessionId}/transcription-stream",
      "parameters": {
        "sessionId": {
          "description": "会话 ID"
        }
      },
      "messages": {
        "clientMessage": {
          "$ref": "#/components/messages/transcriptionClientMessage"
        },
        "serverMessage": {
          "$ref": "#/components/messages/transcriptionServerMessage"
        }
      }
    }
  },
  "operations": {
    "sendSessionEvent": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/sessionEvents"
      },
      "messages": [
        {
          "$ref": "#/channels/sessionEvents/messages/clientMessage"
        }
      ]
    },
    "receiveSessionEvent": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/sessionEvents"
      },
      "messages": [
        {
          "$ref": "#/channels/sessionEvents/messages/serverMessage"
        }
      ]
    },
    "sendConversationEvent": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/conversationEvents"
      },
      "messages": [
        {
          "$ref": "#/channels/conversationEvents/messages/clientMessage"
        }
      ]
    },
    "receiveConversationEvent": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/conversationEvents"
      },
      "messages": [
        {
          "$ref": "#/channels/conversationEvents/messages/serverMessage"
        }
      ]
    },
    "sendTranscriptionAudio": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/transcriptionStream"
      },
      "messages": [
        {
          "$ref": "#/channels/transcriptionStream/messages/clientMessage"
        }
      ]
    },
    "receiveTranscriptionEvent": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/transcriptionStream"
      },
      "messages": [
        {
          "$ref": "#/channels/transcriptionStream/messages/serverMessage"
        }
      ]
    }
  },
  "components": {
    "securitySchemes": {
      "cookieAuth": {
        "type": "httpApiKey",
        "in": "cookie",
        "name": "__Secure-capworks-auth.session_token"
      }
    },
    "messages": {
      "sessionClientMessage": {
        "name": "RealtimeClientMessage",
        "title": "客户端会话消息",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/RealtimeClientMessage"
        }
      },
      "sessionServerMessage": {
        "name": "RealtimeServerMessage",
        "title": "服务端会话消息",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/RealtimeServerMessage"
        }
      },
      "workServerMessage": {
        "name": "RealtimeServerMessageV2",
        "title": "服务端成果协作消息",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/RealtimeServerMessageV2"
        }
      },
      "transcriptionClientMessage": {
        "name": "TranscriptionClientMessage",
        "title": "客户端实时音频消息",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/TranscriptionClientMessage"
        }
      },
      "transcriptionServerMessage": {
        "name": "TranscriptionServerMessage",
        "title": "服务端实时转写消息",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/TranscriptionServerMessage"
        }
      }
    },
    "schemas": {
      "Identifier": {
        "type": "string"
      },
      "ISO8601Timestamp": {
        "type": "string"
      },
      "JSONPrimitive": {
        "type": [
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "JSONValue": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/JSONPrimitive"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          }
        ]
      },
      "ProjectStatus": {
        "type": "string",
        "enum": [
          "active",
          "archived"
        ]
      },
      "ProjectRole": {
        "type": "string",
        "enum": [
          "product",
          "design",
          "engineering",
          "operations",
          "project-management",
          "other"
        ],
        "description": "项目中的工作视角；只决定默认工具和建议，不授予任何权限。"
      },
      "ProjectAccessRole": {
        "type": "string",
        "enum": [
          "owner",
          "editor",
          "viewer"
        ]
      },
      "ProjectMembership": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "accessRole": {
            "$ref": "#/components/schemas/ProjectAccessRole"
          },
          "primaryRole": {
            "$ref": "#/components/schemas/ProjectRole"
          },
          "secondaryRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectRole"
            }
          },
          "roleConfirmedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "joinedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "projectId",
          "userId",
          "accessRole",
          "primaryRole",
          "secondaryRoles",
          "joinedAt"
        ],
        "additionalProperties": false
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProjectStatus"
          },
          "objective": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "defaultLanguage": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "memberIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "currentMembership": {
            "$ref": "#/components/schemas/ProjectMembership",
            "description": "当前登录成员在此项目中的身份；没有记录时项目仍可被发现，但尚未加入。"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "archivedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "status",
          "memberIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "UpsertProjectMembershipRequest": {
        "type": "object",
        "properties": {
          "primaryRole": {
            "$ref": "#/components/schemas/ProjectRole"
          },
          "secondaryRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectRole"
            }
          }
        },
        "required": [
          "primaryRole"
        ],
        "additionalProperties": false
      },
      "ProjectMembershipResponse": {
        "type": "object",
        "properties": {
          "membership": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectMembership"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "membership"
        ],
        "additionalProperties": false
      },
      "ProjectMembershipListResponse": {
        "type": "object",
        "properties": {
          "memberships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectMembership"
            }
          }
        },
        "required": [
          "memberships"
        ],
        "additionalProperties": false
      },
      "ProjectMemoryKind": {
        "type": "string",
        "enum": [
          "identity",
          "goal",
          "user",
          "brand",
          "glossary",
          "constraint",
          "decision",
          "architecture",
          "workflow",
          "person",
          "external-object",
          "other"
        ]
      },
      "ProjectMemorySource": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "project",
              "conversation",
              "integration",
              "user",
              "system"
            ]
          },
          "connectionId": {
            "type": "string"
          },
          "externalMemorySourceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "externalObjectType": {
            "type": "string"
          },
          "externalObjectId": {
            "type": "string"
          },
          "externalURL": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "observedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "kind",
          "observedAt"
        ],
        "additionalProperties": false
      },
      "ProjectMemoryEntry": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "kind": {
            "$ref": "#/components/schemas/ProjectMemoryKind"
          },
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/ProjectMemorySource"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "kind",
          "key",
          "title",
          "content",
          "confidence",
          "status",
          "source",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ProjectMemoryResponse": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectMemoryEntry"
            }
          },
          "lastRefreshedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "projectId",
          "entries"
        ],
        "additionalProperties": false
      },
      "ExternalActionRisk": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "WorkSetStatus": {
        "type": "string",
        "enum": [
          "forming",
          "ready",
          "updating",
          "superseded"
        ]
      },
      "WorkSet": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "primaryBlockId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "compositionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "status": {
            "$ref": "#/components/schemas/WorkSetStatus"
          },
          "blockIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "actionIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "preparedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "projectId",
          "sessionId",
          "compositionId",
          "status",
          "blockIds",
          "actionIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "AuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actor": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "user"
                  },
                  "userId": {
                    "$ref": "#/components/schemas/Identifier"
                  }
                },
                "required": [
                  "kind",
                  "userId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "agent"
                  },
                  "role": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "role"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "system"
                  },
                  "component": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "component"
                ],
                "additionalProperties": false
              }
            ]
          },
          "eventType": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "targetId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "actor",
          "eventType",
          "targetType",
          "targetId",
          "details",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "BuiltInAgentRole": {
        "type": "string",
        "enum": [
          "chief-of-staff",
          "product-manager",
          "project-manager",
          "designer",
          "researcher",
          "engineer",
          "copywriter",
          "decision-analyst",
          "executor"
        ]
      },
      "AgentRole": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BuiltInAgentRole"
          },
          {
            "type": "string"
          }
        ]
      },
      "AgentCapabilityPool": {
        "type": "string",
        "enum": [
          "planning",
          "research-design",
          "build-execution"
        ]
      },
      "AgentTask": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "role": {
            "$ref": "#/components/schemas/AgentRole"
          },
          "capabilityPool": {
            "$ref": "#/components/schemas/AgentCapabilityPool"
          },
          "title": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "active",
              "blocked",
              "complete",
              "cancelled"
            ]
          },
          "revision": {
            "type": "number"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "outputBlockIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "dependsOnTaskIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "capabilityPool",
          "title",
          "objective",
          "status",
          "revision",
          "createdAt",
          "updatedAt",
          "sourceSegmentIds",
          "outputBlockIds"
        ],
        "additionalProperties": false
      },
      "AgentState": {
        "type": "object",
        "properties": {
          "role": {
            "$ref": "#/components/schemas/AgentRole"
          },
          "capabilityPool": {
            "$ref": "#/components/schemas/AgentCapabilityPool"
          },
          "status": {
            "type": "string",
            "enum": [
              "observing",
              "active",
              "complete"
            ]
          },
          "reason": {
            "type": "string"
          },
          "taskIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "activatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "role",
          "capabilityPool",
          "status",
          "reason",
          "taskIds",
          "activatedAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "SessionOrchestration": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "number"
          },
          "chiefOfStaffRole": {
            "type": "string",
            "const": "chief-of-staff"
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentState"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTask"
            }
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "revision",
          "chiefOfStaffRole",
          "agents",
          "tasks",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "BlockFamily": {
        "type": "string",
        "enum": [
          "text",
          "product",
          "reasoning",
          "structure",
          "action",
          "reference",
          "visual",
          "file"
        ]
      },
      "InferenceState": {
        "type": "string",
        "enum": [
          "verified",
          "inferred",
          "placeholder",
          "observed",
          "proposed"
        ]
      },
      "BlockSource": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "transcript"
              },
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "excerpt": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "segmentId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "external"
              },
              "url": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "retrievedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "url"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "generated"
              },
              "agentRole": {
                "$ref": "#/components/schemas/AgentRole"
              },
              "taskId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "agentRole"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "user"
              },
              "participantId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "participantId"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Block": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "family": {
            "$ref": "#/components/schemas/BlockFamily"
          },
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "revision": {
            "type": "number"
          },
          "state": {
            "type": "string",
            "enum": [
              "proposed",
              "accepted",
              "edited",
              "superseded"
            ]
          },
          "inference": {
            "$ref": "#/components/schemas/InferenceState"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockSource"
            }
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "relationshipIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "agentRole": {
                "$ref": "#/components/schemas/AgentRole"
              },
              "taskId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "agentRole"
            ],
            "additionalProperties": false
          },
          "compatibility": {
            "type": "object",
            "properties": {
              "artifactId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "artifactKind": {
                "$ref": "#/components/schemas/ArtifactKind"
              },
              "artifactNodeId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "artifactId",
              "artifactKind"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "family",
          "type",
          "title",
          "revision",
          "state",
          "inference",
          "sources",
          "properties",
          "relationshipIds",
          "createdAt",
          "updatedAt",
          "createdBy"
        ],
        "additionalProperties": false
      },
      "ArtifactKind": {
        "type": "string",
        "enum": [
          "mind-map",
          "requirement",
          "decision",
          "assumption",
          "open-question",
          "next-step"
        ]
      },
      "RelationshipKind": {
        "type": "string",
        "enum": [
          "supports",
          "contradicts",
          "depends-on",
          "parent-of",
          "relates-to",
          "derived-from",
          "sequence-before"
        ]
      },
      "Relationship": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "fromBlockId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "toBlockId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "kind": {
            "$ref": "#/components/schemas/RelationshipKind"
          },
          "label": {
            "type": "string"
          },
          "revision": {
            "type": "number"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "id",
          "fromBlockId",
          "toBlockId",
          "kind",
          "revision"
        ],
        "additionalProperties": false
      },
      "Placement": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "blockId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "order": {
            "type": "number"
          },
          "presentation": {
            "type": "string",
            "enum": [
              "prose",
              "list-item",
              "map-node",
              "reference",
              "action",
              "visual"
            ]
          },
          "column": {
            "type": "number"
          },
          "emphasis": {
            "type": "string",
            "enum": [
              "quiet",
              "normal",
              "primary"
            ]
          }
        },
        "required": [
          "id",
          "blockId",
          "order"
        ],
        "additionalProperties": false
      },
      "CompositionSection": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "layout": {
            "type": "string",
            "enum": [
              "prose",
              "list",
              "map",
              "board",
              "timeline",
              "actions",
              "reference-strip"
            ]
          },
          "placements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Placement"
            }
          }
        },
        "required": [
          "id",
          "title",
          "layout",
          "placements"
        ],
        "additionalProperties": false
      },
      "Composition": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "revision": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready"
            ]
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompositionSection"
            }
          },
          "relationshipIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "revision",
          "status",
          "sections",
          "relationshipIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ActionTarget": {
        "type": "object",
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "enum": [
                  "codex",
                  "research",
                  "visual-generation",
                  "pdf",
                  "email",
                  "workspace"
                ]
              }
            ]
          },
          "capability": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "additionalProperties": false
      },
      "Suggestion": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "rank": {
            "type": "number"
          },
          "sourceBlockIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "compositionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "target": {
            "$ref": "#/components/schemas/ActionTarget"
          },
          "requiresConfirmation": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "suggested",
              "accepted",
              "dismissed",
              "complete"
            ]
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "title",
          "rationale",
          "rank",
          "sourceBlockIds",
          "compositionId",
          "target",
          "requiresConfirmation",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "SessionStatus": {
        "type": "string",
        "enum": [
          "ready",
          "active",
          "paused",
          "finalizing",
          "complete",
          "deleted",
          "error"
        ]
      },
      "CaptureMode": {
        "type": "string",
        "enum": [
          "microphone",
          "microphone-and-system-audio"
        ]
      },
      "EventActor": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "participant"
              },
              "participantId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "participantId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "system"
              },
              "component": {
                "type": "string",
                "enum": [
                  "mac",
                  "workspace",
                  "session"
                ]
              }
            },
            "required": [
              "kind",
              "component"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "agent"
              },
              "role": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/AgentRole"
                  },
                  {
                    "type": "string",
                    "const": "organizer"
                  },
                  {
                    "type": "string",
                    "const": "visualizer"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "role"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ArtifactNode": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "kind": {
            "$ref": "#/components/schemas/ArtifactKind"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "due": {
            "type": "string"
          },
          "workStatus": {
            "type": "string",
            "enum": [
              "todo",
              "in-progress",
              "done",
              "blocked"
            ]
          },
          "parentId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "position": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "required": [
              "x",
              "y"
            ],
            "additionalProperties": false
          },
          "confidence": {
            "type": "number"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "id",
          "kind",
          "title"
        ],
        "additionalProperties": false
      },
      "ArtifactSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "kind": {
            "$ref": "#/components/schemas/ArtifactKind"
          },
          "title": {
            "type": "string"
          },
          "revision": {
            "type": "number"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArtifactNode"
            }
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "confirmed"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "revision",
          "nodes",
          "updatedAt",
          "status"
        ],
        "additionalProperties": false
      },
      "TranscriptSegment": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "text": {
            "type": "string"
          },
          "speakerId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "startedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "endedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "chunkId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "id",
          "text",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "CapWorksEventPayloads": {
        "type": "object",
        "properties": {
          "session.started": {
            "type": "object",
            "properties": {
              "startedBy": {
                "$ref": "#/components/schemas/Identifier"
              },
              "captureMode": {
                "$ref": "#/components/schemas/CaptureMode"
              }
            },
            "required": [
              "startedBy",
              "captureMode"
            ],
            "additionalProperties": false
          },
          "session.paused": {
            "type": "object",
            "properties": {
              "pausedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "pausedAt"
            ],
            "additionalProperties": false
          },
          "session.resumed": {
            "type": "object",
            "properties": {
              "resumedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "resumedAt"
            ],
            "additionalProperties": false
          },
          "session.deleted": {
            "type": "object",
            "properties": {
              "deletedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "deletedAt"
            ],
            "additionalProperties": false
          },
          "participant.joined": {
            "type": "object",
            "properties": {
              "participantId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "participantId",
              "displayName"
            ],
            "additionalProperties": false
          },
          "transcript.delta": {
            "type": "object",
            "properties": {
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "text": {
                "type": "string"
              },
              "chunkId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "segmentId",
              "text"
            ],
            "additionalProperties": false
          },
          "transcript.final": {
            "type": "object",
            "properties": {
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "text": {
                "type": "string"
              },
              "speakerId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "chunkId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "segmentId",
              "text"
            ],
            "additionalProperties": false
          },
          "artifact.proposed": {
            "type": "object",
            "properties": {
              "artifact": {
                "$ref": "#/components/schemas/ArtifactSnapshot"
              }
            },
            "required": [
              "artifact"
            ],
            "additionalProperties": false
          },
          "artifact.updated": {
            "type": "object",
            "properties": {
              "artifact": {
                "$ref": "#/components/schemas/ArtifactSnapshot"
              }
            },
            "required": [
              "artifact"
            ],
            "additionalProperties": false
          },
          "artifact.confirmed": {
            "type": "object",
            "properties": {
              "artifactId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "revision": {
                "type": "number"
              },
              "confirmedBy": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "artifactId",
              "revision",
              "confirmedBy"
            ],
            "additionalProperties": false
          },
          "artifact.superseded": {
            "type": "object",
            "properties": {
              "artifactId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "supersededBy": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "artifactId",
              "supersededBy"
            ],
            "additionalProperties": false
          },
          "agent.activated": {
            "type": "object",
            "properties": {
              "role": {
                "$ref": "#/components/schemas/AgentRole"
              },
              "reason": {
                "type": "string"
              },
              "taskIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              }
            },
            "required": [
              "role",
              "reason",
              "taskIds"
            ],
            "additionalProperties": false
          },
          "task.started": {
            "type": "object",
            "properties": {
              "task": {
                "$ref": "#/components/schemas/AgentTask"
              }
            },
            "required": [
              "task"
            ],
            "additionalProperties": false
          },
          "task.updated": {
            "type": "object",
            "properties": {
              "task": {
                "$ref": "#/components/schemas/AgentTask"
              }
            },
            "required": [
              "task"
            ],
            "additionalProperties": false
          },
          "block.proposed": {
            "type": "object",
            "properties": {
              "block": {
                "$ref": "#/components/schemas/Block"
              }
            },
            "required": [
              "block"
            ],
            "additionalProperties": false
          },
          "block.updated": {
            "type": "object",
            "properties": {
              "block": {
                "$ref": "#/components/schemas/Block"
              }
            },
            "required": [
              "block"
            ],
            "additionalProperties": false
          },
          "composition.updated": {
            "type": "object",
            "properties": {
              "composition": {
                "$ref": "#/components/schemas/Composition"
              }
            },
            "required": [
              "composition"
            ],
            "additionalProperties": false
          },
          "action.suggested": {
            "type": "object",
            "properties": {
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "title": {
                "type": "string"
              },
              "requiresConfirmation": {
                "type": "boolean"
              },
              "suggestion": {
                "$ref": "#/components/schemas/Suggestion"
              }
            },
            "required": [
              "actionId",
              "title",
              "requiresConfirmation"
            ],
            "additionalProperties": false
          },
          "execution.started": {
            "type": "object",
            "properties": {
              "executionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "executionId",
              "actionId"
            ],
            "additionalProperties": false
          },
          "execution.updated": {
            "type": "object",
            "properties": {
              "executionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "status": {
                "type": "string",
                "enum": [
                  "running",
                  "waiting-for-confirmation",
                  "complete",
                  "failed"
                ]
              }
            },
            "required": [
              "executionId",
              "status"
            ],
            "additionalProperties": false
          },
          "session.finalizing": {
            "type": "object",
            "properties": {
              "artifactCount": {
                "type": "number"
              }
            },
            "required": [
              "artifactCount"
            ],
            "additionalProperties": false
          },
          "session.ready": {
            "type": "object",
            "properties": {
              "artifactIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              },
              "completedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              },
              "snapshotRevision": {
                "type": "number"
              }
            },
            "required": [
              "artifactIds",
              "completedAt",
              "snapshotRevision"
            ],
            "additionalProperties": false
          },
          "session.error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          },
          "speaker.identity.updated": {
            "type": "object",
            "properties": {
              "speakerId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "identityId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "displayName": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "candidate",
                  "active",
                  "conflicted",
                  "opted-out",
                  "deleted"
                ]
              },
              "confidence": {
                "type": "number"
              }
            },
            "required": [
              "speakerId",
              "status"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "session.started",
          "session.paused",
          "session.resumed",
          "session.deleted",
          "participant.joined",
          "transcript.delta",
          "transcript.final",
          "artifact.proposed",
          "artifact.updated",
          "artifact.confirmed",
          "artifact.superseded",
          "agent.activated",
          "task.started",
          "task.updated",
          "block.proposed",
          "block.updated",
          "composition.updated",
          "action.suggested",
          "execution.started",
          "execution.updated",
          "session.finalizing",
          "session.ready",
          "session.error",
          "speaker.identity.updated"
        ],
        "additionalProperties": false
      },
      "CapWorksEventType": {
        "type": "string",
        "enum": [
          "session.started",
          "session.paused",
          "session.resumed",
          "session.deleted",
          "participant.joined",
          "transcript.delta",
          "transcript.final",
          "artifact.proposed",
          "artifact.updated",
          "artifact.confirmed",
          "artifact.superseded",
          "agent.activated",
          "task.started",
          "task.updated",
          "block.proposed",
          "block.updated",
          "composition.updated",
          "action.suggested",
          "execution.started",
          "execution.updated",
          "session.finalizing",
          "session.ready",
          "session.error",
          "speaker.identity.updated"
        ]
      },
      "CapWorksEvent": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2estarted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2epaused_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2eresumed_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2edeleted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22participant_2ejoined_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22transcript_2edelta_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22transcript_2efinal_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22artifact_2eproposed_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22artifact_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22artifact_2econfirmed_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22artifact_2esuperseded_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22agent_2eactivated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22task_2estarted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22task_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22block_2eproposed_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22block_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22composition_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22action_2esuggested_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22execution_2estarted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22execution_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2efinalizing_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2eready_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22session_2eerror_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelope_3c_22speaker_2eidentity_2eupdated_22_3e"
          }
        ]
      },
      "EventEnvelope_3c_22session_2estarted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.started"
          },
          "payload": {
            "type": "object",
            "properties": {
              "startedBy": {
                "$ref": "#/components/schemas/Identifier"
              },
              "captureMode": {
                "$ref": "#/components/schemas/CaptureMode"
              }
            },
            "required": [
              "startedBy",
              "captureMode"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22session_2epaused_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.paused"
          },
          "payload": {
            "type": "object",
            "properties": {
              "pausedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "pausedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22session_2eresumed_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.resumed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "resumedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "resumedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22session_2edeleted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.deleted"
          },
          "payload": {
            "type": "object",
            "properties": {
              "deletedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "deletedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22participant_2ejoined_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "participant.joined"
          },
          "payload": {
            "type": "object",
            "properties": {
              "participantId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "participantId",
              "displayName"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22transcript_2edelta_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "transcript.delta"
          },
          "payload": {
            "type": "object",
            "properties": {
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "text": {
                "type": "string"
              },
              "chunkId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "segmentId",
              "text"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22transcript_2efinal_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "transcript.final"
          },
          "payload": {
            "type": "object",
            "properties": {
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "text": {
                "type": "string"
              },
              "speakerId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "chunkId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "segmentId",
              "text"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22artifact_2eproposed_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "artifact.proposed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "artifact": {
                "$ref": "#/components/schemas/ArtifactSnapshot"
              }
            },
            "required": [
              "artifact"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22artifact_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "artifact.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "artifact": {
                "$ref": "#/components/schemas/ArtifactSnapshot"
              }
            },
            "required": [
              "artifact"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22artifact_2econfirmed_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "artifact.confirmed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "artifactId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "revision": {
                "type": "number"
              },
              "confirmedBy": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "artifactId",
              "revision",
              "confirmedBy"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22artifact_2esuperseded_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "artifact.superseded"
          },
          "payload": {
            "type": "object",
            "properties": {
              "artifactId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "supersededBy": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "artifactId",
              "supersededBy"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22agent_2eactivated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "agent.activated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "role": {
                "$ref": "#/components/schemas/AgentRole"
              },
              "reason": {
                "type": "string"
              },
              "taskIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              }
            },
            "required": [
              "role",
              "reason",
              "taskIds"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22task_2estarted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "task.started"
          },
          "payload": {
            "type": "object",
            "properties": {
              "task": {
                "$ref": "#/components/schemas/AgentTask"
              }
            },
            "required": [
              "task"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22task_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "task.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "task": {
                "$ref": "#/components/schemas/AgentTask"
              }
            },
            "required": [
              "task"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22block_2eproposed_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "block.proposed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "block": {
                "$ref": "#/components/schemas/Block"
              }
            },
            "required": [
              "block"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22block_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "block.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "block": {
                "$ref": "#/components/schemas/Block"
              }
            },
            "required": [
              "block"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22composition_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "composition.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "composition": {
                "$ref": "#/components/schemas/Composition"
              }
            },
            "required": [
              "composition"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22action_2esuggested_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "action.suggested"
          },
          "payload": {
            "type": "object",
            "properties": {
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "title": {
                "type": "string"
              },
              "requiresConfirmation": {
                "type": "boolean"
              },
              "suggestion": {
                "$ref": "#/components/schemas/Suggestion"
              }
            },
            "required": [
              "actionId",
              "title",
              "requiresConfirmation"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22execution_2estarted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "execution.started"
          },
          "payload": {
            "type": "object",
            "properties": {
              "executionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "executionId",
              "actionId"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22execution_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "execution.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "executionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "status": {
                "type": "string",
                "enum": [
                  "running",
                  "waiting-for-confirmation",
                  "complete",
                  "failed"
                ]
              }
            },
            "required": [
              "executionId",
              "status"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22session_2efinalizing_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.finalizing"
          },
          "payload": {
            "type": "object",
            "properties": {
              "artifactCount": {
                "type": "number"
              }
            },
            "required": [
              "artifactCount"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22session_2eready_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.ready"
          },
          "payload": {
            "type": "object",
            "properties": {
              "artifactIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              },
              "completedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              },
              "snapshotRevision": {
                "type": "number"
              }
            },
            "required": [
              "artifactIds",
              "completedAt",
              "snapshotRevision"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22session_2eerror_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "session.error"
          },
          "payload": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelope_3c_22speaker_2eidentity_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "type": {
            "type": "string",
            "const": "speaker.identity.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "speakerId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "identityId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "displayName": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "candidate",
                  "active",
                  "conflicted",
                  "opted-out",
                  "deleted"
                ]
              },
              "confidence": {
                "type": "number"
              }
            },
            "required": [
              "speakerId",
              "status"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "sessionId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "SessionSnapshot": {
        "type": "object",
        "properties": {
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SessionStatus"
          },
          "captureMode": {
            "$ref": "#/components/schemas/CaptureMode"
          },
          "contentLanguage": {
            "type": "string"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "completedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "archivedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "lastSequence": {
            "type": "number"
          },
          "snapshotRevision": {
            "type": "number"
          },
          "participants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/Identifier"
                },
                "displayName": {
                  "type": "string"
                },
                "isCapturing": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "displayName",
                "isCapturing"
              ],
              "additionalProperties": false
            }
          },
          "captureSource": {
            "type": "object",
            "properties": {
              "deviceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "platform": {
                "type": "string",
                "enum": [
                  "ios",
                  "macos",
                  "web"
                ]
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "deviceId",
              "platform",
              "label"
            ],
            "additionalProperties": false,
            "description": "当前唯一收音设备。其它端只同步结果，不得再显示成本机「正在听」。"
          },
          "speakerAliases": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "User-confirmed names. Workspace member aliases may be inherited across sessions."
          },
          "transcripts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TranscriptSegment"
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArtifactSnapshot"
            }
          },
          "orchestration": {
            "$ref": "#/components/schemas/SessionOrchestration"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Block"
            }
          },
          "relationships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Relationship"
            }
          },
          "composition": {
            "$ref": "#/components/schemas/Composition"
          },
          "workSet": {
            "$ref": "#/components/schemas/WorkSet"
          },
          "suggestions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Suggestion"
            }
          }
        },
        "required": [
          "sessionId",
          "workspaceId",
          "title",
          "status",
          "captureMode",
          "createdAt",
          "updatedAt",
          "lastSequence",
          "snapshotRevision",
          "participants",
          "transcripts",
          "artifacts"
        ],
        "additionalProperties": false
      },
      "AccountBootstrapRequest": {
        "type": "object",
        "properties": {
          "inviteToken": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "InvitationLoginIntentRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "InvitationLoginIntentResponse": {
        "type": "object",
        "properties": {
          "workspaceName": {
            "type": "string"
          },
          "invitedEmail": {
            "type": "string"
          },
          "contentPermission": {
            "$ref": "#/components/schemas/WorkspaceContentPermission"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectName": {
            "type": "string"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "workspaceName",
          "invitedEmail",
          "contentPermission",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceContentPermission": {
        "type": "string",
        "enum": [
          "edit",
          "view"
        ],
        "description": "内容协作权限独立于组织管理角色；view 仍可在场、查看与评论。"
      },
      "VoiceProfileModelManifest": {
        "type": "object",
        "properties": {
          "runtime": {
            "type": "string",
            "const": "sherpa-onnx"
          },
          "runtimeVersion": {
            "type": "string",
            "const": "1.13.2"
          },
          "modelVersion": {
            "type": "string",
            "const": "3dspeaker-campplus-zh-en-advanced-v1"
          },
          "fileName": {
            "type": "string",
            "const": "3dspeaker_speech_campplus_sv_zh_en_16k-common_advanced.onnx"
          },
          "sha256": {
            "type": "string",
            "const": "aa3cfc16963a10586a9393f5035d6d6b57e98d358b347f80c2a30bf4f00ceba2"
          },
          "sizeBytes": {
            "type": "number",
            "const": 28281164
          },
          "embeddingDimension": {
            "type": "number",
            "const": 192
          },
          "sampleRate": {
            "type": "number",
            "const": 16000
          },
          "downloadPath": {
            "type": "string"
          }
        },
        "required": [
          "runtime",
          "runtimeVersion",
          "modelVersion",
          "fileName",
          "sha256",
          "sizeBytes",
          "embeddingDimension",
          "sampleRate",
          "downloadPath"
        ],
        "additionalProperties": false
      },
      "CreateVoiceProfileEnrollmentRequest": {
        "type": "object",
        "properties": {
          "consentVersion": {
            "type": "string"
          }
        },
        "required": [
          "consentVersion"
        ],
        "additionalProperties": false
      },
      "CreateVoiceProfileEnrollmentResponse": {
        "type": "object",
        "properties": {
          "enrollment": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "consentVersion": {
                "type": "string"
              },
              "expiresAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "id",
              "consentVersion",
              "expiresAt"
            ],
            "additionalProperties": false
          },
          "model": {
            "$ref": "#/components/schemas/VoiceProfileModelManifest"
          }
        },
        "required": [
          "enrollment",
          "model"
        ],
        "additionalProperties": false
      },
      "SaveVoiceProfileEnrollmentRequest": {
        "type": "object",
        "properties": {
          "modelVersion": {
            "type": "string",
            "const": "3dspeaker-campplus-zh-en-advanced-v1"
          },
          "embeddings": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          "expectedRevision": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "modelVersion",
          "embeddings",
          "expectedRevision"
        ],
        "additionalProperties": false
      },
      "VoiceProfileResponse": {
        "type": "object",
        "properties": {
          "profile": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "modelVersion": {
                    "type": "string",
                    "const": "3dspeaker-campplus-zh-en-advanced-v1"
                  },
                  "revision": {
                    "type": "number"
                  },
                  "embeddings": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    }
                  },
                  "consentVersion": {
                    "type": "string"
                  },
                  "consentedAt": {
                    "$ref": "#/components/schemas/ISO8601Timestamp"
                  },
                  "updatedAt": {
                    "$ref": "#/components/schemas/ISO8601Timestamp"
                  }
                },
                "required": [
                  "modelVersion",
                  "revision",
                  "embeddings",
                  "consentVersion",
                  "consentedAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "profile"
        ],
        "additionalProperties": false
      },
      "DeleteVoiceProfileResponse": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        },
        "required": [
          "deleted"
        ],
        "additionalProperties": false
      },
      "WorkspaceVoiceIdentityStatus": {
        "type": "string",
        "enum": [
          "candidate",
          "active",
          "conflicted",
          "disabled"
        ]
      },
      "WorkspaceVoiceIdentity": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "displayName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkspaceVoiceIdentityStatus"
          },
          "hasPreview": {
            "type": "boolean"
          },
          "modelVersion": {
            "type": "string",
            "const": "3dspeaker-campplus-zh-en-advanced-v1"
          },
          "sampleCount": {
            "type": "number"
          },
          "confidence": {
            "type": "number"
          },
          "firstSeenSessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "lastSeenAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "occurrences": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sessionId": {
                  "$ref": "#/components/schemas/Identifier"
                },
                "sessionTitle": {
                  "type": "string"
                },
                "speakerId": {
                  "$ref": "#/components/schemas/Identifier"
                },
                "updatedAt": {
                  "$ref": "#/components/schemas/ISO8601Timestamp"
                }
              },
              "required": [
                "sessionId",
                "sessionTitle",
                "speakerId",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "workspaceId",
          "status",
          "hasPreview",
          "modelVersion",
          "sampleCount",
          "confidence",
          "firstSeenSessionId",
          "lastSeenAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceVoiceIdentityListResponse": {
        "type": "object",
        "properties": {
          "identities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceVoiceIdentity"
            }
          }
        },
        "required": [
          "identities"
        ],
        "additionalProperties": false
      },
      "WorkspaceVoiceIdentityUtterance": {
        "type": "object",
        "properties": {
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionTitle": {
            "type": "string"
          },
          "speakerId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "segmentId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "text": {
            "type": "string"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "sessionId",
          "sessionTitle",
          "speakerId",
          "segmentId",
          "text",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceVoiceIdentityDetailResponse": {
        "type": "object",
        "properties": {
          "identity": {
            "$ref": "#/components/schemas/WorkspaceVoiceIdentity"
          },
          "utterances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceVoiceIdentityUtterance"
            }
          }
        },
        "required": [
          "identity",
          "utterances"
        ],
        "additionalProperties": false
      },
      "UpdateWorkspaceVoiceIdentityRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "conflicted",
              "disabled"
            ]
          }
        },
        "additionalProperties": false
      },
      "MergeWorkspaceVoiceIdentityRequest": {
        "type": "object",
        "properties": {
          "targetIdentityId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "targetIdentityId"
        ],
        "additionalProperties": false
      },
      "SplitWorkspaceVoiceIdentityRequest": {
        "type": "object",
        "properties": {
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "speakerId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "sessionId",
          "speakerId"
        ],
        "additionalProperties": false
      },
      "DeleteWorkspaceVoiceIdentityResponse": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean"
          },
          "anonymizedSessions": {
            "type": "number"
          }
        },
        "required": [
          "deleted",
          "anonymizedSessions"
        ],
        "additionalProperties": false
      },
      "OptOutSessionSpeakerResponse": {
        "type": "object",
        "properties": {
          "optedOut": {
            "type": "boolean"
          },
          "deletedIdentity": {
            "type": "boolean"
          },
          "speakerAliases": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "optedOut",
          "deletedIdentity",
          "speakerAliases"
        ],
        "additionalProperties": false
      },
      "CreateProjectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "defaultLanguage": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "UpdateProjectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProjectStatus"
          },
          "objective": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "defaultLanguage": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateProjectResponse": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/Project"
          }
        },
        "required": [
          "project"
        ],
        "additionalProperties": false
      },
      "ProjectListResponse": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Project"
            }
          }
        },
        "required": [
          "projects"
        ],
        "additionalProperties": false
      },
      "ProjectContextResponse": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/Project"
          },
          "recentSessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionSnapshot"
            }
          }
        },
        "required": [
          "project",
          "recentSessions"
        ],
        "additionalProperties": false
      },
      "ProjectReferenceDocument": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "fileName": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "extractedCharacterCount": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "deleted"
            ]
          },
          "createdByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "fileName",
          "mimeType",
          "sizeBytes",
          "extractedCharacterCount",
          "status",
          "createdByUserId",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ProjectReferenceDocumentResponse": {
        "type": "object",
        "properties": {
          "reference": {
            "$ref": "#/components/schemas/ProjectReferenceDocument"
          }
        },
        "required": [
          "reference"
        ],
        "additionalProperties": false
      },
      "ProjectReferenceDocumentListResponse": {
        "type": "object",
        "properties": {
          "references": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectReferenceDocument"
            }
          }
        },
        "required": [
          "references"
        ],
        "additionalProperties": false
      },
      "IntegrationProviderCard": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "iconURL": {
            "type": "string"
          },
          "homepageURL": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "displayName"
              ],
              "additionalProperties": false
            }
          },
          "scenario": {
            "type": "string"
          },
          "authTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "capabilityCount": {
            "type": "number"
          },
          "capabilityHighlights": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "locallyExecutable": {
            "type": "boolean"
          },
          "auth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationAuthOption"
            }
          }
        },
        "required": [
          "service",
          "displayName",
          "categories",
          "scenario",
          "authTypes",
          "capabilityCount",
          "capabilityHighlights",
          "locallyExecutable",
          "auth"
        ],
        "additionalProperties": false
      },
      "IntegrationAuthOption": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "no_auth",
              "api_key",
              "custom_credential",
              "oauth2"
            ]
          },
          "configured": {
            "type": "boolean"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationCredentialField"
            }
          }
        },
        "required": [
          "type",
          "configured",
          "fields"
        ],
        "additionalProperties": false
      },
      "IntegrationCredentialField": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "inputType": {
            "type": "string",
            "enum": [
              "text",
              "password",
              "textarea",
              "json"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "secret": {
            "type": "boolean"
          },
          "placeholder": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "defaultValue": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "label",
          "inputType",
          "required",
          "secret"
        ],
        "additionalProperties": false
      },
      "IntegrationActionCard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "authenticated": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "service",
          "name",
          "description",
          "authenticated"
        ],
        "additionalProperties": false
      },
      "IntegrationActionDescriptor": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requiredScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "providerPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "outputSchema": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "followUpActionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "executable": {
            "type": "boolean"
          },
          "catalogOnly": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "authenticated": {
            "type": "boolean"
          }
        },
        "required": [
          "authenticated",
          "catalogOnly",
          "description",
          "executable",
          "followUpActionIds",
          "id",
          "inputSchema",
          "name",
          "outputSchema",
          "providerPermissions",
          "requiredScopes",
          "service"
        ]
      },
      "IntegrationConnectionCard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "authType": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "accountLabel": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "suspended",
              "error",
              "revoked"
            ]
          },
          "actionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "autoReadActionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lifecycleVersion": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "service",
          "alias",
          "authType",
          "displayName",
          "accountLabel",
          "isDefault",
          "scopes",
          "status",
          "actionIds",
          "autoReadActionIds",
          "lifecycleVersion"
        ],
        "additionalProperties": false
      },
      "IntegrationProviderListResponse": {
        "type": "object",
        "properties": {
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationProviderCard"
            }
          }
        },
        "required": [
          "providers"
        ],
        "additionalProperties": false
      },
      "IntegrationProviderActionListResponse": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationActionCard"
            }
          }
        },
        "required": [
          "actions"
        ],
        "additionalProperties": false
      },
      "IntegrationActionSearchResponse": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationActionCard"
            }
          }
        },
        "required": [
          "actions"
        ],
        "additionalProperties": false
      },
      "IntegrationActionDescriptorResponse": {
        "type": "object",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/IntegrationActionDescriptor"
          }
        },
        "required": [
          "action"
        ],
        "additionalProperties": false
      },
      "IntegrationActionFieldOption": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "label"
        ],
        "additionalProperties": false
      },
      "ResolveIntegrationActionFieldOptionsRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "connectionId": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "input": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "query": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "connectionId",
          "actionId",
          "field",
          "input"
        ],
        "additionalProperties": false
      },
      "ResolveIntegrationActionFieldOptionsResponse": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationActionFieldOption"
            }
          },
          "sourceActionId": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "options"
        ],
        "additionalProperties": false
      },
      "IntegrationConnectionListResponse": {
        "type": "object",
        "properties": {
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationConnectionCard"
            }
          }
        },
        "required": [
          "connections"
        ],
        "additionalProperties": false
      },
      "StartIntegrationOAuthRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "service": {
            "type": "string"
          },
          "actionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "projectId",
          "service"
        ],
        "additionalProperties": false
      },
      "StartIntegrationOAuthResponse": {
        "type": "object",
        "properties": {
          "authorizationURL": {
            "type": "string"
          },
          "connectionAlias": {
            "type": "string"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "authorizationURL",
          "connectionAlias",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "CreateIntegrationCredentialRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "service": {
            "type": "string"
          },
          "authType": {
            "type": "string",
            "enum": [
              "api_key",
              "custom_credential",
              "no_auth"
            ]
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "actionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "projectId",
          "service",
          "authType",
          "values"
        ],
        "additionalProperties": false
      },
      "UpdateIntegrationAccessRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "connectionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "connectionGrants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "connectionId": {
                  "type": "string"
                },
                "actionIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "autoReadActionIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "connectionId",
                "actionIds",
                "autoReadActionIds"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "projectId"
        ],
        "additionalProperties": false
      },
      "QueryExternalContextRequest": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "input": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          }
        },
        "required": [
          "connectionId",
          "actionId",
          "input"
        ],
        "additionalProperties": false
      },
      "ExternalContextItem": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "externalURL": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "text"
        ],
        "additionalProperties": false
      },
      "ExternalContextObservation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "connectionId": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "lifecycleVersion": {
            "type": "number"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalContextItem"
            }
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "projectId",
          "connectionId",
          "actionId",
          "lifecycleVersion",
          "items",
          "expiresAt",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "ExternalMemorySource": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "connectionId": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "lifecycleVersion": {
            "type": "number"
          },
          "externalId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "externalURL": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "contentHash": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "purging"
            ]
          },
          "chunkCount": {
            "type": "number"
          },
          "savedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "projectId",
          "createdByUserId",
          "connectionId",
          "actionId",
          "lifecycleVersion",
          "title",
          "contentHash",
          "status",
          "chunkCount",
          "savedAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "SaveExternalMemoryRequest": {
        "type": "object",
        "properties": {
          "observationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "itemIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "confirmSourceBound": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "observationId",
          "itemIds",
          "confirmSourceBound"
        ],
        "additionalProperties": false
      },
      "ExternalContextObservationResponse": {
        "type": "object",
        "properties": {
          "observation": {
            "$ref": "#/components/schemas/ExternalContextObservation"
          }
        },
        "required": [
          "observation"
        ],
        "additionalProperties": false
      },
      "ExternalMemorySourceListResponse": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalMemorySource"
            }
          }
        },
        "required": [
          "sources"
        ],
        "additionalProperties": false
      },
      "SaveExternalMemoryResponse": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalMemorySource"
            }
          }
        },
        "required": [
          "sources"
        ],
        "additionalProperties": false
      },
      "PrepareExternalActionRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionId": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "input": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "recommendationId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "projectId",
          "actionId",
          "connectionId",
          "input"
        ],
        "additionalProperties": false
      },
      "PreparedExternalAction": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionId": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "connectionAlias": {
            "type": "string"
          },
          "input": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "inputDigest": {
            "type": "string"
          },
          "schemaDigest": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "prepared",
              "approved",
              "running",
              "complete",
              "failed",
              "unknown",
              "cancelled"
            ]
          },
          "requiresApproval": {
            "type": "boolean",
            "const": true
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "recommendationId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "id",
          "projectId",
          "actionId",
          "service",
          "connectionId",
          "connectionAlias",
          "input",
          "inputDigest",
          "schemaDigest",
          "status",
          "requiresApproval",
          "expiresAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PrepareExternalActionResponse": {
        "type": "object",
        "properties": {
          "preparedAction": {
            "$ref": "#/components/schemas/PreparedExternalAction"
          }
        },
        "required": [
          "preparedAction"
        ],
        "additionalProperties": false
      },
      "ApproveExternalActionResponse": {
        "type": "object",
        "properties": {
          "preparedAction": {
            "$ref": "#/components/schemas/PreparedExternalAction"
          },
          "approvalToken": {
            "type": "string"
          }
        },
        "required": [
          "preparedAction",
          "approvalToken"
        ],
        "additionalProperties": false
      },
      "ExternalActionReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "preparedActionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionId": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "complete",
              "failed",
              "unknown"
            ]
          },
          "openConnectorRunId": {
            "type": "string"
          },
          "auditPersisted": {
            "type": "boolean"
          },
          "result": {
            "$ref": "#/components/schemas/JSONValue"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "recommendationId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "id",
          "preparedActionId",
          "projectId",
          "actionId",
          "connectionId",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ExecuteExternalActionRequest": {
        "type": "object",
        "properties": {
          "approvalToken": {
            "type": "string"
          }
        },
        "required": [
          "approvalToken"
        ],
        "additionalProperties": false
      },
      "ExecuteExternalActionResponse": {
        "type": "object",
        "properties": {
          "preparedAction": {
            "$ref": "#/components/schemas/PreparedExternalAction"
          },
          "receipt": {
            "$ref": "#/components/schemas/ExternalActionReceipt"
          }
        },
        "required": [
          "preparedAction",
          "receipt"
        ],
        "additionalProperties": false
      },
      "CreateSessionRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "captureMode": {
            "$ref": "#/components/schemas/CaptureMode"
          },
          "captureSource": {
            "type": "object",
            "properties": {
              "deviceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "platform": {
                "type": "string",
                "enum": [
                  "ios",
                  "macos",
                  "web"
                ]
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "deviceId",
              "platform",
              "label"
            ],
            "additionalProperties": false,
            "description": "当前唯一收音设备。其它端只同步结果，不得再显示成本机「正在听」。"
          }
        },
        "required": [
          "captureMode"
        ],
        "additionalProperties": false
      },
      "CreateSessionResponse": {
        "type": "object",
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/SessionSnapshot"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "websocketURL": {
            "type": "string"
          },
          "workWebsocketURL": {
            "type": "string"
          },
          "reusedExisting": {
            "type": "boolean",
            "description": "true when the account already had this open session; no new row was created."
          }
        },
        "required": [
          "snapshot",
          "conversationId",
          "websocketURL",
          "workWebsocketURL"
        ],
        "additionalProperties": false
      },
      "CreateProjectFromSessionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateProjectFromSessionResponse": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/Project"
          },
          "snapshot": {
            "$ref": "#/components/schemas/SessionSnapshot"
          },
          "created": {
            "type": "boolean"
          }
        },
        "required": [
          "project",
          "snapshot",
          "created"
        ],
        "additionalProperties": false
      },
      "SessionListResponse": {
        "type": "object",
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionSnapshot"
            }
          }
        },
        "required": [
          "sessions"
        ],
        "additionalProperties": false
      },
      "SessionSearchResponse": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionSnapshot"
            }
          }
        },
        "required": [
          "query",
          "sessions"
        ],
        "additionalProperties": false
      },
      "WorkspaceMemoryAnswerSource": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "kind": {
            "type": "string",
            "enum": [
              "transcript",
              "outcome",
              "memory"
            ]
          },
          "title": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "excerpt",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceMemoryAnswerRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "locale": {
            "type": "string",
            "enum": [
              "zh-Hans",
              "en"
            ]
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "WorkspaceMemoryAnswerResponse": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "answered",
              "no-evidence"
            ]
          },
          "answer": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceMemoryAnswerSource"
            }
          },
          "generatedBy": {
            "type": "string",
            "enum": [
              "grounded-ai",
              "extractive"
            ]
          }
        },
        "required": [
          "query",
          "status",
          "answer",
          "sources",
          "generatedBy"
        ],
        "additionalProperties": false
      },
      "TranscriptSummaryRequest": {
        "type": "object",
        "properties": {
          "segmentId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "itemText": {
            "type": "string"
          },
          "locale": {
            "type": "string",
            "enum": [
              "zh-Hans",
              "en"
            ]
          }
        },
        "required": [
          "segmentId",
          "itemText"
        ],
        "additionalProperties": false
      },
      "TranscriptSummaryResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "answered",
              "no-evidence"
            ]
          },
          "summary": {
            "type": "string"
          },
          "quote": {
            "type": "object",
            "properties": {
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "segmentId",
              "text"
            ],
            "additionalProperties": false
          },
          "generatedBy": {
            "type": "string",
            "enum": [
              "grounded-ai",
              "extractive"
            ]
          }
        },
        "required": [
          "status",
          "summary",
          "quote",
          "generatedBy"
        ],
        "additionalProperties": false
      },
      "AudioChunkResponse": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "const": true
          },
          "chunkId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "segment": {
            "$ref": "#/components/schemas/TranscriptSegment"
          },
          "duplicate": {
            "type": "boolean"
          }
        },
        "required": [
          "accepted",
          "chunkId",
          "duplicate"
        ],
        "additionalProperties": false
      },
      "ShareLinkResponse": {
        "type": "object",
        "properties": {
          "shareToken": {
            "type": "string"
          },
          "shareURL": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "comment"
            ]
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "shareToken",
          "shareURL",
          "permission"
        ],
        "additionalProperties": false
      },
      "SharedSessionResponse": {
        "type": "object",
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/SessionSnapshot"
          },
          "workSet": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkSetDetailResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "comment"
            ]
          },
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShareComment"
            }
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "snapshot",
          "workSet",
          "permission",
          "comments"
        ],
        "additionalProperties": false
      },
      "WorkSetDetailResponse": {
        "type": "object",
        "properties": {
          "workSet": {
            "$ref": "#/components/schemas/WorkSetV2"
          },
          "workObjects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkObject"
            }
          },
          "revisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkObjectRevision"
            }
          },
          "reviews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewTask"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActionV2"
            }
          },
          "executions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExecutionV2"
            }
          },
          "actionRecommendationEligibility": {
            "$ref": "#/components/schemas/ActionRecommendationEligibility"
          },
          "actionRecommendationRun": {
            "$ref": "#/components/schemas/ActionRecommendationRun"
          },
          "externalActionRecommendations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalActionRecommendation"
            }
          },
          "externalPreparedActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreparedExternalAction"
            }
          },
          "externalActionReceipts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalActionReceipt"
            }
          },
          "needsRebuild": {
            "type": "boolean",
            "description": "True when historical output was hidden by the current quality gate and should be rebuilt from its preserved transcript before presentation."
          },
          "takeover": {
            "$ref": "#/components/schemas/TakeoverDigest",
            "description": "最新未 supersede 的会后摘要；无真实行动项时缺省，前端不渲染接管条。"
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkRelation"
            }
          },
          "decisionWorkstreams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecisionWorkstream"
            },
            "description": "P6: one decision's independently reviewed professional branches."
          },
          "takeoverState": {
            "$ref": "#/components/schemas/TakeoverState",
            "description": "会后整理诚实态：失败时 UI 显示重试，不静默。"
          }
        },
        "required": [
          "workSet",
          "workObjects",
          "revisions",
          "reviews",
          "actions",
          "executions"
        ],
        "additionalProperties": false
      },
      "WorkSetV2": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "forming",
              "ready",
              "updating",
              "superseded"
            ]
          },
          "revision": {
            "type": "number"
          },
          "primaryWorkObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "placements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkSetPlacement"
            }
          },
          "reviewTaskIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "actionIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "preparedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "readyAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "conversationId",
          "title",
          "status",
          "revision",
          "placements",
          "reviewTaskIds",
          "actionIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkSetPlacement": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "order": {
            "type": "number"
          },
          "size": {
            "type": "string",
            "enum": [
              "compact",
              "standard",
              "wide",
              "hero"
            ]
          },
          "emphasis": {
            "type": "string",
            "enum": [
              "quiet",
              "normal",
              "primary"
            ]
          },
          "group": {
            "type": "string"
          }
        },
        "required": [
          "workObjectId",
          "order",
          "size",
          "emphasis"
        ],
        "additionalProperties": false
      },
      "WorkObject": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workOrderId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "family": {
            "$ref": "#/components/schemas/WorkObjectFamily"
          },
          "semanticType": {
            "$ref": "#/components/schemas/WorkObjectSemanticType"
          },
          "meetingKind": {
            "$ref": "#/components/schemas/MeetingWorkKind"
          },
          "meetingStage": {
            "$ref": "#/components/schemas/MeetingWorkStage"
          },
          "proposalState": {
            "$ref": "#/components/schemas/WorkProposalState",
            "description": "AI revision is only a proposal until a member explicitly decides it."
          },
          "stageUpdatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp",
            "description": "独立于内容 revision 的阶段乐观并发水位。"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "ownerRole": {
            "$ref": "#/components/schemas/WorkspaceRole"
          },
          "ownerUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "progressState": {
            "$ref": "#/components/schemas/WorkObjectProgressState"
          },
          "responsibilityUpdatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp",
            "description": "独立于标题、内容与审阅修改的责任状态乐观并发水位。"
          },
          "dueAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "blockedReason": {
            "type": "string"
          },
          "completedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "reviewState": {
            "$ref": "#/components/schemas/WorkObjectReviewState"
          },
          "latestRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "latestRevisionNumber": {
            "type": "number"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "conversationId",
          "family",
          "semanticType",
          "title",
          "ownerRole",
          "progressState",
          "reviewState",
          "latestRevisionId",
          "latestRevisionNumber",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkObjectFamily": {
        "type": "string",
        "enum": [
          "task",
          "issue",
          "decision",
          "requirement",
          "design",
          "research",
          "communication",
          "code",
          "reference",
          "asset",
          "action",
          "structure",
          "other"
        ]
      },
      "WorkObjectSemanticType": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BuiltInWorkObjectSemanticType"
          },
          {
            "type": "string"
          }
        ]
      },
      "BuiltInWorkObjectSemanticType": {
        "type": "string",
        "enum": [
          "todo-list",
          "bug",
          "investigation-checklist",
          "product-decision",
          "requirement",
          "acceptance-criteria",
          "design-brief",
          "design-direction",
          "moodboard",
          "research-result",
          "chat-draft",
          "email-draft",
          "code-task",
          "external-link",
          "file",
          "generated-image",
          "mind-map",
          "external-action"
        ]
      },
      "MeetingWorkKind": {
        "type": "string",
        "enum": [
          "outcome",
          "decision",
          "action",
          "question",
          "reference"
        ],
        "description": "会议中的统一工作语言。它与更细的 family/semanticType 并存：前者让跨职能 团队快速归类，后者继续为执行器和历史客户端提供精确语义。"
      },
      "MeetingWorkStage": {
        "type": "string",
        "enum": [
          "captured",
          "structured",
          "executing",
          "ready-for-review",
          "accepted"
        ],
        "description": "人工可审计的推进阶段；AI 建议不得直接改变该字段。"
      },
      "WorkProposalState": {
        "type": "string",
        "enum": [
          "human",
          "ai-pending",
          "ai-accepted",
          "ai-rejected"
        ]
      },
      "WorkspaceRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "product-owner",
          "engineering-owner",
          "design-owner",
          "member"
        ]
      },
      "WorkObjectProgressState": {
        "type": "string",
        "enum": [
          "todo",
          "in-progress",
          "blocked",
          "done"
        ],
        "description": "责任推进状态与内容审阅状态相互独立：负责人可以推进工作，审阅人负责质量闸。"
      },
      "WorkObjectReviewState": {
        "type": "string",
        "enum": [
          "draft",
          "ready-for-review",
          "changes-requested",
          "approved",
          "superseded"
        ]
      },
      "WorkObjectRevision": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "revision": {
            "type": "number"
          },
          "revisionHash": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/WorkObjectContent"
          },
          "confidence": {
            "type": "number"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkObjectSource"
            }
          },
          "contextRefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkContextRef"
            },
            "description": "项目记忆召回来源；用于展示证据并组装确认后的本地或 OpenConnector 任务。"
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "agent"
                  },
                  "role": {
                    "type": "string"
                  },
                  "workOrderId": {
                    "$ref": "#/components/schemas/Identifier"
                  }
                },
                "required": [
                  "kind",
                  "role"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "user"
                  },
                  "userId": {
                    "$ref": "#/components/schemas/Identifier"
                  }
                },
                "required": [
                  "kind",
                  "userId"
                ],
                "additionalProperties": false
              }
            ]
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workObjectId",
          "revision",
          "revisionHash",
          "title",
          "content",
          "confidence",
          "sources",
          "createdBy",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "WorkObjectContent": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "checklist"
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ChecklistItem"
                }
              }
            },
            "required": [
              "kind",
              "items"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "bug"
              },
              "symptom": {
                "type": "string"
              },
              "impact": {
                "type": "string"
              },
              "environment": {
                "type": "string"
              },
              "reproductionSteps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "expectedBehavior": {
                "type": "string"
              },
              "actualBehavior": {
                "type": "string"
              },
              "investigation": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ChecklistItem"
                }
              }
            },
            "required": [
              "kind",
              "symptom",
              "reproductionSteps",
              "investigation"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "decision"
              },
              "outcome": {
                "type": "string"
              },
              "rationale": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "alternatives": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "consequences": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kind",
              "outcome",
              "rationale"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "requirement"
              },
              "problem": {
                "type": "string"
              },
              "userStory": {
                "type": "string"
              },
              "scope": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "acceptanceCriteria": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "exclusions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kind",
              "problem",
              "scope",
              "acceptanceCriteria"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "design-brief"
              },
              "challenge": {
                "type": "string"
              },
              "audience": {
                "type": "string"
              },
              "principles": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "directions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "references": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Identifier"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description"
                  ],
                  "additionalProperties": false
                }
              },
              "deliverables": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "visualRequest": {
                "$ref": "#/components/schemas/VisualWorkRequestV1"
              },
              "compiledVisualBrief": {
                "$ref": "#/components/schemas/VisualBriefV1"
              },
              "designArtifact": {
                "$ref": "#/components/schemas/DesignArtifactV1"
              }
            },
            "required": [
              "kind",
              "challenge",
              "principles",
              "directions",
              "deliverables"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "moodboard"
              },
              "thesis": {
                "type": "string"
              },
              "references": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "title": {
                      "type": "string"
                    },
                    "imageURL": {
                      "type": "string"
                    },
                    "sourceURL": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    },
                    "palette": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "sourceProvider": {
                      "type": "string",
                      "enum": [
                        "openverse",
                        "wikimedia",
                        "user-provided"
                      ]
                    },
                    "creator": {
                      "type": "string"
                    },
                    "license": {
                      "type": "string"
                    },
                    "rightsStatus": {
                      "type": "string",
                      "enum": [
                        "verified-open",
                        "user-attested",
                        "unverified"
                      ]
                    },
                    "selection": {
                      "type": "string",
                      "enum": [
                        "candidate",
                        "shortlisted",
                        "rejected",
                        "accepted"
                      ]
                    },
                    "rationale": {
                      "type": "string"
                    },
                    "votes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "$ref": "#/components/schemas/Identifier"
                          },
                          "decision": {
                            "type": "string",
                            "enum": [
                              "shortlist",
                              "reject"
                            ]
                          },
                          "updatedAt": {
                            "$ref": "#/components/schemas/ISO8601Timestamp"
                          }
                        },
                        "required": [
                          "userId",
                          "decision",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title"
                  ],
                  "additionalProperties": false
                }
              },
              "directionDecision": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "accepted"
                    ]
                  },
                  "statement": {
                    "type": "string"
                  },
                  "acceptedReferenceIds": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Identifier"
                    }
                  }
                },
                "required": [
                  "status",
                  "statement",
                  "acceptedReferenceIds"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "thesis",
              "references"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "research"
              },
              "question": {
                "type": "string"
              },
              "findings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "finding": {
                      "type": "string"
                    },
                    "implication": {
                      "type": "string"
                    },
                    "sourceIds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Identifier"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "finding",
                    "sourceIds"
                  ],
                  "additionalProperties": false
                }
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "publisher": {
                      "type": "string"
                    },
                    "retrievedAt": {
                      "$ref": "#/components/schemas/ISO8601Timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "kind",
              "question",
              "findings",
              "sources"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "draft"
              },
              "channel": {
                "type": "string",
                "enum": [
                  "chat",
                  "email",
                  "other"
                ]
              },
              "subject": {
                "type": "string"
              },
              "recipients": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "body": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "channel",
              "body"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "code-task"
              },
              "repository": {
                "type": "string"
              },
              "authorizedPath": {
                "type": "string"
              },
              "objective": {
                "type": "string"
              },
              "plan": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "acceptanceCriteria": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "suggestedRunner": {
                "type": "string",
                "enum": [
                  "codex",
                  "claude-code",
                  "either"
                ]
              }
            },
            "required": [
              "kind",
              "objective",
              "plan",
              "acceptanceCriteria",
              "suggestedRunner"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "mind-map"
              },
              "rootId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "nodes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "label": {
                      "type": "string"
                    },
                    "parentId": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "note": {
                      "type": "string"
                    },
                    "sourceSegmentIds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Identifier"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "label"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "kind",
              "rootId",
              "nodes"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "asset"
              },
              "assetType": {
                "type": "string",
                "enum": [
                  "image",
                  "file",
                  "link"
                ]
              },
              "url": {
                "type": "string"
              },
              "thumbnailURL": {
                "type": "string"
              },
              "mimeType": {
                "type": "string"
              },
              "caption": {
                "type": "string"
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/JSONValue"
                }
              }
            },
            "required": [
              "kind",
              "assetType",
              "url"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "asset-collection"
              },
              "query": {
                "type": "string"
              },
              "assets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "thumbnailURL": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    },
                    "sourceWorkObjectId": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "sourceRevisionId": {
                      "$ref": "#/components/schemas/Identifier"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "url",
                    "sourceWorkObjectId",
                    "sourceRevisionId"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "kind",
              "query",
              "assets"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "action"
              },
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "actionId",
              "label"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "structured"
              },
              "fields": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/JSONValue"
                }
              },
              "sections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "title": {
                      "type": "string"
                    },
                    "body": {
                      "$ref": "#/components/schemas/JSONValue"
                    }
                  },
                  "required": [
                    "id",
                    "body"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "kind",
              "fields"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "elements"
              },
              "elements": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlockElement"
                }
              },
              "plug": {
                "$ref": "#/components/schemas/WorkPlug"
              },
              "visualBrief": {
                "type": "string",
                "deprecated": "旧视觉动作的文本简报；新写入以 visualRequest 为准。"
              },
              "visualRequest": {
                "$ref": "#/components/schemas/VisualWorkRequestV1"
              },
              "compiledVisualBrief": {
                "$ref": "#/components/schemas/VisualBriefV1"
              },
              "designArtifact": {
                "$ref": "#/components/schemas/DesignArtifactV1"
              }
            },
            "required": [
              "kind",
              "elements"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ChecklistItem": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "todo",
              "in-progress",
              "done",
              "blocked"
            ]
          },
          "ownerUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "ownerLabel": {
            "type": "string"
          },
          "dueAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "priority": {
            "type": "string",
            "enum": [
              "urgent",
              "high",
              "normal",
              "low"
            ]
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "id",
          "title",
          "state"
        ],
        "additionalProperties": false
      },
      "VisualWorkRequestV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "intent": {
            "$ref": "#/components/schemas/VisualIntent"
          },
          "goal": {
            "type": "string"
          },
          "deliverable": {
            "$ref": "#/components/schemas/VisualDeliverable"
          },
          "usage": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "style": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "composition": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "palette": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "literalText": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "type": "object",
            "properties": {
              "aspectRatio": {
                "type": "string"
              },
              "background": {
                "type": "string",
                "enum": [
                  "opaque",
                  "transparent"
                ]
              }
            },
            "additionalProperties": false
          },
          "mustInclude": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mustAvoid": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "referenceAssetIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "directions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualDirectionV1"
            },
            "description": "Two or three meaningfully different, reviewable directions."
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "contextRefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkContextRef"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missingCriticalFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confidence": {
            "type": "number"
          }
        },
        "required": [
          "version",
          "intent",
          "goal",
          "sourceSegmentIds",
          "assumptions",
          "missingCriticalFields",
          "confidence"
        ],
        "additionalProperties": false
      },
      "VisualIntent": {
        "type": "string",
        "enum": [
          "reference-search",
          "image-generation",
          "image-edit",
          "asset-retrieval",
          "visual-analysis",
          "none"
        ],
        "description": "视觉工作请求的版本化语义契约。它描述用户真正想推进的工作， 动作标题、关键词和具体模型 prompt 都不能反向充当路由真相源。"
      },
      "VisualDeliverable": {
        "type": "string",
        "enum": [
          "logo",
          "app-icon",
          "illustration",
          "hero",
          "product-mockup",
          "photo",
          "diagram",
          "moodboard",
          "other"
        ]
      },
      "VisualDirectionV1": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "name": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "delta": {
            "$ref": "#/components/schemas/VisualRevisionDeltaV1"
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "rationale",
          "delta",
          "assumptions"
        ],
        "additionalProperties": false
      },
      "VisualRevisionDeltaV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "changedFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualRevisionField"
            }
          },
          "values": {
            "type": "object",
            "properties": {
              "goal": {
                "type": "string"
              },
              "deliverable": {
                "$ref": "#/components/schemas/VisualDeliverable"
              },
              "usage": {
                "type": "string"
              },
              "audience": {
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "style": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "composition": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "palette": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "literalText": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "format": {
                "type": "object",
                "properties": {
                  "aspectRatio": {
                    "type": "string"
                  },
                  "background": {
                    "type": "string",
                    "enum": [
                      "opaque",
                      "transparent"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "mustInclude": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mustAvoid": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "referenceAssetIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              }
            },
            "additionalProperties": false
          },
          "mergeMode": {
            "type": "string",
            "enum": [
              "replace",
              "append"
            ],
            "description": "Direction exploration appends qualities; user corrections replace them."
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "feedback": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          }
        },
        "required": [
          "version",
          "changedFields",
          "values",
          "sourceSegmentIds"
        ],
        "additionalProperties": false
      },
      "VisualRevisionField": {
        "type": "string",
        "enum": [
          "goal",
          "deliverable",
          "usage",
          "audience",
          "subject",
          "style",
          "composition",
          "palette",
          "literalText",
          "format",
          "mustInclude",
          "mustAvoid",
          "referenceAssetIds"
        ],
        "description": "A visual revision is an explicit field mask, not a replacement prompt. This is the shared invariant behind first-round directions and later feedback such as “keep the composition, only change the color”."
      },
      "WorkContextRef": {
        "type": "object",
        "properties": {
          "sourceType": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "externalURL": {
            "type": "string"
          }
        },
        "required": [
          "sourceType",
          "sourceId",
          "title",
          "excerpt"
        ],
        "additionalProperties": false
      },
      "VisualBriefV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "requestVersion": {
            "type": "number",
            "const": 1
          },
          "intent": {
            "type": "string",
            "enum": [
              "reference-search",
              "image-generation",
              "image-edit",
              "asset-retrieval",
              "visual-analysis"
            ],
            "description": "视觉工作请求的版本化语义契约。它描述用户真正想推进的工作， 动作标题、关键词和具体模型 prompt 都不能反向充当路由真相源。"
          },
          "deliverable": {
            "$ref": "#/components/schemas/VisualDeliverable"
          },
          "objective": {
            "type": "string"
          },
          "usage": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "direction": {
            "type": "object",
            "properties": {
              "style": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "composition": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "palette": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "style",
              "composition",
              "palette"
            ],
            "additionalProperties": false
          },
          "content": {
            "type": "object",
            "properties": {
              "literalText": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mustInclude": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mustAvoid": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "literalText",
              "mustInclude",
              "mustAvoid"
            ],
            "additionalProperties": false
          },
          "format": {
            "type": "object",
            "properties": {
              "aspectRatio": {
                "type": "string"
              },
              "background": {
                "type": "string",
                "enum": [
                  "opaque",
                  "transparent"
                ]
              }
            },
            "additionalProperties": false
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missingCriticalFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "readiness": {
            "$ref": "#/components/schemas/VisualBriefReadiness"
          },
          "nextQuestion": {
            "type": "object",
            "properties": {
              "field": {
                "type": "string"
              },
              "prompt": {
                "type": "string"
              }
            },
            "required": [
              "field",
              "prompt"
            ],
            "additionalProperties": false
          },
          "executionTarget": {
            "type": "string",
            "enum": [
              "reference-search",
              "image-generation",
              "asset-retrieval",
              "none"
            ]
          },
          "executionInstruction": {
            "type": "string"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "contextRefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkContextRef"
            }
          }
        },
        "required": [
          "version",
          "requestVersion",
          "intent",
          "objective",
          "direction",
          "content",
          "assumptions",
          "missingCriticalFields",
          "readiness",
          "executionTarget",
          "executionInstruction",
          "sourceSegmentIds"
        ],
        "additionalProperties": false,
        "description": "VisualWorkRequestV1 的确定性编译结果。请求保存“用户要什么”，简报保存 “系统准备怎样做”；执行器只消费该版本化简报，不直接吞口语或 UI 文案。"
      },
      "VisualBriefReadiness": {
        "type": "string",
        "enum": [
          "ready",
          "needs-input",
          "review"
        ]
      },
      "DesignArtifactV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "marker": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "root": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "type": {
                "type": "string",
                "const": "frame"
              },
              "name": {
                "type": "string"
              },
              "layout": {
                "type": "string",
                "enum": [
                  "none",
                  "horizontal",
                  "vertical"
                ]
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "gap": {
                "type": "number"
              },
              "padding": {
                "type": "number"
              },
              "background": {
                "type": "string"
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DesignArtifactNodeV1"
                }
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "layout",
              "children"
            ],
            "additionalProperties": false
          },
          "projectConstraints": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "const": "unavailable"
              },
              "componentNames": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "styleNames": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "variables": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "verified": {
                "type": "boolean"
              }
            },
            "required": [
              "source",
              "componentNames",
              "styleNames",
              "variables",
              "verified"
            ],
            "additionalProperties": false
          },
          "validation": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "needs-review",
                  "blocked"
                ]
              },
              "checks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/Identifier"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "warning",
                        "fail"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "status",
              "checks"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "version",
          "id",
          "sourceRevisionId",
          "marker",
          "name",
          "root",
          "projectConstraints",
          "validation"
        ],
        "additionalProperties": false,
        "description": "CapWorks 内部可编辑的结构化设计稿，不等于生成位图或外部系统写入。"
      },
      "DesignArtifactNodeV1": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "type": {
                "type": "string",
                "const": "frame"
              },
              "name": {
                "type": "string"
              },
              "layout": {
                "type": "string",
                "enum": [
                  "none",
                  "horizontal",
                  "vertical"
                ]
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "gap": {
                "type": "number"
              },
              "padding": {
                "type": "number"
              },
              "background": {
                "type": "string"
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DesignArtifactNodeV1"
                }
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "layout",
              "children"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "type": {
                "type": "string",
                "const": "text"
              },
              "name": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "fontSize": {
                "type": "number"
              },
              "fontWeight": {
                "type": "number",
                "enum": [
                  400,
                  500,
                  600,
                  700
                ]
              },
              "color": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "text",
              "fontSize",
              "fontWeight",
              "color"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "type": {
                "type": "string",
                "const": "rectangle"
              },
              "name": {
                "type": "string"
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "fill": {
                "type": "string"
              },
              "cornerRadius": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "width",
              "height",
              "fill"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "type": {
                "type": "string",
                "const": "component-instance"
              },
              "name": {
                "type": "string"
              },
              "componentKey": {
                "type": "string"
              },
              "properties": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "componentKey"
            ],
            "additionalProperties": false
          }
        ]
      },
      "BlockElement": {
        "anyOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "heading"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "text"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "bullet_item"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "indent": {
                "type": "number",
                "enum": [
                  0,
                  1
                ]
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "numbered_item"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "indent": {
                "type": "number",
                "enum": [
                  0,
                  1
                ]
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "check_item"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "state": {
                "$ref": "#/components/schemas/CheckItemState"
              },
              "assignee": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "participantId": {
                    "$ref": "#/components/schemas/Identifier"
                  }
                },
                "required": [
                  "label"
                ],
                "additionalProperties": false
              },
              "dueAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "state",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "quote"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "speakerId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "speakerLabel": {
                "type": "string"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "callout"
              },
              "text": {
                "$ref": "#/components/schemas/RichText"
              },
              "tone": {
                "type": "string",
                "enum": [
                  "info",
                  "warning",
                  "success",
                  "critical"
                ]
              },
              "icon": {
                "type": "string"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "text"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "image"
              },
              "url": {
                "type": "string"
              },
              "caption": {
                "type": "string"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "url"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "link_card"
              },
              "url": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "url"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "table"
              },
              "header": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "rows"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "code"
              },
              "code": {
                "type": "string"
              },
              "language": {
                "type": "string"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "code",
              "element",
              "id"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "field"
              },
              "label": {
                "type": "string"
              },
              "value": {
                "$ref": "#/components/schemas/RichText"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id",
              "label",
              "value"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "element": {
                "type": "string",
                "const": "divider"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sourceRef": {
                "$ref": "#/components/schemas/ElementSourceRef"
              }
            },
            "required": [
              "element",
              "id"
            ]
          }
        ]
      },
      "RichText": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/InlineNode"
        }
      },
      "InlineNode": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "marks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InlineMark"
            }
          },
          "href": {
            "type": "string"
          },
          "mention": {
            "$ref": "#/components/schemas/InlineMention"
          }
        },
        "required": [
          "text"
        ],
        "additionalProperties": false,
        "description": "行内节点：一段文字 + 可选标记/链接/提及。纯文本即单节点。"
      },
      "InlineMark": {
        "type": "string",
        "enum": [
          "em",
          "code"
        ]
      },
      "InlineMention": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "person"
              },
              "label": {
                "type": "string"
              },
              "participantId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "label"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "date"
              },
              "date": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "date"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ElementSourceRef": {
        "type": "object",
        "properties": {
          "segmentId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "speakerId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "segmentId"
        ],
        "additionalProperties": false,
        "description": "零件溯源：指回转写段——AI 产出的每一粒零件都有出处可查"
      },
      "CheckItemState": {
        "type": "string",
        "enum": [
          "todo",
          "in-progress",
          "done",
          "blocked"
        ]
      },
      "WorkPlug": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "enum": [
              "external-action",
              "local-agent"
            ]
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "target"
        ],
        "additionalProperties": false,
        "description": "管道插头：块凭零件构成获得的生产动作入口"
      },
      "WorkObjectSource": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "transcript"
              },
              "segmentId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "excerpt": {
                "type": "string"
              },
              "speakerId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "segmentId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "memory-claim"
              },
              "claimId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "unavailable": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "claimId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "integration"
              },
              "sourceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "connectionId": {
                "type": "string"
              },
              "externalURL": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "unavailable": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "sourceId",
              "connectionId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "agent"
              },
              "workOrderId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "role": {
                "type": "string"
              },
              "modelRoute": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "workOrderId",
              "role"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "user"
              },
              "userId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "userId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "memory-context"
              },
              "sourceType": {
                "type": "string"
              },
              "sourceId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "excerpt": {
                "type": "string"
              },
              "externalURL": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "sourceType",
              "sourceId",
              "title",
              "excerpt"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ReviewTask": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workSetId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "revisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "assigneeRole": {
            "$ref": "#/components/schemas/WorkspaceRole"
          },
          "assigneeUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "status": {
            "$ref": "#/components/schemas/ReviewTaskStatus"
          },
          "claimedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "requestedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "resolvedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "conversationId",
          "workSetId",
          "workObjectId",
          "revisionId",
          "assigneeRole",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ReviewTaskStatus": {
        "type": "string",
        "enum": [
          "waiting-for-submission",
          "pending",
          "in-review",
          "approved",
          "changes-requested",
          "cancelled"
        ]
      },
      "ActionV2": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workSetId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceRevisionIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "actionType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "risk": {
            "$ref": "#/components/schemas/ExternalActionRisk"
          },
          "target": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "payload": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "status": {
            "$ref": "#/components/schemas/ActionV2Status"
          },
          "requiresWorkApproval": {
            "type": "boolean"
          },
          "requiresSideEffectApproval": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "approvedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "approvedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "conversationId",
          "workSetId",
          "sourceRevisionIds",
          "actionType",
          "title",
          "risk",
          "target",
          "payload",
          "status",
          "requiresWorkApproval",
          "requiresSideEffectApproval",
          "idempotencyKey",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ActionV2Status": {
        "type": "string",
        "enum": [
          "prepared",
          "work-approved",
          "awaiting-side-effect-approval",
          "approved",
          "queued",
          "running",
          "complete",
          "failed",
          "cancelled"
        ]
      },
      "ExecutionV2": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "complete",
              "failed",
              "cancelled"
            ]
          },
          "attempt": {
            "type": "number"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "runnerId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "externalObjectId": {
            "type": "string"
          },
          "externalURL": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          },
          "startedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "completedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "actionId",
          "status",
          "attempt",
          "idempotencyKey",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ActionRecommendationEligibility": {
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/ActionRecommendationEligibilityState"
          },
          "providerCount": {
            "type": "number"
          },
          "actionCount": {
            "type": "number"
          }
        },
        "required": [
          "state",
          "providerCount",
          "actionCount"
        ],
        "additionalProperties": false
      },
      "ActionRecommendationEligibilityState": {
        "type": "string",
        "enum": [
          "no_provider",
          "no_authorized_action",
          "limited",
          "ready"
        ]
      },
      "ActionRecommendationRun": {
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/ActionRecommendationRunState"
          },
          "basedOnWorkSetRevision": {
            "type": "number"
          },
          "recommendationCount": {
            "type": "number"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "errorCode": {
            "type": "string"
          }
        },
        "required": [
          "state",
          "basedOnWorkSetRevision",
          "recommendationCount",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ActionRecommendationRunState": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "ready",
          "empty",
          "failed",
          "stale"
        ]
      },
      "ExternalActionRecommendation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionId": {
            "type": "string"
          },
          "actionLabel": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "connectionName": {
            "type": "string"
          },
          "suggestedInput": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/ExternalActionRecommendationStatus"
          },
          "preparedActionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "workObjectId",
          "sourceRevisionId",
          "actionId",
          "actionLabel",
          "service",
          "connectionId",
          "connectionName",
          "suggestedInput",
          "missingFields",
          "reason",
          "score",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ExternalActionRecommendationStatus": {
        "type": "string",
        "enum": [
          "active",
          "stale",
          "prepared",
          "dismissed"
        ]
      },
      "TakeoverDigest": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "basedOnWorksetRevision": {
            "type": "number"
          },
          "aligned": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TakeoverAlignedItem"
            }
          },
          "now": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TakeoverNowItem"
            }
          },
          "later": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TakeoverLaterItem"
            }
          },
          "clarify": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClarifyItem"
            }
          },
          "generatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "supersededAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "conversationId",
          "basedOnWorksetRevision",
          "aligned",
          "now",
          "later",
          "clarify",
          "generatedAt"
        ],
        "additionalProperties": false,
        "description": "会后接管摘要：纯派生，钉在某个 workset revision 上，不改写块。"
      },
      "TakeoverAlignedItem": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "evidenceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "text",
          "evidenceSegmentIds"
        ],
        "additionalProperties": false
      },
      "TakeoverNowItem": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "why": {
            "type": "string"
          },
          "evidenceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "workObjectId",
          "why",
          "evidenceSegmentIds"
        ],
        "additionalProperties": false
      },
      "TakeoverLaterItem": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "text": {
            "type": "string"
          },
          "why": {
            "type": "string"
          }
        },
        "required": [
          "why"
        ],
        "additionalProperties": false
      },
      "ClarifyItem": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "question": {
            "type": "string"
          },
          "wouldChange": {
            "type": "string",
            "description": "答案将改变什么；空则不得入库。"
          },
          "status": {
            "$ref": "#/components/schemas/ClarifyStatus"
          },
          "evidenceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "id",
          "workObjectId",
          "question",
          "wouldChange",
          "status",
          "evidenceSegmentIds"
        ],
        "additionalProperties": false
      },
      "ClarifyStatus": {
        "type": "string",
        "enum": [
          "open",
          "confirmed",
          "deferred",
          "dismissed"
        ]
      },
      "WorkRelation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workSetId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "fromWorkObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "toWorkObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "relationType": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "manualOverride": {
            "type": "boolean"
          },
          "deletedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workSetId",
          "fromWorkObjectId",
          "toWorkObjectId",
          "relationType",
          "reason",
          "sourceSegmentIds",
          "manualOverride",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false,
        "description": "会后派生关系：有原话证据才入库，类型由 LLM 判断，不写死枚举。"
      },
      "DecisionWorkstream": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "decisionWorkObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "decisionRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecisionWorkstreamItem"
            }
          }
        },
        "required": [
          "id",
          "decisionWorkObjectId",
          "decisionRevisionId",
          "sourceSegmentIds",
          "items"
        ],
        "additionalProperties": false,
        "description": "Read-only current projection. Membership comes only from shared transcript evidence; it never replaces each profession's independent revision/review."
      },
      "DecisionWorkstreamItem": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "revisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "discipline": {
            "$ref": "#/components/schemas/DecisionWorkstreamDiscipline"
          },
          "reviewStatus": {
            "$ref": "#/components/schemas/ReviewTaskStatus"
          },
          "reviewTaskId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "workObjectId",
          "revisionId",
          "discipline",
          "reviewStatus",
          "actionIds"
        ],
        "additionalProperties": false
      },
      "DecisionWorkstreamDiscipline": {
        "type": "string",
        "enum": [
          "product",
          "design",
          "engineering",
          "quality"
        ]
      },
      "TakeoverState": {
        "type": "string",
        "enum": [
          "pending",
          "ready",
          "failed",
          "empty"
        ]
      },
      "ShareComment": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "authorUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "authorDisplayName": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkCommentStatus"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workObjectId",
          "authorUserId",
          "authorDisplayName",
          "body",
          "status",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "WorkCommentStatus": {
        "type": "string",
        "enum": [
          "active",
          "resolved"
        ]
      },
      "RealtimeServerMessage": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "snapshot"
              },
              "snapshot": {
                "$ref": "#/components/schemas/SessionSnapshot"
              }
            },
            "required": [
              "kind",
              "snapshot"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "event"
              },
              "event": {
                "$ref": "#/components/schemas/CapWorksEvent"
              }
            },
            "required": [
              "kind",
              "event"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "replay-complete"
              },
              "lastSequence": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "lastSequence"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "ping"
              },
              "sentAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "sentAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "error"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          }
        ]
      },
      "RealtimePresenceIntent": {
        "type": "string",
        "enum": [
          "viewing",
          "editing",
          "reviewing",
          "assigning"
        ]
      },
      "RealtimePresenceSelection": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "fieldId": {
            "type": "string"
          }
        },
        "required": [
          "workObjectId"
        ],
        "additionalProperties": false
      },
      "RealtimePresenceViewport": {
        "type": "object",
        "properties": {
          "left": {
            "type": "number"
          },
          "top": {
            "type": "number"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          }
        },
        "required": [
          "left",
          "top",
          "width",
          "height"
        ],
        "additionalProperties": false
      },
      "RealtimeDraftRef": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "baseRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "workObjectId",
          "baseRevisionId"
        ],
        "additionalProperties": false,
        "description": "A live draft is scoped to one immutable WorkObject revision. It is never the authoritative revision itself; publishing the draft still goes through the normal optimistic-concurrency API."
      },
      "RealtimeClientMessage": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "resume"
              },
              "afterSequence": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "afterSequence"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "ping"
              },
              "sentAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "sentAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.join"
              },
              "clientId": {
                "type": "string"
              }
            },
            "required": [
              "baseRevisionId",
              "clientId",
              "kind",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.update"
              },
              "clientId": {
                "type": "string"
              },
              "updateId": {
                "type": "string"
              },
              "updateBase64": {
                "type": "string"
              }
            },
            "required": [
              "baseRevisionId",
              "clientId",
              "kind",
              "updateBase64",
              "updateId",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.checkpoint"
              },
              "clientId": {
                "type": "string"
              },
              "checkpointId": {
                "type": "string"
              }
            },
            "required": [
              "baseRevisionId",
              "checkpointId",
              "clientId",
              "kind",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.leave"
              },
              "clientId": {
                "type": "string"
              }
            },
            "required": [
              "baseRevisionId",
              "clientId",
              "kind",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "presence"
              },
              "page": {
                "type": "string"
              },
              "clientId": {
                "type": "string"
              },
              "surfaceId": {
                "type": "string"
              },
              "cursor": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "number"
                      },
                      "y": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "x",
                      "y"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "viewport": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RealtimePresenceViewport"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "selection": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RealtimePresenceSelection"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "editing": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RealtimePresenceSelection"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "intent": {
                "$ref": "#/components/schemas/RealtimePresenceIntent"
              },
              "sentAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "page",
              "sentAt"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ArtifactGenerationResult": {
        "type": "object",
        "properties": {
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "$ref": "#/components/schemas/ArtifactKind"
                },
                "title": {
                  "type": "string"
                },
                "nodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string"
                      },
                      "owner": {
                        "type": "string"
                      },
                      "due": {
                        "type": "string"
                      },
                      "workStatus": {
                        "type": "string",
                        "enum": [
                          "todo",
                          "in-progress",
                          "done",
                          "blocked"
                        ]
                      },
                      "parentTitle": {
                        "type": "string"
                      },
                      "confidence": {
                        "type": "number"
                      },
                      "sourceSegmentIds": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Identifier"
                        }
                      }
                    },
                    "required": [
                      "title"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "kind",
                "title",
                "nodes"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "artifacts"
        ],
        "additionalProperties": false
      },
      "WorkRefinementMode": {
        "type": "string",
        "enum": [
          "live",
          "final",
          "rebuild"
        ]
      },
      "WorkRefinementStatus": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "idle",
              "queued",
              "running",
              "ready",
              "failed"
            ]
          },
          "requestedTranscriptCount": {
            "type": "number"
          },
          "completedTranscriptCount": {
            "type": "number"
          },
          "mode": {
            "$ref": "#/components/schemas/WorkRefinementMode"
          },
          "completedMode": {
            "$ref": "#/components/schemas/WorkRefinementMode"
          },
          "failureCount": {
            "type": "number"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "errorCode": {
            "type": "string"
          }
        },
        "required": [
          "state",
          "requestedTranscriptCount",
          "completedTranscriptCount",
          "mode",
          "failureCount",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkRefinementResponse": {
        "type": "object",
        "properties": {
          "refinement": {
            "$ref": "#/components/schemas/WorkRefinementStatus"
          }
        },
        "required": [
          "refinement"
        ],
        "additionalProperties": false
      },
      "QueueJob": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "refine-session-work"
              },
              "sessionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "transcriptCount": {
                "type": "number"
              },
              "mode": {
                "$ref": "#/components/schemas/WorkRefinementMode"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "sessionId",
              "transcriptCount",
              "mode",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "persist-final-snapshot"
              },
              "sessionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "sessionId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "purge-conversation-memory"
              },
              "workspaceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "projectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sessionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "workspaceId",
              "projectId",
              "sessionId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "delete-session-files"
              },
              "sessionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workspaceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "projectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "sessionId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "execute-visual-action"
              },
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "actionId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "generate-design-image",
                "deprecated": "Legacy visual queue messages use the typed dispatcher."
              },
              "actionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "actionId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "sync-billing-seats"
              },
              "workspaceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "workspaceId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "generate-takeover-digest"
              },
              "conversationId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "sessionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "leaseToken": {
                "type": "string"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "conversationId",
              "sessionId",
              "leaseToken",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "generate-workset-action-recommendations"
              },
              "workspaceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workSetId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "leaseToken": {
                "type": "string"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "workspaceId",
              "workSetId",
              "leaseToken",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "purge-external-memory"
              },
              "workspaceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "projectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "connectionId": {
                "type": "string"
              },
              "actionId": {
                "type": "string"
              },
              "disconnectRemote": {
                "type": "boolean"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "workspaceId",
              "projectId",
              "connectionId",
              "requestedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "cleanup-external-observations"
              },
              "requestedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "requestedAt"
            ],
            "additionalProperties": false
          }
        ]
      },
      "CurrentUser": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "avatarURL": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceRole"
            }
          },
          "jobRole": {
            "$ref": "#/components/schemas/JobRole"
          },
          "jobRoleConfirmedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "locale": {
            "type": "string",
            "enum": [
              "en",
              "zh-Hans"
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "displayName",
          "roles",
          "jobRole",
          "locale"
        ],
        "additionalProperties": false
      },
      "JobRole": {
        "type": "string",
        "enum": [
          "product",
          "engineering",
          "design",
          "other"
        ]
      },
      "WorkspaceAccessRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "member"
        ]
      },
      "BillingPlanKey": {
        "type": "string",
        "enum": [
          "free",
          "pro",
          "business"
        ]
      },
      "BillingInterval": {
        "type": "string",
        "enum": [
          "monthly",
          "annual"
        ]
      },
      "BillingSubscriptionStatus": {
        "type": "string",
        "enum": [
          "free",
          "trialing",
          "active",
          "past_due",
          "canceled",
          "unpaid",
          "incomplete",
          "incomplete_expired",
          "paused"
        ]
      },
      "BillingPlanDefinition": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/BillingPlanKey"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "monthlyPricePerSeat": {
            "type": "number"
          },
          "annualPricePerSeat": {
            "type": "number"
          },
          "annualTotalPerSeat": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "const": "usd"
          },
          "limits": {
            "type": "object",
            "properties": {
              "seats": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "monthlyAudioMinutesPerSeat": {
                "type": "number"
              },
              "activeProjects": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "referenceDocuments": {
                "type": "number"
              }
            },
            "required": [
              "seats",
              "monthlyAudioMinutesPerSeat",
              "activeProjects",
              "referenceDocuments"
            ],
            "additionalProperties": false
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "key",
          "name",
          "description",
          "monthlyPricePerSeat",
          "annualPricePerSeat",
          "annualTotalPerSeat",
          "currency",
          "limits",
          "features"
        ],
        "additionalProperties": false
      },
      "BillingSummaryResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingPlanDefinition"
            }
          },
          "subscription": {
            "type": "object",
            "properties": {
              "planKey": {
                "$ref": "#/components/schemas/BillingPlanKey"
              },
              "status": {
                "$ref": "#/components/schemas/BillingSubscriptionStatus"
              },
              "interval": {
                "$ref": "#/components/schemas/BillingInterval"
              },
              "seatQuantity": {
                "type": "number"
              },
              "currentPeriodEnd": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              },
              "cancelAtPeriodEnd": {
                "type": "boolean"
              },
              "hasPaidAccess": {
                "type": "boolean"
              }
            },
            "required": [
              "planKey",
              "status",
              "seatQuantity",
              "cancelAtPeriodEnd",
              "hasPaidAccess"
            ],
            "additionalProperties": false
          },
          "usage": {
            "type": "object",
            "properties": {
              "periodStart": {
                "type": "string"
              },
              "audioSeconds": {
                "type": "number"
              },
              "audioLimitSeconds": {
                "type": "number"
              },
              "activeProjects": {
                "type": "number"
              },
              "projectLimit": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "members": {
                "type": "number"
              },
              "pendingInvitations": {
                "type": "number"
              },
              "seatLimit": {
                "type": "number"
              },
              "referenceDocuments": {
                "type": "number"
              },
              "referenceDocumentLimit": {
                "type": "number"
              }
            },
            "required": [
              "periodStart",
              "audioSeconds",
              "audioLimitSeconds",
              "activeProjects",
              "projectLimit",
              "members",
              "pendingInvitations",
              "seatLimit",
              "referenceDocuments",
              "referenceDocumentLimit"
            ],
            "additionalProperties": false
          },
          "canManageBilling": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "plans",
          "subscription",
          "usage",
          "canManageBilling"
        ],
        "additionalProperties": false
      },
      "CreateBillingCheckoutRequest": {
        "type": "object",
        "properties": {
          "planKey": {
            "type": "string",
            "enum": [
              "pro",
              "business"
            ]
          },
          "interval": {
            "$ref": "#/components/schemas/BillingInterval"
          },
          "seatQuantity": {
            "type": "number"
          }
        },
        "required": [
          "planKey",
          "interval",
          "seatQuantity"
        ],
        "additionalProperties": false
      },
      "BillingRedirectResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "WorkspaceSummary": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "name": {
            "type": "string"
          },
          "accessRole": {
            "$ref": "#/components/schemas/WorkspaceAccessRole"
          },
          "contentPermission": {
            "$ref": "#/components/schemas/WorkspaceContentPermission"
          },
          "jobRole": {
            "$ref": "#/components/schemas/JobRole"
          }
        },
        "required": [
          "id",
          "name",
          "accessRole",
          "contentPermission",
          "jobRole"
        ],
        "additionalProperties": false
      },
      "CurrentAccountResponse": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "accessRole": {
                "$ref": "#/components/schemas/WorkspaceAccessRole"
              },
              "contentPermission": {
                "$ref": "#/components/schemas/WorkspaceContentPermission"
              },
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workspaceId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "displayName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "avatarURL": {
                "type": "string"
              },
              "roles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkspaceRole"
                }
              },
              "jobRole": {
                "$ref": "#/components/schemas/JobRole"
              },
              "jobRoleConfirmedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              },
              "locale": {
                "type": "string",
                "enum": [
                  "en",
                  "zh-Hans"
                ]
              }
            },
            "required": [
              "accessRole",
              "contentPermission",
              "displayName",
              "id",
              "jobRole",
              "locale",
              "roles",
              "workspaceId"
            ]
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Identifier"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceSummary"
            }
          },
          "authentication": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "email"
              },
              "expiresAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "expiresAt"
            ],
            "additionalProperties": false
          },
          "features": {
            "type": "object",
            "properties": {
              "liveWorkbench": {
                "type": "boolean"
              }
            },
            "required": [
              "liveWorkbench"
            ],
            "additionalProperties": false,
            "description": "服务端发布开关；旧服务端缺失时客户端必须按关闭处理。"
          }
        },
        "required": [
          "user",
          "workspace",
          "workspaces",
          "authentication"
        ],
        "additionalProperties": false
      },
      "AccountBootstrapResponse": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/CurrentAccountResponse"
          },
          "isNewAccount": {
            "type": "boolean"
          },
          "joinedWorkspaceFromInvite": {
            "type": "boolean"
          },
          "invitedProjectId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "account",
          "isNewAccount",
          "joinedWorkspaceFromInvite"
        ],
        "additionalProperties": false
      },
      "WorkspaceMember": {
        "type": "object",
        "properties": {
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "avatarURL": {
            "type": "string"
          },
          "accessRole": {
            "$ref": "#/components/schemas/WorkspaceAccessRole"
          },
          "contentPermission": {
            "$ref": "#/components/schemas/WorkspaceContentPermission"
          },
          "jobRole": {
            "$ref": "#/components/schemas/JobRole"
          },
          "joinedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "lastSeenAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp",
            "description": "最近心跳时间；20 秒租约内视为在线（实时通道断线后的可信兜底）"
          },
          "online": {
            "type": "boolean"
          },
          "presencePage": {
            "type": "string",
            "description": "当前所在页面或展开块 id（page / object:work_…）"
          },
          "viewingWorkObjectId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "displayName",
          "accessRole",
          "contentPermission",
          "jobRole",
          "joinedAt"
        ],
        "additionalProperties": false
      },
      "RealtimePresence": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "page": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "surfaceId": {
            "type": "string"
          },
          "cursor": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "required": [
              "x",
              "y"
            ],
            "additionalProperties": false
          },
          "viewport": {
            "$ref": "#/components/schemas/RealtimePresenceViewport"
          },
          "selection": {
            "$ref": "#/components/schemas/RealtimePresenceSelection"
          },
          "editing": {
            "$ref": "#/components/schemas/RealtimePresenceSelection"
          },
          "intent": {
            "$ref": "#/components/schemas/RealtimePresenceIntent"
          },
          "lastSeenAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "workspaceId",
          "conversationId",
          "userId",
          "page",
          "lastSeenAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceInvitationStatus": {
        "type": "string",
        "enum": [
          "pending",
          "accepted",
          "revoked",
          "expired"
        ]
      },
      "WorkspaceInvitation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "email": {
            "type": "string"
          },
          "accessRole": {
            "type": "string",
            "enum": [
              "admin",
              "member"
            ]
          },
          "contentPermission": {
            "$ref": "#/components/schemas/WorkspaceContentPermission"
          },
          "jobRole": {
            "$ref": "#/components/schemas/JobRole"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier",
            "description": "可选的项目落点；邀请仍授予工作区权限，项目只负责进入后的上下文。"
          },
          "status": {
            "$ref": "#/components/schemas/WorkspaceInvitationStatus"
          },
          "invitedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "acceptedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "acceptedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "revokedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "email",
          "accessRole",
          "contentPermission",
          "jobRole",
          "status",
          "invitedByUserId",
          "expiresAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceMembersResponse": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceMember"
            }
          },
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceInvitation"
            }
          }
        },
        "required": [
          "members",
          "invitations"
        ],
        "additionalProperties": false
      },
      "CreateWorkspaceInvitationRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "accessRole": {
            "type": "string",
            "enum": [
              "admin",
              "member"
            ]
          },
          "contentPermission": {
            "$ref": "#/components/schemas/WorkspaceContentPermission"
          },
          "jobRole": {
            "$ref": "#/components/schemas/JobRole"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "email",
          "accessRole",
          "contentPermission",
          "jobRole"
        ],
        "additionalProperties": false
      },
      "CreateWorkspaceInvitationResponse": {
        "type": "object",
        "properties": {
          "invitation": {
            "$ref": "#/components/schemas/WorkspaceInvitation"
          },
          "inviteURL": {
            "type": "string"
          },
          "delivery": {
            "type": "string",
            "enum": [
              "email",
              "link"
            ]
          }
        },
        "required": [
          "invitation",
          "inviteURL",
          "delivery"
        ],
        "additionalProperties": false
      },
      "WorkspaceInvitationPreview": {
        "type": "object",
        "properties": {
          "workspaceName": {
            "type": "string"
          },
          "invitedEmail": {
            "type": "string"
          },
          "contentPermission": {
            "$ref": "#/components/schemas/WorkspaceContentPermission"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkspaceInvitationStatus"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "workspaceName",
          "invitedEmail",
          "contentPermission",
          "status",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "WorkspaceSelectionResponse": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/CurrentAccountResponse"
          },
          "invitedProjectId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "account"
        ],
        "additionalProperties": false
      },
      "ConversationStatus": {
        "type": "string",
        "enum": [
          "ready",
          "listening",
          "paused",
          "ending",
          "ready-for-review",
          "complete",
          "error",
          "deleted"
        ]
      },
      "ProjectInference": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectName": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "state": {
            "type": "string",
            "enum": [
              "automatic",
              "needs-confirmation",
              "needs-selection",
              "corrected"
            ]
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inferredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "confirmedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "confidence",
          "state",
          "evidence",
          "inferredAt"
        ],
        "additionalProperties": false
      },
      "Conversation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConversationStatus"
          },
          "captureMode": {
            "type": "string",
            "enum": [
              "microphone",
              "microphone-and-system-audio"
            ]
          },
          "contentLanguage": {
            "type": "string"
          },
          "projectInference": {
            "$ref": "#/components/schemas/ProjectInference"
          },
          "participantIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "workSetId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "startedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "endedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "title",
          "status",
          "captureMode",
          "participantIds",
          "startedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkOrderStatus": {
        "type": "string",
        "enum": [
          "queued",
          "working",
          "waiting-for-context",
          "complete",
          "cancelled",
          "failed"
        ]
      },
      "WorkOrder": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "assignedRole": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "enum": [
                  "chief-of-staff",
                  "product-manager",
                  "engineer",
                  "designer",
                  "researcher",
                  "project-manager"
                ]
              }
            ]
          },
          "objective": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkOrderStatus"
          },
          "priority": {
            "type": "number"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "inputMemoryClaimIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "outputWorkObjectIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "modelRoute": {
            "type": "string"
          },
          "startedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "completedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "conversationId",
          "assignedRole",
          "objective",
          "status",
          "priority",
          "sourceSegmentIds",
          "inputMemoryClaimIds",
          "outputWorkObjectIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "VisualGenerationDirectionV1": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "name": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "delta": {
            "$ref": "#/components/schemas/VisualRevisionDeltaV1"
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "brief": {
            "$ref": "#/components/schemas/VisualBriefV1"
          }
        },
        "required": [
          "id",
          "name",
          "rationale",
          "delta",
          "assumptions",
          "brief"
        ],
        "additionalProperties": false
      },
      "VisualGenerationPlanV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "requestVersion": {
            "type": "number",
            "const": 1
          },
          "baseBrief": {
            "$ref": "#/components/schemas/VisualBriefV1"
          },
          "directions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualGenerationDirectionV1"
            }
          }
        },
        "required": [
          "version",
          "requestVersion",
          "baseBrief",
          "directions"
        ],
        "additionalProperties": false,
        "description": "Immutable execution plan compiled from one source request revision."
      },
      "VisualImageMimeType": {
        "type": "string",
        "enum": [
          "image/jpeg",
          "image/png",
          "image/svg+xml"
        ]
      },
      "VisualModelCapabilityV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "provider": {
            "type": "string",
            "const": "cloudflare-workers-ai"
          },
          "model": {
            "type": "string"
          },
          "supportedIntents": {
            "type": "array",
            "items": {
              "type": "string",
              "const": "image-generation"
            }
          },
          "supportedDeliverables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualDeliverable"
            }
          },
          "supportedAspectRatios": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outputMimeTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualImageMimeType"
            }
          },
          "maxWidth": {
            "type": "number"
          },
          "maxHeight": {
            "type": "number"
          },
          "imageEditing": {
            "type": "boolean",
            "const": false
          },
          "transparentBackground": {
            "type": "boolean",
            "const": false
          },
          "exactTextFidelity": {
            "type": "string",
            "const": "review-required"
          }
        },
        "required": [
          "version",
          "provider",
          "model",
          "supportedIntents",
          "supportedDeliverables",
          "supportedAspectRatios",
          "outputMimeTypes",
          "maxWidth",
          "maxHeight",
          "imageEditing",
          "transparentBackground",
          "exactTextFidelity"
        ],
        "additionalProperties": false,
        "description": "App-owned allowlist for one image model adapter. This is an execution boundary, not a marketing claim about every feature the provider may offer."
      },
      "VisualModelReviewRequirement": {
        "type": "string",
        "enum": [
          "semantic-fidelity",
          "literal-text-fidelity"
        ]
      },
      "VisualModelRouteV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "capability": {
            "$ref": "#/components/schemas/VisualModelCapabilityV1"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "aspectRatio": {
            "type": "string"
          },
          "steps": {
            "type": "number"
          },
          "guidance": {
            "type": "number"
          },
          "reviewRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualModelReviewRequirement"
            }
          }
        },
        "required": [
          "version",
          "capability",
          "width",
          "height",
          "aspectRatio",
          "steps",
          "guidance",
          "reviewRequirements"
        ],
        "additionalProperties": false
      },
      "VisualQualityCheckCode": {
        "type": "string",
        "enum": [
          "output-bytes",
          "mime-type",
          "dimensions",
          "aspect-ratio",
          "prompt-coverage",
          "semantic-fidelity",
          "literal-text-fidelity"
        ]
      },
      "VisualQualityCheckV1": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/VisualQualityCheckCode"
          },
          "status": {
            "type": "string",
            "enum": [
              "pass",
              "warn",
              "fail"
            ]
          },
          "message": {
            "type": "string"
          },
          "evidence": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          }
        },
        "required": [
          "code",
          "status",
          "message"
        ],
        "additionalProperties": false
      },
      "VisualQualityReportV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "verdict": {
            "type": "string",
            "enum": [
              "pass",
              "needs-review",
              "reject"
            ]
          },
          "modelRoute": {
            "$ref": "#/components/schemas/VisualModelRouteV1"
          },
          "output": {
            "type": "object",
            "properties": {
              "mimeType": {
                "$ref": "#/components/schemas/VisualImageMimeType"
              },
              "byteLength": {
                "type": "number"
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "actualAspectRatio": {
                "type": "number"
              }
            },
            "required": [
              "mimeType",
              "byteLength"
            ],
            "additionalProperties": false
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisualQualityCheckV1"
            }
          }
        },
        "required": [
          "version",
          "verdict",
          "modelRoute",
          "output",
          "checks"
        ],
        "additionalProperties": false,
        "description": "Deterministic transport/adapter checks stay separate from aesthetic review. A report may reject malformed output, but cannot claim pixel-level semantic fidelity without a later visual reviewer or a human decision."
      },
      "MeetingWorkNextStep": {
        "type": "string",
        "enum": [
          "organize",
          "codex",
          "moodboard",
          "visual-proposal"
        ],
        "description": "成员在捕获讨论时明确选择的下一条生产分支。它只准备内部工作或待确认动作， 不授权任何外部副作用。"
      },
      "CaptureMeetingWorkObjectRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/MeetingWorkKind"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "nextStep": {
            "$ref": "#/components/schemas/MeetingWorkNextStep"
          },
          "targetProjectId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "kind",
          "title",
          "sourceSegmentIds"
        ],
        "additionalProperties": false
      },
      "ExternalActionRecommendationListResponse": {
        "type": "object",
        "properties": {
          "recommendations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalActionRecommendation"
            }
          }
        },
        "required": [
          "recommendations"
        ],
        "additionalProperties": false
      },
      "ExternalActionRecommendationDraftRequest": {
        "type": "object",
        "properties": {
          "actionId": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          }
        },
        "required": [
          "actionId",
          "connectionId"
        ],
        "additionalProperties": false
      },
      "ExternalActionRecommendationDraftResponse": {
        "type": "object",
        "properties": {
          "recommendation": {
            "$ref": "#/components/schemas/ExternalActionRecommendation"
          }
        },
        "required": [
          "recommendation"
        ],
        "additionalProperties": false
      },
      "RefreshActionRecommendationsResponse": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/ActionRecommendationRun"
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": false
      },
      "PrepareExternalActionRecommendationRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          }
        },
        "required": [
          "input"
        ],
        "additionalProperties": false
      },
      "CaptureMeetingWorkObjectResponse": {
        "type": "object",
        "properties": {
          "workSet": {
            "$ref": "#/components/schemas/WorkSetV2"
          },
          "workObject": {
            "$ref": "#/components/schemas/WorkObject"
          },
          "revision": {
            "$ref": "#/components/schemas/WorkObjectRevision"
          }
        },
        "required": [
          "workSet",
          "workObject",
          "revision"
        ],
        "additionalProperties": false
      },
      "SuggestMeetingWorkProjectRequest": {
        "type": "object",
        "properties": {
          "sourceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "sourceSegmentIds"
        ],
        "additionalProperties": false
      },
      "MeetingWorkProjectSuggestion": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectName": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "evidenceSegmentIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "projectId",
          "projectName",
          "confidence",
          "evidenceSegmentIds"
        ],
        "additionalProperties": false
      },
      "SuggestMeetingWorkProjectResponse": {
        "type": "object",
        "properties": {
          "suggestions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingWorkProjectSuggestion"
            }
          },
          "preselectedProjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "route": {
            "type": "string",
            "enum": [
              "project",
              "inbox"
            ]
          }
        },
        "required": [
          "suggestions",
          "route"
        ],
        "additionalProperties": false
      },
      "TransitionMeetingWorkStageRequest": {
        "type": "object",
        "properties": {
          "fromStage": {
            "$ref": "#/components/schemas/MeetingWorkStage"
          },
          "toStage": {
            "$ref": "#/components/schemas/MeetingWorkStage"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "fromStage",
          "toStage"
        ],
        "additionalProperties": false
      },
      "WorkObjectStageTransition": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actorUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "fromStage": {
            "$ref": "#/components/schemas/MeetingWorkStage"
          },
          "toStage": {
            "$ref": "#/components/schemas/MeetingWorkStage"
          },
          "note": {
            "type": "string"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workObjectId",
          "actorUserId",
          "fromStage",
          "toStage",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "TransitionMeetingWorkStageResponse": {
        "type": "object",
        "properties": {
          "workObject": {
            "$ref": "#/components/schemas/WorkObject"
          },
          "transition": {
            "$ref": "#/components/schemas/WorkObjectStageTransition"
          }
        },
        "required": [
          "workObject",
          "transition"
        ],
        "additionalProperties": false
      },
      "WorkObjectRevisionHistoryResponse": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "revisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkObjectRevision"
            }
          }
        },
        "required": [
          "workObjectId",
          "revisions"
        ],
        "additionalProperties": false
      },
      "DecideWorkProposalRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accept",
              "reject"
            ]
          },
          "expectedRevisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "decision",
          "expectedRevisionId"
        ],
        "additionalProperties": false
      },
      "WorkProposalDecision": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "revisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actorUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "decision": {
            "type": "string",
            "enum": [
              "accept",
              "reject"
            ]
          },
          "note": {
            "type": "string"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workObjectId",
          "revisionId",
          "actorUserId",
          "decision",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "DecideWorkProposalResponse": {
        "type": "object",
        "properties": {
          "workObject": {
            "$ref": "#/components/schemas/WorkObject"
          },
          "decision": {
            "$ref": "#/components/schemas/WorkProposalDecision"
          }
        },
        "required": [
          "workObject",
          "decision"
        ],
        "additionalProperties": false
      },
      "WorkAssignmentAction": {
        "type": "string",
        "enum": [
          "claim",
          "assign",
          "release"
        ]
      },
      "UpdateWorkAssignmentRequest": {
        "type": "object",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/WorkAssignmentAction"
          },
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "action"
        ],
        "additionalProperties": false
      },
      "UpdateWorkResponsibilityRequest": {
        "type": "object",
        "properties": {
          "expectedResponsibilityUpdatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "state": {
            "$ref": "#/components/schemas/WorkObjectProgressState"
          },
          "dueAt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "blockedReason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "expectedResponsibilityUpdatedAt"
        ],
        "additionalProperties": false
      },
      "WorkComment": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "authorKind": {
            "type": "string",
            "enum": [
              "member",
              "account"
            ]
          },
          "authorUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "authorDisplayName": {
            "type": "string"
          },
          "authorAvatarURL": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "mentionUserIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "status": {
            "$ref": "#/components/schemas/WorkCommentStatus"
          },
          "editedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "resolvedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "resolvedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "workObjectId",
          "authorKind",
          "authorUserId",
          "authorDisplayName",
          "body",
          "mentionUserIds",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "WorkCommentsResponse": {
        "type": "object",
        "properties": {
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkComment"
            }
          }
        },
        "required": [
          "comments"
        ],
        "additionalProperties": false
      },
      "CreateWorkCommentRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "mentionUserIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          }
        },
        "required": [
          "body"
        ],
        "additionalProperties": false
      },
      "CreateShareCommentRequest": {
        "type": "object",
        "properties": {
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "workObjectId",
          "body"
        ],
        "additionalProperties": false
      },
      "UpdateWorkCommentRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "mentionUserIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "resolved": {
            "type": "boolean"
          },
          "expectedUpdatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "additionalProperties": false
      },
      "CollaborationNotificationKind": {
        "type": "string",
        "enum": [
          "mention",
          "assignment"
        ]
      },
      "CollaborationNotification": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "kind": {
            "$ref": "#/components/schemas/CollaborationNotificationKind"
          },
          "sourceKey": {
            "type": "string"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sessionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workObjectTitle": {
            "type": "string"
          },
          "commentId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "commentPreview": {
            "type": "string"
          },
          "actorUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actorDisplayName": {
            "type": "string"
          },
          "actorAvatarURL": {
            "type": "string"
          },
          "readAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "kind",
          "sourceKey",
          "conversationId",
          "sessionId",
          "workObjectId",
          "workObjectTitle",
          "actorDisplayName",
          "createdAt"
        ],
        "additionalProperties": false,
        "description": "个人协作收件箱是评论/负责人的物化送达视图，不是内容真相源。"
      },
      "CollaborationNotificationsResponse": {
        "type": "object",
        "properties": {
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CollaborationNotification"
            }
          },
          "unreadCount": {
            "type": "number"
          }
        },
        "required": [
          "notifications",
          "unreadCount"
        ],
        "additionalProperties": false
      },
      "MarkCollaborationNotificationsReadRequest": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "all": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "all"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "all": {
                "type": "boolean",
                "const": false
              },
              "notificationIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              }
            },
            "required": [
              "notificationIds"
            ],
            "additionalProperties": false
          }
        ]
      },
      "MarkCollaborationNotificationsReadResponse": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "number"
          },
          "unreadCount": {
            "type": "number"
          }
        },
        "required": [
          "updated",
          "unreadCount"
        ],
        "additionalProperties": false
      },
      "RequestReviewRequest": {
        "type": "object",
        "properties": {
          "revisionId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "revisionId"
        ],
        "additionalProperties": false,
        "description": "指定审阅人与正式发起审阅是两件事。负责人或管理者只可把当前正式版本提交审阅。"
      },
      "ReviewAssignmentAction": {
        "type": "string",
        "enum": [
          "claim",
          "assign",
          "release"
        ]
      },
      "UpdateReviewAssignmentRequest": {
        "type": "object",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ReviewAssignmentAction"
          },
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "action"
        ],
        "additionalProperties": false
      },
      "ReviewDecisionKind": {
        "type": "string",
        "enum": [
          "approved",
          "changes-requested",
          "returned",
          "taken-over",
          "reassigned"
        ]
      },
      "ReviewDecision": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "reviewTaskId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "revisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "decision": {
            "$ref": "#/components/schemas/ReviewDecisionKind"
          },
          "actorUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "note": {
            "type": "string"
          },
          "reassignedToUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "reviewTaskId",
          "revisionId",
          "decision",
          "actorUserId",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "MemoryAuthority": {
        "type": "string",
        "enum": [
          "user-confirmed",
          "external-authority",
          "review-approved",
          "ai-inferred",
          "unverified-draft"
        ]
      },
      "MemoryEntity": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "project",
              "product",
              "person",
              "team",
              "brand",
              "repository",
              "design-file",
              "external-object",
              "term",
              "other"
            ]
          },
          "canonicalName": {
            "type": "string"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "merged",
              "archived"
            ]
          },
          "mergedIntoEntityId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "entityType",
          "canonicalName",
          "aliases",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "MemorySource": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "user",
              "conversation",
              "integration",
              "review",
              "system",
              "codebase"
            ]
          },
          "authority": {
            "$ref": "#/components/schemas/MemoryAuthority"
          },
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "reviewDecisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "connectionId": {
            "type": "string"
          },
          "externalMemorySourceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sourceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "externalObjectType": {
            "type": "string"
          },
          "externalObjectId": {
            "type": "string"
          },
          "externalURL": {
            "type": "string"
          },
          "externalVersion": {
            "type": "string"
          },
          "repoPath": {
            "type": "string"
          },
          "observedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "kind",
          "authority",
          "observedAt"
        ],
        "additionalProperties": false
      },
      "MemoryClaim": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "subjectEntityId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "predicate": {
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/JSONValue"
          },
          "normalizedValue": {
            "type": "string"
          },
          "authority": {
            "$ref": "#/components/schemas/MemoryAuthority"
          },
          "confidence": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "conflicted",
              "superseded",
              "rejected"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/MemorySource"
          },
          "validFrom": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "validUntil": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "supersedesClaimId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "subjectEntityId",
          "predicate",
          "value",
          "authority",
          "confidence",
          "status",
          "source",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "MemoryRelation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "fromEntityId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "relationType": {
            "type": "string"
          },
          "toEntityId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "authority": {
            "$ref": "#/components/schemas/MemoryAuthority"
          },
          "confidence": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "conflicted",
              "superseded",
              "rejected"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/MemorySource"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "fromEntityId",
          "relationType",
          "toEntityId",
          "authority",
          "confidence",
          "status",
          "source",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "MemoryConflict": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "subjectEntityId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "predicate": {
            "type": "string"
          },
          "claimIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved",
              "dismissed"
            ]
          },
          "resolvedClaimId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "resolvedByUserId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "resolvedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "projectId",
          "subjectEntityId",
          "predicate",
          "claimIds",
          "status",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "LocalRunnerKind": {
        "type": "string",
        "enum": [
          "codex",
          "claude-code"
        ]
      },
      "LocalRunnerResultV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "runner": {
            "$ref": "#/components/schemas/LocalRunnerKind"
          },
          "exitCode": {
            "type": "number"
          },
          "baseRevision": {
            "type": "string"
          },
          "headRevision": {
            "type": "string"
          },
          "worktreePath": {
            "type": "string"
          },
          "changedFiles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "diffStat": {
            "type": "string"
          },
          "diffPatch": {
            "type": "string"
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "command": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pass",
                    "fail",
                    "unknown"
                  ]
                },
                "output": {
                  "type": "string"
                }
              },
              "required": [
                "command",
                "status",
                "output"
              ],
              "additionalProperties": false
            }
          },
          "riskStatus": {
            "type": "string",
            "enum": [
              "reported",
              "not-reported"
            ],
            "description": "空数组不能被解释为“无风险”；当前 runner 未结构化报告时保持 not-reported。"
          },
          "unresolvedRisks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "output": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "runner",
          "exitCode",
          "baseRevision",
          "headRevision",
          "worktreePath",
          "changedFiles",
          "diffStat",
          "diffPatch",
          "checks",
          "riskStatus",
          "output"
        ],
        "additionalProperties": false,
        "description": "本地代码执行的可审阅结果；远程 PR/合并/部署不属于该结果。"
      },
      "LocalRunnerRegistration": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "userId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "installationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "displayName": {
            "type": "string"
          },
          "supportedRunners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalRunnerKind"
            }
          },
          "authorizedRepositories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/Identifier"
                },
                "projectId": {
                  "$ref": "#/components/schemas/Identifier"
                },
                "displayName": {
                  "type": "string"
                },
                "absolutePath": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "projectId",
                "displayName",
                "absolutePath"
              ],
              "additionalProperties": false
            }
          },
          "publicSigningKey": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "online",
              "offline",
              "revoked"
            ]
          },
          "lastSeenAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "userId",
          "installationId",
          "displayName",
          "supportedRunners",
          "authorizedRepositories",
          "publicSigningKey",
          "status",
          "lastSeenAt"
        ],
        "additionalProperties": false
      },
      "LocalRunnerTask": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "actionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "executionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "registrationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "runnerKind": {
            "$ref": "#/components/schemas/LocalRunnerKind"
          },
          "repositoryAuthorizationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workingDirectory": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "sandbox": {
            "type": "string",
            "enum": [
              "workspace-write",
              "read-only"
            ]
          },
          "signature": {
            "type": "string"
          },
          "signedPayload": {
            "type": "string",
            "description": "被 Ed25519 签名的确切载荷（JSON 字符串）；Mac 端验签并核对字段一致性"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "claimed",
              "running",
              "complete",
              "failed",
              "expired"
            ]
          },
          "claimedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "completedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "createdAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectId",
          "actionId",
          "executionId",
          "registrationId",
          "runnerKind",
          "repositoryAuthorizationId",
          "workingDirectory",
          "prompt",
          "sandbox",
          "signature",
          "status",
          "expiresAt",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "RegisterLocalRunnerRequest": {
        "type": "object",
        "properties": {
          "installationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "displayName": {
            "type": "string"
          },
          "supportedRunners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalRunnerKind"
            }
          },
          "authorizedRepositories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "projectId": {
                  "$ref": "#/components/schemas/Identifier"
                },
                "displayName": {
                  "type": "string"
                },
                "absolutePath": {
                  "type": "string"
                }
              },
              "required": [
                "projectId",
                "displayName",
                "absolutePath"
              ],
              "additionalProperties": false
            }
          },
          "publicSigningKey": {
            "type": "string"
          }
        },
        "required": [
          "installationId",
          "displayName",
          "supportedRunners",
          "authorizedRepositories",
          "publicSigningKey"
        ],
        "additionalProperties": false
      },
      "CompleteLocalRunnerTaskRequest": {
        "type": "object",
        "properties": {
          "signature": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "failed"
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "signature",
          "status"
        ],
        "additionalProperties": false
      },
      "ExecuteActionV2Response": {
        "type": "object",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ActionV2"
          },
          "execution": {
            "$ref": "#/components/schemas/ExecutionV2"
          },
          "localRunnerTask": {
            "$ref": "#/components/schemas/LocalRunnerTask"
          }
        },
        "required": [
          "action",
          "execution"
        ],
        "additionalProperties": false
      },
      "CapWorksEventPayloadsV2": {
        "type": "object",
        "properties": {
          "project.inferred": {
            "type": "object",
            "properties": {
              "inference": {
                "$ref": "#/components/schemas/ProjectInference"
              }
            },
            "required": [
              "inference"
            ],
            "additionalProperties": false
          },
          "work_order.started": {
            "type": "object",
            "properties": {
              "workOrder": {
                "$ref": "#/components/schemas/WorkOrder"
              }
            },
            "required": [
              "workOrder"
            ],
            "additionalProperties": false
          },
          "work_order.updated": {
            "type": "object",
            "properties": {
              "workOrder": {
                "$ref": "#/components/schemas/WorkOrder"
              }
            },
            "required": [
              "workOrder"
            ],
            "additionalProperties": false
          },
          "work_object.proposed": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "revision": {
                "$ref": "#/components/schemas/WorkObjectRevision"
              }
            },
            "required": [
              "workObject",
              "revision"
            ],
            "additionalProperties": false
          },
          "work_object.revised": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "revision": {
                "$ref": "#/components/schemas/WorkObjectRevision"
              },
              "supersededRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "workObject",
              "revision",
              "supersededRevisionId"
            ],
            "additionalProperties": false
          },
          "work_object.assigned": {
            "type": "object",
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "ownerUserId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "actorUserId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workObject": {
                "$ref": "#/components/schemas/WorkObject",
                "description": "新客户端就地归并负责人；旧事件没有该字段时回退到权威快照。"
              }
            },
            "required": [
              "workObjectId",
              "actorUserId"
            ],
            "additionalProperties": false
          },
          "work_object.progress_updated": {
            "type": "object",
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "actorUserId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workObject": {
                "$ref": "#/components/schemas/WorkObject",
                "description": "完整对象使多窗口可按 updatedAt 幂等归并，不维护客户端第二真相源。"
              }
            },
            "required": [
              "workObjectId",
              "actorUserId",
              "workObject"
            ],
            "additionalProperties": false
          },
          "work_object.stage_updated": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "transition": {
                "$ref": "#/components/schemas/WorkObjectStageTransition"
              }
            },
            "required": [
              "workObject",
              "transition"
            ],
            "additionalProperties": false
          },
          "work_object.proposal_decided": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "decision": {
                "$ref": "#/components/schemas/WorkProposalDecision"
              }
            },
            "required": [
              "workObject",
              "decision"
            ],
            "additionalProperties": false
          },
          "work_comment.created": {
            "type": "object",
            "properties": {
              "comment": {
                "$ref": "#/components/schemas/WorkComment"
              }
            },
            "required": [
              "comment"
            ],
            "additionalProperties": false
          },
          "work_comment.updated": {
            "type": "object",
            "properties": {
              "comment": {
                "$ref": "#/components/schemas/WorkComment"
              }
            },
            "required": [
              "comment"
            ],
            "additionalProperties": false
          },
          "workset.updated": {
            "type": "object",
            "properties": {
              "workSet": {
                "$ref": "#/components/schemas/WorkSetV2"
              }
            },
            "required": [
              "workSet"
            ],
            "additionalProperties": false
          },
          "workset.ready": {
            "type": "object",
            "properties": {
              "workSet": {
                "$ref": "#/components/schemas/WorkSetV2"
              },
              "readyLatencyMilliseconds": {
                "type": "number"
              }
            },
            "required": [
              "workSet",
              "readyLatencyMilliseconds"
            ],
            "additionalProperties": false
          },
          "action_recommendations.updated": {
            "type": "object",
            "properties": {
              "workSetId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "run": {
                "$ref": "#/components/schemas/ActionRecommendationRun"
              }
            },
            "required": [
              "workSetId",
              "run"
            ],
            "additionalProperties": false
          },
          "review.planned": {
            "type": "object",
            "properties": {
              "reviewTask": {
                "$ref": "#/components/schemas/ReviewTask"
              }
            },
            "required": [
              "reviewTask"
            ],
            "additionalProperties": false
          },
          "review.assigned": {
            "type": "object",
            "properties": {
              "reviewTask": {
                "$ref": "#/components/schemas/ReviewTask"
              }
            },
            "required": [
              "reviewTask"
            ],
            "additionalProperties": false
          },
          "review.requested": {
            "type": "object",
            "properties": {
              "reviewTask": {
                "$ref": "#/components/schemas/ReviewTask"
              },
              "requestedByUserId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "reviewTask",
              "requestedByUserId"
            ],
            "additionalProperties": false
          },
          "review.approved": {
            "type": "object",
            "properties": {
              "decision": {
                "$ref": "#/components/schemas/ReviewDecision"
              }
            },
            "required": [
              "decision"
            ],
            "additionalProperties": false
          },
          "review.changes_requested": {
            "type": "object",
            "properties": {
              "decision": {
                "$ref": "#/components/schemas/ReviewDecision"
              }
            },
            "required": [
              "decision"
            ],
            "additionalProperties": false
          },
          "action.prepared": {
            "type": "object",
            "properties": {
              "action": {
                "$ref": "#/components/schemas/ActionV2"
              }
            },
            "required": [
              "action"
            ],
            "additionalProperties": false
          },
          "action.approved": {
            "type": "object",
            "properties": {
              "action": {
                "$ref": "#/components/schemas/ActionV2"
              }
            },
            "required": [
              "action"
            ],
            "additionalProperties": false
          },
          "execution.running": {
            "type": "object",
            "properties": {
              "execution": {
                "$ref": "#/components/schemas/ExecutionV2"
              }
            },
            "required": [
              "execution"
            ],
            "additionalProperties": false
          },
          "execution.completed": {
            "type": "object",
            "properties": {
              "execution": {
                "$ref": "#/components/schemas/ExecutionV2"
              }
            },
            "required": [
              "execution"
            ],
            "additionalProperties": false
          },
          "execution.failed": {
            "type": "object",
            "properties": {
              "execution": {
                "$ref": "#/components/schemas/ExecutionV2"
              }
            },
            "required": [
              "execution"
            ],
            "additionalProperties": false
          },
          "memory.candidate": {
            "type": "object",
            "properties": {
              "claim": {
                "$ref": "#/components/schemas/MemoryClaim"
              }
            },
            "required": [
              "claim"
            ],
            "additionalProperties": false
          },
          "memory.accepted": {
            "type": "object",
            "properties": {
              "claim": {
                "$ref": "#/components/schemas/MemoryClaim"
              }
            },
            "required": [
              "claim"
            ],
            "additionalProperties": false
          },
          "memory.conflicted": {
            "type": "object",
            "properties": {
              "conflict": {
                "$ref": "#/components/schemas/MemoryConflict"
              }
            },
            "required": [
              "conflict"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "project.inferred",
          "work_order.started",
          "work_order.updated",
          "work_object.proposed",
          "work_object.revised",
          "work_object.assigned",
          "work_object.progress_updated",
          "work_object.stage_updated",
          "work_object.proposal_decided",
          "work_comment.created",
          "work_comment.updated",
          "workset.updated",
          "workset.ready",
          "action_recommendations.updated",
          "review.planned",
          "review.assigned",
          "review.requested",
          "review.approved",
          "review.changes_requested",
          "action.prepared",
          "action.approved",
          "execution.running",
          "execution.completed",
          "execution.failed",
          "memory.candidate",
          "memory.accepted",
          "memory.conflicted"
        ],
        "additionalProperties": false
      },
      "CapWorksEventTypeV2": {
        "type": "string",
        "enum": [
          "project.inferred",
          "work_order.started",
          "work_order.updated",
          "work_object.proposed",
          "work_object.revised",
          "work_object.assigned",
          "work_object.progress_updated",
          "work_object.stage_updated",
          "work_object.proposal_decided",
          "work_comment.created",
          "work_comment.updated",
          "workset.updated",
          "workset.ready",
          "action_recommendations.updated",
          "review.planned",
          "review.assigned",
          "review.requested",
          "review.approved",
          "review.changes_requested",
          "action.prepared",
          "action.approved",
          "execution.running",
          "execution.completed",
          "execution.failed",
          "memory.candidate",
          "memory.accepted",
          "memory.conflicted"
        ]
      },
      "CapWorksEventV2": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22project_2einferred_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_order_2estarted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_order_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_object_2eproposed_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_object_2erevised_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_object_2eassigned_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_object_2eprogress_updated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_object_2estage_updated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_object_2eproposal_decided_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_comment_2ecreated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22work_comment_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22workset_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22workset_2eready_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22action_recommendations_2eupdated_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22review_2eplanned_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22review_2eassigned_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22review_2erequested_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22review_2eapproved_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22review_2echanges_requested_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22action_2eprepared_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22action_2eapproved_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22execution_2erunning_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22execution_2ecompleted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22execution_2efailed_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22memory_2ecandidate_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22memory_2eaccepted_22_3e"
          },
          {
            "$ref": "#/components/schemas/EventEnvelopeV2_3c_22memory_2econflicted_22_3e"
          }
        ]
      },
      "EventEnvelopeV2_3c_22project_2einferred_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "project.inferred"
          },
          "payload": {
            "type": "object",
            "properties": {
              "inference": {
                "$ref": "#/components/schemas/ProjectInference"
              }
            },
            "required": [
              "inference"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_order_2estarted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_order.started"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workOrder": {
                "$ref": "#/components/schemas/WorkOrder"
              }
            },
            "required": [
              "workOrder"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_order_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_order.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workOrder": {
                "$ref": "#/components/schemas/WorkOrder"
              }
            },
            "required": [
              "workOrder"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_object_2eproposed_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_object.proposed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "revision": {
                "$ref": "#/components/schemas/WorkObjectRevision"
              }
            },
            "required": [
              "workObject",
              "revision"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_object_2erevised_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_object.revised"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "revision": {
                "$ref": "#/components/schemas/WorkObjectRevision"
              },
              "supersededRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "workObject",
              "revision",
              "supersededRevisionId"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_object_2eassigned_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_object.assigned"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "ownerUserId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "actorUserId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workObject": {
                "$ref": "#/components/schemas/WorkObject",
                "description": "新客户端就地归并负责人；旧事件没有该字段时回退到权威快照。"
              }
            },
            "required": [
              "workObjectId",
              "actorUserId"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_object_2eprogress_updated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_object.progress_updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "actorUserId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "workObject": {
                "$ref": "#/components/schemas/WorkObject",
                "description": "完整对象使多窗口可按 updatedAt 幂等归并，不维护客户端第二真相源。"
              }
            },
            "required": [
              "workObjectId",
              "actorUserId",
              "workObject"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_object_2estage_updated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_object.stage_updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "transition": {
                "$ref": "#/components/schemas/WorkObjectStageTransition"
              }
            },
            "required": [
              "workObject",
              "transition"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_object_2eproposal_decided_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_object.proposal_decided"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "decision": {
                "$ref": "#/components/schemas/WorkProposalDecision"
              }
            },
            "required": [
              "workObject",
              "decision"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_comment_2ecreated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_comment.created"
          },
          "payload": {
            "type": "object",
            "properties": {
              "comment": {
                "$ref": "#/components/schemas/WorkComment"
              }
            },
            "required": [
              "comment"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22work_comment_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "work_comment.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "comment": {
                "$ref": "#/components/schemas/WorkComment"
              }
            },
            "required": [
              "comment"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22workset_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "workset.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workSet": {
                "$ref": "#/components/schemas/WorkSetV2"
              }
            },
            "required": [
              "workSet"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22workset_2eready_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "workset.ready"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workSet": {
                "$ref": "#/components/schemas/WorkSetV2"
              },
              "readyLatencyMilliseconds": {
                "type": "number"
              }
            },
            "required": [
              "workSet",
              "readyLatencyMilliseconds"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22action_recommendations_2eupdated_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "action_recommendations.updated"
          },
          "payload": {
            "type": "object",
            "properties": {
              "workSetId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "run": {
                "$ref": "#/components/schemas/ActionRecommendationRun"
              }
            },
            "required": [
              "workSetId",
              "run"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22review_2eplanned_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "review.planned"
          },
          "payload": {
            "type": "object",
            "properties": {
              "reviewTask": {
                "$ref": "#/components/schemas/ReviewTask"
              }
            },
            "required": [
              "reviewTask"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22review_2eassigned_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "review.assigned"
          },
          "payload": {
            "type": "object",
            "properties": {
              "reviewTask": {
                "$ref": "#/components/schemas/ReviewTask"
              }
            },
            "required": [
              "reviewTask"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22review_2erequested_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "review.requested"
          },
          "payload": {
            "type": "object",
            "properties": {
              "reviewTask": {
                "$ref": "#/components/schemas/ReviewTask"
              },
              "requestedByUserId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "reviewTask",
              "requestedByUserId"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22review_2eapproved_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "review.approved"
          },
          "payload": {
            "type": "object",
            "properties": {
              "decision": {
                "$ref": "#/components/schemas/ReviewDecision"
              }
            },
            "required": [
              "decision"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22review_2echanges_requested_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "review.changes_requested"
          },
          "payload": {
            "type": "object",
            "properties": {
              "decision": {
                "$ref": "#/components/schemas/ReviewDecision"
              }
            },
            "required": [
              "decision"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22action_2eprepared_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "action.prepared"
          },
          "payload": {
            "type": "object",
            "properties": {
              "action": {
                "$ref": "#/components/schemas/ActionV2"
              }
            },
            "required": [
              "action"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22action_2eapproved_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "action.approved"
          },
          "payload": {
            "type": "object",
            "properties": {
              "action": {
                "$ref": "#/components/schemas/ActionV2"
              }
            },
            "required": [
              "action"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22execution_2erunning_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "execution.running"
          },
          "payload": {
            "type": "object",
            "properties": {
              "execution": {
                "$ref": "#/components/schemas/ExecutionV2"
              }
            },
            "required": [
              "execution"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22execution_2ecompleted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "execution.completed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "execution": {
                "$ref": "#/components/schemas/ExecutionV2"
              }
            },
            "required": [
              "execution"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22execution_2efailed_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "execution.failed"
          },
          "payload": {
            "type": "object",
            "properties": {
              "execution": {
                "$ref": "#/components/schemas/ExecutionV2"
              }
            },
            "required": [
              "execution"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22memory_2ecandidate_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "memory.candidate"
          },
          "payload": {
            "type": "object",
            "properties": {
              "claim": {
                "$ref": "#/components/schemas/MemoryClaim"
              }
            },
            "required": [
              "claim"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22memory_2eaccepted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "memory.accepted"
          },
          "payload": {
            "type": "object",
            "properties": {
              "claim": {
                "$ref": "#/components/schemas/MemoryClaim"
              }
            },
            "required": [
              "claim"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "EventEnvelopeV2_3c_22memory_2econflicted_22_3e": {
        "type": "object",
        "properties": {
          "eventId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "conversationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "sequence": {
            "type": "number"
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          },
          "actor": {
            "$ref": "#/components/schemas/EventActor"
          },
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "idempotencyKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "memory.conflicted"
          },
          "payload": {
            "type": "object",
            "properties": {
              "conflict": {
                "$ref": "#/components/schemas/MemoryConflict"
              }
            },
            "required": [
              "conflict"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "eventId",
          "workspaceId",
          "projectId",
          "conversationId",
          "sequence",
          "occurredAt",
          "actor",
          "schemaVersion",
          "idempotencyKey",
          "type",
          "payload"
        ],
        "additionalProperties": false
      },
      "ClarifyResolveRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "const": "clarify.resolve"
          },
          "clarifyId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "confirmed",
              "deferred",
              "dismissed"
            ]
          },
          "idempotencyKey": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "clarifyId",
          "resolution",
          "idempotencyKey"
        ],
        "additionalProperties": false
      },
      "TakeoverRegenerateRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "const": "takeover.regenerate"
          },
          "idempotencyKey": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "idempotencyKey"
        ],
        "additionalProperties": false
      },
      "RelationMutateRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "relation.delete",
              "relation.confirm"
            ]
          },
          "relationId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "idempotencyKey": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "relationId",
          "idempotencyKey"
        ],
        "additionalProperties": false
      },
      "WorkSetPatchRequest": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ClarifyResolveRequest"
          },
          {
            "$ref": "#/components/schemas/TakeoverRegenerateRequest"
          },
          {
            "$ref": "#/components/schemas/RelationMutateRequest"
          }
        ]
      },
      "ConversationWorkSetListResponse": {
        "type": "object",
        "properties": {
          "workSets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkSetDetailResponse"
            }
          }
        },
        "required": [
          "workSets"
        ],
        "additionalProperties": false
      },
      "WorkSetPatchResponse": {
        "type": "object",
        "properties": {
          "takeover": {
            "$ref": "#/components/schemas/TakeoverDigest"
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkRelation"
            }
          },
          "takeoverState": {
            "$ref": "#/components/schemas/TakeoverState"
          },
          "refinement": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "const": "queued"
              }
            },
            "required": [
              "state"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "UpdateWorkObjectRequest": {
        "type": "object",
        "properties": {
          "expectedRevisionHash": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/WorkObjectContent"
          }
        },
        "required": [
          "expectedRevisionHash",
          "content"
        ],
        "additionalProperties": false
      },
      "CreateReviewDecisionRequest": {
        "type": "object",
        "properties": {
          "revisionId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "decision": {
            "$ref": "#/components/schemas/ReviewDecisionKind"
          },
          "note": {
            "type": "string"
          },
          "reassignedToUserId": {
            "$ref": "#/components/schemas/Identifier"
          }
        },
        "required": [
          "revisionId",
          "decision"
        ],
        "additionalProperties": false
      },
      "PrepareActionRequest": {
        "type": "object",
        "properties": {
          "sourceRevisionIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Identifier"
            }
          },
          "actionType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "risk": {
            "$ref": "#/components/schemas/ExternalActionRisk"
          },
          "target": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "payload": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JSONValue"
            }
          },
          "idempotencyKey": {
            "type": "string"
          }
        },
        "required": [
          "sourceRevisionIds",
          "actionType",
          "title",
          "risk",
          "target",
          "payload",
          "idempotencyKey"
        ],
        "additionalProperties": false
      },
      "ActionPreviewResponse": {
        "type": "object",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ActionV2"
          },
          "humanReadableTarget": {
            "type": "string"
          },
          "sideEffects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "action",
          "humanReadableTarget",
          "sideEffects",
          "permissions"
        ],
        "additionalProperties": false
      },
      "ProjectMemoryGraphResponse": {
        "type": "object",
        "properties": {
          "projectId": {
            "$ref": "#/components/schemas/Identifier"
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryEntity"
            }
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryClaim"
            }
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryRelation"
            }
          },
          "conflicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryConflict"
            }
          },
          "lastRefreshedAt": {
            "$ref": "#/components/schemas/ISO8601Timestamp"
          }
        },
        "required": [
          "projectId",
          "entities",
          "claims",
          "relations",
          "conflicts"
        ],
        "additionalProperties": false
      },
      "RealtimeServerMessageV2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "workset-snapshot"
              },
              "snapshot": {
                "$ref": "#/components/schemas/WorkSetDetailResponse"
              }
            },
            "required": [
              "kind",
              "snapshot"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "event"
              },
              "event": {
                "$ref": "#/components/schemas/CapWorksEventV2"
              }
            },
            "required": [
              "kind",
              "event"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "presence-snapshot"
              },
              "presence": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RealtimePresence"
                }
              }
            },
            "required": [
              "kind",
              "presence"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "presence"
              },
              "presence": {
                "$ref": "#/components/schemas/RealtimePresence"
              }
            },
            "required": [
              "kind",
              "presence"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "presence-leave"
              },
              "userId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "clientId": {
                "type": "string"
              },
              "conversationId": {
                "$ref": "#/components/schemas/Identifier"
              }
            },
            "required": [
              "kind",
              "userId",
              "conversationId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.snapshot"
              },
              "updateBase64": {
                "type": "string"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "baseRevisionId",
              "kind",
              "updateBase64",
              "updatedAt",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.update"
              },
              "updateId": {
                "type": "string"
              },
              "updateBase64": {
                "type": "string"
              },
              "userId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "baseRevisionId",
              "kind",
              "updateBase64",
              "updateId",
              "updatedAt",
              "userId",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.ack"
              },
              "updateId": {
                "type": "string"
              },
              "duplicate": {
                "type": "boolean"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "baseRevisionId",
              "duplicate",
              "kind",
              "updateId",
              "updatedAt",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.checkpointed"
              },
              "checkpointId": {
                "type": "string"
              },
              "workObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "revision": {
                "$ref": "#/components/schemas/WorkObjectRevision"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "baseRevisionId",
              "checkpointId",
              "kind",
              "revision",
              "updatedAt",
              "workObject",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "draft.rebase-required"
              },
              "checkpointId": {
                "type": "string"
              },
              "latestWorkObject": {
                "$ref": "#/components/schemas/WorkObject"
              },
              "latestRevision": {
                "$ref": "#/components/schemas/WorkObjectRevision"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "baseRevisionId",
              "checkpointId",
              "kind",
              "latestRevision",
              "latestWorkObject",
              "updatedAt",
              "workObjectId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "replay-complete"
              },
              "lastSequence": {
                "type": "number"
              },
              "hasMore": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "lastSequence"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "ping"
              },
              "sentAt": {
                "$ref": "#/components/schemas/ISO8601Timestamp"
              }
            },
            "required": [
              "kind",
              "sentAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "workObjectId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "baseRevisionId": {
                "$ref": "#/components/schemas/Identifier"
              },
              "kind": {
                "type": "string",
                "const": "error"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "kind",
              "message",
              "retryable"
            ]
          }
        ]
      },
      "coerceCheckState": {
        "$comment": "(value: string | undefined | null) => CheckItemState | null",
        "type": "object",
        "properties": {
          "namedArgs": {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": false
          }
        }
      },
      "materializeElementsContent": {
        "$comment": "(\n  seed: Extract<WorkObjectContent, { kind: \"elements\" }>,\n  views: MaterializeElementViews) => Extract<WorkObjectContent, { kind: \"elements\" }>",
        "type": "object",
        "properties": {
          "namedArgs": {
            "type": "object",
            "properties": {
              "seed": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "elements"
                  },
                  "elements": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/BlockElement"
                    }
                  },
                  "plug": {
                    "$ref": "#/components/schemas/WorkPlug"
                  },
                  "visualBrief": {
                    "type": "string",
                    "deprecated": "旧视觉动作的文本简报；新写入以 visualRequest 为准。"
                  },
                  "visualRequest": {
                    "$ref": "#/components/schemas/VisualWorkRequestV1"
                  },
                  "compiledVisualBrief": {
                    "$ref": "#/components/schemas/VisualBriefV1"
                  },
                  "designArtifact": {
                    "$ref": "#/components/schemas/DesignArtifactV1"
                  }
                },
                "required": [
                  "kind",
                  "elements"
                ],
                "additionalProperties": false
              },
              "views": {
                "$ref": "#/components/schemas/MaterializeElementViews"
              }
            },
            "required": [
              "seed",
              "views"
            ],
            "additionalProperties": false
          }
        }
      },
      "MaterializeElementViews": {
        "type": "object",
        "properties": {
          "texts": {
            "type": "object",
            "properties": {
              "size": {
                "type": "number"
              }
            },
            "required": [
              "size"
            ],
            "additionalProperties": false
          },
          "attrs": {
            "type": "object",
            "properties": {
              "size": {
                "type": "number"
              }
            },
            "required": [
              "size"
            ],
            "additionalProperties": false,
            "description": "elementId → attrKey → string value（state 等）"
          },
          "order": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "null：保持 seed 顺序且不增删。 非 null：权威顺序；未知 id 需 meta 才能还原，否则 drop。"
          },
          "meta": {
            "type": "object",
            "properties": {
              "size": {
                "type": "number"
              }
            },
            "required": [
              "size"
            ],
            "additionalProperties": false,
            "description": "仅 order 中出现、seed 中没有的 id 需要 meta"
          }
        },
        "required": [
          "texts",
          "attrs",
          "order"
        ],
        "additionalProperties": false
      },
      "ElementStructureMeta": {
        "type": "object",
        "properties": {
          "element": {
            "type": "string",
            "enum": [
              "heading",
              "text",
              "bullet_item",
              "numbered_item",
              "check_item",
              "quote",
              "callout",
              "image",
              "link_card",
              "table",
              "code",
              "field",
              "divider"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/CheckItemState",
            "description": "check_item 默认 state，可被 attrs 覆盖"
          },
          "indent": {
            "type": "number",
            "enum": [
              0,
              1
            ]
          },
          "tone": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "success",
              "critical"
            ]
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "element"
        ],
        "additionalProperties": false,
        "description": "新建行的结构元数据（无 text 正文；正文走 texts map）。"
      },
      "TranscriptionClientMessage": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "type",
              "audio"
            ],
            "properties": {
              "type": {
                "const": "input_audio_buffer.append"
              },
              "audio": {
                "type": "string",
                "contentEncoding": "base64"
              },
              "startMs": {
                "type": "integer"
              },
              "endMs": {
                "type": "integer"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "input_audio_buffer.commit",
                  "input_audio_buffer.clear"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "startMs",
              "endMs",
              "score"
            ],
            "properties": {
              "type": {
                "const": "capworks.speaker.self_match"
              },
              "startMs": {
                "type": "integer"
              },
              "endMs": {
                "type": "integer"
              },
              "score": {
                "type": "number"
              },
              "profileRevision": {
                "type": "integer"
              },
              "modelVersion": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "startMs",
              "endMs",
              "modelVersion",
              "embedding"
            ],
            "properties": {
              "type": {
                "const": "capworks.speaker.embedding"
              },
              "startMs": {
                "type": "integer"
              },
              "endMs": {
                "type": "integer"
              },
              "modelVersion": {
                "type": "string"
              },
              "embedding": {
                "type": "array",
                "minItems": 192,
                "maxItems": 192,
                "items": {
                  "type": "number"
                }
              }
            }
          }
        ]
      },
      "TranscriptionServerMessage": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "const": "session.created"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "transcript"
            ],
            "properties": {
              "type": {
                "const": "conversation.item.input_audio_transcription.completed"
              },
              "transcript": {
                "type": "string"
              },
              "segments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "transcript"
            ],
            "properties": {
              "type": {
                "enum": [
                  "capworks.transcript.partial",
                  "capworks.transcription.committed"
                ]
              },
              "transcript": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "const": "capworks.speaker.identity"
              },
              "speakerId": {
                "type": "string"
              },
              "confidence": {
                "type": "number"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "const": "capworks.error"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            }
          }
        ]
      }
    }
  }
}
