Documentation
¶
Overview ¶
Package agy implements an AGGREGATE adapter for the Antigravity CLI.
Antigravity 1.1.22 reports authoritative cumulative conversation usage in print-mode stream JSON result records. The terminal step_update for the same turn repeats incremental usage, so it is deliberately ignored. Captured result streams may be placed in an Antigravity data root (or an explicit adapter override) for collection. The earlier Gemini-shaped JSON parser is retained for source compatibility with existing captures.
CRITICAL: strictly read-only. Files are opened O_RDONLY and never written, locked, or modified.
Index ¶
- func New() adapter.Adapter
- type Adapter
- func (Adapter) Capabilities() model.ToolCapability
- func (a Adapter) Collect(ctx context.Context, src adapter.Source) (adapter.Observation, error)
- func (a Adapter) CollectIncremental(ctx context.Context, src adapter.Source, cp *model.SourceCheckpoint) (adapter.Observation, error)
- func (a Adapter) Discover(ctx context.Context, cfg adapter.DiscoverConfig) ([]adapter.Source, error)
- func (Adapter) DisplayName() string
- func (Adapter) ID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter reads Antigravity CLI telemetry files. Read-only.
func (Adapter) Capabilities ¶
func (Adapter) Capabilities() model.ToolCapability
Capabilities declares what this project can say about Antigravity.
Cost is COMPUTED: nothing here calls SetCost. There is NO activity at all — this adapter references model.ActivityEvent nowhere, so its surface exposes usage and nothing else.
func (Adapter) Collect ¶
Collect reads a single file and emits one AggregateSnapshot per (file, id), taking the max (final) cumulative snapshot per id. Malformed records are skipped; a non-fatal error is returned describing how many were skipped.
func (Adapter) CollectIncremental ¶
func (a Adapter) CollectIncremental(ctx context.Context, src adapter.Source, cp *model.SourceCheckpoint) (adapter.Observation, error)
CollectIncremental gates the file on size+mtime: unchanged files are not opened at all. Any change re-parses the whole file (cumulative records need the max-per-id grouping over every record). A nil cp is a full read.
func (Adapter) Discover ¶
func (a Adapter) Discover(ctx context.Context, cfg adapter.DiscoverConfig) ([]adapter.Source, error)
Discover scans each Antigravity root for *.json / *.jsonl files. Files are not pre-parsed for token usage here. Content-only artifacts remain valid empty sources, while captured print-mode streams provide cumulative usage.
func (Adapter) DisplayName ¶
DisplayName returns the human-friendly name.