agentactivity

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound added in v0.1.12

func IsNotFound(err error) bool

func ProjectStreamHandler

func ProjectStreamHandler(recorder *Recorder) http.Handler

Types

type CursorStore added in v0.1.12

type CursorStore interface {
	Since(context.Context, string, int64, int) ([]Event, error)
}

type Event

type Event struct {
	ID                 int64           `json:"id"`
	Timestamp          time.Time       `json:"timestamp"`
	EventKind          string          `json:"event_kind,omitempty"`
	ProjectID          string          `json:"project_id,omitempty"`
	TraceID            string          `json:"trace_id,omitempty"`
	RunID              string          `json:"run_id,omitempty"`
	ParentID           string          `json:"parent_id,omitempty"`
	CorrelationKind    string          `json:"correlation_kind,omitempty"`
	Method             string          `json:"method"`
	ToolName           string          `json:"tool_name,omitempty"`
	Status             string          `json:"status"`
	DurationMS         int64           `json:"duration_ms"`
	Error              string          `json:"error,omitempty"`
	FailureCategory    string          `json:"failure_category,omitempty"`
	PolicyCategory     string          `json:"policy_category,omitempty"`
	RelativePath       string          `json:"relative_path,omitempty"`
	RequestID          string          `json:"request_id,omitempty"`
	RemoteAddr         string          `json:"remote_addr,omitempty"`
	UserAgent          string          `json:"user_agent,omitempty"`
	ClientClass        string          `json:"client_class,omitempty"`
	InputSummaryHash   string          `json:"input_summary_hash,omitempty"`
	InputSummaryClass  string          `json:"input_summary_class,omitempty"`
	OutputSummaryHash  string          `json:"output_summary_hash,omitempty"`
	OutputSummaryClass string          `json:"output_summary_class,omitempty"`
	RawRequest         json.RawMessage `json:"raw_request,omitempty"`
	RawParams          json.RawMessage `json:"raw_params,omitempty"`
	RawArgs            json.RawMessage `json:"raw_arguments,omitempty"`
	RawResult          json.RawMessage `json:"raw_result,omitempty"`
}

type IDStore added in v0.1.12

type IDStore interface {
	MaxID(context.Context) (int64, error)
}

type PolicyEvent added in v0.1.12

type PolicyEvent struct {
	ProjectID string
	Category  string
	Path      string
}

type Recorder

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

func NewRecorder

func NewRecorder(capacity int) *Recorder

func NewRecorderWithStore added in v0.1.12

func NewRecorderWithStore(capacity int, store Store) *Recorder

func (*Recorder) Recent

func (recorder *Recorder) Recent(projectID string, limit int) []Event

func (*Recorder) Record

func (recorder *Recorder) Record(event Event) Event

func (*Recorder) RecordPolicyEvent added in v0.1.12

func (recorder *Recorder) RecordPolicyEvent(event PolicyEvent) Event

func (*Recorder) RecordRunEvent added in v0.1.12

func (recorder *Recorder) RecordRunEvent(event Event) Event

func (*Recorder) Since added in v0.1.12

func (recorder *Recorder) Since(projectID string, afterID int64, limit int) []Event

func (*Recorder) Subscribe

func (recorder *Recorder) Subscribe(ctx context.Context) <-chan Event

type SQLiteStore added in v0.1.12

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

func NewSQLiteStore added in v0.1.12

func NewSQLiteStore(db *sql.DB, options SQLiteStoreOptions) *SQLiteStore

func (*SQLiteStore) MaxID added in v0.1.12

func (store *SQLiteStore) MaxID(ctx context.Context) (int64, error)

func (*SQLiteStore) Recent added in v0.1.12

func (store *SQLiteStore) Recent(ctx context.Context, projectID string, limit int) ([]Event, error)

func (*SQLiteStore) Record added in v0.1.12

func (store *SQLiteStore) Record(ctx context.Context, event Event) error

func (*SQLiteStore) Since added in v0.1.12

func (store *SQLiteStore) Since(ctx context.Context, projectID string, afterID int64, limit int) ([]Event, error)

type SQLiteStoreOptions added in v0.1.12

type SQLiteStoreOptions struct {
	RetainRawPayloads bool
}

type Store added in v0.1.12

type Store interface {
	Record(context.Context, Event) error
	Recent(context.Context, string, int) ([]Event, error)
}

Jump to

Keyboard shortcuts

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