| title | Feature |
|---|---|
| description | Feature protocol schemas |
{/*
Feature Rollout Strategy
**Source:** `packages/spec/src/kernel/feature.zod.ts`import { FeatureFlag, FeatureStrategy } from '@objectstack/spec/kernel';
import type { FeatureFlag, FeatureStrategy } from '@objectstack/spec/kernel';
// Validate data
const result = FeatureFlag.parse(data);| Property | Type | Required | Description |
|---|---|---|---|
| name | string |
✅ | Feature key (snake_case) |
| label | string |
optional | Display label |
| description | string |
optional | |
| enabled | boolean |
optional | Is globally enabled |
| strategy | Enum<'boolean' | 'percentage' | 'user_list' | 'group' | 'custom'> |
optional | |
| conditions | { percentage?: number; users?: string[]; groups?: string[]; expression?: string | { dialect: Enum<'cel' | 'cron' | 'template'>; source?: string; ast?: any; meta?: object } } |
optional | |
| environment | Enum<'dev' | 'staging' | 'prod' | 'all'> |
optional | Environment validity |
| expiresAt | string |
optional | Feature flag expiration date |
booleanpercentageuser_listgroupcustom