// Types
export type {
  TaskStatus,
  TaskType,
  DispatchMode,
  DependsOnPolicy,
  GateType,
  GateFailOn,
  GateEntry,
  Task,
  EventType,
  MACPEvent,
  GateResult,
  TaskResult,
  ProviderMeta,
  ProviderRegistry,
} from './types.js';

export { CredentialError } from './types.js';

// Credential resolver
export {
  DEFAULT_CREDENTIALS_DIR,
  OC_CONFIG_PATH,
  REDACTED_MARKER,
  PROVIDER_REGISTRY,
  extractProvider,
  parseDotenv,
  stripJSON5Extensions,
  checkOCConfigPermissions,
  isValidCredential,
  resolveCredentials,
} from './credential-resolver.js';

export type { ResolveCredentialsOptions } from './credential-resolver.js';

// Gate runner
export { normalizeGate, runShell, countAIFindings, runGate, runGates } from './gate-runner.js';

export type { NormalizedGate } from './gate-runner.js';

// Risk-floor (agent reflection loop — diff review classifier)
export { evaluateRiskFloor, DEFAULT_RISK_THRESHOLD } from './risk-floor.js';

export type { ReviewSurface, RiskFloorInput, RiskFloorVerdict } from './risk-floor.js';

// Event emitter
export { nowISO, appendEvent, emitEvent } from './event-emitter.js';

// CLI
export { registerMacpCommand } from './cli.js';
