// Copyright (c) 2026 defconxt. All rights reserved.
// Licensed under AGPL-3.0 — see LICENSE file for details.
// NERF is a trademark of defconxt.

/**
 * NERF Gateway — Public API surface.
 *
 * All downstream consumers (nerf.js, API, MCP) import from this barrel.
 *
 * @module gateway
 */

// Config validation
export { validateConfig, VALID_BACKENDS } from './config-validate.js';

// Mode detection
export { parseKeywordTable, detectMode, stripModePrefix } from './mode.js';

// Prompt assembly
export {
  loadBasePrompt,
  loadRawClaudeMd,
  loadSkill,
  assembleSystemPrompt,
  MODE_SKILL_MAP,
  REPO_ROOT,
} from './prompt.js';

// Plugin management
export { PluginManager } from './plugins.js';

// LLM client factory
export { makeClient } from './client.js';

// Pi-ai LLM client adapter
export { makePiClient, listPiProviders } from './client-pi.js';

// Gateway orchestrator
export { Gateway } from './gateway.js';

// Command handlers
export {
  handleSearch,
  handleStore,
  handleStats,
  handleScore,
  handleMemoryExport,
  handleMemoryImport,
  handleIngest,
  handleStatus,
  handleDiff,
  handleWorkflow,
  handleSarif,
  handleOsint,
  handleDomains,
  handleSkills,
  handleVersion,
  handleDoctor,
  handlePlugin,
  handleQuery,
  handleLeaderboard,
  handleFeedback,
  handleMarketplace,
  handleCompliance,
  handleScan,
  handleSetupSignal,
  handleUpdate,
  handleReview,
  handlePanel,
  handleAnalyze,
  handleShard,
  handleGuardrail,
  handleChain,
  handleCouncil,
  handleResume,
  handleBenchmark,
} from './commands.js';
