Skip to content

MonitorInput

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  311234720["input_types.MonitorInput"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 311234720
  2751680898 --> 2645524081

🛈 DocStrings

Bases: TypedDict

Input for the Monitor tool.

Source code in src/clawd_code_sdk/models/input_types.py
@_extra_allow
class MonitorInput(TypedDict):
    """Input for the Monitor tool."""

    description: str
    """Short human-readable description of what you are monitoring (shown in notifications)."""
    timeout_ms: float
    """Kill the monitor after this deadline.

    Default 300000ms. Deadlines above 1800000ms are capped to 1800000ms. You are notified at expiry
    and can re-arm.
    """
    command: NotRequired[str]
    """Shell command or script. Each stdout line is an event; exit ends the watch."""
    ws: NotRequired[MonitorWs]
    """WebSocket to open.

    Each text frame is an event; binary frames are reported as a placeholder line. Socket close ends
    the watch. Cannot be combined with command.
    """

command instance-attribute

command: NotRequired[str]

Shell command or script. Each stdout line is an event; exit ends the watch.

description instance-attribute

description: str

Short human-readable description of what you are monitoring (shown in notifications).

timeout_ms instance-attribute

timeout_ms: float

Kill the monitor after this deadline.

Default 300000ms. Deadlines above 1800000ms are capped to 1800000ms. You are notified at expiry and can re-arm.

ws instance-attribute

ws: NotRequired[MonitorWs]

WebSocket to open.

Each text frame is an event; binary frames are reported as a placeholder line. Socket close ends the watch. Cannot be combined with command.

:fa-brands-github: Show source on GitHub