agy

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 15 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() adapter.Adapter

New returns an Antigravity adapter.

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

func (a Adapter) Collect(ctx context.Context, src adapter.Source) (adapter.Observation, error)

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

func (Adapter) DisplayName() string

DisplayName returns the human-friendly name.

func (Adapter) ID

func (Adapter) ID() string

ID returns the stable tool identifier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL