/**
 * @mcp-abap-adt/llm-agent-libs — core SmartAgent composition surface.
 *
 * Re-exports the runtime composition classes that are needed to build a
 * SmartAgent without depending on @mcp-abap-adt/llm-agent-server.
 */

// ---------------------------------------------------------------------------
// Adapters
// ---------------------------------------------------------------------------
export {
  type AgentCallOptions,
  type BaseAgentLlmBridge,
  LlmAdapter,
  type LlmAdapterProviderInfo,
} from './adapters/llm-adapter.js';
export { LlmProviderBridge } from './adapters/llm-provider-bridge.js';
export { NonStreamingLlm } from './adapters/non-streaming-llm.js';
export { wrapEmbedder } from './adapters/usage-logging-embedder.js';
export {
  OrchestratorError,
  SmartAgent,
  type SmartAgentConfig,
  type SmartAgentDeps,
  type SmartAgentRagStores,
  type SmartAgentReconfigureOptions,
  type SmartAgentResponse,
  type StopReason,
} from './agent.js';
// ---------------------------------------------------------------------------
// Builder + agent
// ---------------------------------------------------------------------------
export {
  type BuilderMcpConfig,
  type BuilderPromptsConfig,
  SmartAgentBuilder,
  type SmartAgentBuilderConfig,
  type SmartAgentHandle,
} from './builder.js';
// ---------------------------------------------------------------------------
// Config
// ---------------------------------------------------------------------------
export {
  ConfigWatcher,
  type ConfigWatcherOptions,
  type HotReloadableConfig,
} from './config/config-watcher.js';
export {
  FINALIZER_SYSTEM,
  LlmFinalizer,
  PassthroughFinalizer,
  SubAgentStateOracle,
  TemplateFinalizer,
} from './coordinator/dag/index.js';
// ---------------------------------------------------------------------------
// Coordinator strategies
// ---------------------------------------------------------------------------
export {
  AbortErrorStrategy,
  AutoActivation,
  DagPlanInterpreter,
  ExplicitActivation,
  HybridDispatch,
  LlmDagPlanner,
  LlmReviewStrategy,
  NoopReviewStrategy,
  OneShotPlanning,
  ReplanErrorStrategy,
  ReplanOnErrorPlanning,
  SelfDispatch,
  SkillStepsPlanning,
  SubAgentDispatch,
} from './coordinator/index.js';
// ---------------------------------------------------------------------------
// Stepper runtime (18.0)
// ---------------------------------------------------------------------------
export * from './coordinator/stepper/index.js';
// ---------------------------------------------------------------------------
// Health
// ---------------------------------------------------------------------------
export {
  HealthChecker,
  type HealthCheckerDeps,
} from './health/health-checker.js';
// ---------------------------------------------------------------------------
// History
// ---------------------------------------------------------------------------
export { HistoryMemory } from './history/history-memory.js';
export { HistorySummarizer } from './history/history-summarizer.js';
export type {
  IPipeline,
  PipelineDeps,
  PipelineResult,
} from './interfaces/pipeline.js';
// ---------------------------------------------------------------------------
// Logger
// ---------------------------------------------------------------------------
export { DefaultRequestLogger } from './logger/default-request-logger.js';
export { NoopRequestLogger } from './logger/noop-request-logger.js';
export { SessionLogger } from './logger/session-logger.js';
export {
  SessionRequestLogger,
  summaryToUsage,
} from './logger/session-request-logger.js';
// ---------------------------------------------------------------------------
// Metrics
// ---------------------------------------------------------------------------
export {
  type CounterSnapshot,
  type HistogramSnapshot,
  InMemoryMetrics,
  type MetricsSnapshot,
} from './metrics/in-memory-metrics.js';
export { NoopMetrics } from './metrics/noop-metrics.js';
// ---------------------------------------------------------------------------
// Pipeline
// ---------------------------------------------------------------------------
export {
  type BuiltInStageType,
  buildDefaultHandlerRegistry,
  type ControlFlowType,
  CoordinatorHandler,
  type CoordinatorHandlerDeps,
  DagCoordinatorHandler,
  type DagCoordinatorHandlerDeps,
  DefaultPipeline,
  type DefaultPipelineOptions,
  evaluateCondition,
  type IStageHandler,
  type PipelineContext,
  PipelineExecutor,
  type StageDefinition,
  type StageType,
} from './pipeline/index.js';
export {
  DEFAULT_TOOL_SELECTION,
  ScoreThresholdToolSelection,
  TopKToolSelection,
} from './pipeline/tool-selection/index.js';
export type {
  IPluginLoader,
  LoadedPlugins,
  PluginExports,
} from './plugins/index.js';
// ---------------------------------------------------------------------------
// Plugins
// ---------------------------------------------------------------------------
export {
  emptyLoadedPlugins,
  FileSystemPluginLoader,
  type FileSystemPluginLoaderConfig,
  getDefaultPluginDirs,
  loadPlugins,
  mergePluginExports,
} from './plugins/index.js';
// ---------------------------------------------------------------------------
// Providers (LLM)
// ---------------------------------------------------------------------------
export {
  DefaultModelResolver,
  type MakeLlmConfig,
  makeDefaultLlm,
  makeLlm,
} from './providers.js';
export {
  InMemoryKnowledgeBackend,
  type KnowledgeBackend,
  KnowledgeRag,
} from './rag/knowledge-rag.js';
// ---------------------------------------------------------------------------
// Reranker
// ---------------------------------------------------------------------------
export { LlmReranker } from './reranker/llm-reranker.js';
export { NoopReranker } from './reranker/noop-reranker.js';
// ---------------------------------------------------------------------------
// Resilience
// ---------------------------------------------------------------------------
export { RateLimiterLlm } from './resilience/rate-limiter-llm.js';
export { RetryLlm, type RetryOptions } from './resilience/retry-llm.js';
export {
  type TokenBucketConfig,
  TokenBucketRateLimiter,
} from './resilience/token-bucket-rate-limiter.js';
// ---------------------------------------------------------------------------
// Session
// ---------------------------------------------------------------------------
export { NoopSessionManager } from './session/noop-session-manager.js';
export { SessionGraph } from './session/session-graph.js';
export type {
  SessionAgentParts,
  SessionGraphFactoryOptions,
  SessionGraphIdentity,
} from './session/session-graph-factory.js';
export { SessionGraphFactory } from './session/session-graph-factory.js';
export { SessionManager } from './session/session-manager.js';
export type {
  SessionGraphSource,
  SessionRegistryOptions,
} from './session/session-registry.js';
export { SessionRegistry } from './session/session-registry.js';
// ---------------------------------------------------------------------------
// Skills
// ---------------------------------------------------------------------------
export {
  ClaudeSkillManager,
  CodexSkillManager,
  FileSystemSkillManager,
} from './skills/index.js';
export {
  DefaultSubAgentContextBuilder,
  type DefaultSubAgentContextBuilderConfig,
  type SubAgentRetrievalSource,
} from './subagent/default-context-builder.js';
export {
  DirectLlmSubAgent,
  type DirectLlmSubAgentOptions,
} from './subagent/direct-llm-subagent.js';
// ---------------------------------------------------------------------------
// SubAgent adapters
// ---------------------------------------------------------------------------
export { SmartAgentSubAgent } from './subagent/smart-agent-subagent.js';

// ---------------------------------------------------------------------------
// Tracer
// ---------------------------------------------------------------------------
export { NoopTracer } from './tracer/noop-tracer.js';

// ---------------------------------------------------------------------------
// Utils
// ---------------------------------------------------------------------------
export { LazyInitError, type LazyOptions, lazy } from './utils/lazy.js';

// ---------------------------------------------------------------------------
// Validator
// ---------------------------------------------------------------------------
export { NoopValidator } from './validator/noop-validator.js';
