// 新的存储 API
export * from './storage/index.js';

// 类型定义
export type { MessageInfo, Message, MessageRole } from './message.js';
export {
  MessageInfoSchema,
  MessageRoleSchema,
  generateMessageId,
  getTimestampFromMessageId,
  createMessageInfo,
} from './message.js';

export type { Part, PartType, ToolStatus, ToolState, ToolPart, TextPart } from './parts.js';
export {
  PartSchema,
  TextPartSchema,
  ToolPartSchema,
  ReasoningPartSchema,
  FilePartSchema,
  StepStartPartSchema,
  StepFinishPartSchema,
  SnapshotPartSchema,
  PatchPartSchema,
  AgentPartSchema,
  SubtaskPartSchema,
  CompactionPartSchema,
  RetryPartSchema,
  ToolStateSchema,
  ToolStatePendingSchema,
  ToolStateRunningSchema,
  ToolStateCompletedSchema,
  ToolStateErrorSchema,
  createPart,
} from './parts.js';

// 消息转换器
export { toModelMessages, getToolInput, getToolDuration } from './converter.js';

// ID 生成器
export {
  generateSessionId,
  generateMessageId as generateMsgId,
  generatePartId,
  generateTodoId,
  getTimestampFromMessageId as getMsgTimestamp,
  getTimestampFromPartId,
  getDateFromSessionId,
  isValidSessionId,
  isValidMessageId,
  isValidPartId,
} from './id.js';

// 会话管理器
export { SessionManager, sessionManager } from './manager.js';
export type { SessionData, SessionSummary, ProjectMetadata } from './manager.js';

// 项目工具
export { getProjectId, isGitRepository } from './project.js';
