Skip to content

ItemGuardianApprovalReviewStartedNotification

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: CodexBaseModel

[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.

Source code in src/codexed/models/v2_protocol.py
class ItemGuardianApprovalReviewStartedNotification(CodexBaseModel):
    """[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon."""

    action: GuardianApprovalReviewAction
    review: GuardianApprovalReview
    review_id: str
    """
    Stable identifier for this review.
    """
    started_at_ms: int
    """
    Unix timestamp (in milliseconds) when this review started.
    """
    target_item_id: str | None = None
    """
    Identifier for the reviewed item or tool call when one exists.

    In most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - stdin reviews, which refer to the existing parent command item and have a separate approval ID in the action payload - network policy reviews, where there is no target item

    A network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.
    """
    thread_id: str
    turn_id: str

review_id instance-attribute

review_id: str

Stable identifier for this review.

started_at_ms instance-attribute

started_at_ms: int

Unix timestamp (in milliseconds) when this review started.

target_item_id class-attribute instance-attribute

target_item_id: str | None = None

Identifier for the reviewed item or tool call when one exists.

In most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - stdin reviews, which refer to the existing parent command item and have a separate approval ID in the action payload - network policy reviews, where there is no target item

A network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.

:fa-brands-github: Show source on GitHub