Skip to content

HookMetadata2

Base classes

Name Children Inherits
CodexBaseModel
codexed.models.base
Base model for all Codex API models.

⋔ Inheritance diagram

graph TD
  2817047859["v2_protocol.HookMetadata2"]
  3116041069["base.CodexBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  3116041069 --> 2817047859
  3879467795 --> 3116041069
  2751680898 --> 3879467795

🛈 DocStrings

Bases: CodexBaseModel

Source code in src/codexed/models/v2_protocol.py
class HookMetadata2(CodexBaseModel):
    additional_context_limit: int | None = Field(None, ge=0)
    """
    Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.
    """
    current_hash: str
    display_order: int
    enabled: bool
    environment_id: str | None = None
    """
    The owning execution environment, if this hook came from its requirements.
    """
    event_name: HookEventName
    is_managed: bool
    key: str
    matcher: str | None = None
    plugin_id: str | None = None
    source: HookSource
    source_path: AbsolutePathBuf
    status_message: str | None = None
    timeout_sec: int = Field(..., ge=0)
    trust_status: HookTrustStatus
    handler_type: Literal["mcpTool"] = "mcpTool"
    server: str
    tool: str

additional_context_limit class-attribute instance-attribute

additional_context_limit: int | None = Field(None, ge=0)

Configured additionalContext spill threshold. null uses 2,500 tokens; 0 disables spilling.

environment_id class-attribute instance-attribute

environment_id: str | None = None

The owning execution environment, if this hook came from its requirements.

:fa-brands-github: Show source on GitHub