ofw-mcp 2.29.1 → 2.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,7 +92,7 @@ Always pass `--config ~/.mcporter/mcporter.json` unless a local `config/mcporter
92
92
  |------|-------|
93
93
  | `ofw_sync_messages(folders?, deep?, fetchUnreadBodies?)` | Sync OFW → local cache. **Call first if the cache might be stale.** Never marks anything read unless `fetchUnreadBodies` is set. `newMessages` lists every message this call cached for the first time (newest first, with `read` and `bodyFetched`; `newMessagesTotal`/`newMessagesTruncated` when more than 50 arrived), so tell the user what arrived from that list. `unreadInbox` lists the new inbox messages that were unread when the sync began (`bodyFetched:false` = still unread). If the response leads with a `warning` and a `markedRead` list, the sync marked those messages read on OFW; tell the user, and stress any with `reason: "unexpected"`. With `fetchUnreadBodies` it may instead return a confirmation preview listing the unread messages it would open (server `OFW_CONFIRM_MARK_READ`): show the user that list and repeat with the `confirmToken` only on their yes. `unreadBodies.gate` names a server ceiling that refused. |
94
94
  | `ofw_list_message_folders` | List OFW folders with unread counts. Most reads use the cache; this is mainly for folder IDs and live unread counts. |
95
- | `ofw_list_messages(folderId?, since?, until?, q?, sort?, page?, size?, autoRefresh?, view?)` | Cache-backed list. Supports folder ("inbox"/"sent"/"both"), date range, and substring search. `sort:"oldest"` starts at the old end of a range instead of paging to it (default `"newest"`). Returns `complete` for the RESULT SET plus **`nextPage`** (null when done) — and the paging keys come FIRST in the JSON, before `messages`. `returned` carries the record count as a scalar, beside `total`. An **empty** result from a non-fresh cache is refused (`UNVERIFIED_EMPTY`) — pass `autoRefresh:true` to sync and answer instead. |
95
+ | `ofw_list_messages(folderId?, since?, until?, q?, sort?, page?, size?, autoRefresh?, view?)` | Cache-backed list. Supports folder ("inbox"/"sent"/"both"), date range, and substring search. Any OTHER folder (user-created, Archived, Action Items) can be named by id or name from `ofw_list_message_folders`: it is read **live**, one page (≤50) per call, with subject/sender/date/`read` but **no bodies**, and `since`/`until`/`q` are refused there — fetch a body with `ofw_get_message`, which returns it as `folder: "other"` (with `folderName`, no `read` key — like a draft — and not cached). Listing the folder first is what lets `ofw_get_message` judge such a message under the mark-read safeguards (`OFW_ALLOW_MARK_READ=false`, `OFW_CONFIRM_MARK_READ`, no-read days) — an id it has never seen is refused there. `sort:"oldest"` starts at the old end of a range instead of paging to it (default `"newest"`). Returns `complete` for the RESULT SET plus **`nextPage`** (null when done) — and the paging keys come FIRST in the JSON, before `messages`. `returned` carries the record count as a scalar, beside `total`. An **empty** result from a non-fresh cache is refused (`UNVERIFIED_EMPTY`) — pass `autoRefresh:true` to sync and answer instead. |
96
96
  | `ofw_get_message(messageId, allowMarkRead?, view?)` | Read a message OR draft body. Cache-first. Ids in the drafts cache return `folder: "drafts"`. ⚠️ Falls through to OFW for unread inbox messages, which marks them read AND stamps a "First Viewed" time the co-parent can see — irreversible. Pass `allowMarkRead:false` to refuse that fetch instead; cached, sent and already-read messages are unaffected. If the server runs with `OFW_CONFIRM_MARK_READ`, the first call returns a preview (subject, sender, sent time) instead of the body: show it to the user and repeat the call with its `confirmToken` only after they say yes. On a server-configured no-read day (`readingBlocked` / `READING_BLOCKED` in the response) the body is withheld (`bodyWithheld: true`) — report the sender, date and subject, say when `nextReadableDay` is, and do not try to work around it. When citing a "First Viewed" time, check the recipient's `viewedAtOrigin`: `detail-this-call` was read from OFW just now, `detail-cached` is carried forward from an earlier read (`viewedAtCheckedAt`), `list` means unknown. Never cite `viewedPlaceholder` (OFW's 1970 placeholder) as a view time. |
97
97
  | `ofw_send_message(draftId?, subject?, body?, bodyFormat?, recipientIds?, replyToId?, expectedRevision?, deleteDraftOnSuccess?, myFileIDs?, inlineAttachments?, blobKeys?, force?)` | Send a message — **the one irreversible operation**. Preferred path: pass `draftId` (+ `expectedRevision`) to send an existing draft **as it exists on the server** — the tool re-reads it from OFW first and refuses if it changed since you read it (or was already sent/deleted); `subject`/`body` become optional overrides. `recipientIds` is usually still required: OFW does not store recipients on drafts. After a **confirmed** send the draft is auto-deleted (`deleteDraftOnSuccess:false` to keep it); on any failure or ambiguity it is retained and the response says why (`draftRetained`). Response leads with `sentMessageId`, `draftKey`, `threaded`, `draftDeleted`. Compose from scratch by passing `subject`/`body`/`recipientIds` with no `draftId`. Sending a draft attaches its held files as they are (PRIVATE files attach fine); new files upload PRIVATE only after approval, and the response's `attachments.verified`/`missing` says what OFW actually attached. A replace without `recipientIds` keeps the draft's recipients. A draft with no `draftKey` says why (`draftKeyReason`). |
98
98
  | `ofw_get_unread_sent(page?, size?, autoRefresh?)` | Sent messages your co-parent hasn't read yet (from cache). Leads with `complete`/`hasMore`/`nextPage`, then `scanned`/`total`, then `unread`; an empty sent cache that is not fresh is refused rather than reported as "nothing sent". |
@@ -266,8 +266,8 @@ Editing a draft mints a **new OFW id every time** — `ofw_save_draft` replaces
266
266
  ## Workflows
267
267
 
268
268
  **Check inbox:**
269
- 1. `ofw_list_message_folders` → find inbox folder ID
270
- 2. `ofw_list_messages(folderId)` → list messages
269
+ 1. `ofw_list_messages(folderId: "inbox")` → list cached inbox messages
270
+ 2. For a folder the user filed messages into: `ofw_list_message_folders` → its id or name → `ofw_list_messages(folderId)` (read live)
271
271
  3. `ofw_get_message(messageId)` → read a specific message
272
272
 
273
273
  **Writing a message body:** OFW shows bodies as plain text — Markdown is never rendered. Write plain text: blank lines between paragraphs, `-` bullets, `1.` numbered lists, full `https://` links (those, emails and phone numbers become clickable). Any Markdown that slips in is converted before saving/sending (`bodyConversion` in the response says what changed; the send preview shows the converted text). `bodyFormat: "plain"` sends a body byte-for-byte.