@clipform/mcp-server 4.11.4 → 5.1.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-VQRVB4AU.js → chunk-25QAMDHS.js} +2 -2
- package/dist/{chunk-MOXS5GL2.js → chunk-DWFBJMC5.js} +3 -3
- package/dist/{chunk-BUSXPGIE.js → chunk-QED4R32Z.js} +50 -10
- package/dist/chunk-QED4R32Z.js.map +1 -0
- package/dist/{chunk-BNSHHORH.js → chunk-RHMP5D55.js} +44 -10
- package/dist/{chunk-BNSHHORH.js.map → chunk-RHMP5D55.js.map} +1 -1
- package/dist/{chunk-5CIGKMM5.js → chunk-WZ4LCPSY.js} +5 -4
- package/dist/{chunk-5CIGKMM5.js.map → chunk-WZ4LCPSY.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/prompts.js +3 -3
- package/dist/resources.js +3 -3
- package/dist/server.js +5 -5
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/chunk-BUSXPGIE.js.map +0 -1
- /package/dist/{chunk-VQRVB4AU.js.map → chunk-25QAMDHS.js.map} +0 -0
- /package/dist/{chunk-MOXS5GL2.js.map → chunk-DWFBJMC5.js.map} +0 -0
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
union,
|
|
30
30
|
unknown,
|
|
31
31
|
url
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WZ4LCPSY.js";
|
|
33
33
|
import {
|
|
34
34
|
GUIDE_TYPES,
|
|
35
35
|
QUIZ_VARIANTS,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
getGuideUri,
|
|
39
39
|
guideFallbackText,
|
|
40
40
|
registerResources
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-DWFBJMC5.js";
|
|
42
42
|
import {
|
|
43
43
|
ANON_PREVIEW_LINK_LABEL,
|
|
44
44
|
ANON_PREVIEW_NOTICE,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
isPreviewViewerUrl,
|
|
53
53
|
previewOnlyNotice,
|
|
54
54
|
withAdoptedNotice
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-25QAMDHS.js";
|
|
56
56
|
import {
|
|
57
57
|
ACTIVE_NODE_TYPES,
|
|
58
58
|
ANON_MCP_BLOCKED_NODE_TYPES,
|
|
@@ -76,6 +76,7 @@ import {
|
|
|
76
76
|
errorResult,
|
|
77
77
|
exposedCompositionIds,
|
|
78
78
|
gatedConfigKeys,
|
|
79
|
+
gatedEnumValues,
|
|
79
80
|
isAnonMcpLockedNode,
|
|
80
81
|
isAnonymousAccountRequired,
|
|
81
82
|
lettersCapError,
|
|
@@ -84,7 +85,7 @@ import {
|
|
|
84
85
|
stripGatedConfigKeys,
|
|
85
86
|
structuredResult,
|
|
86
87
|
textResult
|
|
87
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-QED4R32Z.js";
|
|
88
89
|
import {
|
|
89
90
|
getMcpAuth,
|
|
90
91
|
runWithMcpAuth,
|
|
@@ -16148,7 +16149,8 @@ function generateConfigSummary(configSchema, typeKey) {
|
|
|
16148
16149
|
if (gated.has(key)) continue;
|
|
16149
16150
|
if (!FEATURE_FLAGS.ENABLE_CUSTOM_SCORES && CUSTOM_SCORES_GATED_KEYS.has(key)) continue;
|
|
16150
16151
|
if (prop.enum) {
|
|
16151
|
-
const
|
|
16152
|
+
const hiddenVals = typeKey ? gatedEnumValues(typeKey, key) : /* @__PURE__ */ new Set();
|
|
16153
|
+
const vals = prop.enum.filter((v) => !hiddenVals.has(v)).map((v) => `"${v}"`).join("|");
|
|
16152
16154
|
let s = `${key} (${vals}`;
|
|
16153
16155
|
if (prop.default !== void 0) s += `, default: "${prop.default}"`;
|
|
16154
16156
|
s += ")";
|
|
@@ -16300,6 +16302,24 @@ function gatedConfigKeysOnEveryType() {
|
|
|
16300
16302
|
}
|
|
16301
16303
|
return new Set([...gatedBy].filter(([, g]) => g).map(([k]) => k));
|
|
16302
16304
|
}
|
|
16305
|
+
function gatedEnumValuesOnEveryType() {
|
|
16306
|
+
const gatedBy = /* @__PURE__ */ new Map();
|
|
16307
|
+
for (const [type, def] of Object.entries(NODE_TYPES)) {
|
|
16308
|
+
for (const [key, prop] of Object.entries(def.config_schema?.properties ?? {})) {
|
|
16309
|
+
if (!Array.isArray(prop?.enum)) continue;
|
|
16310
|
+
const gated = gatedEnumValues(type, key);
|
|
16311
|
+
const byValue = gatedBy.get(key) ?? /* @__PURE__ */ new Map();
|
|
16312
|
+
for (const value of prop.enum) byValue.set(value, (byValue.get(value) ?? true) && gated.has(value));
|
|
16313
|
+
gatedBy.set(key, byValue);
|
|
16314
|
+
}
|
|
16315
|
+
}
|
|
16316
|
+
const out = /* @__PURE__ */ new Map();
|
|
16317
|
+
for (const [key, byValue] of gatedBy) {
|
|
16318
|
+
const values = [...byValue].filter(([, g]) => g).map(([v]) => v);
|
|
16319
|
+
if (values.length > 0) out.set(key, new Set(values));
|
|
16320
|
+
}
|
|
16321
|
+
return out;
|
|
16322
|
+
}
|
|
16303
16323
|
function ignoredConfigNote(keys) {
|
|
16304
16324
|
return `Ignored unsupported config key(s): ${keys.join(", ")}.`;
|
|
16305
16325
|
}
|
|
@@ -17051,12 +17071,15 @@ function allowedConfigKeys(nodeType) {
|
|
|
17051
17071
|
}
|
|
17052
17072
|
return /* @__PURE__ */ new Set();
|
|
17053
17073
|
}
|
|
17074
|
+
var HIDDEN_CONFIG_KEYS = /* @__PURE__ */ new Set(["workspace_integration_id"]);
|
|
17054
17075
|
function projectConfig(nodeType, config) {
|
|
17055
17076
|
if (!config) return void 0;
|
|
17056
17077
|
const allowed = allowedConfigKeys(nodeType);
|
|
17057
17078
|
const projected = {};
|
|
17058
17079
|
for (const [key, value] of Object.entries(config)) {
|
|
17059
|
-
if (allowed.has(key)
|
|
17080
|
+
if (!allowed.has(key) || HIDDEN_CONFIG_KEYS.has(key)) continue;
|
|
17081
|
+
if (typeof value === "string" && gatedEnumValues(nodeType, key).has(value)) continue;
|
|
17082
|
+
projected[key] = value;
|
|
17060
17083
|
}
|
|
17061
17084
|
return projected;
|
|
17062
17085
|
}
|
|
@@ -17262,6 +17285,7 @@ function registerUpdateFormTool(server) {
|
|
|
17262
17285
|
show_branding: external_exports.boolean().optional().describe("Show Clipform branding. Set false to remove (Pro plan)."),
|
|
17263
17286
|
brand_name: external_exports.string().nullable().optional().describe("AI-PROTECTED: Custom brand name shown in footer. Only set when user explicitly provides."),
|
|
17264
17287
|
cover_media_asset_id: external_exports.string().uuid().nullable().optional().describe("Cover image: the picture shown in emails, link previews and on the embed button, cropped to the form's 9:16 frame. A media_asset_id of a ready still image in this form's workspace. Set null to clear and fall back to the first step's media. Goes live on the next publish (is_live: true), which can be in the same call."),
|
|
17288
|
+
alias: external_exports.string().optional().describe("Readable link name for a template, so it is shared as app.clipform.io/try/NAME instead of an id. ONLY for forms in a Clipform Public workspace (others are refused). Lowercase letters, digits and single dashes, 3-50 characters (e.g. 'testimonial-howto'); reserved words and 9-character hex strings are refused. Adds a name: old names keep working, and a name is never reused by another form."),
|
|
17265
17289
|
tags: external_exports.array(external_exports.string()).optional().describe("Replace all tags on this form. Pass the full desired set (e.g. ['quiz', 'trivia', 'slug:elephants']). Omit to leave tags unchanged.")
|
|
17266
17290
|
}),
|
|
17267
17291
|
outputSchema: external_exports.object({
|
|
@@ -17280,7 +17304,7 @@ function registerUpdateFormTool(server) {
|
|
|
17280
17304
|
openWorldHint: true
|
|
17281
17305
|
}
|
|
17282
17306
|
},
|
|
17283
|
-
async ({ form_id, title, is_live, show_step_counter, disable_back_navigation, total_steps, primary_color, background_color, font_family, description, author, logo_url, show_branding, brand_name, cover_media_asset_id, tags }) => {
|
|
17307
|
+
async ({ form_id, title, is_live, show_step_counter, disable_back_navigation, total_steps, primary_color, background_color, font_family, description, author, logo_url, show_branding, brand_name, cover_media_asset_id, alias, tags }) => {
|
|
17284
17308
|
const body = {};
|
|
17285
17309
|
if (title !== void 0) body.title = title;
|
|
17286
17310
|
if (is_live !== void 0) body.is_live = is_live;
|
|
@@ -17296,6 +17320,8 @@ function registerUpdateFormTool(server) {
|
|
|
17296
17320
|
if (show_branding !== void 0) body.show_branding = show_branding;
|
|
17297
17321
|
if (brand_name !== void 0) body.brand_name = brand_name;
|
|
17298
17322
|
if (cover_media_asset_id !== void 0) body.cover_media_asset_id = cover_media_asset_id;
|
|
17323
|
+
if (alias !== void 0) body.alias = alias;
|
|
17324
|
+
let storedAlias;
|
|
17299
17325
|
if (Object.keys(body).length > 0) {
|
|
17300
17326
|
const result = await callApi(`/forms/${form_id}`, {
|
|
17301
17327
|
method: "PATCH",
|
|
@@ -17318,6 +17344,8 @@ ${others ? "The other changes in this call were saved to the draft, but the form
|
|
|
17318
17344
|
}
|
|
17319
17345
|
return errorResult(result.error);
|
|
17320
17346
|
}
|
|
17347
|
+
const returned = result.data?.alias;
|
|
17348
|
+
if (typeof returned === "string" && returned) storedAlias = returned;
|
|
17321
17349
|
}
|
|
17322
17350
|
if (tags) {
|
|
17323
17351
|
const tagResult = await callApi(`/forms/${form_id}/tags`, {
|
|
@@ -17389,6 +17417,10 @@ ${others ? "The other changes in this call were saved to the draft, but the form
|
|
|
17389
17417
|
updates.push(`Cover image \u2192 ${cover_media_asset_id === null ? "cleared" : `set (${cover_media_asset_id})`}`);
|
|
17390
17418
|
updatedFields.push("cover_media_asset_id");
|
|
17391
17419
|
}
|
|
17420
|
+
if (alias !== void 0) {
|
|
17421
|
+
updates.push(`Link name \u2192 ${storedAlias ?? alias}`);
|
|
17422
|
+
updatedFields.push("alias");
|
|
17423
|
+
}
|
|
17392
17424
|
if (tags) {
|
|
17393
17425
|
updates.push(`Tags \u2192 [${tags.join(", ")}]`);
|
|
17394
17426
|
updatedFields.push("tags");
|
|
@@ -18035,8 +18067,10 @@ function registerUpdateNodeTool(server) {
|
|
|
18035
18067
|
({ config, dropped: droppedKeys } = stripGatedConfigKeys(type, rawConfig));
|
|
18036
18068
|
} else {
|
|
18037
18069
|
const gated = gatedConfigKeysOnEveryType();
|
|
18038
|
-
|
|
18039
|
-
|
|
18070
|
+
const gatedValues = gatedEnumValuesOnEveryType();
|
|
18071
|
+
const isGated = ([k, v]) => gated.has(k) || typeof v === "string" && (gatedValues.get(k)?.has(v) ?? false);
|
|
18072
|
+
droppedKeys = Object.entries(rawConfig).filter(isGated).map(([k]) => k);
|
|
18073
|
+
if (droppedKeys.length > 0) config = Object.fromEntries(Object.entries(rawConfig).filter((e) => !isGated(e)));
|
|
18040
18074
|
}
|
|
18041
18075
|
}
|
|
18042
18076
|
const body = {};
|
|
@@ -20446,4 +20480,4 @@ export {
|
|
|
20446
20480
|
* MIT Licensed
|
|
20447
20481
|
*)
|
|
20448
20482
|
*/
|
|
20449
|
-
//# sourceMappingURL=chunk-
|
|
20483
|
+
//# sourceMappingURL=chunk-RHMP5D55.js.map
|