Documentation
¶
Overview ¶
Source: internal/router/app_server_guard_hook.go:64:137@[2ba2151a] effective-hook validation.
Source: internal/vcsguard/hook.go:18:106@[2ba2151a] native hook protocol.
Index ¶
Constants ¶
const DefaultCompactPrompt = `` /* 426-byte string literal not displayed */
Source: codex-rs/prompts/templates/compact/prompt.md:1:10@0df4aa677. DefaultCompactPrompt is the stock plaintext handover prompt, pinned for launch.
const Environment = "MEKUGI_VCS_GUARD_HOOK"
const Flag = "--guard-hook"
const Key = "/<session-flags>/config.toml:pre_tool_use:0:0"
Variables ¶
This section is empty.
Functions ¶
func Config ¶
func Config(helper, directory, sudoDirectory, tracker string, prior Invocation, disabled []string) (config, state, identityHash string, err error)
Config uses the native session-layer hook and exact trust identity. It neither changes user files nor grants sandbox permissions.
Types ¶
type Input ¶
type Input struct {
Helper string `json:"helper"`
Directory string `json:"directory"`
SudoDirectory string `json:"sudo_directory"`
Tracker string `json:"tracker"`
Event string `json:"hook_event_name"`
Tool string `json:"tool_name"`
Item string `json:"tool_use_id"`
Input struct {
Command *string `json:"command"`
} `json:"tool_input"`
}
Input binds session resources in the trusted hook configuration. The remaining fields are expanded from Codex's native hook event, not router cwd.
type Invocation ¶
type Invocation struct {
CompactPrompt string `json:"-"`
PreToolUse []jsontext.Value `json:"PreToolUse"`
State map[string]jsontext.Value `json:"state"`
}
Invocation retains the selected compaction prompt and only the host-resolved sessionFlags hook layer. Copying merged hooks would duplicate other layers.
func Discover ¶
Discover starts no thread or turn. The process resolves caller configuration and is joined before the caller starts its final, guarded invocation.