codex

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeNotify

func DecodeNotify(env runtime.Envelope) (any, string, error)

func DecodePermissionRequest added in v1.2.0

func DecodePermissionRequest(env runtime.Envelope) (any, string, error)

func DecodePreToolUse added in v1.2.0

func DecodePreToolUse(env runtime.Envelope) (any, string, error)

func DecodeStop added in v1.2.0

func DecodeStop(env runtime.Envelope) (any, string, error)

func DecodeSubagentStop added in v1.2.0

func DecodeSubagentStop(env runtime.Envelope) (any, string, error)

func EncodeNotify

func EncodeNotify(v any) runtime.Result

func EncodeNotifyOutcome

func EncodeNotifyOutcome(NotifyOutcome) runtime.Result

func EncodePermissionRequest added in v1.2.0

func EncodePermissionRequest(v any) runtime.Result

func EncodePermissionRequestOutcome added in v1.2.0

func EncodePermissionRequestOutcome(PermissionRequestOutcome) runtime.Result

EncodePermissionRequestOutcome emits the observation acknowledgement: empty stdout, exit 0.

func EncodePreToolUse added in v1.2.0

func EncodePreToolUse(v any) runtime.Result

func EncodePreToolUseOutcome added in v1.2.0

func EncodePreToolUseOutcome(PreToolUseOutcome) runtime.Result

EncodePreToolUseOutcome emits the observation acknowledgement: empty stdout, exit 0.

func EncodeStop added in v1.2.0

func EncodeStop(v any) runtime.Result

func EncodeStopOutcome added in v1.2.0

func EncodeStopOutcome(StopOutcome) runtime.Result

EncodeStopOutcome emits the observation acknowledgement: empty stdout, exit 0.

func EncodeSubagentStop added in v1.2.0

func EncodeSubagentStop(v any) runtime.Result

func EncodeSubagentStopOutcome added in v1.2.0

func EncodeSubagentStopOutcome(SubagentStopOutcome) runtime.Result

EncodeSubagentStopOutcome emits the observation acknowledgement: empty stdout, exit 0.

Types

type NotifyInput

type NotifyInput struct {
	Raw    json.RawMessage
	Client string
}

type NotifyOutcome

type NotifyOutcome struct{}

type PermissionRequestInput added in v1.2.0

type PermissionRequestInput struct {
	SessionID      string
	TurnID         string
	TranscriptPath string
	CWD            string
	HookEventName  string
	Model          string
	PermissionMode string
	ToolName       string
	ToolInput      json.RawMessage
	AgentID        string
	AgentType      string
}

PermissionRequestInput is the decoded Codex PermissionRequest payload (stdin JSON). ToolInput stays raw for typed consumers.

type PermissionRequestOutcome added in v1.2.0

type PermissionRequestOutcome struct{}

PermissionRequestOutcome acknowledges an observation-only PermissionRequest hook.

type PreToolUseInput added in v1.2.0

type PreToolUseInput struct {
	SessionID      string
	TurnID         string
	TranscriptPath string
	CWD            string
	HookEventName  string
	Model          string
	PermissionMode string
	ToolName       string
	ToolInput      json.RawMessage
	ToolUseID      string
	AgentID        string
	AgentType      string
}

PreToolUseInput is the decoded Codex PreToolUse payload (stdin JSON). ToolInput stays raw for typed consumers.

type PreToolUseOutcome added in v1.2.0

type PreToolUseOutcome struct{}

PreToolUseOutcome acknowledges an observation-only PreToolUse hook.

type StopInput added in v1.2.0

type StopInput struct {
	SessionID            string
	TurnID               string
	TranscriptPath       string
	CWD                  string
	HookEventName        string
	Model                string
	PermissionMode       string
	StopHookActive       bool
	LastAssistantMessage string
}

StopInput is the decoded Codex Stop lifecycle hook payload (stdin JSON).

type StopOutcome added in v1.2.0

type StopOutcome struct{}

StopOutcome acknowledges an observation-only Stop hook.

type SubagentStopInput added in v1.2.0

type SubagentStopInput struct {
	SessionID            string
	TurnID               string
	TranscriptPath       string
	CWD                  string
	HookEventName        string
	Model                string
	PermissionMode       string
	StopHookActive       bool
	LastAssistantMessage string
	AgentID              string
	AgentType            string
	AgentTranscriptPath  string
}

SubagentStopInput is the decoded Codex SubagentStop payload (stdin JSON).

type SubagentStopOutcome added in v1.2.0

type SubagentStopOutcome struct{}

SubagentStopOutcome acknowledges an observation-only SubagentStop hook.

Jump to

Keyboard shortcuts

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