Documentation
¶
Overview ¶
Package core provides core CLI commands (doctor, completion, alias, enable, status, plugin, mcp, marketplace, trust).
Index ¶
- func FindCorrection(input string) (string, bool)
- func UntrustFilter(filterPath string) (bool, error)
- type AgentInfo
- type CcUsagePeriod
- type ClaudeContent
- type ClaudeJSONLMessage
- type ClaudeMessage
- type EconomicsReport
- type SessionSummary
- type TokManSavings
- type TrustEntry
- type TrustStatus
- type TrustStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCorrection ¶ added in v0.28.0
FindCorrection looks for a learned correction for the given input This function is called by the command discovery system
func UntrustFilter ¶ added in v0.28.0
UntrustFilter removes trust for a filter file
Types ¶
type AgentInfo ¶ added in v0.28.0
type AgentInfo struct {
Name string
Flag *bool
ConfigDir string
HookDir string
Detected bool
Instructions string
}
AgentInfo holds information about an AI agent
type CcUsagePeriod ¶ added in v0.28.0
type CcUsagePeriod struct {
Date string `json:"date"`
InputTokens uint64 `json:"inputTokens"`
OutputTokens uint64 `json:"outputTokens"`
CacheCreationTokens uint64 `json:"cacheCreationTokens"`
CacheReadTokens uint64 `json:"cacheReadTokens"`
TotalTokens uint64 `json:"totalTokens"`
TotalCost float64 `json:"totalCost"`
}
CcUsagePeriod represents usage data for a time period
type ClaudeContent ¶ added in v0.28.0
type ClaudeJSONLMessage ¶ added in v0.28.0
type ClaudeJSONLMessage struct {
Type string `json:"type"`
Message ClaudeMessage `json:"message"`
}
ClaudeJSONLMessage represents the structure of Claude Code JSONL files
type ClaudeMessage ¶ added in v0.28.0
type ClaudeMessage struct {
Role string `json:"role"`
Content []ClaudeContent `json:"content"`
}
type EconomicsReport ¶ added in v0.28.0
type EconomicsReport struct {
Period string `json:"period"`
CcUsage CcUsagePeriod `json:"ccUsage"`
TokManSavings TokManSavings `json:"tokManSavings"`
EffectiveCost float64 `json:"effectiveCost"`
SavingsPercent float64 `json:"savingsPercent"`
}
EconomicsReport combines ccusage and TokMan data
type SessionSummary ¶ added in v0.28.0
SessionSummary represents a summarized session for display
func (*SessionSummary) AdoptionPct ¶ added in v0.28.0
func (s *SessionSummary) AdoptionPct() float64
type TokManSavings ¶ added in v0.28.0
type TokManSavings struct {
Date string `json:"date"`
Commands int `json:"commands"`
SavedTokens uint64 `json:"savedTokens"`
OriginalSize uint64 `json:"originalSize"`
FilteredSize uint64 `json:"filteredSize"`
}
TokManSavings represents TokMan savings for a period
type TrustEntry ¶ added in v0.28.0
TrustEntry represents a single trusted filter
type TrustStatus ¶ added in v0.28.0
type TrustStatus int
TrustStatus represents the trust state
const ( TrustStatusUntrusted TrustStatus = iota TrustStatusTrusted TrustStatusContentChanged TrustStatusEnvOverride )
func CheckTrust ¶ added in v0.28.0
func CheckTrust(filterPath string) TrustStatus
CheckTrust checks if a filter file is trusted
type TrustStore ¶ added in v0.28.0
type TrustStore struct {
Version uint32 `json:"version"`
Trusted map[string]TrustEntry `json:"trusted"`
}
TrustStore represents the stored trust entries