Metadata-Version: 2.4
Name: exoclaw-channel-heartbeat
Version: 0.1.1
Summary: Periodic heartbeat channel for exoclaw
Requires-Python: >=3.11
Requires-Dist: exoclaw>=0.1.0
Requires-Dist: loguru<1.0.0,>=0.7.3
Description-Content-Type: text/markdown

# exoclaw-channel-heartbeat

Periodic heartbeat service that wakes the agent on a schedule to check for active tasks in `HEARTBEAT.md`.

## Install

```
pip install exoclaw-channel-heartbeat
```

## Usage

```python
from pathlib import Path
from exoclaw_channel_heartbeat.service import HeartbeatService

heartbeat = HeartbeatService(
    workspace=Path("~/.nanobot/workspace").expanduser(),
    provider=provider,       # any exoclaw LLMProvider
    model="anthropic/claude-opus-4-5",
    on_execute=agent_loop.process_direct,   # called when tasks are found
    on_notify=send_to_user,                 # optional: deliver the result
    interval_s=30 * 60,
)

await heartbeat.start()
```

Each tick reads `HEARTBEAT.md`, asks the LLM via a structured tool call whether there are active tasks (`skip` / `run`), and only invokes `on_execute` when the decision is `run`.
