/**
 * Agent Module - Public API
 *
 * Exports the AgentManager port interface and related types.
 * All consumers should import from this index file.
 */

// Port interface and types
export type {
  AgentStatus,
  SpawnAgentOptions,
  AgentInfo,
  AgentResult,
  AgentManager,
  AgentInputContext,
} from './types.js';

// Adapter implementations
export { MultiProviderAgentManager } from './manager.js';
/** @deprecated Use MultiProviderAgentManager instead */
export { MultiProviderAgentManager as ClaudeAgentManager } from './manager.js';
export { MockAgentManager, type MockAgentScenario } from './mock-manager.js';

// Provider registry
export {
  getProvider,
  listProviders,
  registerProvider,
  loadProvidersFromFile,
  PROVIDER_PRESETS,
} from './providers/index.js';
export type { AgentProviderConfig } from './providers/index.js';

// Agent prompts
export {
  buildDiscussPrompt,
  buildPlanPrompt,
  buildExecutePrompt,
  buildRefinePrompt,
  buildDetailPrompt,
} from './prompts/index.js';

// Schema
export { agentSignalSchema, agentSignalJsonSchema } from './schema.js';
export type { AgentSignal } from './schema.js';
// Backward compat
export { agentOutputSchema, agentOutputJsonSchema } from './schema.js';

// File I/O
export {
  writeInputFiles,
  readSummary,
  readPhaseFiles,
  readTaskFiles,
  readDecisionFiles,
  readPageFiles,
  generateId,
} from './file-io.js';
export type {
  WriteInputFilesOptions,
  ParsedSummary,
  ParsedPhaseFile,
  ParsedTaskFile,
  ParsedDecisionFile,
  ParsedPageFile,
} from './file-io.js';

// Content serializer
export { serializePageTree, tiptapJsonToMarkdown } from './content-serializer.js';
export type { PageForSerialization } from './content-serializer.js';

// Alias generator
export { generateUniqueAlias } from './alias.js';

// File tailer for crash-resilient streaming
export { FileTailer } from './file-tailer.js';
export type { FileTailerOptions } from './file-tailer.js';

// Extracted manager helpers
export { ProcessManager } from './process-manager.js';
export { CredentialHandler } from './credential-handler.js';
export { OutputHandler } from './output-handler.js';
export type { ActiveAgent } from './output-handler.js';
export { CleanupManager } from './cleanup-manager.js';
