Documentation
¶
Overview ¶
Package license implements tiered licensing for TTAL using Ed25519-signed JWTs.
It defines three tiers (free, pro, team) with per-tier limits on agents and teams. Licenses are stored as JWT files at ~/.config/ttal/license and validated against an embedded Ed25519 public key. The free tier requires no license file.
Plane: shared
Package license implements tiered licensing for TTAL using Ed25519-signed JWTs.
Tiers:
- Free: 1 team, 2 agents, unlimited workers (no JWT required)
- Pro: 1 team, unlimited agents ($100 lifetime)
- Team: unlimited teams, unlimited agents ($200 lifetime)
License file: ~/.config/ttal/license JWT payload: { "sub": "<email>", "tier": "pro"|"team" } No expiration claim — all licenses are lifetime.
Index ¶
Constants ¶
const ( FreeMaxAgents = 2 FreeMaxTeams = 1 ProMaxTeams = 1 )
Limits per tier.
Variables ¶
This section is empty.
Functions ¶
func LicensePath ¶
LicensePath returns the path to the license file.
Types ¶
type Claims ¶
type Claims struct {
Sub string `json:"sub"` // email or identifier
Tier Tier `json:"tier"` // "pro" or "team"
}
Claims is the JWT payload.
type License ¶
License holds the validated license state.
func (*License) CheckAgentLimit ¶
CheckAgentLimit returns an error if adding an agent would exceed the tier limit.
func (*License) CheckTeamLimit ¶
CheckTeamLimit returns an error if the number of teams exceeds the tier limit.