@clipform/mcp-server 5.10.0 → 5.11.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.js +1 -1
- package/dist/{chunk-RXCPM5QH.js → chunk-4RTWGIA7.js} +3 -3
- package/dist/{chunk-DADRGNH7.js → chunk-73UYEWQP.js} +274 -24
- package/dist/chunk-73UYEWQP.js.map +1 -0
- package/dist/{chunk-FRBVAMP6.js → chunk-7NLXUGGN.js} +146 -5
- package/dist/chunk-7NLXUGGN.js.map +1 -0
- package/dist/{chunk-ZGILTJBO.js → chunk-P27RWNSP.js} +2 -2
- package/dist/{chunk-TYQ4FUCC.js → chunk-V76FKPAT.js} +3 -3
- package/dist/index.js +5 -5
- package/dist/instrument.d.ts +8 -1
- package/dist/instrument.js +9 -1
- package/dist/instrument.js.map +1 -1
- package/dist/prompts.js +3 -3
- package/dist/resources.js +3 -3
- package/dist/server.d.ts +8 -0
- package/dist/server.js +5 -5
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/chunk-DADRGNH7.js.map +0 -1
- package/dist/chunk-FRBVAMP6.js.map +0 -1
- /package/dist/{chunk-RXCPM5QH.js.map → chunk-4RTWGIA7.js.map} +0 -0
- /package/dist/{chunk-ZGILTJBO.js.map → chunk-P27RWNSP.js.map} +0 -0
- /package/dist/{chunk-TYQ4FUCC.js.map → chunk-V76FKPAT.js.map} +0 -0
|
@@ -963,6 +963,7 @@ var HELP_TOPICS = {
|
|
|
963
963
|
liveAndDraft: { path: "/help/managing-forms", anchor: "live-and-draft" },
|
|
964
964
|
publishingChanges: { path: "/help/managing-forms", anchor: "publishing-changes" },
|
|
965
965
|
embedding: { path: "/help/embed", anchor: null },
|
|
966
|
+
embedTracking: { path: "/help/embed", anchor: "track-form-events" },
|
|
966
967
|
emailShare: { path: "/help/sharing", anchor: "share-by-email" },
|
|
967
968
|
publicResults: { path: "/help/public-results", anchor: null },
|
|
968
969
|
trash: { path: "/help/managing-forms", anchor: "trash" },
|
|
@@ -1034,7 +1035,123 @@ function isInactiveOptionEdge(node, action) {
|
|
|
1034
1035
|
// ../config/variables.js
|
|
1035
1036
|
var VARIABLE_KEY_MAX_LENGTH = 40;
|
|
1036
1037
|
var VARIABLE_KEY_PATTERN = new RegExp(`^[a-z][a-z0-9_]{0,${VARIABLE_KEY_MAX_LENGTH - 1}}$`);
|
|
1038
|
+
var VARIABLE_TYPES = ["number", "text"];
|
|
1039
|
+
var VARIABLE_TEXT_MAX_LENGTH = 500;
|
|
1040
|
+
var VARIABLE_LABEL_MAX_LENGTH = 200;
|
|
1041
|
+
var VARIABLE_MAX_CUSTOM_PER_FORM = 50;
|
|
1042
|
+
var DECIMAL_PATTERN = /^[+-]?(\d+(\.\d*)?|\.\d+)$/;
|
|
1043
|
+
var VARIABLE_NUMBER_MAX = 1e12;
|
|
1044
|
+
var RESERVED_VARIABLE_KEYS = [
|
|
1045
|
+
"node_id",
|
|
1046
|
+
"rsid",
|
|
1047
|
+
"rsid_ts",
|
|
1048
|
+
"qr",
|
|
1049
|
+
"pt",
|
|
1050
|
+
"imp",
|
|
1051
|
+
"display",
|
|
1052
|
+
"max_score",
|
|
1053
|
+
"fbclid",
|
|
1054
|
+
"gclid",
|
|
1055
|
+
"ttclid",
|
|
1056
|
+
// The viewer's own query params (a link variable must never shadow or strip them, #5650).
|
|
1057
|
+
"mode",
|
|
1058
|
+
"save",
|
|
1059
|
+
"debug",
|
|
1060
|
+
"play",
|
|
1061
|
+
"sdk",
|
|
1062
|
+
"source",
|
|
1063
|
+
"platform",
|
|
1064
|
+
"auto_height"
|
|
1065
|
+
];
|
|
1066
|
+
var RESERVED_VARIABLE_KEY_PREFIXES = ["utm_", "cf_"];
|
|
1067
|
+
function isReservedVariableKey(key) {
|
|
1068
|
+
if (typeof key !== "string") return false;
|
|
1069
|
+
return RESERVED_VARIABLE_KEYS.includes(key) || RESERVED_VARIABLE_KEY_PREFIXES.some((p) => key.startsWith(p));
|
|
1070
|
+
}
|
|
1071
|
+
function validateVariableKey(key) {
|
|
1072
|
+
if (typeof key !== "string" || key === "") return "Key is required";
|
|
1073
|
+
if (!VARIABLE_KEY_PATTERN.test(key)) {
|
|
1074
|
+
return `Key must start with a lowercase letter and use only lowercase letters, numbers and underscores (${VARIABLE_KEY_MAX_LENGTH} characters max)`;
|
|
1075
|
+
}
|
|
1076
|
+
if (isReservedVariableKey(key)) return `"${key}" is reserved`;
|
|
1077
|
+
return null;
|
|
1078
|
+
}
|
|
1079
|
+
function coerceVariableValue(type, raw) {
|
|
1080
|
+
if (type === "number") {
|
|
1081
|
+
let n;
|
|
1082
|
+
if (typeof raw === "number") n = raw;
|
|
1083
|
+
else if (typeof raw === "string" && DECIMAL_PATTERN.test(raw.trim())) n = Number(raw.trim());
|
|
1084
|
+
else return void 0;
|
|
1085
|
+
if (!Number.isFinite(n) || Math.abs(n) > VARIABLE_NUMBER_MAX) return void 0;
|
|
1086
|
+
return n;
|
|
1087
|
+
}
|
|
1088
|
+
if (type === "text") {
|
|
1089
|
+
let s;
|
|
1090
|
+
if (typeof raw === "string") s = raw;
|
|
1091
|
+
else if (typeof raw === "number" && Number.isFinite(raw)) s = String(raw);
|
|
1092
|
+
else return void 0;
|
|
1093
|
+
if (s === "" || s.length > VARIABLE_TEXT_MAX_LENGTH) return void 0;
|
|
1094
|
+
return s;
|
|
1095
|
+
}
|
|
1096
|
+
return void 0;
|
|
1097
|
+
}
|
|
1098
|
+
function asArray(value) {
|
|
1099
|
+
return Array.isArray(value) ? value : [];
|
|
1100
|
+
}
|
|
1037
1101
|
var CHOICE_POINTS_MAX = 999;
|
|
1102
|
+
function findScoreVariable(variables) {
|
|
1103
|
+
return asArray(variables).find((v) => v && v.kind === "custom" && v.type === "number" && v.key === "score");
|
|
1104
|
+
}
|
|
1105
|
+
var VARIABLE_MAX_LINK_PER_FORM = 25;
|
|
1106
|
+
function isPersonalLinkKey(key) {
|
|
1107
|
+
if (typeof key !== "string") return false;
|
|
1108
|
+
return key.toLowerCase().split("_").some((token) => token === "email" || token === "phone" || token === "name");
|
|
1109
|
+
}
|
|
1110
|
+
var LINK_VARIABLE_PRESETS = [
|
|
1111
|
+
{
|
|
1112
|
+
id: "manychat",
|
|
1113
|
+
tool: "ManyChat",
|
|
1114
|
+
key: "mc_id",
|
|
1115
|
+
type: "text",
|
|
1116
|
+
snippet: "?mc_id={{user_id}}",
|
|
1117
|
+
note: "Add this to the end of your form link in ManyChat."
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
id: "mailchimp",
|
|
1121
|
+
tool: "Mailchimp",
|
|
1122
|
+
key: "mailchimp_id",
|
|
1123
|
+
type: "text",
|
|
1124
|
+
snippet: "?mailchimp_id=*|UNIQID|*",
|
|
1125
|
+
note: "Add this to the end of your form link in your Mailchimp campaign."
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
id: "kit",
|
|
1129
|
+
tool: "Kit",
|
|
1130
|
+
key: "ck_subscriber_id",
|
|
1131
|
+
type: "text",
|
|
1132
|
+
snippet: null,
|
|
1133
|
+
note: 'In Kit, turn on "Add subscriber_id parameter in email links" in advanced tracking. Kit then adds ck_subscriber_id to every link in your broadcasts and sequences.'
|
|
1134
|
+
}
|
|
1135
|
+
];
|
|
1136
|
+
function linkVariablePreset(key) {
|
|
1137
|
+
return LINK_VARIABLE_PRESETS.find((p) => p.key === key);
|
|
1138
|
+
}
|
|
1139
|
+
function buildVariableLink(shareUrl, variables, valueFor) {
|
|
1140
|
+
const query = [];
|
|
1141
|
+
const hash = [];
|
|
1142
|
+
for (const v of asArray(variables)) {
|
|
1143
|
+
if (!v || v.kind !== "custom" || v.url_settable !== true) continue;
|
|
1144
|
+
if (typeof v.key !== "string" || isReservedVariableKey(v.key)) continue;
|
|
1145
|
+
const raw = valueFor ? valueFor(v) : void 0;
|
|
1146
|
+
const value = raw === void 0 || raw === null ? "" : String(raw);
|
|
1147
|
+
const pair = `${v.key}=${encodeURIComponent(value)}`;
|
|
1148
|
+
(isPersonalLinkKey(v.key) ? hash : query).push(pair);
|
|
1149
|
+
}
|
|
1150
|
+
let url = shareUrl;
|
|
1151
|
+
if (query.length) url += (url.includes("?") ? "&" : "?") + query.join("&");
|
|
1152
|
+
if (hash.length) url += `#${hash.join("&")}`;
|
|
1153
|
+
return url;
|
|
1154
|
+
}
|
|
1038
1155
|
|
|
1039
1156
|
// ../config/node-types.js
|
|
1040
1157
|
var RESPONSE_FORMATS = ["text", "audio", "video"];
|
|
@@ -2970,6 +3087,8 @@ function stripGatedConfigKeys(type, config) {
|
|
|
2970
3087
|
var NODE_TYPES_LIST = Object.entries(NODE_TYPES).map(([type, def]) => ({ type, ...def })).sort((a, b) => a.sort_order - b.sort_order);
|
|
2971
3088
|
var ACTIVE_NODE_TYPES = Object.entries(NODE_TYPES).filter(([, def]) => def.is_active && !def.is_system).map(([type]) => type);
|
|
2972
3089
|
var NODE_TYPE_KEYS = Object.keys(NODE_TYPES);
|
|
3090
|
+
var END_SCREEN_ICON_SCHEMA = NODE_TYPES.end_screen.config_schema.properties.icon;
|
|
3091
|
+
var END_SCREEN_ICONS = END_SCREEN_ICON_SCHEMA.enum;
|
|
2973
3092
|
var OWNER_SCOPED_CONFIG_KEYS = Object.fromEntries(
|
|
2974
3093
|
Object.entries(NODE_TYPES).filter(([, def]) => Array.isArray(def.owner_scoped_config_keys) && def.owner_scoped_config_keys.length > 0).map(([type, def]) => [type, def.owner_scoped_config_keys])
|
|
2975
3094
|
);
|
|
@@ -3410,7 +3529,7 @@ var ENV = {
|
|
|
3410
3529
|
isLocalhost: isDevelopment
|
|
3411
3530
|
// alias for clarity
|
|
3412
3531
|
};
|
|
3413
|
-
var
|
|
3532
|
+
var LEGACY_AUTH_COOKIE_DOMAIN = ENV.isDevelopment ? void 0 : ".clipform.io";
|
|
3414
3533
|
var isTunnelBrowser = isBrowser && window.location.hostname.endsWith(".smith-forge.com");
|
|
3415
3534
|
var PROD_URLS = {
|
|
3416
3535
|
marketing: "https://www.clipform.io",
|
|
@@ -3487,8 +3606,12 @@ var SUPABASE_STORAGE_MAX_BYTES = 200 * 1024 * 1024;
|
|
|
3487
3606
|
var VIDEO_COMPRESS_BITRATE = 35e5;
|
|
3488
3607
|
var VIDEO_COMPRESS_FLOOR_BYTES = 1 * 1024 * 1024;
|
|
3489
3608
|
var MEDIA_VIDEO_MAX_BYTES = 200 * 1024 * 1024;
|
|
3609
|
+
var FILE_DOWNLOAD_MAX_BYTES = 50 * 1024 * 1024;
|
|
3490
3610
|
var VIDEO_COMPRESS_SKIP_BITRATE = VIDEO_COMPRESS_BITRATE * 1.5;
|
|
3491
3611
|
var HELP_LINKS = buildHelpLinks(BUSINESS.urls.docs);
|
|
3612
|
+
function viewerUrl(shareId) {
|
|
3613
|
+
return `${BUSINESS.urls.viewer}/${shareId}`;
|
|
3614
|
+
}
|
|
3492
3615
|
var PLAN_LIMITS = {
|
|
3493
3616
|
free_v1: {
|
|
3494
3617
|
tier: 0,
|
|
@@ -3606,7 +3729,8 @@ var PLAN_LIMITS = {
|
|
|
3606
3729
|
"1,000 completed responses per month",
|
|
3607
3730
|
"Custom themes & colors",
|
|
3608
3731
|
"Remove Clipform branding",
|
|
3609
|
-
"Dynamic links - repoint a printed URL to a new form"
|
|
3732
|
+
"Dynamic links - repoint a printed URL to a new form",
|
|
3733
|
+
"Send form events to Google Tag Manager and Meta Pixel"
|
|
3610
3734
|
]
|
|
3611
3735
|
},
|
|
3612
3736
|
pro_v2_5k: {
|
|
@@ -3633,7 +3757,8 @@ var PLAN_LIMITS = {
|
|
|
3633
3757
|
"5,000 completed responses per month",
|
|
3634
3758
|
"Custom themes & colors",
|
|
3635
3759
|
"Remove Clipform branding",
|
|
3636
|
-
"Dynamic links - repoint a printed URL to a new form"
|
|
3760
|
+
"Dynamic links - repoint a printed URL to a new form",
|
|
3761
|
+
"Send form events to Google Tag Manager and Meta Pixel"
|
|
3637
3762
|
]
|
|
3638
3763
|
},
|
|
3639
3764
|
pro_v2_20k: {
|
|
@@ -3660,7 +3785,8 @@ var PLAN_LIMITS = {
|
|
|
3660
3785
|
"20,000 completed responses per month",
|
|
3661
3786
|
"Custom themes & colors",
|
|
3662
3787
|
"Remove Clipform branding",
|
|
3663
|
-
"Dynamic links - repoint a printed URL to a new form"
|
|
3788
|
+
"Dynamic links - repoint a printed URL to a new form",
|
|
3789
|
+
"Send form events to Google Tag Manager and Meta Pixel"
|
|
3664
3790
|
]
|
|
3665
3791
|
}
|
|
3666
3792
|
};
|
|
@@ -3805,6 +3931,7 @@ function exposedCompositionIds(includeNonPublic) {
|
|
|
3805
3931
|
}
|
|
3806
3932
|
var SCENE_LAYER_COMPOSITION_IDS = COMPOSITION_REGISTRY.filter((c) => c.scene_layer).map((c) => c.id);
|
|
3807
3933
|
var MCP_TOOL_TIERS = {};
|
|
3934
|
+
var MCP_SESSION_GATED_TOOLS = Object.freeze(["clipform_set_link_fields"]);
|
|
3808
3935
|
var MCP_TOOL_TOOLSETS = {
|
|
3809
3936
|
// account: workspace/account-scoped read + admin tools.
|
|
3810
3937
|
clipform_list_forms: "account",
|
|
@@ -3821,6 +3948,7 @@ var MCP_TOOL_TOOLSETS = {
|
|
|
3821
3948
|
clipform_delete_node: "forms",
|
|
3822
3949
|
clipform_update_form: "forms",
|
|
3823
3950
|
clipform_set_logic: "forms",
|
|
3951
|
+
clipform_set_link_fields: "forms",
|
|
3824
3952
|
clipform_get_guide: "forms",
|
|
3825
3953
|
clipform_get_workflow: "forms",
|
|
3826
3954
|
// research: third-party content lookup + generation-workflow audit.
|
|
@@ -3867,6 +3995,7 @@ var MCP_ANON_TOOLS = Object.freeze({
|
|
|
3867
3995
|
clipform_delete_node: "anon",
|
|
3868
3996
|
clipform_update_form: "anon",
|
|
3869
3997
|
clipform_set_logic: "anon",
|
|
3998
|
+
clipform_set_link_fields: "sign_in",
|
|
3870
3999
|
clipform_get_guide: "anon_no_workspace",
|
|
3871
4000
|
clipform_get_workflow: "anon_no_workspace",
|
|
3872
4001
|
// research
|
|
@@ -4136,6 +4265,17 @@ export {
|
|
|
4136
4265
|
isOptionEdge,
|
|
4137
4266
|
isNodeLevelAction,
|
|
4138
4267
|
isInactiveOptionEdge,
|
|
4268
|
+
VARIABLE_TYPES,
|
|
4269
|
+
VARIABLE_LABEL_MAX_LENGTH,
|
|
4270
|
+
VARIABLE_MAX_CUSTOM_PER_FORM,
|
|
4271
|
+
isReservedVariableKey,
|
|
4272
|
+
validateVariableKey,
|
|
4273
|
+
coerceVariableValue,
|
|
4274
|
+
findScoreVariable,
|
|
4275
|
+
VARIABLE_MAX_LINK_PER_FORM,
|
|
4276
|
+
isPersonalLinkKey,
|
|
4277
|
+
linkVariablePreset,
|
|
4278
|
+
buildVariableLink,
|
|
4139
4279
|
CONSENT_TYPES,
|
|
4140
4280
|
CHOICE_MAX_OPTIONS,
|
|
4141
4281
|
NODE_TYPES,
|
|
@@ -4162,6 +4302,7 @@ export {
|
|
|
4162
4302
|
defaultTarget,
|
|
4163
4303
|
bfsOrder,
|
|
4164
4304
|
PROD_URLS,
|
|
4305
|
+
viewerUrl,
|
|
4165
4306
|
PLAN_LIMITS,
|
|
4166
4307
|
CURRENT_PLAN_VERSIONS,
|
|
4167
4308
|
CONTACT_FIELDS,
|
|
@@ -4187,4 +4328,4 @@ export {
|
|
|
4187
4328
|
textResult,
|
|
4188
4329
|
structuredResult
|
|
4189
4330
|
};
|
|
4190
|
-
//# sourceMappingURL=chunk-
|
|
4331
|
+
//# sourceMappingURL=chunk-7NLXUGGN.js.map
|