@animalabs/heartbeat-mcpl
v0.1.3
Published
Periodic self-wake MCPL server for Connectome agents.
Keywords
Readme
@connectome/heartbeat-mcpl
Periodic self-wake MCPL server for Connectome agents.
On a configurable interval, sends a push/event (featureSet heartbeat,
origin.source: heartbeat) to wake the agent for a self-check-in. The agent
itself configures its own schedule via three MCP tools:
heartbeat_status— show current interval, paused state, time-to-next, messageheartbeat_configure— setintervalSeconds | intervalMinutes | intervalHours,paused,message; persists across restartsheartbeat_trigger— fire one heartbeat now (test/debug)
Schedule is persisted to ${HEARTBEAT_CONFIG_FILE:-./heartbeat-config.json}.
Recipe wiring
{
"mcpServers": {
"heartbeat": {
"command": "node",
"args": ["/path/to/heartbeat-mcpl/dist/src/index.js", "--stdio"],
"env": { "HEARTBEAT_CONFIG_FILE": "/path/to/install/data/heartbeat-config.json" },
"enabledFeatureSets": ["heartbeat"]
}
},
"modules": {
"wake": {
"policies": [
{ "name": "heartbeat-wake",
"match": { "scope": ["mcpl:push-event"], "source": "heartbeat" },
"behavior": "always" }
// ... your other policies after
]
}
}
}The wake policy MUST come before any policy that would skip mcpl:push-events
(e.g. a discord-ambient skip rule), since the gate is first-match-wins.
