Files
clawpanel/src/lib/feature-gates.js
晴天 328624cf03 chore: release v0.15.0
发布 0.15.0:
- 新增内核版本兼容层、特性门控、低版本阻断和升级提示
- 新增 PATH 中 OpenClaw CLI 冲突检测、隔离与恢复
- 修复 Hermes Gateway loopback 自动拉起与 /v1/runs 诊断
- 修复 standalone 一键安装包在 About/仪表盘显示未知版本
- 同步 OpenClaw 2026.5.6 推荐版本和热更新 minAppVersion
- 补齐本地 JS/Rust 测试与发布前检查说明

验证:
- npm run build
- node --test tests/*.test.js
- node --check src/scripts JS 文件
- cargo fmt --all -- --check
- cargo check
- cargo clippy --all-targets -- -D warnings
- cargo test
2026-05-08 04:39:36 +08:00

37 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 功能版本门控 — 向后兼容适配层
*
* 从 ClawPanel 0.15.0 开始,内核版本门控逻辑迁移到 `./kernel.js`
* 本文件仅作为 **别名**,保持旧调用代码可用而无需立刻修改所有页面。
*
* 新代码请直接 `import { hasFeature, onKernelChange, getKernelSnapshot } from './kernel.js'`
*
* 迁移指南:
* isFeatureAvailable(id) → hasFeature(id)
* initFeatureGates() → initKernelGates()
* getCachedVersion() → getKernelSnapshot()?.version
* invalidateVersionCache() → refreshKernelSnapshot()
*/
export {
isFeatureAvailable,
initFeatureGates,
getCachedVersion,
invalidateVersionCache,
getAllFeatureStatus,
hasFeature,
hasFeatureStrict,
getKernelSnapshot,
isAboveFloor,
onKernelChange,
refreshKernelSnapshot,
initKernelGates,
parseVersion,
versionGte,
} from './kernel.js'
// 为兼容旧代码中 `checkFeatureAvailable`(异步版)导出一个异步包装
import { hasFeature as _hasFeature } from './kernel.js'
export async function checkFeatureAvailable(featureId) {
return _hasFeature(featureId)
}