{"version":3,"sources":["../../git/types.ts"],"sourcesContent":["/**\n * Types for Morph Git SDK\n */\n\nimport type { RetryConfig } from '../tools/utils/resilience.js';\n\nexport interface MorphGitConfig {\n  apiKey?: string;\n  proxyUrl?: string;\n  /** Retry configuration for API calls */\n  retryConfig?: RetryConfig;\n}\n\nexport interface CloneOptions {\n  repoId: string;\n  dir: string;\n  branch?: string;\n  depth?: number;\n  singleBranch?: boolean;\n}\n\nexport interface PushOptions {\n  dir: string;\n  remote?: string;\n  branch: string; // Required: explicit branch prevents accidental pushes\n  waitForEmbeddings?: boolean; // Optional: wait for embeddings to complete before returning\n  /** Generate embeddings for this push. Default: false (opt-in) */\n  index?: boolean;\n}\n\nexport interface EmbeddingProgress {\n  filesProcessed: number;\n  totalFiles: number;\n  chunksGenerated: number;\n  chunksStored: number;\n}\n\nexport interface WaitForEmbeddingsOptions {\n  repoId: string;\n  commitHash?: string;\n  timeout?: number; // Default: 120000 (2 minutes)\n  onProgress?: (progress: EmbeddingProgress) => void;\n}\n\nexport interface PullOptions {\n  dir: string;\n  remote?: string;\n  branch: string; // Required: explicit branch prevents accidental pulls\n}\n\nexport interface AddOptions {\n  dir: string;\n  filepath: string;\n}\n\nexport interface ChatMessage {\n  role: string;\n  content: string;\n  [key: string]: any; // Allow additional fields like name, function_call, etc.\n}\n\n/**\n * Schema for data stored in git notes (refs/notes/morph-metadata).\n * All fields optional. Single source of truth for note structure.\n */\nexport interface MorphNotesSchema {\n  /** Arbitrary user-defined key-value metadata (must be valid JSON) */\n  metadata?: Record<string, unknown>;\n  /** Chat/conversation history that led to this commit */\n  chatHistory?: ChatMessage[];\n  /** Browser recording session ID for replay */\n  recordingId?: string;\n  /** Schema version for future migrations */\n  _version?: number;\n}\n\n/** @deprecated Use MorphNotesSchema instead */\nexport type CommitMetadata = MorphNotesSchema;\n\nexport interface CommitOptions {\n  dir: string;\n  message: string;\n  author?: {\n    name: string | \"Morph AI Agent\";\n    email: string | \"ai@morphllm.com\";\n  };\n  /** Arbitrary user-defined key-value metadata (must be valid JSON) */\n  metadata?: Record<string, unknown>;\n  /** Chat/conversation history that led to this commit */\n  chatHistory?: ChatMessage[];\n  /** Browser recording session ID for replay */\n  recordingId?: string;\n}\n\nexport interface StatusOptions {\n  dir: string;\n  filepath?: string;\n}\n\nexport interface LogOptions {\n  dir: string;\n  depth?: number;\n  ref?: string;\n}\n\nexport interface CheckoutOptions {\n  dir: string;\n  ref: string;\n}\n\nexport interface BranchOptions {\n  dir: string;\n  name: string;\n  checkout?: boolean;\n}\n\nexport interface DiffOptions {\n  dir: string;\n  ref1?: string;\n  ref2?: string;\n  filepath?: string;\n}\n\nexport interface GitUser {\n  name: string;\n  email: string;\n}\n\nexport interface CommitObject {\n  oid: string;\n  commit: {\n    message: string;\n    author: {\n      name: string | \"Morph AI Agent\";\n      email: string | \"ai@morphllm.com\";\n      timestamp: number;\n    };\n    committer: {\n      name: string | \"Morph AI Agent\";\n      email: string | \"ai@morphllm.com\";\n      timestamp: number;\n    };\n  };\n}\n\nexport interface StatusResult {\n  filepath: string;\n  status: 'unmodified' | 'modified' | '*modified' | 'added' | '*added' | 'deleted' | '*deleted' | 'absent';\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}