INNER CODE UNIT · Python

WatcherCreate

bunkeriot/BunkerM · backend/app/agent-api/main.py:262

class WatcherCreate(BaseModel):
    description: str
    topic: str
    condition_operator: str
    condition_value: str
    response_template: str
    condition_field: str | None = None
    one_shot: bool = False
    cooldown_seconds: int = 10


@app.get("/watchers")
async def list_watchers(x_api_key: str = Header(...)):
    _auth(x_api_key)
    with _lock:
        data = _load_agents()
    return {"watchers": data["watchers"]}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…