Documentation
¶
Index ¶
- Constants
- type Manager
- func (m Manager) Rebind() (Status, error)
- func (m Manager) Remove() (Status, error)
- func (m Manager) RemoveHooks() error
- func (m Manager) Setup() (Status, error)
- func (m Manager) SetupContext(ctx context.Context) (Status, error)
- func (m Manager) Status() (Status, error)
- func (m Manager) StatusContext(ctx context.Context) (Status, error)
- type Status
- type TrustReport
Constants ¶
const ( // TrustMethodAppServer is the supported path: Codex computes the hash and // Codex writes it. TrustMethodAppServer = "app_server" // TrustMethodAppendedConfig is the degraded path used when Codex can report // hook hashes but refuses or no longer offers config/batchWrite. Overgent // appends the trust tables itself, and only ones that do not yet exist. TrustMethodAppendedConfig = "appended_config" // TrustMethodManual is the honest floor: hooks are installed but Codex will // not run them until the member reviews them. TrustMethodManual = "manual" )
Trust methods, ordered by how much of the work Codex itself performs.
const ReviewGuidance = "Open Codex → Settings → Hooks and choose Trust all, or run /hooks in the Codex CLI."
ReviewGuidance is shown to a member who must trust the hooks by hand. Codex surfaces the same review in the desktop application and in the CLI.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
ProjectRoot, ConfigRoot, Executable string
Portable bool
// CodexHome overrides the Codex home directory. Empty resolves $CODEX_HOME
// and then ~/.codex, so tests never touch real contributor state.
CodexHome string
// CodexExecutable overrides Codex discovery for trust repair.
CodexExecutable string
// Version is reported to Codex during the app-server handshake.
Version string
}
func (Manager) Rebind ¶
Rebind transactionally replaces a structurally recognized Overgent binding from another profile. Unknown drift remains an error. Both config files are restored if either managed rewrite fails.
func (Manager) RemoveHooks ¶
RemoveHooks deletes the managed user-level Codex hooks. Call it only after every project binding has been removed; the hooks are shared.
func (Manager) SetupContext ¶
SetupContext installs the project MCP binding and the user-level activity hooks, then asks Codex to trust those hooks so they can actually run.
func (Manager) StatusContext ¶
StatusContext reports the binding without changing it. A binding whose files are present but whose hooks Codex has not trusted reports "needs_review", not "active": Codex skips an untrusted hook silently, so reporting it as working is what hid this failure in the first place.
type Status ¶
type Status struct {
Configured bool `json:"configured"`
ConfigPath string `json:"configPath"`
HookPath string `json:"hookPath,omitempty"`
Hooks string `json:"hooks"`
Binding string `json:"binding"`
PreviousProfile string `json:"previousProfile,omitempty"`
// CheckedProfile names the profile this status was evaluated against, so an
// `other_profile` result can be read without guessing what it was compared
// with. Without it the honest answer "Codex is bound to a different profile
// than the one you asked about" is indistinguishable from the alarming one
// "Codex is bound to somebody else's profile", and the difference is usually
// just a missing --config-root.
CheckedProfile string `json:"checkedProfile"`
RestartRequired bool `json:"restartRequired"`
// Trust reports whether Codex will actually run the installed hooks. Files
// on disk are not enough: Codex skips an untrusted hook silently (ADR-051).
Trust TrustReport `json:"trust"`
}
type TrustReport ¶
type TrustReport struct {
Method string `json:"method"`
Total int `json:"total"`
Trusted int `json:"trusted"`
Pending []string `json:"pending,omitempty"`
Guidance string `json:"guidance,omitempty"`
Detail string `json:"detail,omitempty"`
}
TrustReport describes whether Codex will actually run Overgent's hooks.
A binding whose files are on disk is not a binding that runs: Codex skips an untrusted hook silently. Setup and status both carry this so the desktop app can distinguish a working install from an inert one (ADR-051).
func (TrustReport) Satisfied ¶
func (r TrustReport) Satisfied() bool
Satisfied reports whether every managed hook Codex resolved is trusted. A report that observed no hooks at all is not satisfied: that means Codex could not see the binding, which is exactly the silent failure to surface.