export * from "./modules/ai_assistant/lib/types.js";
import {
  defineAiAgent,
  defineAiAgentExtension
} from "./modules/ai_assistant/lib/ai-agent-definition.js";
import { defineAiTool } from "./modules/ai_assistant/lib/ai-tool-definition.js";
import {
  definePromptTemplate
} from "./modules/ai_assistant/lib/prompt-composition-types.js";
import {
  registerMcpTool,
  getToolRegistry,
  unregisterMcpTool,
  toolRegistry
} from "./modules/ai_assistant/lib/tool-registry.js";
import { executeTool } from "./modules/ai_assistant/lib/tool-executor.js";
import { createMcpServer, runMcpServer } from "./modules/ai_assistant/lib/mcp-server.js";
import { runMcpHttpServer } from "./modules/ai_assistant/lib/http-server.js";
import {
  authenticateMcpRequest,
  extractApiKeyFromHeaders
} from "./modules/ai_assistant/lib/auth.js";
import { loadAllModuleTools, indexToolsForSearch } from "./modules/ai_assistant/lib/tool-loader.js";
import {
  applyAiAgentOverrides,
  applyAiAgentExtensions,
  applyAiToolOverrides,
  applyAiOverridesFromEnabledModules,
  resetProgrammaticOverridesForTests
} from "./modules/ai_assistant/lib/ai-overrides.js";
import {
  loadAgentRegistry,
  getAgent,
  listAgents,
  listAgentsByModule,
  resetAgentRegistryForTests
} from "./modules/ai_assistant/lib/agent-registry.js";
import {
  checkAgentPolicy
} from "./modules/ai_assistant/lib/agent-policy.js";
import {
  resolveAiAgentTools,
  AgentPolicyError
} from "./modules/ai_assistant/lib/agent-tools.js";
import {
  createAiApiOperationRunner
} from "./modules/ai_assistant/lib/ai-api-operation-runner.js";
import {
  defineApiBackedAiTool
} from "./modules/ai_assistant/lib/api-backed-tool.js";
import {
  prepareMutation,
  computeMutationIdempotencyKey,
  AiMutationPreparationError,
  MUTATION_PREVIEW_CARD_COMPONENT
} from "./modules/ai_assistant/lib/prepare-mutation.js";
import {
  runAiAgentText,
  runAiAgentObject,
  composeSystemPrompt
} from "./modules/ai_assistant/lib/agent-runtime.js";
import {
  createAiAgentTransport
} from "./modules/ai_assistant/lib/agent-transport.js";
import {
  AI_PENDING_ACTION_STATUSES,
  AI_PENDING_ACTION_QUEUE_MODES,
  AI_PENDING_ACTION_ALLOWED_TRANSITIONS,
  AI_PENDING_ACTION_TERMINAL_STATUSES,
  AI_PENDING_ACTION_DEFAULT_TTL_SECONDS,
  AI_PENDING_ACTION_TTL_ENV_VAR,
  AiPendingActionStateError,
  isAiPendingActionStatus,
  isAiPendingActionQueueMode,
  isTerminalAiPendingActionStatus,
  isAllowedAiPendingActionTransition,
  resolveAiPendingActionTtlSeconds
} from "./modules/ai_assistant/lib/pending-action-types.js";
import {
  serializePendingActionForClient
} from "./modules/ai_assistant/lib/pending-action-client.js";
import {
  runPendingActionRechecks,
  checkStatusAndExpiry,
  checkAgentAndFeatures,
  checkToolWhitelist,
  checkAttachmentScope,
  checkRecordVersion,
  PENDING_ACTION_RECHECK_CODES,
  isPendingActionRecheckCode
} from "./modules/ai_assistant/lib/pending-action-recheck.js";
import {
  executePendingActionConfirm,
  PENDING_ACTION_CONFIRMED_EVENT_ID
} from "./modules/ai_assistant/lib/pending-action-executor.js";
import {
  executePendingActionCancel,
  PENDING_ACTION_CANCELLED_EVENT_ID,
  PENDING_ACTION_EXPIRED_EVENT_ID
} from "./modules/ai_assistant/lib/pending-action-cancel.js";
import {
  createModelFactory,
  AiModelFactoryError
} from "./modules/ai_assistant/lib/model-factory.js";
import {
  resolveAttachmentParts,
  resolveAttachmentPartsForAgent,
  attachmentPartsToUiFileParts,
  summarizeAttachmentPartsForPrompt
} from "./modules/ai_assistant/lib/attachment-parts.js";
import {
  OpenCodeClient,
  createOpenCodeClient
} from "./modules/ai_assistant/lib/opencode-client.js";
import {
  handleOpenCodeMessage,
  handleOpenCodeHealth,
  handleOpenCodeMessageStreaming,
  handleOpenCodeAnswer,
  getPendingQuestions,
  extractTextFromResponse,
  extractAllPartsFromResponse,
  extractMetadataFromResponse
} from "./modules/ai_assistant/lib/opencode-handlers.js";
import { metadata, features } from "./modules/ai_assistant/index.js";
export {
  AI_PENDING_ACTION_ALLOWED_TRANSITIONS,
  AI_PENDING_ACTION_DEFAULT_TTL_SECONDS,
  AI_PENDING_ACTION_QUEUE_MODES,
  AI_PENDING_ACTION_STATUSES,
  AI_PENDING_ACTION_TERMINAL_STATUSES,
  AI_PENDING_ACTION_TTL_ENV_VAR,
  AgentPolicyError,
  AiModelFactoryError,
  AiMutationPreparationError,
  AiPendingActionStateError,
  MUTATION_PREVIEW_CARD_COMPONENT,
  OpenCodeClient,
  PENDING_ACTION_CANCELLED_EVENT_ID,
  PENDING_ACTION_CONFIRMED_EVENT_ID,
  PENDING_ACTION_EXPIRED_EVENT_ID,
  PENDING_ACTION_RECHECK_CODES,
  applyAiAgentExtensions,
  applyAiAgentOverrides,
  applyAiOverridesFromEnabledModules,
  applyAiToolOverrides,
  attachmentPartsToUiFileParts,
  authenticateMcpRequest,
  checkAgentAndFeatures,
  checkAgentPolicy,
  checkAttachmentScope,
  checkRecordVersion,
  checkStatusAndExpiry,
  checkToolWhitelist,
  composeSystemPrompt,
  computeMutationIdempotencyKey,
  createAiAgentTransport,
  createAiApiOperationRunner,
  createMcpServer,
  createModelFactory,
  createOpenCodeClient,
  defineAiAgent,
  defineAiAgentExtension,
  defineAiTool,
  defineApiBackedAiTool,
  definePromptTemplate,
  executePendingActionCancel,
  executePendingActionConfirm,
  executeTool,
  extractAllPartsFromResponse,
  extractApiKeyFromHeaders,
  extractMetadataFromResponse,
  extractTextFromResponse,
  features,
  getAgent,
  getPendingQuestions,
  getToolRegistry,
  handleOpenCodeAnswer,
  handleOpenCodeHealth,
  handleOpenCodeMessage,
  handleOpenCodeMessageStreaming,
  indexToolsForSearch,
  isAiPendingActionQueueMode,
  isAiPendingActionStatus,
  isAllowedAiPendingActionTransition,
  isPendingActionRecheckCode,
  isTerminalAiPendingActionStatus,
  listAgents,
  listAgentsByModule,
  loadAgentRegistry,
  loadAllModuleTools,
  metadata,
  prepareMutation,
  registerMcpTool,
  resetAgentRegistryForTests,
  resetProgrammaticOverridesForTests,
  resolveAiAgentTools,
  resolveAiPendingActionTtlSeconds,
  resolveAttachmentParts,
  resolveAttachmentPartsForAgent,
  runAiAgentObject,
  runAiAgentText,
  runMcpHttpServer,
  runMcpServer,
  runPendingActionRechecks,
  serializePendingActionForClient,
  summarizeAttachmentPartsForPrompt,
  toolRegistry,
  unregisterMcpTool
};
//# sourceMappingURL=index.js.map
