swagger: "2.0"
info:
  title: entity/agent-gateway/agent/v1/agent.proto
  version: version not set
tags:
  - name: AgentService
  - name: GatewayService
  - name: SessionService
consumes:
  - application/json
produces:
  - application/json
paths:
  /api/v1/agent-gateway/agents:
    get:
      operationId: AgentService_ListAgents
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListAgentsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/projects:
    get:
      operationId: AgentService_ListProjects
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListProjectsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
      tags:
        - AgentService
    post:
      operationId: AgentService_CreateProject
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreateProjectResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/AgentServiceCreateProjectBody'
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/projects/entries:
    get:
      operationId: AgentService_ListProjectEntries
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListProjectEntriesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: project.scope
          in: query
          required: false
          type: string
          enum:
            - PROJECT_SCOPE_UNSPECIFIED
            - PROJECT_SCOPE_PROJECT
            - PROJECT_SCOPE_GLOBAL
          default: PROJECT_SCOPE_UNSPECIFIED
        - name: project.projectName
          in: query
          required: false
          type: string
        - name: path
          in: query
          required: false
          type: string
        - name: pageSize
          in: query
          required: false
          type: integer
          format: int32
        - name: cursor
          in: query
          required: false
          type: string
      tags:
        - AgentService
    delete:
      operationId: AgentService_DeleteProjectEntry
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteProjectEntryResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: project.scope
          in: query
          required: false
          type: string
          enum:
            - PROJECT_SCOPE_UNSPECIFIED
            - PROJECT_SCOPE_PROJECT
            - PROJECT_SCOPE_GLOBAL
          default: PROJECT_SCOPE_UNSPECIFIED
        - name: project.projectName
          in: query
          required: false
          type: string
        - name: path
          in: query
          required: false
          type: string
        - name: recursive
          in: query
          required: false
          type: boolean
        - name: expectedRevision
          in: query
          required: false
          type: string
      tags:
        - AgentService
    post:
      operationId: AgentService_CreateProjectEntry
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreateProjectEntryResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/AgentServiceCreateProjectEntryBody'
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/projects/entries:move:
    post:
      operationId: AgentService_MoveProjectEntry
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1MoveProjectEntryResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/AgentServiceMoveProjectEntryBody'
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/projects/files:
    get:
      operationId: AgentService_GetProjectFile
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetProjectFileResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: project.scope
          in: query
          required: false
          type: string
          enum:
            - PROJECT_SCOPE_UNSPECIFIED
            - PROJECT_SCOPE_PROJECT
            - PROJECT_SCOPE_GLOBAL
          default: PROJECT_SCOPE_UNSPECIFIED
        - name: project.projectName
          in: query
          required: false
          type: string
        - name: path
          in: query
          required: false
          type: string
      tags:
        - AgentService
    put:
      operationId: AgentService_UpdateProjectFile
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UpdateProjectFileResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/AgentServiceUpdateProjectFileBody'
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/projects/{name}:
    delete:
      operationId: AgentService_DeleteProject
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteProjectResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
        - name: name
          in: path
          required: true
          type: string
        - name: confirmName
          in: query
          required: false
          type: string
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/routes:
    get:
      operationId: AgentService_ListAPIProxyRoutes
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListAPIProxyRoutesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
      tags:
        - AgentService
  /api/v1/agent-gateway/agents/{agentId}/secrets:
    get:
      operationId: AgentService_ListSecretStoreSecrets
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListSecretStoreSecretsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: agentId
          in: path
          required: true
          type: string
      tags:
        - AgentService
  /api/v1/agent-gateway/lark/messages:process:
    post:
      operationId: GatewayService_ProcessLarkMessage
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ProcessLarkMessageResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1ProcessLarkMessageRequest'
      tags:
        - GatewayService
  /api/v1/agent-gateway/messages:process:
    post:
      operationId: GatewayService_ProcessMessage
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ProcessMessageResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1ProcessMessageRequest'
      tags:
        - GatewayService
  /api/v1/agent-gateway/sessions:
    get:
      operationId: SessionService_ListSessions
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListSessionsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: sessionId
          in: query
          required: false
          type: string
        - name: sourceType
          in: query
          required: false
          type: string
          enum:
            - MESSAGE_SOURCE_TYPE_UNSPECIFIED
            - MESSAGE_SOURCE_TYPE_LARK
            - MESSAGE_SOURCE_TYPE_APPLICATION
          default: MESSAGE_SOURCE_TYPE_UNSPECIFIED
        - name: sourceInstanceId
          in: query
          required: false
          type: string
        - name: sourceSessionKey
          in: query
          required: false
          type: string
        - name: initiatorEmail
          in: query
          required: false
          type: string
        - name: lark.chatId
          in: query
          required: false
          type: string
        - name: lark.threadId
          in: query
          required: false
          type: string
        - name: lark.anchorMessageId
          in: query
          required: false
          type: string
        - name: lark.entryMessageId
          in: query
          required: false
          type: string
        - name: status
          in: query
          required: false
          type: string
          enum:
            - SESSION_STATUS_UNSPECIFIED
            - SESSION_STATUS_ACTIVE
            - SESSION_STATUS_EXPIRED
          default: SESSION_STATUS_UNSPECIFIED
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: pageSize
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - SessionService
  /api/v1/agent-gateway/sessions/{sessionId}:
    get:
      operationId: SessionService_GetSession
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetSessionResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: sessionId
          in: path
          required: true
          type: string
      tags:
        - SessionService
    delete:
      operationId: SessionService_DeleteSession
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteSessionResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: sessionId
          in: path
          required: true
          type: string
      tags:
        - SessionService
  /api/v1/agent-gateway/sessions/{sessionId}/tasks:
    get:
      operationId: SessionService_ListSessionTasks
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListSessionTasksResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: sessionId
          in: path
          required: true
          type: string
        - name: limit
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - SessionService
definitions:
  AgentServiceCreateProjectBody:
    type: object
    properties:
      name:
        type: string
  AgentServiceCreateProjectEntryBody:
    type: object
    properties:
      project:
        $ref: '#/definitions/v1ProjectRef'
      parentPath:
        type: string
      name:
        type: string
      type:
        $ref: '#/definitions/v1EntryType'
  AgentServiceMoveProjectEntryBody:
    type: object
    properties:
      project:
        $ref: '#/definitions/v1ProjectRef'
      sourcePath:
        type: string
      destinationParentPath:
        type: string
      destinationName:
        type: string
      expectedRevision:
        type: string
  AgentServiceUpdateProjectFileBody:
    type: object
    properties:
      project:
        $ref: '#/definitions/v1ProjectRef'
      path:
        type: string
      content:
        type: string
      expectedRevision:
        type: string
  entityapiproxyv1SecretRef:
    type: object
    properties:
      secret:
        type: string
      field:
        type: string
  entitysecretstorev1SecretRef:
    type: object
    properties:
      name:
        type: string
      field:
        type: string
  protobufAny:
    type: object
    properties:
      '@type':
        type: string
    additionalProperties: {}
  rpcStatus:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          type: object
          $ref: '#/definitions/protobufAny'
  v1AWSSecretsManagerSourceConfig:
    type: object
    properties:
      region:
        type: string
      secretId:
        type: string
      format:
        $ref: '#/definitions/v1SecretFormat'
  v1Agent:
    type: object
    properties:
      agentId:
        type: string
      provider:
        $ref: '#/definitions/v1Provider'
      projectManagementEnabled:
        type: boolean
      isDefault:
        type: boolean
  v1ApplicationMessage:
    type: object
    properties:
      messageId:
        type: string
      sessionKey:
        type: string
      senderEmail:
        type: string
      content:
        type: string
  v1AuthCandidate:
    type: object
    properties:
      type:
        $ref: '#/definitions/v1AuthType'
      headerName:
        type: string
      valueFrom:
        $ref: '#/definitions/entityapiproxyv1SecretRef'
  v1AuthType:
    type: string
    enum:
      - AUTH_TYPE_UNSPECIFIED
      - AUTH_TYPE_BEARER
      - AUTH_TYPE_BASIC
      - AUTH_TYPE_HEADER
      - AUTH_TYPE_GITHUB_PAT_BASIC
    default: AUTH_TYPE_UNSPECIFIED
  v1CreateProjectEntryResponse:
    type: object
    properties:
      entry:
        $ref: '#/definitions/v1Entry'
  v1CreateProjectResponse:
    type: object
    properties:
      project:
        $ref: '#/definitions/v1Project'
  v1CredentialAuthConfig:
    type: object
    properties:
      candidates:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1AuthCandidate'
  v1DeleteProjectEntryResponse:
    type: object
  v1DeleteProjectResponse:
    type: object
  v1DeleteSessionResponse:
    type: object
  v1Entry:
    type: object
    properties:
      name:
        type: string
      path:
        type: string
      type:
        $ref: '#/definitions/v1EntryType'
      size:
        type: string
        format: int64
      modifiedAt:
        type: string
        format: date-time
      revision:
        type: string
      editable:
        type: boolean
  v1EntryType:
    type: string
    enum:
      - ENTRY_TYPE_UNSPECIFIED
      - ENTRY_TYPE_FILE
      - ENTRY_TYPE_DIRECTORY
    default: ENTRY_TYPE_UNSPECIFIED
  v1FileContent:
    type: object
    properties:
      entry:
        $ref: '#/definitions/v1Entry'
      content:
        type: string
  v1GetProjectFileResponse:
    type: object
    properties:
      file:
        $ref: '#/definitions/v1FileContent'
  v1GetSessionResponse:
    type: object
    properties:
      session:
        $ref: '#/definitions/v1Session'
      found:
        type: boolean
  v1HostParameter:
    type: object
    properties:
      source:
        $ref: '#/definitions/v1HostParameterSource'
      allowedValues:
        type: array
        items:
          type: string
  v1HostParameterSource:
    type: string
    enum:
      - HOST_PARAMETER_SOURCE_UNSPECIFIED
      - HOST_PARAMETER_SOURCE_PATH_SEGMENT
    default: HOST_PARAMETER_SOURCE_UNSPECIFIED
  v1LarkAuthProxyConfig:
    type: object
    properties:
      keyFrom:
        $ref: '#/definitions/entityapiproxyv1SecretRef'
  v1LarkMention:
    type: object
    properties:
      key:
        type: string
      openId:
        type: string
  v1LarkMessage:
    type: object
    properties:
      messageId:
        type: string
      rootId:
        type: string
      threadId:
        type: string
      chatId:
        type: string
      chatType:
        type: string
      messageType:
        type: string
      content:
        type: string
      senderType:
        type: string
      senderEmail:
        type: string
      mentions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1LarkMention'
  v1LarkSessionContext:
    type: object
    properties:
      chatId:
        type: string
      threadId:
        type: string
      anchorMessageId:
        type: string
      entryMessageId:
        type: string
  v1LarkSessionFilter:
    type: object
    properties:
      chatId:
        type: string
      threadId:
        type: string
      anchorMessageId:
        type: string
      entryMessageId:
        type: string
  v1LarkTenantTokenSourceConfig:
    type: object
    properties:
      appId:
        type: string
      appSecret:
        $ref: '#/definitions/entitysecretstorev1SecretRef'
      brand:
        type: string
      requestTimeout:
        type: string
  v1ListAPIProxyRoutesResponse:
    type: object
    properties:
      routes:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Route'
  v1ListAgentsResponse:
    type: object
    properties:
      agents:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Agent'
  v1ListProjectEntriesResponse:
    type: object
    properties:
      entries:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Entry'
      nextCursor:
        type: string
      directoryRevision:
        type: string
  v1ListProjectsResponse:
    type: object
    properties:
      projects:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Project'
  v1ListSecretStoreSecretsResponse:
    type: object
    properties:
      secrets:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Secret'
  v1ListSessionTasksResponse:
    type: object
    properties:
      tasks:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Task'
  v1ListSessionsResponse:
    type: object
    properties:
      sessions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Session'
  v1MessageContext:
    type: object
    properties:
      instanceId:
        type: string
      workingDirectory:
        type: string
  v1MessageSourceRef:
    type: object
    properties:
      type:
        $ref: '#/definitions/v1MessageSourceType'
      instanceId:
        type: string
  v1MessageSourceType:
    type: string
    enum:
      - MESSAGE_SOURCE_TYPE_UNSPECIFIED
      - MESSAGE_SOURCE_TYPE_LARK
      - MESSAGE_SOURCE_TYPE_APPLICATION
    default: MESSAGE_SOURCE_TYPE_UNSPECIFIED
  v1Middleware:
    type: object
    properties:
      operationPolicy:
        $ref: '#/definitions/v1OperationPolicyConfig'
      credentialAuth:
        $ref: '#/definitions/v1CredentialAuthConfig'
      larkAuthProxy:
        $ref: '#/definitions/v1LarkAuthProxyConfig'
  v1MoveProjectEntryResponse:
    type: object
    properties:
      entry:
        $ref: '#/definitions/v1Entry'
  v1O11yExchangeSourceConfig:
    type: object
    properties:
      environment:
        type: string
      bootstrap:
        $ref: '#/definitions/entitysecretstorev1SecretRef'
      cloudProvider:
        type: string
      endpoint:
        type: string
      tokenTtl:
        type: string
      requestTimeout:
        type: string
  v1Operation:
    type: object
    properties:
      method:
        type: string
      pathExact:
        type: string
      pathPrefix:
        type: string
      pathTemplate:
        type: string
  v1OperationPolicyConfig:
    type: object
    properties:
      allow:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Operation'
  v1ProcessLarkMessageDisposition:
    type: string
    enum:
      - PROCESS_LARK_MESSAGE_DISPOSITION_UNSPECIFIED
      - PROCESS_LARK_MESSAGE_DISPOSITION_ACCEPTED
      - PROCESS_LARK_MESSAGE_DISPOSITION_DUPLICATED
    default: PROCESS_LARK_MESSAGE_DISPOSITION_UNSPECIFIED
  v1ProcessLarkMessageRequest:
    type: object
    properties:
      context:
        $ref: '#/definitions/v1MessageContext'
      message:
        $ref: '#/definitions/v1LarkMessage'
  v1ProcessLarkMessageResponse:
    type: object
    properties:
      disposition:
        $ref: '#/definitions/v1ProcessLarkMessageDisposition'
      task:
        $ref: '#/definitions/v1Task'
  v1ProcessMessageDisposition:
    type: string
    enum:
      - PROCESS_MESSAGE_DISPOSITION_UNSPECIFIED
      - PROCESS_MESSAGE_DISPOSITION_ACCEPTED
      - PROCESS_MESSAGE_DISPOSITION_DUPLICATED
    default: PROCESS_MESSAGE_DISPOSITION_UNSPECIFIED
  v1ProcessMessageRequest:
    type: object
    properties:
      context:
        $ref: '#/definitions/v1MessageContext'
      message:
        $ref: '#/definitions/v1ApplicationMessage'
      agentId:
        type: string
  v1ProcessMessageResponse:
    type: object
    properties:
      disposition:
        $ref: '#/definitions/v1ProcessMessageDisposition'
      task:
        $ref: '#/definitions/v1Task'
  v1Project:
    type: object
    properties:
      name:
        type: string
      gitInitialized:
        type: boolean
      modifiedAt:
        type: string
        format: date-time
  v1ProjectRef:
    type: object
    properties:
      scope:
        $ref: '#/definitions/v1ProjectScope'
      projectName:
        type: string
  v1ProjectScope:
    type: string
    enum:
      - PROJECT_SCOPE_UNSPECIFIED
      - PROJECT_SCOPE_PROJECT
      - PROJECT_SCOPE_GLOBAL
    default: PROJECT_SCOPE_UNSPECIFIED
  v1Provider:
    type: string
    enum:
      - PROVIDER_UNSPECIFIED
      - PROVIDER_CODEX_CLI
      - PROVIDER_CODEX_APP_SERVER
    default: PROVIDER_UNSPECIFIED
  v1Route:
    type: object
    properties:
      routeId:
        type: string
      prefix:
        type: string
      upstream:
        $ref: '#/definitions/v1Upstream'
      middlewares:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Middleware'
      allowedRequestHeaders:
        type: array
        items:
          type: string
      listenerId:
        type: string
  v1Secret:
    type: object
    properties:
      name:
        type: string
      source:
        $ref: '#/definitions/v1SecretSource'
      refresh:
        $ref: '#/definitions/v1SecretRefresh'
      status:
        $ref: '#/definitions/v1SecretStatus'
    description: Secret exposes configuration and cached status, never resolved credential values.
  v1SecretFormat:
    type: string
    enum:
      - SECRET_FORMAT_UNSPECIFIED
      - SECRET_FORMAT_OPAQUE
      - SECRET_FORMAT_JSON
    default: SECRET_FORMAT_UNSPECIFIED
  v1SecretRefresh:
    type: object
    properties:
      interval:
        type: string
      refreshBeforeExpiry:
        type: string
      maxStaleness:
        type: string
  v1SecretSource:
    type: object
    properties:
      awsSecretsManager:
        $ref: '#/definitions/v1AWSSecretsManagerSourceConfig'
      o11yExchange:
        $ref: '#/definitions/v1O11yExchangeSourceConfig'
      larkTenantToken:
        $ref: '#/definitions/v1LarkTenantTokenSourceConfig'
  v1SecretState:
    type: string
    enum:
      - SECRET_STATE_UNSPECIFIED
      - SECRET_STATE_LOADING
      - SECRET_STATE_READY
      - SECRET_STATE_STALE
      - SECRET_STATE_UNAVAILABLE
    default: SECRET_STATE_UNSPECIFIED
  v1SecretStatus:
    type: object
    properties:
      state:
        $ref: '#/definitions/v1SecretState'
      version:
        type: string
      lastSuccessAt:
        type: string
        format: date-time
      expiresAt:
        type: string
        format: date-time
      lastError:
        type: string
        description: Error from the last completed Fetch; cleared after success.
      lastAttemptAt:
        type: string
        format: date-time
        description: Start time of the most recent Fetch attempt.
  v1Session:
    type: object
    properties:
      sessionId:
        type: string
      agentId:
        type: string
      agentSessionId:
        type: string
      activeTurnId:
        type: string
      source:
        $ref: '#/definitions/v1SessionSource'
      status:
        $ref: '#/definitions/v1SessionStatus'
      createdAt:
        type: string
        format: date-time
      updatedAt:
        type: string
        format: date-time
  v1SessionSource:
    type: object
    properties:
      source:
        $ref: '#/definitions/v1MessageSourceRef'
      sourceSessionKey:
        type: string
      initiatorEmail:
        type: string
      lark:
        $ref: '#/definitions/v1LarkSessionContext'
  v1SessionStatus:
    type: string
    enum:
      - SESSION_STATUS_UNSPECIFIED
      - SESSION_STATUS_ACTIVE
      - SESSION_STATUS_EXPIRED
    default: SESSION_STATUS_UNSPECIFIED
  v1Task:
    type: object
    properties:
      taskId:
        type: string
      sessionId:
        type: string
      agentTurnId:
        type: string
      source:
        $ref: '#/definitions/v1TaskSource'
      status:
        $ref: '#/definitions/v1TaskStatus'
      prompt:
        type: string
      errorMessage:
        type: string
      createdAt:
        type: string
        format: date-time
      updatedAt:
        type: string
        format: date-time
      workingDirectory:
        type: string
  v1TaskSource:
    type: object
    properties:
      sourceMessageId:
        type: string
      senderEmail:
        type: string
  v1TaskStatus:
    type: string
    enum:
      - TASK_STATUS_UNSPECIFIED
      - TASK_STATUS_RECEIVED
      - TASK_STATUS_PROCESSING
      - TASK_STATUS_STEERING
      - TASK_STATUS_SUCCEEDED
      - TASK_STATUS_FAILED
      - TASK_STATUS_TIMEOUT
      - TASK_STATUS_REJECTED
    default: TASK_STATUS_UNSPECIFIED
  v1UpdateProjectFileResponse:
    type: object
    properties:
      entry:
        $ref: '#/definitions/v1Entry'
  v1Upstream:
    type: object
    properties:
      baseUrl:
        type: string
      scheme:
        type: string
      hostTemplate:
        type: string
      hostParameters:
        type: object
        additionalProperties:
          $ref: '#/definitions/v1HostParameter'
