Versions in this module Expand all Collapse all v3 v3.9.0 Oct 6, 2026 v3.8.0 Sep 28, 2026 Changes in this version type CommandError + APIUrl string type CommandIntent + APIUrl string v3.7.1 Sep 8, 2026 v3.7.0 Sep 4, 2026 Changes in this version + const AgentAugment + const AgentClaudeCode + const AgentCline + const AgentCodexCLI + const AgentCursor + const AgentDevin + const AgentGeminiCLI + const AgentOpenCode + const AgentTrae + const InstallTypeBrew + const InstallTypeScript + const InstallTypeUnknown + func DetectAgent() string + func Disabled() bool + func Init() (flush func()) + func RecordError(e CommandError) + func RecordInstall(e InstallEvent) + func RecordIntent(e CommandIntent) + func ResolveInstallType() string + func SetBackend(b Backend) + func SetDisabled(v bool) + func UserDomainFromEmail(email string) string + type Backend interface + RecordError func(e CommandError) + RecordInstall func(e InstallEvent) + RecordIntent func(e CommandIntent) + type CommandError struct + AccountID string + AuthSource string + Category ErrorCategory + DurationMs int64 + Env Env + Module string + Noun string + RunID string + TokenKind string + UserDomain string + UserID string + UserType string + Verb string + type CommandIntent struct + AccountID string + AuthSource string + Env Env + FlagsSet []string + Module string + Noun string + RunID string + TokenKind string + UserDomain string + UserID string + UserType string + Verb string + type Env struct + AIAgent string + Arch string + IsDev bool + IsPipelineExecution bool + IsTTY bool + Locale string + OS string + PipelineID string + TermProgram string + Version string + func NewEnv() Env + type ErrorCategory string + const ErrorCategoryAPI + const ErrorCategoryAuth + const ErrorCategoryBadUsage + const ErrorCategoryInvalidFlag + const ErrorCategoryInvalidNoun + const ErrorCategoryInvalidVerb + const ErrorCategoryNotFound + const ErrorCategoryTimeout + const ErrorCategoryUnknown + const ErrorCategoryValidation + func ClassifyError(err error) ErrorCategory + type InstallEvent struct + Env Env + InstallType string + RunID string + type SegmentBackend struct + func (s *SegmentBackend) Close() + func (s *SegmentBackend) RecordError(e CommandError) + func (s *SegmentBackend) RecordInstall(e InstallEvent) + func (s *SegmentBackend) RecordIntent(e CommandIntent)