opencode_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 ErrorData

type ErrorData struct {
	Message string `json:"message"`
}

type ErrorDetail

type ErrorDetail struct {
	Name string     `json:"name"`
	Data *ErrorData `json:"data"`
}

type Event

type Event struct {
	Type      string       `json:"type"`
	SessionID string       `json:"sessionID,omitempty"`
	Part      any          `json:"part,omitempty"`
	Error     *ErrorDetail `json:"error,omitempty"`
	Done      bool         `json:"done,omitempty"`
}

func ToOpencode

func ToOpencode(events []types.AgentEvent, sessionID string) []Event

type ReasoningPart

type ReasoningPart struct {
	ID   string `json:"id"`
	Type string `json:"type"`
	Text string `json:"text"`
}

type TextPart

type TextPart struct {
	ID   string `json:"id"`
	Type string `json:"type"`
	Text string `json:"text"`
}

type ToolUsePart

type ToolUsePart struct {
	ID    string       `json:"id"`
	Type  string       `json:"type"`
	Tool  string       `json:"tool"`
	State ToolUseState `json:"state"`
}

type ToolUseState

type ToolUseState struct {
	Input    map[string]any `json:"input,omitempty"`
	Output   string         `json:"output,omitempty"`
	Stderr   string         `json:"stderr,omitempty"`
	ExitCode int            `json:"exit_code"`
	Error    string         `json:"error,omitempty"`
	Status   string         `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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