/**
 * leWOOOgo Plugin System - Core Interfaces
 * ADR-003: leWOOOgo 模組化架構
 */

export type PluginCategory = 'INPUT' | 'BRAIN' | 'OUTPUT' | 'ACTION' | 'DATA' | 'UI'

export type HealthStatus = 'healthy' | 'unhealthy' | 'unknown'

export type Unsubscribe = () => void

/**
 * 所有 Plugin 的基礎介面
 */
export interface LeWOOOgoPlugin {
  readonly id: string
  readonly name: string
  readonly version: string
  readonly category: PluginCategory
  readonly description?: string

  initialize(): Promise<void>
  healthCheck(): Promise<HealthStatus>
  shutdown(): Promise<void>
}

/**
 * Plugin 配置 Schema
 */
export interface PluginConfigSchema {
  type: 'object'
  properties: Record<string, unknown>
  required?: string[]
}

/**
 * Plugin 元數據
 */
export interface PluginMetadata {
  id: string
  name: string
  version: string
  category: PluginCategory
  description?: string
  author?: string
  configSchema?: PluginConfigSchema
}
