Skip to content
Поверхность: Go SdkСтабильность: Public StableЗрелость: StableИсходник

codex

Сгенерировано из публичного Go-пакета через gomarkdoc.

Путь импорта: github.com/777genius/plugin-kit-ai/sdk/codex

go
import "github.com/777genius/plugin-kit-ai/sdk/codex"

Пакет codex публикует типизированные входные события, ответы и регистраторы для runtime-интеграций Codex.

Оглавление

  • 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

go
func RegisterCustomJSONT any *Response) error

RegisterCustomJSON 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.

go
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

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

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

type Registrar

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

go
type Registrar struct {
    // содержит скрытые или неэкспортируемые поля
}

func NewRegistrar

go
func NewRegistrar(backend runtime.RegistrarBackend) *Registrar

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

func (*Registrar) OnNotify

go
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.

go
type Response struct{}

func Continue

go
func Continue() *Response

Continue acknowledges the notify event and exits successfully.

Публичная документация для авторов плагинов и интеграторов.