codex

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capability

func Capability() map[string]string

Capability describes validated Codex observation support for this revision.

func CurrentHome

func CurrentHome(projectRoot, modeName string) (string, error)

CurrentHome resolves the fully published home for new launches. The pointer is updated only after a replacement generation passes staging verification. Running Codex processes retain the old canonical path across that update.

func HomesBase

func HomesBase() string

HomesBase is the directory that holds the Codex homes of every project.

Codex binds a Unix socket at <home>/app-server-control/app-server-control.sock, and a socket path is limited to about 104 (macOS) or 108 (Linux) bytes, so a home must sit at a short path. With AGENTPACK_STAGING_ROOT set, the homes go under it (<root>/ap-c) whenever a generation there still leaves room for the socket. Otherwise, and when the configured root is too long, they go under /var/tmp/ap-c, the one place agentpack writes outside its configured roots.

func MergeMCP

func MergeMCP(path string, entries mcp.Entries) error

func New

func New() base.Harness

func ProbeHome

func ProbeHome(ctx context.Context, codexHome, workspace, sourceID, lockDigest, mode string, packaged ...base.PackagedNames) (environment.Receipt, error)

ProbeHome records what Codex lists for the staged home. packaged names the commands and subagents of the plan: Agentpack renders them as skills for Codex, so they are observed in the same listing and reported under their own category.

func ProjectHomes

func ProjectHomes(projectRoot string) (string, error)

ProjectHomes is the directory that holds one project's Codex homes, for every mode.

func Support

func Support(event hooks.Event, handler hooks.Handler) hooks.Support

Support follows the event list of the Codex hooks reference (learn.chatgpt.com/docs/hooks, read 2026-10-13; the names are also in the codex-cli 0.159.3 binary): PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, UserPromptSubmit, SubagentStart, SubagentStop, Stop, SessionStart, SessionEnd. Codex's own Interrupt has no counterpart in the other agents' hook files.

Types

type HookRenderer

type HookRenderer struct{}

func (HookRenderer) Render

func (HookRenderer) Render(bundle hooks.Bundle, context hooks.RenderContext) (hooks.RenderOutput, error)

func (HookRenderer) Target

func (HookRenderer) Target() harness.Target

Jump to

Keyboard shortcuts

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