export interface OpenClawSetupStatus {
  profileId: string
  state: string
  experimentalBlocked: boolean
  hasProfile: boolean
  endpoint: string | null
  discoverySource: string | null
  adoptionState: string
  managementEnabled: boolean
  requiredVersion: string | null
  gatewayVersion: string | null
  protocolVersion: number | null
  deviceId: string | null
  deviceTokenConfigured: boolean
  pairingRequired: boolean
  pairingRequestId: string | null
  grantedScopes: string[]
  advertisedMethods: string[]
  capabilityHash: string | null
  revision: number | null
  lastProbedAt: string | null
  lastVerifiedAt: string | null
  adoptedAt: string | null
  updatedAt: string | null
  message: string | null
  recovery: string | null
  checkedAt: string
}

export interface OpenClawDiscoveryCandidate {
  endpoint: string
  source: string
  isCurrentConnectorEndpoint: boolean
  requiresTlsFingerprint: boolean
  isValid: boolean
  reason: string | null
}

export interface OpenClawDiscovery {
  candidates: OpenClawDiscoveryCandidate[]
  mdnsState: string
  message: string | null
  checkedAt: string
}

export interface OpenClawProbe {
  endpoint: string
  source: string
  isCurrentConnectorEndpoint: boolean
  connected: boolean
  gatewayVersion: string | null
  requiredVersion: string | null
  versionMatches: boolean
  protocolVersion: number | null
  deviceId: string | null
  pairingRequired: boolean
  pairingRequestId: string | null
  grantedScopes: string[]
  advertisedMethods: string[]
  capabilityHash: string
  canAttach: boolean
  leastPrivilegeSatisfied: boolean
  checkedAt: string
}

export interface OpenClawAdoptionInventory {
  agentCount: number | null
  agentFileCount: number | null
  cronJobCount: number | null
  modelCount: number | null
  channelCount: number | null
  nodeCount: number | null
  diagnostics: string[]
  capturedAt: string
}

export interface OpenClawSetupOperation<T> {
  ok: boolean
  state: string
  message: string
  data: T | null
  recovery: string | null
  completedAt: string
}
