agentactivity

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProjectStreamHandler

func ProjectStreamHandler(recorder *Recorder) http.Handler

Types

type Event

type Event struct {
	ID         int64           `json:"id"`
	Timestamp  time.Time       `json:"timestamp"`
	ProjectID  string          `json:"project_id,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"`
	RequestID  string          `json:"request_id,omitempty"`
	RemoteAddr string          `json:"remote_addr,omitempty"`
	UserAgent  string          `json:"user_agent,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 Recorder

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

func NewRecorder

func NewRecorder(capacity int) *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) Subscribe

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

Jump to

Keyboard shortcuts

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