features

package
v0.180.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 3 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 features is muster's feature registry: every optional (and core) feature, whether this server runs it, why not, and the exact .env line(s) that turn it on — written for the documented install, the Compose stack (docs/features.md).

🔴 THIS PACKAGE HOLDS THE SHAPE AND THE IDS, NOT THE PREDICATES. Whether a feature is on is decided by cmd/muster-server from the SAME wired extensions and the SAME parsed config the server itself runs on (its features.go), and handed to internal/api once, at boot, as a Set.

⚠ WHAT READS THE SET, EXACTLY (internal/api features.go has the list beside the code): the boot log's summary line, /api/doctor's `features` (and so `muster doctor`), the Features page, the Account page's suggested-replies note, the Credentials page's variable name, the MCP doors' "disabled" answers and muster_help's disabled_features, and the typed feature_disabled 404. The GATES — whether a microphone or paperclip is drawn, whether the Connectors tab, the push button and the dispatch "+" are drawn, and which MCP tools are listed — read their extension AND the Set (Server.featureOff): the Set can only take a feature away, so a feature the registry calls OFF is never offered. A MISCONFIGURED one keeps what is wired (its store and tools work as far as they go) and is reported where its gap is true: `muster doctor` FAILs on it, and the Features page and the banner say so. Route handlers still gate on their own extension (each answers its own unwired case); the ones the CLI and the composer reach answer the typed 404.

The variable names are spelled in cmd/muster-server's config.go and nowhere else; this package never names a variable.

Index

Constants

View Source
const (
	Mirror               = "mirror"
	PasswordSignIn       = "password-sign-in"
	Push                 = "push"
	Dictation            = "dictation"
	Attachments          = "attachments"
	SuggestedReplies     = "suggested-replies"
	Focus                = "focus"
	Accounts             = "accounts"
	Connectors           = "connectors"
	GitHubApp            = "github-app"
	Dispatch             = "dispatch"
	AgentGateway         = "agent-gateway"
	ClaudeCodeAgents     = "claude-code-agents"
	Chief                = "chief"
	ChiefSessionRuntimes = "chief-session-runtimes"
	ChiefNudges          = "chief-nudges"
	SessionState         = "session-state"
	AskLog               = "ask-log"
	Plugins              = "plugins"
	PluginTasks          = "plugin-tasks"
	SessionRouting       = "session-routing"
	TaskRouting          = "task-routing"
	PRMailRouting        = "pr-mail-routing"
	FleetReports         = "fleet-reports"
	MailResume           = "mail-resume"
	MemoRelay            = "memo-relay"
	ApprovalRouter       = "approval-router"
	BrowserFlows         = "browser-flows"
	AgentAskTool         = "agent-ask-tool"
	ServiceToken         = "service-token"
	Android              = "android"
	Telemetry            = "telemetry"
	Officers             = "officers"
)

The feature ids. They are also the anchors of docs/features.md (DocsRef), so renaming one breaks every link to it: don't.

View Source
const ComposeProfilesVar = "COMPOSE_PROFILES"

ComposeProfilesVar is the variable a profile line sets.

View Source
const DocsPage = "docs/features.md"

DocsPage is the document whose headings are the feature ids.

View Source
const DocsURL = "https://github.com/ZacxDev/muster/blob/main/" + DocsPage

DocsURL is DocsPage on GitHub, for a link a browser can follow.

View Source
const KubernetesHint = "needs Kubernetes (in-cluster dispatch)"

KubernetesHint is what a feature the Compose stack cannot run needs.

View Source
const NeedsChiefHint = "needs the chief — see " + DocsPage + "#chief"

NeedsChiefHint leads the hint of a feature that acts through the chief. The chief runs on the Compose stack (its `chief` profile) as well as on Kubernetes, so the hint sends the reader to the page that says how.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	// Core: part of the documented install (the Compose stack, its Postgres,
	// muster-mirror and tmux). Everything else is optional.
	Core bool `json:"core"`
	// Enable is what turns the feature on, as .env lines.
	Enable []Var `json:"enable"`
	// Settings are the other variables that tune the feature (by name). They
	// are not needed to turn it on.
	Settings []string `json:"settings,omitempty"`
	// Note is what turning it on takes beyond the variables (a runner to host,
	// a host to configure). "" for none.
	Note string `json:"note,omitempty"`
	// HostSide: the feature is set up on each machine running muster-mirror,
	// not in the hub's .env.
	HostSide bool `json:"host_side,omitempty"`
	// Kubernetes: the feature needs in-cluster dispatch, which the Compose
	// stack cannot provide (it does not forward these variables). Its hint
	// then says so instead of "set X in .env", which would not work there.
	// Enable still lists the variables, for a Kubernetes deployment.
	Kubernetes bool `json:"kubernetes,omitempty"`
	// NeedsChief: the feature's variables are forwarded by the Compose stack,
	// but what it does goes through the chief. Its hint says that FIRST, so
	// following it is not a dead end (setting the variable alone leaves the
	// feature misconfigured).
	NeedsChief bool `json:"needs_chief,omitempty"`

	State State `json:"state"`
	// Reason is why the feature is off or misconfigured ("" when on), or, for
	// a feature that is on, what it still depends on ("" when nothing).
	Reason string `json:"reason,omitempty"`
}

Feature is one registry entry: what the catalog says about it (ID through HostSide) and, once evaluated, its State and Reason.

🔴 IT CARRIES VARIABLE NAMES, NEVER VALUES. Reason is written by the evaluator and must not quote a configured value either; the evaluator's test feeds every variable a distinctive value and fails if one comes out.

func (Feature) DisabledMessage

func (f Feature) DisabledMessage() string

DisabledMessage is what a surface answers when a caller reaches for this feature while it is not on:

disabled: dictation — set MUSTER_STT_URL and MUSTER_STT_TOKEN in .env and restart (docs/features.md#dictation)

A misconfigured feature's reason comes first, since it names what is actually missing.

func (Feature) Docs

func (f Feature) Docs() string

Docs is the feature's docs reference, e.g. docs/features.md#dictation.

func (f Feature) DocsLink() string

DocsLink is Docs as a URL a browser can follow.

func (Feature) EnableHint

func (f Feature) EnableHint() string

EnableHint is the one sentence that says how to turn the feature on:

set MUSTER_STT_URL and MUSTER_STT_TOKEN in .env and restart (docs/features.md#dictation)

A Kubernetes feature's hint never says "set X in .env":

needs Kubernetes (in-cluster dispatch) — see docs/features.md#chief

func (Feature) EnableLines

func (f Feature) EnableLines() []string

EnableLines is Enable as .env lines.

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set is the evaluated registry, in catalog order.

The zero Set holds nothing: a server that was never handed one reports no feature (and its consumers fall back to what they did before the registry).

func Evaluate

func Evaluate(catalog []Feature, statuses map[string]Status) (Set, error)

Evaluate joins a catalog with its statuses.

🔴 IT IS A TWO-WAY LEDGER, NOT A LOOKUP. An entry with no status, a status for no entry, a duplicate id, an unknown state, a feature with no way to turn it on, or an "on" feature with no state at all is an error — so adding a feature to the catalog without deciding its state (or the reverse) fails the boot of every test that builds the registry rather than quietly reading "off".

func (Set) All

func (s Set) All() []Feature

All is every feature, in catalog order. The slice is a copy.

func (Set) Counts

func (s Set) Counts() map[State]int

Counts is how many features are in each state.

func (Set) Get

func (s Set) Get(id string) (Feature, bool)

Get is one feature by id.

func (Set) Len

func (s Set) Len() int

Len is how many features the set holds.

func (Set) NotOn

func (s Set) NotOn() []Feature

NotOn is every feature that is off or misconfigured, in catalog order.

func (Set) Summary

func (s Set) Summary(pagePath string) string

Summary is the boot log's one registry line:

features: 9 on; off: dictation, attachments; misconfigured: none — see /account/features

The per-feature detail is on the Features page and in `muster doctor`; the banner's own posture lines say the rest.

type State

type State string

State is a feature's state on this server.

const (
	// On: the feature runs.
	On State = "on"
	// Off: the feature is not configured. Nothing is wrong; it is optional.
	Off State = "off"
	// Misconfigured: the feature was asked for (or is on by default) but a
	// dependency it needs is missing, so it does not do what it says — e.g.
	// suggested replies with no OpenRouter key.
	Misconfigured State = "misconfigured"
)

type Status

type Status struct {
	State  State
	Reason string
}

Status is the evaluated half of an entry.

type Var

type Var struct {
	Name        string `json:"name"`
	Value       string `json:"value,omitempty"`
	Placeholder string `json:"placeholder,omitempty"`
	Profile     string `json:"profile,omitempty"`
	Compose     bool   `json:"compose,omitempty"`
}

Var is one .env line a feature needs. Value is a fixed value the variable must have ("1", "gotrue"); Placeholder describes a value the operator supplies ("a 32-byte base64 key"). At most one is set.

Profile names a Compose profile instead: the line is COMPOSE_PROFILES=<it> (Name is then "COMPOSE_PROFILES"). Compose marks a variable the Compose stack reads and muster-server does not (S3_STORE_SECRET_KEY): it is a real .env line, and the registry's ledger against docs/configuration.md skips it.

func ProfileVar

func ProfileVar(profile string) Var

ProfileVar is the .env line that turns a Compose profile on.

func (Var) Line

func (v Var) Line() string

Line is the variable as one .env line: NAME=value, or NAME=<placeholder>.

Jump to

Keyboard shortcuts

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