ofw-mcp 2.21.0 → 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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "OurFamilyWizard tools for Claude Code",
9
- "version": "2.21.0"
9
+ "version": "2.22.0"
10
10
  },
11
11
  "plugins": [
12
12
  {
@@ -14,7 +14,7 @@
14
14
  "displayName": "OurFamilyWizard",
15
15
  "source": "./",
16
16
  "description": "OurFamilyWizard co-parenting tools for Claude — messages, calendar, expenses, and journal via MCP",
17
- "version": "2.21.0",
17
+ "version": "2.22.0",
18
18
  "author": {
19
19
  "name": "Chris Chall"
20
20
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ofw",
3
3
  "displayName": "OurFamilyWizard",
4
- "version": "2.21.0",
4
+ "version": "2.22.0",
5
5
  "description": "OurFamilyWizard co-parenting tools for Claude — messages, calendar, expenses, and journal via MCP",
6
6
  "author": {
7
7
  "name": "Chris Chall"
package/README.md CHANGED
@@ -154,6 +154,7 @@ Read-only tools run automatically. Writes that reach your co-parent or the court
154
154
  | `ofw_list_expense_categories` | Expense category ids and split metadata | Auto | any |
155
155
  | `ofw_upload_expense_pdf` | Upload a receipt PDF to My Files for an expense (SHARED — the co-parent sees it in My Files at once, even on a private expense) | Confirm (server) | `all` |
156
156
  | `ofw_create_expense` | Log a new expense; supports private entries and one receipt PDF | Confirm (server) | `all` |
157
+ | `ofw_mark_expense_reimbursed` | Irreversibly record full remaining external reimbursement; no transfer or partial payment; unavailable in upload-only mode | Confirm (server) | `all` |
157
158
  | `ofw_update_expense` | Change an expense, e.g. publish a private one. Pass only the fields to change; it reads the expense first so the rest are kept | Confirm (server) | `all` |
158
159
  | `ofw_list_journal_entries` | Journal entries | Auto | any |
159
160
  | `ofw_create_journal_entry` | Create a journal entry | Confirm | `all` |
@@ -225,6 +226,53 @@ A false negative ("no, that was never sent") is more dangerous than a refusal, b
225
226
 
226
227
  Every list read also carries an explicit **`complete`** boolean describing the *result set* — "this is every matching item on OurFamilyWizard as of `asOf`" — with a `completeNote` naming what is missing when it is false. Check it before stating a count.
227
228
 
229
+ ### Recording an external expense reimbursement
230
+
231
+ `ofw_mark_expense_reimbursed` records money **already reimbursed outside OFW**. It
232
+ never transfers money, calls `/payments`, or initiates a bank action. OFW warns
233
+ that marking reimbursed **cannot be undone**. The tool is registered only in
234
+ `OFW_WRITE_MODE=all`, including expense-only mode, but **never** in
235
+ `OFW_EXPENSE_UPLOAD_ONLY=true`; that restricted roster is unchanged.
236
+
237
+ Pass an expense id and `expectedRemainingAmount` in currency units, positive and
238
+ exact to cents. For example, a synthetic expense totaling `96.99` with
239
+ `totalOwed=48.50` and `leftToPay=48.50` needs
240
+ `{ "expenseId": 81001, "expectedRemainingAmount": 48.50 }` — **not** `96.99` and
241
+ not a partial amount. The first call previews the title, author/payer user ids,
242
+ split/category, children, privacy, total, owed amount, remaining balance and
243
+ current status. Verify the parties and that the external reimbursement actually
244
+ happened, then explicitly approve the preview before returning its `confirmToken`
245
+ with the same arguments (or approve the supported client's confirmation prompt).
246
+
247
+ Only `OPEN`, `APPROVED`, or `PARTIAL` with `subStatus=NONE` and a positive balance
248
+ are supported. Missing/malformed detail, unknown or pending status, inconsistent
249
+ balances, id mismatch, or amount mismatch refuses without writing. A record
250
+ already `PAID` with zero remaining balance returns `ALREADY_PAID` without a write,
251
+ regardless of its payment method; this does not relabel an electronic payment.
252
+
253
+ Confirmation binds the **entire detail record**. A fresh detail GET immediately
254
+ before the write rejects any drift, including receipt or metadata edits. The
255
+ only mutation is `PUT /pub/v2/expense/expenses/{id}/status` with
256
+ `{ "status": "MARKED_REIMBURSED" }`. A subsequent detail GET must show `PAID`,
257
+ `subStatus=NONE`, zero remaining balance, `paymentType="Marked reimbursed"`, and
258
+ unchanged fields outside the expected status/balance transition before success
259
+ is reported. Known derived balance-display fields may change normally; numeric
260
+ purchase/owed totals and other protected fields must remain unchanged. The public
261
+ web application's status request contract and the resulting status transition
262
+ were manually accepted against the real provider with one user-authorized record.
263
+ Automated tests remain mock-only and contain synthetic records. Unexpected
264
+ backend changes outside the supported transition still fail conservatively
265
+ rather than claim verification.
266
+
267
+ These are best-effort preconditions, **not an atomic conditional update**: OFW
268
+ exposes no conditional status-write contract here, so a concurrent edit after the
269
+ last GET cannot be prevented. An ambiguous mutation failure (timeout/network/5xx)
270
+ or failed/mismatched readback returns `EXPENSE_REIMBURSEMENT_UNCONFIRMED` with
271
+ `mayHaveLanded=true`. **Do not automatically replay or roll back.** Inspect the
272
+ expense in the Expenses log on ourfamilywizard.com and reconcile its status
273
+ before any new attempt. Definitive OFW rejections remain errors. No live account
274
+ or private family/financial data is used in the automated tests.
275
+
228
276
  ### Server-side confirmation (`MCP_CONFIRM_MODE`)
229
277
 
230
278
  The writes marked **Confirm (server)** above — sending a message, logging an expense, creating/updating/deleting a *shared* calendar event, and uploading a file as `SHARED` — are confirmed by this server, not left to the host. A client that can show a confirmation prompt (Claude Code) gets one, with a preview of exactly what would happen, unless `MCP_CONFIRM_ELICITATION=off`. A client that cannot (claude.ai, Claude Desktop) gets two steps: the first call writes **nothing** and returns that preview plus a `confirmToken`, and only a repeat call with the same arguments and that token proceeds.