# mcp/COMPATIBILITY - CLI version requirements for this MCP server
# Usage: source "${SCRIPT_DIR}/COMPATIBILITY"

CLI_MIN_VERSION="0.9.9"
CLI_MAX_VERSION="1.0.0"

# MCP 1.8.8 requires CLI 0.9.9 for:
# - `query` tool: Advanced relationship filtering (all_, none_, exists_, _count)
# - `query` tool: Pre-include step for fetching relationship data before filtering
# - `query` tool: Relationship key renamed from "people" to "persons" in JSON output
# - CLI commands: --expand option uses "persons" instead of "people"
#
# MCP 1.8.3 requires CLI 0.9.8 for:
# - `query` tool: Fixed fetch-before-filter/sort/aggregate (correct top N, accurate counts)
#
# MCP 1.8.2 requires CLI 0.9.6 for:
# - `query` tool: listEntryId, entityId, entityName, entityType aliases on listEntries
# - `query` tool: null values included in projection when explicitly selected
# - `query` tool: fields key always present on listEntries (defaults to {})
#
# MCP 1.8.0 requires CLI 0.9.2 for:
# - `interaction ls` JSON output: .data is now direct array (was .data.interactions)
# - `interaction ls` JSON output: metadata moved to .meta.summary (was .data.metadata)
# - `note ls` JSON output: .data is now direct array (was .data.notes)
# - Standardized ResultSummary footer rendering
#
# MCP 1.7.0 requires CLI 0.8.0 for:
# - `entry field` unified command (replaces set-field, set-fields, unset-field)
# - Standardized date filter parameters (--after/--before)
# - `interaction ls` auto-chunking: --cursor/--all removed
# - `interaction ls` multi-type support: --type is repeatable, --type all supported
# - `interaction ls` date range defaults to all-time when --days/--after omitted
# - `interaction ls` output: modifiers.type → modifiers.types (always array)
# - `interaction ls` output: metadata.chunksProcessed → metadata.typeStats[type].chunksProcessed
#
# MCP 1.0.0 requires CLI features introduced in 0.6.0:
# - JSON output format with .data wrapper
# - --session-cache flag
# - --readonly flag
# - config check-key --json command
# - version --output json command

# Progress forwarding requires CLI >= 0.6.10 (NDJSON progress on stderr)
# MCP tools gracefully degrade when progress not supported
PROGRESS_MIN_VERSION="0.6.10"
