Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

chat-api

/chat-api

Dodaje do aplikacji czat z historią rozmów przez Hibira Chat API w wersji beta, z potwierdzeniami odczytu i powiadomieniami.

Repozytorium
agent-plugin ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
5
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Dodaje do aplikacji czat z historią rozmów przez Hibira Chat API w wersji beta, z potwierdzeniami odczytu i powiadomieniami.

Oryginalny opis (EN)

Add in-app chat with stored history using the Hibira Chat API (beta). Use when building one-to-one or group messaging, support chat, unread counts, read receipts, typing indicators or push for offline users on top of Hibira, or when testing conversations with the MCP chat tools.

Jak działa

  1. Check access first
  2. Server side
  3. Client side
  4. With the MCP server
  5. Rules
Sekcje z nagłówków SKILL.md, w oryginale · 54 linii, 569 słów
Podgląd SKILL.md
---
name: chat-api
description: Add in-app chat with stored history using the Hibira Chat API (beta). Use when building one-to-one or group messaging, support chat, unread counts, read receipts, typing indicators or push for offline users on top of Hibira, or when testing conversations with the MCP chat tools.
---

# Hibira Chat API

The Chat API stores conversations and messages and delivers them over the app's existing Hibira connection. **Your server** creates conversations, chooses members and sends messages on users' behalf; **clients** only connect, call `pusher.signin()` and listen on their user channel. Full reference: https://hibira.io/chat-api (Markdown copy: https://hibira.io/chat-api.md).

## Check access first

The API is in beta per account. A call to an app without it answers `403 the Chat API is not enabled for this app`. With the MCP server connected, `create_conversation` says so directly and gives the waitlist link (https://hibira.io/chat). Tell the user instead of working around it.

## Server side

Base URL `https://<app host>/apps/<APP_ID>/chat`, JSON bodies, signed exactly like the Pusher HTTP API (`auth_key`, `auth_timestamp`, `auth_version=1.0`, `body_md5`, `auth_signature` = HMAC-SHA256 of `METHOD\nPATH\nsorted query` with the app secret). Pusher server libraries only sign GET/POST to fixed paths, so write a small signer (the reference has a complete Node.js one) and keep the secret on the server.

| Need | Request |
|---|---|
| Create or replace a conversation | `PUT /conversations/{id}` with `name`, `members`, `metadata`, `roles` |
| Add / remove a member | `POST /conversations/{id}/members` `{user_ids}` / `DELETE /conversations/{id}/members/{user_id}` |
| Send as a user | `POST /conversations/{id}/messages` with `user_id` (a member), `text`, optional `name`, `metadata`, `push` |
| Catch up | `GET /conversations/{id}/messages?after=<seq>` or `?last=50` |
| Mark read | `POST /conversations/{id}/read` `{user_id, seq}` |
| Inbox with unread counts | `GET /users/{user_id}/conversations` |
| Token for a browser to call `/chat/me/...` itself | `POST /tokens` `{user_id, conversation_id?, join?, ttl?}` |

Conversation IDs are yours (1–128 of `A-Z a-z 0-9 _ - = @ , . ;`), such as `order-1042`. Use the same user IDs as `pusher.signin`. Max 100 members, 4,000-character text, 4 KB metadata.

## Client side

```js
const pusher = new Pusher(KEY, { cluster, wsHost, userAuthentication: { endpoint: '/pusher/user-auth' } });
pusher.signin();
pusher.user.bind('chat.message', ({ conversation_id, message }) => render(conversation_id, message));
pusher.user.bind('chat.read', ({ conversation_id, user_id, read_seq }) => markRead(conversation_id, user_id, read_seq));
```

Other events: `chat.conversation`, `chat.message_updated` (edit, delete, reaction), `chat.typing`, `chat.left`, `chat.deleted`. On reconnect, read `after` the last `seq` you have, and re-read the shown messages with `last=n` to pick up edits. For a ready React or plain JS view, use `@hibira-io/chat-ui` (https://hibira.io/guides/chat-ui).

## With the MCP server

| Tool | Scope | Use |
|---|---|---|
| `create_conversation` | write | Create a test conversation with members |
| `send_message` | write | Send as a member; members get `chat.message` live |
| `list_conversations` | read | A user's conversations with `unread` |
| `list_messages` | read | Newest messages, or those after a seq |

Typical check after wiring a project: `create_conversation` with two test users, open the app signed in as one, `send_message` as the other, confirm the message appears and `list_conversations` shows `unread: 1`, then mark it read from the app.

## Rules

- **Ask before writing to a production app.** Messages are delivered to real users and pushed to their phones (`push: "offline"` is the default; pass `push: "never"` for tests).
- **Monthly active users are billed.** A user who sends or marks read counts for the month (500 free per account). Use a few fixed test user IDs, not a new one per run.
- **Never put the app secret in client code.** Browsers use `/chat/me` with a user token from your server.
- Moderation (word filter, bans, mutes, reports), attachments and roles/internal notes are in the reference.

Wersje

W bazie nie ma innych skilli o nazwie chat-api.

Migawka bazy z 13.11.2026 · wersja paczki a38bb31db39c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100realtime-integration
    Dodaje kanały czasu rzeczywistego Hibira do strony, aplikacji mobilnej lub backendu: aktualizacje, czat, obecność i powiadomienia.
  • 100get-started
    Prowadzi pierwszą konfigurację Hibira: logowanie do serwera MCP, wybór lub utworzenie aplikacji i wysłanie testowego zdarzenia.
  • 100azure-communication-chat-java
    Buduje czat w czasie rzeczywistym z Azure Communication Services Chat SDK dla Javy: wątki, wiadomości, uczestnicy, potwierdzenia odczytu i powiadomienia o pisaniu.
  • 100azure-communication-chat-java
    Buduje w Javie aplikacje czatu czasu rzeczywistego z Azure Communication Services Chat SDK: wątki, wiadomości, uczestnicy, potwierdzenia odczytu i powiadomienia o pisaniu.
  • 100fyzz-chat-api
    Odpytuje rozmowy i projekty Fyzz Chat przez REST API: wyszukiwanie w historii czatów i listowanie projektów.
  • 92local-build-zoom-team-chat-app-889e1b93
    Prawdopodobnie pomaga w budowaniu aplikacji Team Chat w Zoomie.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.