Cursor plugin specification and official plugins
TypeScript
X skill: trim to the inbox page size and unread paging
Santiago Medina Rolong78bf6ccb212c
diff --git a/third_party/x/CHANGELOG.md b/third_party/x/CHANGELOG.mdindex 6505957e..8c9d575a 100644--- a/third_party/x/CHANGELOG.md+++ b/third_party/x/CHANGELOG.md@@ -2,12 +2,10 @@All notable changes to this plugin will be documented here.-## 2.6.4 — Exact unread messages, 1000-conversation inbox pages, and mark-read covers the whole conversation+## 2.6.4 — 1000-conversation inbox pages-- List conversations with `get_chat_conversations` `max_results` 1000, falling back to 100 if the API rejects 1000 as too large.-- To find the exact unread messages, list the unread conversations, then page each one's `get_chat_conversation_events` newest first and stop at the first event whose `id` is at or below `last_read_event_id`, the `seen_until_sequence_id` of the owner's latest read receipt. No parameter starts after an event. The events above it, except the owner's own, are the unread messages.-- A conversation is unread when its latest notifying message, `newest_event_id`, is from someone else after `last_read_event_id`, or when there is no read receipt. Marking a conversation unread does not set `unread`.-- `mark_chat_conversation_read` takes only `id` and always marks the whole conversation read.+- List conversations with `get_chat_conversations` `max_results` 1000.+- Unread messages leave out the owner's own messages, and paging continues past an empty events page that still has a `next_token`.## 2.6.3 — Built-in public reads, unread state, message requests, no congrats linediff --git a/third_party/x/skills/x-api-mcp-guide/SKILL.md b/third_party/x/skills/x-api-mcp-guide/SKILL.mdindex 4ae27f66..5e88abbc 100644--- a/third_party/x/skills/x-api-mcp-guide/SKILL.md+++ b/third_party/x/skills/x-api-mcp-guide/SKILL.md@@ -394,7 +394,7 @@ MCP owns OAuth (`dm.read` / `dm.write`) and ciphertext. Local `chatxdk` + `xchat| `get_users_me` | Numeric `user_id` || `get_users_public_key` | Self: `juicebox_config`, `public_key_version`, `public_key`, `signing_public_key`, `identity_public_key_signature` || `get_users_public_keys` | Signing keys for every sender, all versions (up to 100 `ids` per call) |-| `get_chat_conversations` | Inbox (paginate). Use `max_results` 1000; if that is rejected as too large, use 100 |+| `get_chat_conversations` | Inbox (paginate), `max_results` 1000 || `get_chat_message_requests` | Pending requests, one `inbox_type` per call (`you_may_know` Priority, `low_quality` Hidden) || `get_chat_message_request` | One request. Marks its messages delivered. Only when the owner asked to open it || `accept_chat_message_request` | Accept a received request into the inbox. Owner must say to accept. A reply does not |@@ -403,7 +403,7 @@ MCP owns OAuth (`dm.read` / `dm.write`) and ciphertext. Local `chatxdk` + `xchat| `send_chat_message` | Pre-encrypted `message_id` + `encoded_message_create_event` (+ signature) || `add_conversation_keys` | Output of local `prepare-keys` / `session-encrypt.add_conversation_keys` || `send_chat_typing_indicator` | Optional UX (do not hammer) |-| `mark_chat_conversation_read` | Optional after handling. Pass only `id`: it always marks the whole conversation read |+| `mark_chat_conversation_read` | Optional after handling |**Valid `public_key.fields`:**`public_key_version,public_key,signing_public_key,identity_public_key_signature,juicebox_config`@@ -485,15 +485,12 @@ When they ask, run `$HELPER $SCRIPT forget`. If a run with `--remember-key` prinX tracks which chats are unread. For "what's unread" or "anything new", use that: don't work it out by scanning every conversation for events newer than the read point.-To find the exact unread messages:+1. `get_chat_conversations` with `unread_only` true, `max_results` 1000, and `chat_conversation.fields` `unread,last_read_event_id,newest_event_id`. A page can be short or empty while `meta.has_more` is true: pass `meta.next_token` as `pagination_token` until `has_more` is false. That is every unread conversation.+2. For each, page `get_chat_conversation_events` with `max_results` 100 until you reach `last_read_event_id`; an empty page with a `next_token` is not the end. Events after it, except the ones you sent, are the unread messages (all of them if it is missing). Read further back whenever it helps the answer.+3. Message requests are not in this list. If `meta.has_message_requests` is true, list them as in step 2 of [Read / summarize](#read--summarize).+4. Get signing keys and decrypt as in [Read / summarize](#read--summarize).-1. `get_chat_conversations` with `unread_only` true, `max_results` 1000, and `chat_conversation.fields` `unread,last_read_event_id,newest_event_id`. A page can be short or empty while `meta.has_more` is true: pass `meta.next_token` as `pagination_token` until `has_more` is false. That is every unread conversation. `last_read_event_id` is your read point: the `seen_until_sequence_id` of your latest read receipt.-2. For each, page `get_chat_conversation_events` with its `id`, `max_results` 100, and `meta.next_token` as `pagination_token`. There is no parameter to start after an event. Events come newest first, so stop at the first event whose `id` is at or below `last_read_event_id`, comparing them as numbers. A page can be empty while `next_token` is set; keep paging. Without `last_read_event_id`, page until `next_token` is absent.-3. The events above `last_read_event_id` are the unread messages. Leave out the ones you sent. Read further back whenever it helps the answer.-4. Message requests are not in this list. If `meta.has_message_requests` is true, list them as in step 2 of [Read / summarize](#read--summarize).-5. Get signing keys and decrypt as in [Read / summarize](#read--summarize).--A conversation is unread when its latest notifying message, `newest_event_id`, was sent by someone else after `last_read_event_id`, or when you have no read receipt in it. `unread` is always true or false. Marking a conversation unread does not set it. `get_chat_conversation` takes the same fields for one thread.+`unread` is always true or false. `get_chat_conversation` takes the same fields for one thread.### Read / summarize