ofw-mcp 2.4.3 → 2.5.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.4.3"
9
+ "version": "2.5.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.4.3",
17
+ "version": "2.5.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.4.3",
4
+ "version": "2.5.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
@@ -144,9 +144,9 @@ Read-only tools run automatically. Write tools ask for your confirmation first.
144
144
  | `ofw_delete_draft` | Delete a draft | Confirm | `drafts` |
145
145
  | `ofw_upload_attachment` | Upload a local file to My Files; returns a fileId to attach via `ofw_send_message`/`ofw_save_draft` | Auto | `drafts` |
146
146
  | `ofw_list_events` | Calendar events in a date range | Auto | any |
147
- | `ofw_create_event` | Create a calendar event | Confirm | `all` |
148
- | `ofw_update_event` | Update a calendar event | Confirm | `all` |
149
- | `ofw_delete_event` | Delete a calendar event | Confirm | `all` |
147
+ | `ofw_create_event` | Create a calendar event | Confirm | `all` (or `drafts` + `OFW_CALENDAR_WRITES`) |
148
+ | `ofw_update_event` | Update a calendar event | Confirm | `all` (or `drafts` + `OFW_CALENDAR_WRITES`) |
149
+ | `ofw_delete_event` | Delete a calendar event | Confirm | `all` (or `drafts` + `OFW_CALENDAR_WRITES`) |
150
150
  | `ofw_get_expense_totals` | Expense summary totals | Auto | any |
151
151
  | `ofw_list_expenses` | Expense history | Auto | any |
152
152
  | `ofw_create_expense` | Log a new expense | Confirm | `all` |
@@ -165,6 +165,10 @@ The "Confirm" permission above is a *hint* to the MCP host — a host configured
165
165
 
166
166
  Unrecognized values fail closed to `none`, with a warning on stderr — a typo never silently grants write access.
167
167
 
168
+ #### Calendar opt-in (`OFW_CALENDAR_WRITES`)
169
+
170
+ Calendar events sit between the two message tiers: they have no draft stage (a created event is immediately visible on the shared record), but unlike a sent message they are reversible — an event can be edited or deleted afterward. If you run in `drafts` mode but are comfortable with direct calendar writes, set `OFW_CALENDAR_WRITES=true` to additionally register `ofw_create_event`, `ofw_update_event`, and `ofw_delete_event`. The flag is redundant in `all` mode and never overrides `none`.
171
+
168
172
  ## Troubleshooting
169
173
 
170
174
  **"0 messages"** — Claude may have read the notification counts rather than the actual messages. Ask explicitly: *"List the messages in my OFW inbox"* or *"Use ofw_list_message_folders then ofw_list_messages"*.
package/dist/auth.js CHANGED
@@ -45,22 +45,11 @@
45
45
  // - `./auth-password.js` (loginWithPassword) is a separate module
46
46
  // specifically so it can be mocked here too. This keeps the
47
47
  // selection logic independent of either implementation.
48
- import { readEnvVar } from '@chrischall/mcp-utils';
48
+ import { parseBoolEnv, readEnvVar } from '@chrischall/mcp-utils';
49
49
  import { bootstrap } from '@fetchproxy/bootstrap';
50
50
  import { classifyBridgeError } from '@chrischall/mcp-utils/fetchproxy';
51
51
  import { loginWithPassword } from './auth-password.js';
52
- import { parseBoolEnv } from './config.js';
53
52
  import pkg from '../package.json' with { type: 'json' };
54
- /**
55
- * Read an env var, trim, and treat blank / `${UNEXPANDED}` placeholders as
56
- * unset. Defends against MCP hosts that pass `.mcp.json` env blocks through
57
- * without variable expansion. Delegates to @chrischall/mcp-utils' `readEnvVar`,
58
- * which applies the identical sanitization (blank, `undefined`/`null`,
59
- * `${...}` placeholder → unset).
60
- */
61
- function readEnv(key) {
62
- return readEnvVar(key);
63
- }
64
53
  /** True if the user has explicitly disabled the fetchproxy fallback. */
65
54
  function fetchproxyDisabled() {
66
55
  return parseBoolEnv('OFW_DISABLE_FETCHPROXY');
@@ -75,8 +64,11 @@ function fetchproxyDisabled() {
75
64
  */
76
65
  export async function resolveAuth() {
77
66
  // ── Path 1: env-var credentials (unchanged from pre-fetchproxy behavior).
78
- const username = readEnv('OFW_USERNAME');
79
- const password = readEnv('OFW_PASSWORD');
67
+ // `readEnvVar` trims and treats blank / `"undefined"` / `"null"` /
68
+ // `${UNEXPANDED}` placeholders as unset — defends against MCP hosts that
69
+ // pass `.mcp.json` env blocks through without variable expansion.
70
+ const username = readEnvVar('OFW_USERNAME');
71
+ const password = readEnvVar('OFW_PASSWORD');
80
72
  if (username && password) {
81
73
  const { token, expiresAt } = await loginWithPassword(username, password);
82
74
  return { token, expiresAt, source: 'env' };