/**
 * MemoryCore Types — JSDoc typedefs for the facade contract.
 * 
 * PR-2: MemoryCore Facade
 * Architecture Freeze v2 (PR-1): Core §2 — memory-core
 * 
 * No runtime code. Pure type definitions for documentation and IDE support.
 */

/**
 * @typedef {Object} MemoryCoreSearchOpts
 * @property {number} [maxResults=10] - Max results to return
 * @property {string} [source] - Filter by source ("memory", "daily", "all")
 * @property {boolean} [includeSnippets=true] - Include text snippets in results
 * @property {number} [snippetLength=200] - Max chars per snippet
 */

/**
 * @typedef {Object} MemoryCoreSearchResult
 * @property {string} id - Unique identifier (file path relative to workspace)
 * @property {string} path - File path
 * @property {string} snippet - Matching text snippet
 * @property {number} score - Relevance score (0-1)
 * @property {string} source - Source category ("MEMORY.md", "daily", "vault", "register")
 */

/**
 * @typedef {Object} MemoryCoreSearchResponse
 * @property {boolean} ok
 * @property {MemoryCoreSearchResult[]} results
 * @property {string} source - Backend source label
 * @property {number} latencyMs
 * @property {Object} [error]
 * @property {string} error.code
 * @property {string} error.message
 */

/**
 * @typedef {Object} MemoryCoreGetOpts
 * @property {number} [maxLines] - Max lines to return
 * @property {boolean} [includeMetadata=true] - Include file metadata
 */

/**
 * @typedef {Object} MemoryCoreGetResponse
 * @property {boolean} ok
 * @property {string} [content] - File content (if ok)
 * @property {Object} [metadata] - File metadata
 * @property {string} metadata.path
 * @property {number} metadata.sizeBytes
 * @property {string} metadata.modifiedAt
 * @property {Object} [error]
 * @property {string} error.code
 * @property {string} error.message
 */

/**
 * @typedef {Object} MemoryCoreWriteEntry
 * @property {string} namespace - Write namespace (only "test" allowed in PR-2)
 * @property {string} key - Entry key
 * @property {string} content - Content to write
 * @property {Object} [metadata] - Optional metadata
 */

/**
 * @typedef {Object} MemoryCoreWriteResponse
 * @property {boolean} ok
 * @property {string} [path] - Written file path
 * @property {Object} [error]
 * @property {string} error.code
 * @property {string} error.message
 */

/**
 * @typedef {Object} MemoryCoreDeleteResponse
 * @property {boolean} ok
 * @property {Object} [error]
 * @property {string} error.code
 * @property {string} error.message
 */

/**
 * @typedef {Object} MemoryCoreStats
 * @property {number} memoryFileCount
 * @property {number} memoryTotalSizeBytes
 * @property {number} knownPluginCount
 * @property {number} legacyItemCount
 * @property {Object} breakdown - Per-directory breakdown
 * @property {number} breakdown.daily
 * @property {number} breakdown.registers
 * @property {number} breakdown.vault
 * @property {number} breakdown.core
 */

/**
 * @typedef {Object} MemoryCoreHealth
 * @property {boolean} ok
 * @property {boolean} memoryCoreAvailable
 * @property {boolean} legacyBackendReachable
 * @property {boolean} canSearch
 * @property {boolean} canGet
 * @property {boolean} canWriteTestNamespace
 * @property {string} [error] - Error message if not ok
 */

export {}; // Make this a module
