ofw-mcp 2.13.0 → 2.15.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/dist/auth.js +34 -4
- package/dist/bundle.js +800 -148
- package/dist/index.js +3 -1
- package/dist/tools/_shared.js +16 -6
- package/dist/tools/healthcheck.js +81 -0
- package/dist/tools/messages.js +38 -6
- package/dist/tools/project.js +196 -0
- package/package.json +2 -2
- package/server.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "OurFamilyWizard tools for Claude Code",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.15.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.
|
|
17
|
+
"version": "2.15.0",
|
|
18
18
|
"author": {
|
|
19
19
|
"name": "Chris Chall"
|
|
20
20
|
},
|
package/dist/auth.js
CHANGED
|
@@ -69,6 +69,38 @@ function fetchproxyDisabled() {
|
|
|
69
69
|
* return value as opaque credentials — they should not branch on `source`.
|
|
70
70
|
* The field exists for logging / future cache-keying only.
|
|
71
71
|
*/
|
|
72
|
+
/**
|
|
73
|
+
* The message raised when NEITHER auth path is configured.
|
|
74
|
+
*
|
|
75
|
+
* Exported with {@link isNoAuthConfigured} because a second reader needs to
|
|
76
|
+
* tell this case apart from every other auth failure: "nothing is set up" and
|
|
77
|
+
* "the password was rejected" or "the bridge is down" need opposite advice, and
|
|
78
|
+
* `ofw_healthcheck` gives the wrong one if it confuses them. A prefix match on
|
|
79
|
+
* a copy of this string in the other module would pass its own test while
|
|
80
|
+
* silently stopping matching the day this wording changed.
|
|
81
|
+
*/
|
|
82
|
+
export const NO_AUTH_CONFIGURED = 'OFW auth: set OFW_USERNAME + OFW_PASSWORD, ' +
|
|
83
|
+
'or install the fetchproxy extension and sign into ourfamilywizard.com ' +
|
|
84
|
+
'(unset OFW_DISABLE_FETCHPROXY if it is set).';
|
|
85
|
+
/**
|
|
86
|
+
* Prefix of the message raised when the fetchproxy bridge is unreachable.
|
|
87
|
+
*
|
|
88
|
+
* A PREFIX rather than a whole constant because the upstream `.hint` — the
|
|
89
|
+
* actionable "click the toolbar icon" copy — is appended per failure. Exported
|
|
90
|
+
* with {@link isBridgeDown} for the reason {@link NO_AUTH_CONFIGURED} is: a
|
|
91
|
+
* reader that matched a copy of this text would keep its own test green on the
|
|
92
|
+
* day the wording changed, while silently misreporting a downed bridge as an
|
|
93
|
+
* unconfigured server.
|
|
94
|
+
*/
|
|
95
|
+
export const BRIDGE_DOWN_PREFIX = 'OFW auth: fetchproxy bridge is down';
|
|
96
|
+
/** True for the {@link BRIDGE_DOWN_PREFIX} failure and nothing else. */
|
|
97
|
+
export function isBridgeDown(e) {
|
|
98
|
+
return e instanceof Error && e.message.startsWith(BRIDGE_DOWN_PREFIX);
|
|
99
|
+
}
|
|
100
|
+
/** True for the {@link NO_AUTH_CONFIGURED} failure and nothing else. */
|
|
101
|
+
export function isNoAuthConfigured(e) {
|
|
102
|
+
return e instanceof Error && e.message === NO_AUTH_CONFIGURED;
|
|
103
|
+
}
|
|
72
104
|
export async function resolveAuth() {
|
|
73
105
|
// Which paths are CONFIGURED. `resolveAuthPattern` runs the first one
|
|
74
106
|
// provided, in the fleet's fixed priority order (token → oauth →
|
|
@@ -125,7 +157,7 @@ export async function resolveAuth() {
|
|
|
125
157
|
// FetchproxyBridgeDownError only escapes bootstrap() after the lazy-revive retry fails — surface .hint verbatim (actionable "click toolbar icon" copy).
|
|
126
158
|
if (classifyBridgeError(e) === 'bridge_down') {
|
|
127
159
|
const downErr = e;
|
|
128
|
-
throw new Error(
|
|
160
|
+
throw new Error(`${BRIDGE_DOWN_PREFIX} (extension service worker unreachable after retry). ${downErr.hint}`);
|
|
129
161
|
}
|
|
130
162
|
const msg = e instanceof Error ? e.message : String(e);
|
|
131
163
|
throw new Error(`OFW auth: no OFW_USERNAME/OFW_PASSWORD set, and fetchproxy fallback failed: ${msg}`);
|
|
@@ -137,9 +169,7 @@ export async function resolveAuth() {
|
|
|
137
169
|
// because this one names OFW's own two fixes side-by-side and the generic
|
|
138
170
|
// one cannot.
|
|
139
171
|
if (!pattern.sessionScrape && !pattern.fetchproxy) {
|
|
140
|
-
throw new Error(
|
|
141
|
-
'or install the fetchproxy extension and sign into ourfamilywizard.com ' +
|
|
142
|
-
'(unset OFW_DISABLE_FETCHPROXY if it is set).');
|
|
172
|
+
throw new Error(NO_AUTH_CONFIGURED);
|
|
143
173
|
}
|
|
144
174
|
// Errors from the winning path propagate UNWRAPPED, which is what keeps the
|
|
145
175
|
// bridge-down `.hint` above intact.
|