/**
 * mcpctl/proxymodel — Public entrypoint for ProxyModel plugin authors.
 *
 * Import from this module when writing custom plugins or stages:
 *
 *   import type { ProxyModelPlugin, PluginSessionContext } from 'mcpctl/proxymodel';
 *
 * Plugins implement the ProxyModelPlugin interface and are wired via router.setPlugin().
 */

// Plugin system
export type {
  ProxyModelPlugin,
  ProxyModelFactory,
  PluginSessionContext,
} from './plugin.js';
export { PluginRegistry, resolveInheritance, loadPlugins } from './plugin-loader.js';
export { PluginContextImpl } from './plugin-context.js';
export type { PluginContextDeps } from './plugin-context.js';

// Built-in plugins
export { createGatePlugin } from './plugins/gate.js';
export type { GatePluginConfig } from './plugins/gate.js';
export { createContentPipelinePlugin } from './plugins/content-pipeline.js';
export { createDefaultPlugin } from './plugins/default.js';
export type { DefaultPluginConfig } from './plugins/default.js';

// Content utilities for plugin authors
export { executePipeline } from './executor.js';
export type { ExecuteOptions } from './executor.js';
export { getStage, listStages, loadCustomStages, clearCustomStages } from './stage-registry.js';
export { BUILT_IN_STAGES } from './stages/index.js';
export { detectContentType } from './content-type.js';
export { MemoryCache } from './cache.js';
export { FileCache } from './file-cache.js';
export { pauseQueue } from './pause-queue.js';
export type { PausedItem } from './pause-queue.js';
export { startWatchers, stopWatchers, reloadStages, onReload } from './watcher.js';
export { LLMProviderAdapter } from './llm-adapter.js';

// Types
export type {
  // Stage contract
  StageHandler,
  StageContext,
  StageResult,
  Section,

  // Session controller contract (legacy — prefer ProxyModelPlugin)
  SessionController,
  SessionContext,
  InitializeHook,
  InterceptResult,
  VirtualToolHandler,

  // Platform services
  LLMProvider,
  LLMCompleteOptions,
  CacheProvider,
  StageLogger,

  // ProxyModel definition (legacy YAML — kept for backward compat)
  ProxyModelDefinition,
  StageDefinition,
  ContentType,

  // Supporting types
  ToolDefinition,
  PromptIndex,
  PromptIndexEntry,
} from './types.js';

// Schema & loader (legacy YAML — kept for backward compat)
export { validateProxyModel } from './schema.js';
export type { ProxyModelDefinition as ProxyModelDef, StageSpec } from './schema.js';
export { loadProxyModels, getProxyModel } from './loader.js';
export { getBuiltInProxyModels } from './built-in-models.js';
