Documentation
¶
Index ¶
- func ToolCallFromContext(ctx context.Context) (tool.ToolCall, bool)
- func WithRuntime(ctx context.Context, runtime Runtime) context.Context
- func WithToolCall(ctx context.Context, call tool.ToolCall) context.Context
- type Hooks
- type Outcome
- type PermissionBehavior
- type PermissionRequest
- type PermissionRequestOutcome
- type PostCompact
- type PostToolUse
- type PreCompact
- type PreToolUse
- type PreToolUseOutcome
- type Runtime
- type SessionEnd
- type SessionStart
- type Stop
- type SubagentStart
- type SubagentStop
- type UserPromptSubmit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToolCallFromContext ¶ added in v0.12.9
func WithRuntime ¶ added in v0.12.9
Types ¶
type Hooks ¶
type Hooks struct {
PreToolUse []PreToolUse
PermissionRequest []PermissionRequest
PostToolUse []PostToolUse
UserPromptSubmit []UserPromptSubmit
SessionStart []SessionStart
SessionEnd []SessionEnd
SubagentStart []SubagentStart
SubagentStop []SubagentStop
PreCompact []PreCompact
PostCompact []PostCompact
Stop []Stop
}
type Outcome ¶ added in v0.12.9
type Outcome struct {
// Block has event-specific Codex semantics: deny a tool/prompt, stop the
// agentic loop, or continue a Stop/SubagentStop target.
Block bool
// Stop represents the universal {"continue": false} response.
Stop bool
Reason string
AdditionalContext []string
// UpdatedResult is an internal extension used by deterministic result
// transforms such as truncation. Codex command hooks leave it nil.
UpdatedResult *string
}
type PermissionBehavior ¶ added in v0.12.9
type PermissionBehavior string
const ( PermissionUndecided PermissionBehavior = "" PermissionAllow PermissionBehavior = "allow" PermissionDeny PermissionBehavior = "deny" )
type PermissionRequest ¶ added in v0.12.9
type PermissionRequestOutcome ¶ added in v0.12.9
type PermissionRequestOutcome struct {
Behavior PermissionBehavior
Message string
}
type PostCompact ¶ added in v0.12.9
type PostToolUse ¶
type PreCompact ¶ added in v0.11.2
type PreToolUse ¶
type PreToolUseOutcome ¶ added in v0.12.9
type PreToolUseOutcome struct {
Outcome
UpdatedInput json.RawMessage
}
type Runtime ¶ added in v0.12.9
type Runtime struct {
SessionID string
TurnID string
TranscriptPath string
CWD string
Model string
PermissionMode string
StartSource string
AgentID string
AgentType string
}
Runtime carries the Codex hook fields shared by lifecycle events. Callers may populate only the fields they know; the external hook adapter supplies Codex-compatible zero/null values for the rest.
func RuntimeFromContext ¶ added in v0.12.9
type SessionEnd ¶ added in v0.11.2
type SessionStart ¶ added in v0.11.2
type SubagentStart ¶ added in v0.12.9
type SubagentStop ¶ added in v0.11.2
Click to show internal directories.
Click to hide internal directories.