ofw-mcp 2.20.6 → 2.22.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +59 -0
- package/dist/bundle.js +700 -278
- package/dist/cache/store.js +8 -2
- package/dist/read-days.js +127 -0
- package/dist/sync.js +44 -5
- package/dist/tools/_confirm.js +17 -9
- package/dist/tools/expense-reimbursement.js +117 -0
- package/dist/tools/expenses.js +3 -0
- package/dist/tools/messages.js +79 -7
- package/dist/version.js +1 -1
- package/mint.yaml +12 -0
- package/package.json +1 -1
- package/server.json +15 -3
- package/skills/ofw/SKILL.md +23 -1
package/mint.yaml
CHANGED
|
@@ -84,6 +84,18 @@ env:
|
|
|
84
84
|
Default "false". Whether ofw_sync_messages fetches unread inbox bodies by
|
|
85
85
|
default (each fetch stamps a First Viewed time). Capped by
|
|
86
86
|
OFW_ALLOW_MARK_READ.
|
|
87
|
+
- name: OFW_READ_DAYS
|
|
88
|
+
required: false
|
|
89
|
+
help: >-
|
|
90
|
+
Allow list of days message content may be read, e.g. "mon,thu" (weekday
|
|
91
|
+
names, YYYY-MM-DD, or YYYY-MM-DD..YYYY-MM-DD, in DISPLAY_TZ). On other
|
|
92
|
+
days senders, dates and subjects stay visible, but bodies and attachments
|
|
93
|
+
are withheld and nothing is marked read. Unset = every day.
|
|
94
|
+
- name: OFW_NO_READ_DAYS
|
|
95
|
+
required: false
|
|
96
|
+
help: >-
|
|
97
|
+
Deny list of days message content may NOT be read (same format as
|
|
98
|
+
OFW_READ_DAYS; wins over it). Unset = none.
|
|
87
99
|
- name: OFW_INLINE_ATTACHMENTS
|
|
88
100
|
required: false
|
|
89
101
|
help: >-
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/ofw-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.22.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "ofw-mcp",
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.22.0",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
|
@@ -53,6 +53,18 @@
|
|
|
53
53
|
"isRequired": false,
|
|
54
54
|
"format": "string"
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"name": "OFW_READ_DAYS",
|
|
58
|
+
"description": "Allow list of days message content may be read, e.g. \"mon,thu\" (weekdays, YYYY-MM-DD, or YYYY-MM-DD..YYYY-MM-DD, in DISPLAY_TZ). Other days: subjects only, nothing marked read. Unset = every day.",
|
|
59
|
+
"isRequired": false,
|
|
60
|
+
"format": "string"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "OFW_NO_READ_DAYS",
|
|
64
|
+
"description": "Deny list of days message content may NOT be read (same format as OFW_READ_DAYS; wins over it). Unset = none.",
|
|
65
|
+
"isRequired": false,
|
|
66
|
+
"format": "string"
|
|
67
|
+
},
|
|
56
68
|
{
|
|
57
69
|
"name": "OFW_SESSION_CACHE",
|
|
58
70
|
"description": "Set to false to disable the on-disk session cache and re-authenticate on every process start. Defaults to enabled.",
|
|
@@ -73,7 +85,7 @@
|
|
|
73
85
|
},
|
|
74
86
|
{
|
|
75
87
|
"name": "OFW_EXPENSE_UPLOAD_ONLY",
|
|
76
|
-
"description": "Set true for strict reimbursement upload mode: only healthcheck, ofw_upload_expense_pdf, ofw_create_expense, and ofw_update_expense register. Implies OFW_EXPENSE_ONLY.",
|
|
88
|
+
"description": "Set true for strict reimbursement upload mode: only healthcheck, ofw_upload_expense_pdf, ofw_create_expense, and ofw_update_expense register. Excludes ofw_mark_expense_reimbursed. Implies OFW_EXPENSE_ONLY.",
|
|
77
89
|
"isRequired": false,
|
|
78
90
|
"format": "string"
|
|
79
91
|
},
|
package/skills/ofw/SKILL.md
CHANGED
|
@@ -93,7 +93,7 @@ Always pass `--config ~/.mcporter/mcporter.json` unless a local `config/mcporter
|
|
|
93
93
|
| `ofw_sync_messages(folders?, deep?, fetchUnreadBodies?)` | Sync OFW → local cache. **Call first if the cache might be stale.** Returns unread inbox hints (bodies not fetched, to avoid mark-as-read). |
|
|
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
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. |
|
|
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. |
|
|
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. 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. |
|
|
97
97
|
| `ofw_send_message(draftId?, subject?, body?, recipientIds?, replyToId?, expectedRevision?, deleteDraftOnSuccess?, myFileIDs?, 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`. |
|
|
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". |
|
|
99
99
|
| `ofw_list_drafts(page?, size?, verify?, autoRefresh?, view?)` | Leads with `complete`/`hasMore`/`nextPage`; `drafts` comes last. List saved drafts, **auto-verified**: when the cache is not verified-fresh a cheap drafts sync runs first (default `verify:true`), so one call answers server-confirmed. `verify:false` serves straight from cache. Each draft carries `serverConfirmed`, `revision` and `draftKey`. Returns `complete` — **check it before saying "you have N drafts"**. See [Freshness](#freshness). |
|
|
@@ -124,8 +124,30 @@ When `OFW_EXPENSE_ONLY=true`, only the healthcheck and expense tools exist. When
|
|
|
124
124
|
| `ofw_list_expense_categories` | Category ids and split metadata (use the id in create/update) |
|
|
125
125
|
| `ofw_upload_expense_pdf(path \| url, fileName?, label?, description?)` | Upload one receipt PDF to My Files (SHARED, co-parent-visible even on a private expense) for later attachment; confirm-gated; mode `all` only |
|
|
126
126
|
| `ofw_create_expense(title, amount, purchaseDate, categoryId, payerId, children, description?, privateExpense?, receiptFileId?)` | Log a new expense; confirm-gated; optionally private with one receipt |
|
|
127
|
+
| `ofw_mark_expense_reimbursed(expenseId, expectedRemainingAmount, confirmToken?)` | Confirm-gated, irreversible FULL remaining external reimbursement only; no money transfer or partial amount. Mode `all`, never upload-only. |
|
|
127
128
|
| `ofw_update_expense(expenseId, …only the fields to change…)` | Reads the expense and keeps every field you omit; `privateExpense:false` publishes a private expense; `receiptFileId` replaces all receipts, `null` clears it or `description`; refuses as `EXPENSE_FIELDS_UNREADABLE` (naming the fields) rather than erase one it can't read; confirm-gated |
|
|
128
129
|
|
|
130
|
+
### Recording reimbursement (not sending money)
|
|
131
|
+
|
|
132
|
+
Use `ofw_mark_expense_reimbursed` only after the user explicitly says the FULL
|
|
133
|
+
remaining balance was reimbursed outside OFW. Require `expectedRemainingAmount`
|
|
134
|
+
in currency units and exact cents, matching `amount.leftToPay`, not `amount.total`
|
|
135
|
+
or a guessed half. Show the tool's complete preview and irreversible warning,
|
|
136
|
+
confirm the author/payer ids refer to the intended parents, and wait for explicit
|
|
137
|
+
approval before returning the single-use `confirmToken` with identical args.
|
|
138
|
+
This is a status-only record: it never pays anyone or accesses payment/bank
|
|
139
|
+
endpoints and supports no partial reimbursement. It is absent in upload-only
|
|
140
|
+
mode and in write modes `none`/`drafts`.
|
|
141
|
+
|
|
142
|
+
The tool refuses pending/unknown statuses or unreadable financial details, binds
|
|
143
|
+
the full current detail to confirmation, re-GETs immediately before writing, and
|
|
144
|
+
verifies paid/zero/external-marker plus unchanged expense fields afterward. An
|
|
145
|
+
already paid zero balance is a no-op, not a new reimbursement. On
|
|
146
|
+
`EXPENSE_REIMBURSEMENT_UNCONFIRMED` (`mayHaveLanded=true`), inspect the expense in
|
|
147
|
+
the OFW web app; never automatically replay or roll back. Pre-write checks are
|
|
148
|
+
best-effort, not atomic against concurrent edits. See README's external
|
|
149
|
+
reimbursement section for the exact endpoint and verification contract.
|
|
150
|
+
|
|
129
151
|
### Journal
|
|
130
152
|
| Tool | Notes |
|
|
131
153
|
|------|-------|
|