Documentation
¶
Overview ¶
Package codeburn reads CodeBurn's client-facing menubar JSON through its resident stdio server. CodeBurn remains responsible for discovering agent sessions, normalizing token usage, pricing models, and classifying activity; orchard only consumes and renders the resulting local data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrUnavailable means CodeBurn is disabled or its executable is not on PATH.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client owns one warm `codeburn serve --stdio` child. Queries are serialized because CodeBurn's resident protocol and aggregation pipeline are serialized.
func NewClient ¶
func NewClient() *Client
NewClient resolves CodeBurn from ORCHARD_CODEBURN or PATH. Set the variable to off/0/false to disable integration, or to an executable path to override.
func NewClientWithExecutable ¶
NewClientWithExecutable builds a client for an explicit CodeBurn executable.
type Current ¶
type Current struct {
Label string `json:"label"`
Cost float64 `json:"cost"`
EstimatedCostUSD float64 `json:"estimatedCostUSD"`
Calls int `json:"calls"`
Sessions int `json:"sessions"`
InputTokens int `json:"inputTokens"`
OutputTokens int `json:"outputTokens"`
CacheReadTokens int `json:"cacheReadTokens"`
CacheWriteTokens int `json:"cacheWriteTokens"`
CacheHitPercent float64 `json:"cacheHitPercent"`
OneShotRate *float64 `json:"oneShotRate"`
PricingCoverage *float64 `json:"pricingCoverage"`
TopActivities []Activity `json:"topActivities"`
TopModels []Model `json:"topModels"`
TopProjects []Project `json:"topProjects"`
ProviderDetails []Provider `json:"providerDetails"`
Providers map[string]float64 `json:"providers"`
Tools []CountRow `json:"tools"`
MCPServers []CountRow `json:"mcpServers"`
Skills []CostRow `json:"skills"`
Subagents []CostRow `json:"subagents"`
UnpricedModels []UnpricedModel `json:"unpricedModels"`
Workflow Workflow `json:"workflow"`
}
type Payload ¶
type Payload struct {
Generated string `json:"generated"`
Current Current `json:"current"`
History History `json:"history"`
Currency Currency `json:"currency"`
}
Payload is the stable subset of `codeburn status --format menubar-json` rendered by orchard. Unknown fields are deliberately ignored so additive CodeBurn releases remain compatible.