Adds `whatsapp_agent`, an additive channel that connects nanobot to the
official WhatsApp Agent Platform API (https://api.whatsapp.com/agent/v1).
It authenticates with a per-agent API token and long-polls `GET /updates`
instead of linking a device, so it is the officially supported interface
rather than the Neonize linked-device protocol used by the existing
`whatsapp` channel.
The existing `whatsapp` channel is unchanged; both can run at once under
different names.
Design notes:
- The poll cursor, dedup window, and creator identifier live in one
atomically replaced state file. A message id is recorded before it is
handled, so a crash re-reads the batch without answering twice, and the
cursor is only accepted after the batch is processed.
- The first poll omits `offset`, which resolves the head and never replays
up to 30 days of history into an auto-replying agent.
- A changed token resets the cursor, because `next_offset` is only valid
for the agent that issued it.
- Each API method is paced below its own rolling 60-second limit, and
progress/tool-hint messages default to off because they spend the shared
12-per-minute send budget.
- Retries are limited to confirmed non-delivery (`429`, `503`/`131016`).
A `500` or read timeout is ambiguous, so it is not retried unless
`retryAmbiguousSends` is set; a duplicate is worse than a missed reply.
- Inbound media is downloaded through the shared SSRF guard, size-capped,
and verified against the reported digest. Outbound media is validated
before upload.
- Reactions are receive-only, matching the API. The token is never logged
or persisted; state stores only a SHA-256 fingerprint.
Docs compare both WhatsApp channels, including the lack of end-to-end
encryption, country availability, and rate limits.
Render recovery decisions only for awaiting_user and failed states so a reload cannot resurrect a resuming banner. Preserve the runtime recovery state and normal running controls.
Refs NAN-260
* fix(webui): wait for sidebar state before persisting edits
* test(webui): load sidebar state in temporary chat fixtures
* fix(webui): preserve sidebar pushes during initial reads
* fix(webui): require successful session reads before pruning
Treat sidebar initialization and session-list completeness as separate permissions. Retain sidebar metadata, workbench panes, activity markers, and workspace overrides when the session list fails or only a partial reload cache is available.
Add integration coverage for recovery with and without cached sessions, successful deletion reconciliation, and successful empty session lists.
* test(webui): align sidebar recovery fixture with current schema
Remove obsolete preview and timestamp settings from the raw API fixture. Assert supported view preferences while retaining exact metadata and workbench comparisons.
---------
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
* fix(webui): resume queued prompts after turn completion
Persist the lifecycle turn each queued prompt waits for and use canonical completion identities to resume after navigation or reconnect. Release one entry at a time, and retain stopped or rejected entries for manual sending.
* fix(webui): drain temporary chat prompts on live completion
* perf(webui): resume queued prompts from live completion
* feat(webui): expand MCP service presets
* refactor(webui): load MCP presets from JSON
Validate and package the static service catalogue while preserving existing preset definitions. Pass Redis connection URLs through the official CLI option to retain target, TLS, database, and credential settings.
* docs(mcp): include all built-in service presets
* refactor(webui): organize shared components with an internal gallery
* refactor(webui): decouple views and expand component gallery
* fix(docker): include channel sources in WebUI build
* refactor(webui): cover all channel interfaces in gallery
* docs(webui): remove manual paragraph wrapping