/**
 *
 * Integration System
 *
 * Infrastructure for calling external APIs (Gmail, Slack, etc.) from agent tools.
 * Provides adapters, credentials, rate limiting, and retry logic.
 *
 * Usage:
 * import { createIntegrationTool, IntegrationService } from '@repo/core/execution-engine/tools/integration'
 */

// Tool creation (primary interface for agents)
export { createIntegrationTool } from './tool'
export type {
  IntegrationToolConfig,
  IntegrationType,
  IntegrationMethodMap,
  GmailMethod,
  SlackMethod,
  GithubMethod,
  LinearMethod,
  AirtableMethod,
  SalesforceMethod,
  HubspotMethod,
  StripeMethod,
  TwilioMethod,
  SendgridMethod,
  MailgunMethod,
  ZapierMethod,
  WebhookMethod,
  SignatureApiMethod
} from './tool'

// Core service and orchestration
export { IntegrationService } from './service'

// Types and errors
export type { BaseIntegrationAdapter } from './base-integration-adapter'
export type { RateLimiter, RetryPolicy } from '../../../../platform/resilience'

// Utilities
export {
  DEFAULT_RETRY_POLICY,
  InMemoryRateLimiter,
  createRateLimiter,
  withRetry,
  calculateRetryDelay,
  sleep
} from '../../../../platform/resilience'

// NOTE: Tool factory functions (createGmailSendEmailTool, etc.)
// are server-only and must be imported from @repo/core/server
// They are NOT exported here to enforce the browser/server boundary
