()
| 158 | * loaded yet, the default '0.0.0' means the check passes — a safe fallback. |
| 159 | */ |
| 160 | export function checkBridgeMinVersion(): string | null { |
| 161 | // Positive pattern — see docs/feature-gating.md. |
| 162 | // Negative pattern (if (!feature(...)) return) does not eliminate |
| 163 | // inline string literals from external builds. |
| 164 | if (feature('BRIDGE_MODE')) { |
| 165 | const config = getDynamicConfig_CACHED_MAY_BE_STALE<{ |
| 166 | minVersion: string |
| 167 | }>('tengu_bridge_min_version', { minVersion: '0.0.0' }) |
| 168 | if (config.minVersion && lt(MACRO.VERSION, config.minVersion)) { |
| 169 | return `Your version of Claude Code (${MACRO.VERSION}) is too old for Remote Control.\nVersion ${config.minVersion} or higher is required. Run \`claude update\` to update.` |
| 170 | } |
| 171 | } |
| 172 | return null |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Default for remoteControlAtStartup when the user hasn't explicitly set it. |
no test coverage detected