mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
docs: restructure docs site and fix drift against code
- split installation.md into installation/deployment/notifications - merge cursor/grok guides into new agents.md with full support matrix - sidebar: grouped sections; add namespace, deployment, notifications, native companion contract - fix license footer (AGPL-3.0), settings schema fields and $id - fix drift in pwa, faq, namespace, how-it-works, voice-assistant, quick-start, native-companion-contract - move mermaid lightbox dogfood doc to localdocs (untracked) - README: complete agent list, replace dead cursor/grok links
This commit is contained in:
@@ -23,12 +23,14 @@ A companion implementing this contract is a **native client to the same hub the
|
||||
{
|
||||
"token": "<fcm-registration-token>",
|
||||
"platform": "phone",
|
||||
"deviceId": "<stable-install-id-uuid>"
|
||||
"deviceId": "<stable-install-id>"
|
||||
}
|
||||
```
|
||||
|
||||
`platform`: `"phone"` | `"wear"`
|
||||
|
||||
`deviceId`: any string of 1-128 characters chosen by the client (does not have to be a UUID). Must be stable across re-registrations of the same install.
|
||||
|
||||
**Response:** `{ "ok": true }`
|
||||
|
||||
Upsert on `(namespace, deviceId, platform)` - same device re-registering replaces the FCM token.
|
||||
@@ -67,7 +69,8 @@ namespace to avoid duplicate OS notifications.
|
||||
| `title` | string | Notification title |
|
||||
| `body` | string | Notification body |
|
||||
| `severity` | `info` | `info` (ready), `warning` (permission), `success` / `error` (task) |
|
||||
| `notifySummary` | JSON string | Optional: parsed `AGENT_NOTIFY_SUMMARY` line from agent text |
|
||||
| `contractVersion` | `1` | Present on every message; see [Versioning](#versioning) |
|
||||
| `notifySummary` | JSON string | Only on `ready`: parsed `AGENT_NOTIFY_SUMMARY` line from agent text, when present |
|
||||
|
||||
Native apps **must** handle `data` for Wear; notification block is for display.
|
||||
|
||||
@@ -79,6 +82,8 @@ Native apps **must** handle `data` for Wear; notification block is for display.
|
||||
| Allow | `POST /api/sessions/:id/permissions/:requestId/approve` |
|
||||
| Deny | `POST /api/sessions/:id/permissions/:requestId/deny` |
|
||||
|
||||
`localId` is optional in the send-message body - an opaque client-generated id for reconciling the locally shown message with the server-echoed one.
|
||||
|
||||
`sentFrom` extension (optional future): `android-phone`, `android-wear`.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user