SDK lifecycle and reporting limits
Call acp.start() once when your application starts. It sends an immediate heartbeat and then repeats every 30 seconds by default. Reports are buffered and flushed every five seconds or after fifty runs. The default buffer cap is 200; excess records can be dropped.
Await acp.stop() during graceful shutdown to clear timers and flush outstanding reports. A process crash can lose buffered telemetry. Reporting is best effort; it is not a durable queue.
Lifecycle reference
| Option | Purpose |
|---|---|
| heartbeatMs / flushMs | Tune heartbeat and report intervals. |
| flushAt / maxBuffer | Tune batch size and buffer capacity. |
| webhookSecretPrev | Accept the previous signing secret during rotation. |
| disableControl | Disable local command handling. |
| logger | Provide info, warn, and error handlers. |
Keep the webhook route before express.json(), because signature verification needs the raw request bytes. Use one client per agent and keep credentials on your server.