experimental

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package experimental is the single platform gate for features hidden at launch.

Index

Constants

View Source
const (
	MaturityExperimental = "experimental"
	MaturityBeta         = "beta"
)

Maturity labels how settled a gated feature is.

View Source
const EnvVar = "APP_EXPERIMENTAL"

EnvVar names the env var holding the comma separated enabled features.

Variables

This section is empty.

Functions

func ApplyAtBoot

func ApplyAtBoot(f Feature, on bool)

ApplyAtBoot records the stored choice for f and makes it the active state, before startup wiring reads Enabled.

func ApplyRemote

func ApplyRemote(on map[Feature]bool)

ApplyRemote makes the server's Settings switches the active state for this process, so a CLI or MCP session follows the control plane, not its own env.

func DisabledMessage

func DisabledMessage(f Feature) string

DisabledMessage is the operator-facing text for a gated surface.

func Enabled

func Enabled(f Feature) bool

Enabled reports whether f is switched on. The environment is read once.

func EnabledByEnv

func EnabledByEnv(f Feature) bool

EnabledByEnv reports whether the environment alone switches f on.

func EnvHint

func EnvHint(f Feature) string

EnvHint is the exact line to set and how to apply it.

func Parse

func Parse(s string) (map[Feature]bool, error)

Parse turns a comma separated list into a feature set, rejecting unknown keys.

func Pending

func Pending(f Feature) bool

Pending reports whether f is saved in a state a restart has yet to apply.

func Reset

func Reset()

Reset forgets the cached environment, for tests.

func Set

func Set(fs ...Feature)

Set replaces the enabled set, for tests.

func SetRuntime

func SetRuntime(f Feature, on bool)

SetRuntime records the Settings choice for a feature. A live feature applies now; a startup-wired one only records the choice (see Pending). It never turns off a feature the environment enables.

func Toggleable

func Toggleable(f Feature) bool

Toggleable reports whether f applies the moment it is switched, with no restart. Every other feature is saved at once but wired at startup.

func Validate

func Validate() error

Validate reports an unknown feature key in the environment.

Types

type Feature

type Feature string

Feature names a gated capability.

const (
	// AIChat is the in-app AI assistant chat.
	AIChat Feature = "ai-chat"
	// AIModels is GPU model hosting.
	AIModels Feature = "ai-models"
	// LoadBalancer is multi-replica load balancing.
	LoadBalancer Feature = "load-balancer"
	// IaC is platform as code (plan, apply, export).
	IaC Feature = "iac"
	// CloudflareTunnel is the Cloudflare tunnel integration.
	CloudflareTunnel Feature = "cloudflare-tunnel"
	// AccessRoles is stored roles, the guest role and per-environment grants.
	AccessRoles Feature = "access-roles"
	// GlobalEnvironments is instance-wide typed environments and the environment switcher.
	GlobalEnvironments Feature = "global-environments"
	// AIControl is the Settings switch that governs agent and AI access.
	AIControl Feature = "ai-control"
	// ResourceAdvisor is the beta resource advisor: limit, tuning and idle suggestions.
	ResourceAdvisor Feature = "resource-advisor"
	// CLIConsole is the dashboard's web console for the platform CLI (never a host shell).
	CLIConsole Feature = "cli-console"
	// MobileAPI is phone pairing, device tokens and the mobile overview endpoint.
	MobileAPI Feature = "mobile-api"
	// SAMLSCIM gates SAML sign-in and SCIM provisioning on the sign-in library.
	SAMLSCIM Feature = "saml-scim"
	// Plugins is the out-of-process plugin runtime: signed packages, operator-approved abilities (ADR 034).
	Plugins Feature = "plugins"
	// GitPush is the built-in remote that deploys an app from a push.
	GitPush Feature = "git-push"
	// Canvas is the beta visual editor that composes a project as a reviewable plan.
	Canvas Feature = "canvas"
)

func All

func All() []Feature

All returns every gated feature, sorted.

func EnabledList

func EnabledList() []Feature

EnabledList returns the enabled features, sorted.

func ToggleableList

func ToggleableList() []Feature

ToggleableList returns every feature Settings may switch, sorted.

type Info

type Info struct {
	ID       Feature
	Name     string
	Summary  string
	DocsPath string
	Maturity string
	// RestartRequired is true when startup wires something (routes, listeners,
	// reconcilers, goroutines) that a runtime switch could not add or remove.
	RestartRequired bool
}

Info describes a gated feature for operators. It is the single place names and summaries live, so the API, CLI and dashboard never drift.

func Describe

func Describe(f Feature) Info

Describe returns the operator-facing description of f. Only the Settings toggleable features can change at runtime; every other one is wired at startup (routes, reconcilers, goroutines), so it needs a restart.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL