@clipform/mcp-server 3.3.0 → 3.3.2
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/dist/{chunk-22BV4NSB.js → chunk-5J5N7KTW.js} +2 -2
- package/dist/{chunk-SEZ37YSH.js → chunk-65MTGAFF.js} +10 -6
- package/dist/{chunk-SEZ37YSH.js.map → chunk-65MTGAFF.js.map} +1 -1
- package/dist/{chunk-4XCXDH3I.js → chunk-7I765YTD.js} +21 -10
- package/dist/{chunk-4XCXDH3I.js.map → chunk-7I765YTD.js.map} +1 -1
- package/dist/{chunk-ELK26KWM.js → chunk-KHRY3A3M.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/prompts.js +2 -2
- package/dist/resources.js +2 -2
- package/dist/server.js +4 -4
- package/package.json +1 -1
- /package/dist/{chunk-22BV4NSB.js.map → chunk-5J5N7KTW.js.map} +0 -0
- /package/dist/{chunk-ELK26KWM.js.map → chunk-KHRY3A3M.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
WORKFLOW_TYPES,
|
|
4
4
|
getDiscoveryParams,
|
|
5
5
|
getSessionContextWithAuth
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-65MTGAFF.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./chunk-G3PMV62Z.js";
|
|
@@ -4856,4 +4856,4 @@ export {
|
|
|
4856
4856
|
getWorkflowText,
|
|
4857
4857
|
registerPrompts
|
|
4858
4858
|
};
|
|
4859
|
-
//# sourceMappingURL=chunk-
|
|
4859
|
+
//# sourceMappingURL=chunk-5J5N7KTW.js.map
|
|
@@ -3163,8 +3163,10 @@ async function callApi(path, options = {}) {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
const data = await response.json();
|
|
3165
3165
|
if (!response.ok) {
|
|
3166
|
-
const hint = recoveryHint(response.status, path);
|
|
3167
3166
|
const apiMsg = data.error || `API error (${response.status})`;
|
|
3167
|
+
const details = data.details;
|
|
3168
|
+
const reason = details && typeof details.reason === "string" ? details.reason : void 0;
|
|
3169
|
+
const hint = recoveryHint(response.status, path, reason);
|
|
3168
3170
|
const errorMsg = hint ? `${apiMsg} - ${hint}` : apiMsg;
|
|
3169
3171
|
const errorCode = typeof data.code === "string" ? data.code : void 0;
|
|
3170
3172
|
if (isServerFault(response.status) || isAuthFault(response.status, errorCode)) {
|
|
@@ -3176,20 +3178,22 @@ async function callApi(path, options = {}) {
|
|
|
3176
3178
|
api_path: `${prefix}${path}`
|
|
3177
3179
|
});
|
|
3178
3180
|
}
|
|
3179
|
-
const details = data.details;
|
|
3180
|
-
const reason = details && typeof details.reason === "string" ? details.reason : void 0;
|
|
3181
3181
|
return {
|
|
3182
3182
|
ok: false,
|
|
3183
3183
|
status: response.status,
|
|
3184
3184
|
error: errorMsg,
|
|
3185
|
+
apiMessage: apiMsg,
|
|
3185
3186
|
code: errorCode,
|
|
3186
3187
|
reason
|
|
3187
3188
|
};
|
|
3188
3189
|
}
|
|
3189
3190
|
return { ok: true, data };
|
|
3190
3191
|
}
|
|
3191
|
-
function recoveryHint(status, path) {
|
|
3192
|
+
function recoveryHint(status, path, reason) {
|
|
3192
3193
|
if (status === 401 || status === 403) {
|
|
3194
|
+
if (reason === "anonymous_not_allowed" || getMcpAuth()?.is_anonymous) {
|
|
3195
|
+
return "This session is anonymous - open the claim URL from clipform_create_form (or sign up) to claim your workspace, then retry.";
|
|
3196
|
+
}
|
|
3193
3197
|
return "Check credentials: the key comes from CLIPFORM_API_KEY or the OAuth session - read clipform://context/session for the active workspace and auth mode.";
|
|
3194
3198
|
}
|
|
3195
3199
|
if (status === 404) {
|
|
@@ -3246,7 +3250,7 @@ async function getSessionContextWithAuth() {
|
|
|
3246
3250
|
}
|
|
3247
3251
|
if (!result.ok) return { text: "", authMode: "anonymous" };
|
|
3248
3252
|
const me = result.data;
|
|
3249
|
-
const apiAuthMode = me.auth_mode ?? "anonymous";
|
|
3253
|
+
const apiAuthMode = getMcpAuth()?.is_anonymous ? "anonymous" : me.auth_mode ?? "anonymous";
|
|
3250
3254
|
const authMode = apiAuthMode === "anonymous" ? "anonymous" : "authenticated";
|
|
3251
3255
|
const plan = me.plan;
|
|
3252
3256
|
const lines = [];
|
|
@@ -3318,4 +3322,4 @@ export {
|
|
|
3318
3322
|
getSessionContextWithAuth,
|
|
3319
3323
|
getSessionContext
|
|
3320
3324
|
};
|
|
3321
|
-
//# sourceMappingURL=chunk-
|
|
3325
|
+
//# sourceMappingURL=chunk-65MTGAFF.js.map
|