codex_types

package
v0.0.17 Latest Latest
Warning

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

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

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