codex

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package codex exposes typed public event inputs, responses, and registrars for Codex runtime integrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCustomJSON

func RegisterCustomJSON[T any](r *Registrar, eventName string, fn func(*T) *Response) error

RegisterCustomJSON registers an experimental future Codex hook whose payload is delivered as a JSON argv argument. The handler remains fully typed.

Types

type NotifyEvent

type NotifyEvent struct {
	// Raw keeps the original notify payload as it was received from argv JSON.
	Raw json.RawMessage
	// Client identifies the Codex client variant that emitted the event.
	Client string
}

NotifyEvent is the decoded Codex notify payload and its raw JSON form.

func (*NotifyEvent) RawJSON

func (e *NotifyEvent) RawJSON() json.RawMessage

RawJSON returns the original JSON payload for pass-through or custom decoding.

type Registrar

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

Registrar registers public Codex event handlers on a root SDK app.

func NewRegistrar

func NewRegistrar(backend runtime.RegistrarBackend) *Registrar

NewRegistrar builds a Codex registrar on top of the shared runtime backend.

func (*Registrar) OnNotify

func (r *Registrar) OnNotify(fn func(*NotifyEvent) *Response)

OnNotify registers a handler for the Codex Notify.

type Response

type Response struct{}

Response represents a successful Codex notify acknowledgement.

func Continue

func Continue() *Response

Continue acknowledges the notify event and exits successfully.

Jump to

Keyboard shortcuts

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