featuregate

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package featuregate gates capabilities whose corresponding backend support has not yet shipped. Each Feature constant maps 1:1 to a product capability and stays inert until its entry is added to the allowlist below.

Bypass for internal dogfooding: pass --override-gate on the CLI or set STEPSECURITY_OVERRIDE_GATE=1 in the environment. The env-var form is the only way to flip the gate before cli.Parse runs, which the _hook hot path relies on (main returns before Parse for that subcommand).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableOverride

func EnableOverride()

EnableOverride turns on the global override. main calls this when --override-gate is present on the command line.

func IsEnabled

func IsEnabled(f Feature) bool

IsEnabled reports whether a feature should run.

func UnavailableMessage

func UnavailableMessage(command string) string

UnavailableMessage returns the user-facing string printed when a gated command is invoked. Kept here so the wording stays identical across every visible command site.

Types

type Feature

type Feature string
const (
	FeatureAIAgentHooks    Feature = "ai-agent-hooks"
	FeatureNPMRCAudit      Feature = "npmrc-audit"
	FeaturePipConfigAudit  Feature = "pipconfig-audit"
	FeaturePnpmConfigAudit Feature = "pnpm-config-audit"
	FeatureBunConfigAudit  Feature = "bun-config-audit"
	FeatureYarnConfigAudit Feature = "yarn-config-audit"
)

Jump to

Keyboard shortcuts

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