fakeagent

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCodexEvents

func FormatCodexEvents(events []Event) ([]string, error)

func FormatCodexEventsText

func FormatCodexEventsText(events []Event) string

Types

type CodexEvent

type CodexEvent struct {
	Type    string     `json:"type"`
	Item    *EventItem `json:"item,omitempty"`
	Delta   string     `json:"delta,omitempty"`
	Text    string     `json:"text,omitempty"`
	Message string     `json:"message,omitempty"`
}

type Event

type Event struct {
	Type    EventType  `json:"type"`
	Item    *EventItem `json:"item,omitempty"`
	Message string     `json:"message,omitempty"`
	Text    string     `json:"text,omitempty"`
}

func ParseCodexEvents

func ParseCodexEvents(lines []string) ([]Event, error)

type EventItem

type EventItem struct {
	ID               string       `json:"id"`
	Type             ItemType     `json:"type"`
	Text             string       `json:"text,omitempty"`
	Content          []ItemPart   `json:"content,omitempty"`
	Command          string       `json:"command,omitempty"`
	AggregatedOutput string       `json:"aggregated_output,omitempty"`
	ExitCode         *int         `json:"exit_code,omitempty"`
	Status           string       `json:"status,omitempty"`
	Changes          []FileChange `json:"changes,omitempty"`
}

type EventType

type EventType string
const (
	EventStarted   EventType = "item.started"
	EventUpdated   EventType = "item.updated"
	EventCompleted EventType = "item.completed"
	EventError     EventType = "error"
)

type FileChange

type FileChange struct {
	Path string `json:"path"`
	Kind string `json:"kind"`
}

type Generator

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

func NewGenerator

func NewGenerator(seed int64) *Generator

func (*Generator) GenerateSession

func (g *Generator) GenerateSession(prompt string) []Event

func (*Generator) NextID

func (g *Generator) NextID() string

type ItemPart

type ItemPart struct {
	Type string `json:"type"`
	Text string `json:"text,omitempty"`
}

type ItemType

type ItemType string
const (
	ItemReasoning        ItemType = "reasoning"
	ItemCommandExecution ItemType = "command_execution"
	ItemFileChange       ItemType = "file_change"
	ItemMessage          ItemType = "message"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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