capdux.org CP REGISTRY

@web/flags

v1.0.0 MIT .cap ✓ Verified by capdux.org AI-First .d.cp

Official deterministic FNV-1a Feature Flags & percentage rollout plugin for cap:web

Install with Cap
$ cap add @web/flags

AI Interface Stub .d.cp

// Type definitions for CP

import { App, AppMethod, Context, Response, Plugin, PluginScope } from "../../../../lib/web/app.cp";
export class FlagsConfig {
    status_path: string,
    user_header: string,
}

export class FeatureFlag {
    name: string,
    enabled: bool,
    rollout_pct: u8,
    allow_users: string,
}

export fn flgStrEql(a: string, b: string): bool;
export fn flgInList(list: string, target: string): bool;
export fn flagBucket(flag_name: string, user_key: string): u8;
export fn flagReset();
export fn flagDefine(name: string, enabled: bool, rollout_pct: u8, allow_users: string): bool;
export fn flagEval(flag_name: string, user_key: string): bool;
export fn flgWriteRaw(dst: []u8, pos: &mut usize, s: string): bool;
export fn flgWriteU8(dst: []u8, pos: &mut usize, v: u8): bool;
export fn handleFlagsStatus(ctx: &mut Context): Response;
export fn createFlagsPlugin(cfg: FlagsConfig): Plugin;
export fn registerFlags(app: &mut App, cfg: FlagsConfig): &mut App;

README

Markdown

No README provided for this package version.

Version History

1 release
Version Format / Size Integrity (SHA-256) Downloads Published Status
v1.0.0 .cap · 2.6 KB sha256-e638e2dad6605ff4… 0 2026-11-26 latest