@clipform/mcp-server 5.7.1 → 5.8.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/dist/api-client.d.ts +34 -1
- package/dist/api-client.js +8 -1
- package/dist/{chunk-7UIXBPTS.js → chunk-5AODH5TC.js} +3 -3
- package/dist/{chunk-D65NJDP5.js → chunk-7PJHCRSD.js} +58 -1
- package/dist/chunk-7PJHCRSD.js.map +1 -0
- package/dist/{chunk-7F36T6AQ.js → chunk-EQPYULVM.js} +79 -59
- package/dist/{chunk-7F36T6AQ.js.map → chunk-EQPYULVM.js.map} +1 -1
- package/dist/{chunk-7M2APEB6.js → chunk-HHRUYPFP.js} +2 -2
- package/dist/chunk-XO7XBMRY.js +15 -0
- package/dist/chunk-XO7XBMRY.js.map +1 -0
- package/dist/{chunk-S4S6H7GF.js → chunk-YFOTTAGR.js} +3 -3
- package/dist/{chunk-S4S6H7GF.js.map → chunk-YFOTTAGR.js.map} +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/instrument.js +9 -0
- package/dist/instrument.js.map +1 -1
- package/dist/prompts.js +4 -3
- package/dist/resources.js +4 -3
- package/dist/server.js +6 -5
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/chunk-D65NJDP5.js.map +0 -1
- /package/dist/{chunk-7UIXBPTS.js.map → chunk-5AODH5TC.js.map} +0 -0
- /package/dist/{chunk-7M2APEB6.js.map → chunk-HHRUYPFP.js.map} +0 -0
package/dist/api-client.d.ts
CHANGED
|
@@ -27,6 +27,39 @@ declare function errorResult(message: string, meta?: Record<string, unknown>): {
|
|
|
27
27
|
}[];
|
|
28
28
|
isError: boolean;
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* An error the caller can fix (missing/conflicting args, a broken rule),
|
|
32
|
+
* labelled for telemetry (#5917, see error-kind.ts). It stays `isError: true`:
|
|
33
|
+
* the MCP spec makes input-validation and business-logic errors tool execution
|
|
34
|
+
* errors so the model can see the call failed and self-correct.
|
|
35
|
+
*/
|
|
36
|
+
declare function refusedResult(message: string, meta?: Record<string, unknown>): {
|
|
37
|
+
_meta?: Record<string, unknown> | undefined;
|
|
38
|
+
content: {
|
|
39
|
+
type: "text";
|
|
40
|
+
text: string;
|
|
41
|
+
}[];
|
|
42
|
+
isError: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* True when an API failure refused the caller's request rather than broke:
|
|
46
|
+
* any 4xx except auth faults (401, a FORBIDDEN 403), a timeout (408) or rate
|
|
47
|
+
* limiting (429). A PLAN_LIMIT 403, 404, 409 or 422 is a refusal.
|
|
48
|
+
*/
|
|
49
|
+
declare function isRefusedStatus(status: number, code?: string): boolean;
|
|
50
|
+
/** Error result for a callApi failure, labelled refused when the API refused the request. */
|
|
51
|
+
declare function apiErrorResult(failure: {
|
|
52
|
+
status: number;
|
|
53
|
+
code?: string;
|
|
54
|
+
error: string;
|
|
55
|
+
}, message?: string, meta?: Record<string, unknown>): {
|
|
56
|
+
_meta?: Record<string, unknown> | undefined;
|
|
57
|
+
content: {
|
|
58
|
+
type: "text";
|
|
59
|
+
text: string;
|
|
60
|
+
}[];
|
|
61
|
+
isError: boolean;
|
|
62
|
+
};
|
|
30
63
|
/**
|
|
31
64
|
* True exactly when a callApi failure is the `assertNotAnonymous` account
|
|
32
65
|
* gate (apps/api/src/lib/anonymous-guard.ts) - triple-keyed on status + code
|
|
@@ -63,4 +96,4 @@ declare function structuredResult(text: string, structuredContent: Record<string
|
|
|
63
96
|
structuredContent: Record<string, unknown>;
|
|
64
97
|
};
|
|
65
98
|
|
|
66
|
-
export { authChallengeMeta, callApi, errorResult, isAnonymousAccountRequired, recoveryHint, structuredResult, textResult };
|
|
99
|
+
export { apiErrorResult, authChallengeMeta, callApi, errorResult, isAnonymousAccountRequired, isRefusedStatus, recoveryHint, refusedResult, structuredResult, textResult };
|
package/dist/api-client.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
+
apiErrorResult,
|
|
2
3
|
authChallengeMeta,
|
|
3
4
|
callApi,
|
|
4
5
|
errorResult,
|
|
5
6
|
isAnonymousAccountRequired,
|
|
7
|
+
isRefusedStatus,
|
|
6
8
|
recoveryHint,
|
|
9
|
+
refusedResult,
|
|
7
10
|
structuredResult,
|
|
8
11
|
textResult
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7PJHCRSD.js";
|
|
10
13
|
import "./chunk-ENVV65JX.js";
|
|
11
14
|
import "./chunk-PBQ5BQWD.js";
|
|
15
|
+
import "./chunk-XO7XBMRY.js";
|
|
12
16
|
import "./chunk-PZ5AY32C.js";
|
|
13
17
|
export {
|
|
18
|
+
apiErrorResult,
|
|
14
19
|
authChallengeMeta,
|
|
15
20
|
callApi,
|
|
16
21
|
errorResult,
|
|
17
22
|
isAnonymousAccountRequired,
|
|
23
|
+
isRefusedStatus,
|
|
18
24
|
recoveryHint,
|
|
25
|
+
refusedResult,
|
|
19
26
|
structuredResult,
|
|
20
27
|
textResult
|
|
21
28
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FULL_CAPS,
|
|
3
3
|
getSessionContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HHRUYPFP.js";
|
|
5
5
|
import {
|
|
6
6
|
ALL_VARIANTS,
|
|
7
7
|
FORM_TYPES,
|
|
8
8
|
FORM_TYPE_KEYS,
|
|
9
9
|
callApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7PJHCRSD.js";
|
|
11
11
|
import {
|
|
12
12
|
getMcpAuth
|
|
13
13
|
} from "./chunk-ENVV65JX.js";
|
|
@@ -146,4 +146,4 @@ export {
|
|
|
146
146
|
getGuideUri,
|
|
147
147
|
registerResources
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
149
|
+
//# sourceMappingURL=chunk-5AODH5TC.js.map
|
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
isServerFault,
|
|
12
12
|
reportError
|
|
13
13
|
} from "./chunk-PBQ5BQWD.js";
|
|
14
|
+
import {
|
|
15
|
+
ERROR_KIND_META_KEY
|
|
16
|
+
} from "./chunk-XO7XBMRY.js";
|
|
14
17
|
|
|
15
18
|
// ../config/features.js
|
|
16
19
|
var FEATURES = {
|
|
@@ -1064,6 +1067,7 @@ var GOOGLE_MEET_BOOKING_DEFAULTS = Object.freeze({
|
|
|
1064
1067
|
sat: [],
|
|
1065
1068
|
sun: []
|
|
1066
1069
|
}),
|
|
1070
|
+
buffer_minutes: 0,
|
|
1067
1071
|
min_notice_minutes: 240,
|
|
1068
1072
|
days_ahead: 14
|
|
1069
1073
|
});
|
|
@@ -1554,6 +1558,8 @@ var NODE_TYPES = {
|
|
|
1554
1558
|
calendar_name: { type: "string", label: "Calendar name", description: "Display name for the selected calendar" },
|
|
1555
1559
|
duration: { type: "number", label: "Duration (minutes)", default: 30, minimum: 15, maximum: 240, description: "Meeting duration in minutes" },
|
|
1556
1560
|
event_title: { type: "string", label: "Event title", maxLength: 80, description: "Calendar event title; the form title when unset" },
|
|
1561
|
+
// Kept free on both sides of every busy event in the calendar, not just bookings (#5856).
|
|
1562
|
+
buffer_minutes: { type: "number", label: "Gap between meetings (minutes)", default: 0, minimum: 0, maximum: 60, description: "Minutes kept free before and after every busy event in the calendar" },
|
|
1557
1563
|
// Notice (4h), window (14 days) and timezone (the owner's calendar) are fixed:
|
|
1558
1564
|
// GOOGLE_MEET_BOOKING_DEFAULTS, scope change on #5309 (2026-10-29).
|
|
1559
1565
|
availability: {
|
|
@@ -3478,7 +3484,10 @@ var MEDIA_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
|
|
|
3478
3484
|
var DRAW_DIAGRAM_SPEC = `PNG with simple dark outlines on a light or transparent background (no shading or text), portrait, at least 1000px wide. Up to ${Math.round(MEDIA_IMAGE_MAX_BYTES / (1024 * 1024))}MB.`;
|
|
3479
3485
|
var MEDIA_DOCUMENT_MAX_BYTES = 20 * 1024 * 1024;
|
|
3480
3486
|
var SUPABASE_STORAGE_MAX_BYTES = 200 * 1024 * 1024;
|
|
3487
|
+
var VIDEO_COMPRESS_BITRATE = 35e5;
|
|
3481
3488
|
var VIDEO_COMPRESS_FLOOR_BYTES = 1 * 1024 * 1024;
|
|
3489
|
+
var MEDIA_VIDEO_MAX_BYTES = 200 * 1024 * 1024;
|
|
3490
|
+
var VIDEO_COMPRESS_SKIP_BITRATE = VIDEO_COMPRESS_BITRATE * 1.5;
|
|
3482
3491
|
var HELP_LINKS = buildHelpLinks(BUSINESS.urls.docs);
|
|
3483
3492
|
var PLAN_LIMITS = {
|
|
3484
3493
|
free_v1: {
|
|
@@ -3734,6 +3743,37 @@ function contactFieldNotes(result) {
|
|
|
3734
3743
|
if (result.madeCustom.length) notes.push(madeCustomContactNote(result.madeCustom));
|
|
3735
3744
|
return notes;
|
|
3736
3745
|
}
|
|
3746
|
+
function normalizeConsentType(type) {
|
|
3747
|
+
if (type === void 0 || type === null) return type;
|
|
3748
|
+
const v = typeof type === "string" ? type.trim().toLowerCase() : type;
|
|
3749
|
+
if (CONSENT_TYPES.includes(v)) return v;
|
|
3750
|
+
if (["optional", "opt-in", "optin", "opt in"].includes(v)) return "opt_in";
|
|
3751
|
+
return "consent";
|
|
3752
|
+
}
|
|
3753
|
+
function normalizeConsentItems(items) {
|
|
3754
|
+
if (!Array.isArray(items)) return { items, coerced: [] };
|
|
3755
|
+
const coerced = [];
|
|
3756
|
+
const out = items.map((item) => {
|
|
3757
|
+
if (!item || typeof item !== "object") return item;
|
|
3758
|
+
const to = normalizeConsentType(item.type);
|
|
3759
|
+
if (to === item.type) return { ...item };
|
|
3760
|
+
coerced.push({ id: item.id, from: item.type, to });
|
|
3761
|
+
return { ...item, type: to };
|
|
3762
|
+
});
|
|
3763
|
+
return { items: out, coerced };
|
|
3764
|
+
}
|
|
3765
|
+
function consentItemNotes(result) {
|
|
3766
|
+
if (!result.coerced.length) return [];
|
|
3767
|
+
const clip = (v) => {
|
|
3768
|
+
const t = typeof v === "string" ? v : v === void 0 || v === null ? "(none)" : JSON.stringify(v) ?? String(v);
|
|
3769
|
+
return t.length > NOTE_MAX_ID_LENGTH ? t.slice(0, NOTE_MAX_ID_LENGTH) + "..." : t;
|
|
3770
|
+
};
|
|
3771
|
+
const shown = result.coerced.slice(0, NOTE_MAX_IDS).map((c) => `"${clip(typeof c.id === "string" ? c.id : "(no id)")}" ("${clip(c.from)}" -> "${clip(c.to)}")`);
|
|
3772
|
+
const more = result.coerced.length - NOTE_MAX_IDS;
|
|
3773
|
+
return [
|
|
3774
|
+
`Consent item(s) ${shown.join(", ")}${more > 0 ? ` and ${more} more` : ""} had a type that is not a consent type, so they were saved as shown. Use "consent" for a required agreement or "opt_in" for an optional one.`
|
|
3775
|
+
];
|
|
3776
|
+
}
|
|
3737
3777
|
var COMPOSITION_REGISTRY = [
|
|
3738
3778
|
// Beds (full-bleed backgrounds)
|
|
3739
3779
|
{ id: "Slideshow", tier: "public", kind: "bed", scene_layer: true },
|
|
@@ -4050,6 +4090,17 @@ function errorResult(message, meta) {
|
|
|
4050
4090
|
...meta ? { _meta: meta } : {}
|
|
4051
4091
|
};
|
|
4052
4092
|
}
|
|
4093
|
+
function refusedResult(message, meta) {
|
|
4094
|
+
return errorResult(message, { ...meta, [ERROR_KIND_META_KEY]: "refused" });
|
|
4095
|
+
}
|
|
4096
|
+
function isRefusedStatus(status, code) {
|
|
4097
|
+
if (status < 400 || status >= 500) return false;
|
|
4098
|
+
if (status === 408 || status === 429) return false;
|
|
4099
|
+
return !isAuthFault(status, code);
|
|
4100
|
+
}
|
|
4101
|
+
function apiErrorResult(failure, message = failure.error, meta) {
|
|
4102
|
+
return isRefusedStatus(failure.status, failure.code) ? refusedResult(message, meta) : errorResult(message, meta);
|
|
4103
|
+
}
|
|
4053
4104
|
var PROTECTED_RESOURCE_METADATA_URL = `${BUSINESS.urls.mcp}/.well-known/oauth-protected-resource`;
|
|
4054
4105
|
function escapeChallengeValue(value) {
|
|
4055
4106
|
return value.replace(/[\r\n]/g, "").replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
@@ -4085,6 +4136,7 @@ export {
|
|
|
4085
4136
|
isOptionEdge,
|
|
4086
4137
|
isNodeLevelAction,
|
|
4087
4138
|
isInactiveOptionEdge,
|
|
4139
|
+
CONSENT_TYPES,
|
|
4088
4140
|
CHOICE_MAX_OPTIONS,
|
|
4089
4141
|
NODE_TYPES,
|
|
4090
4142
|
gatedEnumValues,
|
|
@@ -4115,6 +4167,8 @@ export {
|
|
|
4115
4167
|
CONTACT_FIELDS,
|
|
4116
4168
|
normalizeContactFields,
|
|
4117
4169
|
contactFieldNotes,
|
|
4170
|
+
normalizeConsentItems,
|
|
4171
|
+
consentItemNotes,
|
|
4118
4172
|
exposedCompositionIds,
|
|
4119
4173
|
MCP_TOOL_TIERS,
|
|
4120
4174
|
MCP_TOOL_TOOLSETS,
|
|
@@ -4125,9 +4179,12 @@ export {
|
|
|
4125
4179
|
callApi,
|
|
4126
4180
|
recoveryHint,
|
|
4127
4181
|
errorResult,
|
|
4182
|
+
refusedResult,
|
|
4183
|
+
isRefusedStatus,
|
|
4184
|
+
apiErrorResult,
|
|
4128
4185
|
isAnonymousAccountRequired,
|
|
4129
4186
|
authChallengeMeta,
|
|
4130
4187
|
textResult,
|
|
4131
4188
|
structuredResult
|
|
4132
4189
|
};
|
|
4133
|
-
//# sourceMappingURL=chunk-
|
|
4190
|
+
//# sourceMappingURL=chunk-7PJHCRSD.js.map
|