HookEndPayload
Payload for “hook_end” events — a host lifecycle hook finished.
Class Diagram
Section titled “Class Diagram”---
title: HookEndPayload
config:
look: handDrawn
theme: colorful
class:
hideEmptyMembersBox: true
---
classDiagram
class HookEndPayload {
+string hookInvocationId
+string hookType
+string scope
+boolean success
+dictionary output
+float64 durationMs
+string error
+RedactionMetadata redaction
}
class RedactionMetadata {
+boolean sanitized
+RedactedField[] fields
+string policy
}
HookEndPayload *-- RedactionMetadata
Yaml Example
Section titled “Yaml Example”hookInvocationId: hook_abc123hookType: preToolUsesuccess: truedurationMs: 12error: hook failedProperties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| hookInvocationId | string | Stable hook invocation identifier |
| hookType | string | Host-defined hook type |
| scope | string | Whether the hook is scoped to a turn or the outer session |
| success | boolean | Whether the hook completed successfully |
| output | dictionary | Hook output after host-side sanitization |
| durationMs | float64 | Hook execution duration in milliseconds |
| error | string | Human-readable error when success is false |
| redaction | RedactionMetadata | Redaction state for sensitive hook output fields |
Composed Types
Section titled “Composed Types”The following types are composed within HookEndPayload: