codexhooks

package
v0.93.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package codexhooks reads Codex's hooks/list, the app-server's account of each hook and whether the person trusted it (measured on 0.170.0), which a Codex chat and a Codex terminal session both read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LichTrust

func LichTrust(list List) string

LichTrust is the trust of a lich-plugin PreToolUse hook Codex is not running because its content changed or was never trusted, "" when every one is trusted or none is installed. Codex runs such a hook not at all and says nothing (docs/hooks/subagent-cards.md, Known ceilings), so its subagents stay native.

Types

type Hook

type Hook struct {
	Key       string `json:"key"`
	Event     string `json:"eventName"`
	Type      string `json:"handlerType"`
	Matcher   string `json:"matcher"`
	Command   string `json:"command"`
	Timeout   int    `json:"timeoutSec"`
	Status    string `json:"statusMessage"`
	Source    string `json:"source"`
	Plugin    string `json:"pluginId"`
	Enabled   bool   `json:"enabled"`
	IsManaged bool   `json:"isManaged"`
	Hash      string `json:"currentHash"`
	Trust     string `json:"trustStatus"`
}

Hook is one hooks/list entry.

type List

type List struct {
	Data []struct {
		Hooks  []Hook `json:"hooks"`
		Errors []struct {
			Message string `json:"message"`
			Path    string `json:"path"`
		} `json:"errors"`
	} `json:"data"`
}

List is hooks/list's answer.

func Probe

func Probe(ctx context.Context, cmd *exec.Cmd, cwd string) (List, error)

Probe reads hooks/list for cwd through cmd, a `codex app-server` not yet started, and ends it: the app-server's stdio JSON-RPC, initialize then hooks/list, nothing written to Codex's config.

Jump to

Keyboard shortcuts

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