Documentation
¶
Overview ¶
Package license provides feature licensing and validation.
BETA STATUS: All features are currently unlocked during beta. When agnt reaches stable release, premium features will require a license.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFeatureDescription ¶
GetFeatureDescription returns a human-readable description of a feature.
func HasFeature ¶
HasFeature checks if the current license has access to a feature.
BETA: Currently always returns true for all features. After beta, this will perform actual license validation.
func IsPremiumFeature ¶
IsPremiumFeature returns true if the feature will require a license after beta.
func RequireFeature ¶
RequireFeature checks if a feature is available, returning an error if not.
BETA: Currently always returns nil. After beta, this will return descriptive errors with upgrade links.
func SetLicense ¶
func SetLicense(lic *License)
SetLicense sets the current license (for testing or future license loading).
Types ¶
type Feature ¶
type Feature string
Feature represents a licensed feature in agnt.
const ( // Free tier features (always available) FeatureBasicProxy Feature = "basic-proxy" // Basic reverse proxy FeatureProcessManagement Feature = "process-management" // Process management FeatureBasicAccessibility Feature = "basic-accessibility" // Basic a11y audit FeatureStandardAccessibility Feature = "standard-accessibility" // Standard a11y audit (axe-core) FeatureFastAccessibility Feature = "fast-accessibility" // Fast a11y improvements mode FeatureScreenshots Feature = "screenshots" // Screenshot capture FeatureFloatingIndicator Feature = "floating-indicator" // Floating indicator panel // Premium features (will require license after beta) FeatureSketchMode Feature = "sketch-mode" // Wireframing/sketch mode FeatureDesignMode Feature = "design-mode" // AI-assisted design iteration FeatureComprehensiveA11y Feature = "comprehensive-a11y" // Comprehensive accessibility audit FeatureTunneling Feature = "tunneling" // Tunnel integration FeatureVisualRegression Feature = "visual-regression" // Snapshot/baseline testing FeatureChaosProxy Feature = "chaos-proxy" // Chaos engineering for proxy )
type FeatureLockedError ¶
FeatureLockedError is returned when a feature is not available in the current license.
func (*FeatureLockedError) Error ¶
func (e *FeatureLockedError) Error() string
type License ¶
type License struct {
// Valid indicates if the license is valid
Valid bool
// Email of the license holder
Email string
// Features enabled by this license
Features []Feature
// ExpiresAt is when the license expires (nil = perpetual)
ExpiresAt *time.Time
// BetaMode indicates if we're in beta (all features unlocked)
BetaMode bool
}
License represents a user's license configuration.
func LoadLicense ¶
LoadLicense loads a license from a file path.
BETA: Not implemented - returns unlocked beta license. TODO: Implement Ed25519 signature verification when licensing is enabled.