codex
Generado desde el paquete público de Go mediante gomarkdoc.
Ruta de importación: github.com/777genius/plugin-kit-ai/sdk/codex
import "github.com/777genius/plugin-kit-ai/sdk/codex"Package codex exposes typed public event inputs, responses, and registrars for Codex runtime integrations.
Index
- func RegisterCustomJSON[T any](r *Registrar, eventName string, fn func(*T) *Response) error
- type NotifyEvent
- func (e *NotifyEvent) RawJSON() json.RawMessage
- type Registrar
- func NewRegistrar(backend runtime.RegistrarBackend) *Registrar
- func (r *Registrar) OnNotify(fn func(*NotifyEvent) *Response)
- type Response
- func Continue() *Response
func RegisterCustomJSON
func RegisterCustomJSONT any *Response) errorRegisterCustomJSON registers an experimental future Codex hook whose payload is delivered as a JSON argv argument. The handler remains fully typed.
type NotifyEvent
NotifyEvent is the decoded Codex notify payload and its raw JSON form.
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
}func (*NotifyEvent) RawJSON
func (e *NotifyEvent) RawJSON() json.RawMessageRawJSON returns the original JSON payload for pass-through or custom decoding.
type Registrar
Registrar registers public Codex event handlers on a root SDK app.
type Registrar struct {
// contains filtered or unexported fields
}func NewRegistrar
func NewRegistrar(backend runtime.RegistrarBackend) *RegistrarNewRegistrar 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
Response represents a successful Codex notify acknowledgement.
type Response struct{}func Continue
func Continue() *ResponseContinue acknowledges the notify event and exits successfully.