antigravity

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package antigravity provides an adapter for Antigravity CLI (agy) that parses JSONL session logs from ~/.gemini/antigravity-cli/brain/<session-id>/.system_generated/logs/transcript.jsonl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements the adapter.Adapter interface for Antigravity CLI sessions.

func New

func New() *Adapter

New creates a new Antigravity adapter.

func NewWithBrainDir

func NewWithBrainDir(brainDir string) *Adapter

NewWithBrainDir creates an adapter with a custom brain directory (for testing).

func (*Adapter) Capabilities

func (a *Adapter) Capabilities() adapter.CapabilitySet

Capabilities returns the supported features.

func (*Adapter) Detect

func (a *Adapter) Detect(projectRoot string) (bool, error)

Detect checks if Antigravity sessions exist.

func (*Adapter) ID

func (a *Adapter) ID() string

ID returns the adapter identifier.

func (*Adapter) Icon

func (a *Adapter) Icon() string

Icon returns the adapter icon.

func (*Adapter) Messages

func (a *Adapter) Messages(sessionID string) ([]adapter.Message, error)

Messages loads and parses message transcript for a session.

func (*Adapter) Name

func (a *Adapter) Name() string

Name returns the human-readable adapter name.

func (*Adapter) SearchMessages

func (a *Adapter) SearchMessages(sessionID, query string, opts adapter.SearchOptions) ([]adapter.MessageMatch, error)

SearchMessages searches message content within a session. Implements adapter.MessageSearcher interface.

func (*Adapter) SessionByID

func (a *Adapter) SessionByID(sessionID string) (*adapter.Session, error)

SessionByID returns a single session by ID.

func (*Adapter) Sessions

func (a *Adapter) Sessions(projectRoot string) ([]adapter.Session, error)

Sessions returns all Antigravity sessions sorted by update time.

func (*Adapter) Usage

func (a *Adapter) Usage(sessionID string) (*adapter.UsageStats, error)

Usage estimates usage metrics for a session.

func (*Adapter) Watch

func (a *Adapter) Watch(projectRoot string) (<-chan adapter.Event, io.Closer, error)

Watch implements the adapter.Adapter interface for Antigravity.

func (*Adapter) WatchScope

func (a *Adapter) WatchScope() adapter.WatchScope

WatchScope indicates this adapter watches a global path.

type LogLine

type LogLine struct {
	StepIndex int        `json:"step_index"`
	Source    string     `json:"source"`
	Type      string     `json:"type"`
	Status    string     `json:"status"`
	CreatedAt string     `json:"created_at"`
	Content   string     `json:"content"`
	ToolCalls []ToolCall `json:"tool_calls,omitempty"`
}

LogLine represents a single step in transcript.jsonl.

type SessionMetadata

type SessionMetadata struct {
	SessionID        string
	StartTime        time.Time
	LastUpdated      time.Time
	FirstUserMessage string
	MessageCount     int
	TotalTokens      int
	FileSize         int64
}

SessionMetadata stores parsed session header info.

type ToolCall

type ToolCall struct {
	ToolName string                 `json:"tool_name,omitempty"`
	Name     string                 `json:"name,omitempty"`
	Args     map[string]interface{} `json:"args,omitempty"`
}

ToolCall represents a tool call in a log line.

Jump to

Keyboard shortcuts

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