Documentation
¶
Overview ¶
Package stats counts magpie's users: once a day a running magpie tells PostHog it is in use, under an id made up on this computer, with its version and system, and, unless the user turned that part off, which agents, providers and models it is used with, by their built-in ids (Usage): a provider of the user's own is only "custom". No names, URLs, accounts, keys, prompts or usage go. Settings → Privacy turns it off, and so do DO_NOT_TRACK=1 and MAGPIE_NO_STATS=1; a build from source never sends it.
Index ¶
Constants ¶
const Key = "phc_nyDyYyrUTRGvNq5U7FBesCyM2j4GdKeqGp8ko7DBerTC"
Key is the Magpie project's key on PostHog: it can send events there and read nothing, so it is safe in the app.
Variables ¶
This section is empty.
Functions ¶
func Host ¶
func Host() string
Host takes the events; MAGPIE_STATS_HOST points them elsewhere, for testing.
Types ¶
type Usage ¶ added in v0.1.1118
type Usage struct {
Agents []string // the agents connected to magpie: claude, codex
Providers []string // the providers on: deepseek, codex (a subscription), plugin:kiro
Models []string // the models the connected agents are set to: deepseek/deepseek-v4, custom, group
Groups int // routing groups shown
}
Usage is what the day's event says magpie is used with, when the user shares it: built-in ids only. A provider of the user's own is "custom", and so is a model on one; a plugin no one knows is "plugin".