/**
 * Agent module exports
 * Core agent framework for autonomous AI agents
 */

// Agent class
export { Agent } from './core/agent'

// Types
export type {
  AgentKind,
  AgentConfig,
  DescriptorBackedAgentConfig,
  AgentConstraints,
  AgentDefinition,
  IterationContext,
  LLMAdapterFactory
} from './core/types'

// Memory
export type { AgentMemory, MemoryEntry, MemoryEntryType } from './memory/types'
export { addToolError, loadSessionMemory, validateMemoryKeyOwnership } from './memory/utils'
export { isToolOwnedKey, isActionOwnedKey, isLLMOwnedKey, getKeyOwner } from './memory/domains'

// Tools & Actions
export type { Tool, ToolDefinition } from '../tools/types'
export type { AgentAction, ToolCallAction, CompleteAction, MessageAction, NavigateKnowledgeAction } from './actions/types'
export {
  ToolCallActionSchema,
  CompleteActionSchema,
  MessageActionSchema,
  NavigateKnowledgeActionSchema,
  AgentActionSchema
} from './actions/types'

// Knowledge Map
export type { KnowledgeMap, KnowledgeNode, KnowledgeContent, KnowledgeMapState } from './knowledge-map/types'
export { reloadKnowledgeMapTools } from './knowledge-map/utils'

// LLM exports (re-exported from llm module)
export type { LLMAdapter, LLMGenerateRequest, LLMGenerateResponse, LLMMessage } from '../llm/types'
export type { LLMModel, ModelConfig } from '../llm/model-info'

// LLM type exports (browser-safe - types only)
// NOTE: Implementations (OpenAIAdapter, createLLMAdapter) are server-only - import from @repo/core/server
export type { OpenAIAdapterConfig } from '../llm/adapters/server/openai'

// Logging - Simplified 2-event model (lifecycle + iteration)
export type {
  AgentLogContext,
  AgentLogMessage,
  AgentLifecycle,
  LifecycleStage,
  IterationEventType,
  AgentLifecycleEvent,
  AgentIterationEvent,
  ActionPlaceholderData
} from './observability/logging'

// Logging - Type Guards (2 primary + helpers)
export {
  // Primary type guards
  isLifecycleEvent,
  isIterationEvent,
  // Helper type guards
  isInitialization,
  isIteration,
  isCompletion,
  isReasoningEvent,
  isActionEvent,
  isToolUseAction,
  isIterationContext,
  // Logging utilities
  createAgentLogger
} from './observability/logging'

// Utilities - Currently empty, reserved for future functions

// Agent errors
export * from './errors'
