codex_types

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 4 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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"`
	Mock    *types.MockConfig `json:"mock,omitempty"`
}

func ToCodex

func ToCodex(events []types.AgentEvent) []Event

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 = types.FileChange

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"
)

Jump to

Keyboard shortcuts

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