@clipform/mcp-server 1.24.0 → 1.25.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/{chunk-Q4LHGVFQ.js → chunk-2SXOLMHL.js} +141 -46
- package/dist/chunk-2SXOLMHL.js.map +1 -0
- package/dist/{chunk-ZVBCKXPT.js → chunk-H7XSNUKI.js} +2 -2
- package/dist/{chunk-2AQPZWXG.js → chunk-WGIWNARP.js} +2 -2
- package/dist/{chunk-ZFJGTESI.js → chunk-X5HRS3GG.js} +11 -1
- package/dist/chunk-X5HRS3GG.js.map +1 -0
- 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-Q4LHGVFQ.js.map +0 -1
- package/dist/chunk-ZFJGTESI.js.map +0 -1
- /package/dist/{chunk-ZVBCKXPT.js.map → chunk-H7XSNUKI.js.map} +0 -0
- /package/dist/{chunk-2AQPZWXG.js.map → chunk-WGIWNARP.js.map} +0 -0
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
getWorkflowText,
|
|
7
7
|
objectType,
|
|
8
8
|
registerPrompts
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H7XSNUKI.js";
|
|
10
10
|
import {
|
|
11
11
|
GUIDE_TYPES,
|
|
12
12
|
QUIZ_VARIANTS,
|
|
13
13
|
getGuideContent,
|
|
14
14
|
getGuideUri,
|
|
15
15
|
registerResources
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WGIWNARP.js";
|
|
17
17
|
import {
|
|
18
18
|
BUSINESS,
|
|
19
19
|
CONTACT_FIELDS,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
errorResult,
|
|
30
30
|
resolveFormType,
|
|
31
31
|
textResult
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-X5HRS3GG.js";
|
|
33
33
|
import {
|
|
34
34
|
__commonJS,
|
|
35
35
|
__export,
|
|
@@ -3114,6 +3114,9 @@ var require_utils = __commonJS({
|
|
|
3114
3114
|
"use strict";
|
|
3115
3115
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3116
3116
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3117
|
+
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3118
|
+
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3119
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
3117
3120
|
function stringArrayToHexStripped(input) {
|
|
3118
3121
|
let acc = "";
|
|
3119
3122
|
let code = 0;
|
|
@@ -3306,27 +3309,77 @@ var require_utils = __commonJS({
|
|
|
3306
3309
|
}
|
|
3307
3310
|
return output.join("");
|
|
3308
3311
|
}
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3312
|
+
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
3313
|
+
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
3314
|
+
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
3315
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
3316
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
3317
|
+
re.lastIndex = 0;
|
|
3318
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
3319
|
+
}
|
|
3320
|
+
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
3321
|
+
if (input.indexOf("%") === -1) {
|
|
3322
|
+
return input;
|
|
3319
3323
|
}
|
|
3320
|
-
|
|
3321
|
-
|
|
3324
|
+
let output = "";
|
|
3325
|
+
for (let i = 0; i < input.length; i++) {
|
|
3326
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3327
|
+
const hex = input.slice(i + 1, i + 3);
|
|
3328
|
+
if (isHexPair(hex)) {
|
|
3329
|
+
const normalizedHex = hex.toUpperCase();
|
|
3330
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3331
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
3332
|
+
output += decoded;
|
|
3333
|
+
} else {
|
|
3334
|
+
output += "%" + normalizedHex;
|
|
3335
|
+
}
|
|
3336
|
+
i += 2;
|
|
3337
|
+
continue;
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
output += input[i];
|
|
3322
3341
|
}
|
|
3323
|
-
|
|
3324
|
-
|
|
3342
|
+
return output;
|
|
3343
|
+
}
|
|
3344
|
+
function normalizePathEncoding(input) {
|
|
3345
|
+
let output = "";
|
|
3346
|
+
for (let i = 0; i < input.length; i++) {
|
|
3347
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3348
|
+
const hex = input.slice(i + 1, i + 3);
|
|
3349
|
+
if (isHexPair(hex)) {
|
|
3350
|
+
const normalizedHex = hex.toUpperCase();
|
|
3351
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3352
|
+
if (decoded !== "." && isUnreserved(decoded)) {
|
|
3353
|
+
output += decoded;
|
|
3354
|
+
} else {
|
|
3355
|
+
output += "%" + normalizedHex;
|
|
3356
|
+
}
|
|
3357
|
+
i += 2;
|
|
3358
|
+
continue;
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
if (isPathCharacter(input[i])) {
|
|
3362
|
+
output += input[i];
|
|
3363
|
+
} else {
|
|
3364
|
+
output += escape(input[i]);
|
|
3365
|
+
}
|
|
3325
3366
|
}
|
|
3326
|
-
|
|
3327
|
-
|
|
3367
|
+
return output;
|
|
3368
|
+
}
|
|
3369
|
+
function escapePreservingEscapes(input) {
|
|
3370
|
+
let output = "";
|
|
3371
|
+
for (let i = 0; i < input.length; i++) {
|
|
3372
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3373
|
+
const hex = input.slice(i + 1, i + 3);
|
|
3374
|
+
if (isHexPair(hex)) {
|
|
3375
|
+
output += "%" + hex.toUpperCase();
|
|
3376
|
+
i += 2;
|
|
3377
|
+
continue;
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
output += escape(input[i]);
|
|
3328
3381
|
}
|
|
3329
|
-
return
|
|
3382
|
+
return output;
|
|
3330
3383
|
}
|
|
3331
3384
|
function recomposeAuthority(component) {
|
|
3332
3385
|
const uriTokens = [];
|
|
@@ -3341,7 +3394,7 @@ var require_utils = __commonJS({
|
|
|
3341
3394
|
if (ipV6res.isIPV6 === true) {
|
|
3342
3395
|
host = `[${ipV6res.escapedHost}]`;
|
|
3343
3396
|
} else {
|
|
3344
|
-
host =
|
|
3397
|
+
host = reescapeHostDelimiters(host, false);
|
|
3345
3398
|
}
|
|
3346
3399
|
}
|
|
3347
3400
|
uriTokens.push(host);
|
|
@@ -3355,7 +3408,10 @@ var require_utils = __commonJS({
|
|
|
3355
3408
|
module.exports = {
|
|
3356
3409
|
nonSimpleDomain,
|
|
3357
3410
|
recomposeAuthority,
|
|
3358
|
-
|
|
3411
|
+
reescapeHostDelimiters,
|
|
3412
|
+
normalizePercentEncoding,
|
|
3413
|
+
normalizePathEncoding,
|
|
3414
|
+
escapePreservingEscapes,
|
|
3359
3415
|
removeDotSegments,
|
|
3360
3416
|
isIPv4,
|
|
3361
3417
|
isUUID,
|
|
@@ -3579,12 +3635,12 @@ var require_schemes = __commonJS({
|
|
|
3579
3635
|
var require_fast_uri = __commonJS({
|
|
3580
3636
|
"../../node_modules/fast-uri/index.js"(exports, module) {
|
|
3581
3637
|
"use strict";
|
|
3582
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
3638
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3583
3639
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3584
3640
|
function normalize(uri, options) {
|
|
3585
3641
|
if (typeof uri === "string") {
|
|
3586
3642
|
uri = /** @type {T} */
|
|
3587
|
-
|
|
3643
|
+
normalizeString(uri, options);
|
|
3588
3644
|
} else if (typeof uri === "object") {
|
|
3589
3645
|
uri = /** @type {T} */
|
|
3590
3646
|
parse3(serialize(uri, options), options);
|
|
@@ -3651,19 +3707,9 @@ var require_fast_uri = __commonJS({
|
|
|
3651
3707
|
return target;
|
|
3652
3708
|
}
|
|
3653
3709
|
function equal(uriA, uriB, options) {
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
} else if (typeof uriA === "object") {
|
|
3658
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
3659
|
-
}
|
|
3660
|
-
if (typeof uriB === "string") {
|
|
3661
|
-
uriB = unescape(uriB);
|
|
3662
|
-
uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
|
|
3663
|
-
} else if (typeof uriB === "object") {
|
|
3664
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
3665
|
-
}
|
|
3666
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
3710
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
3711
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
3712
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
|
|
3667
3713
|
}
|
|
3668
3714
|
function serialize(cmpts, opts) {
|
|
3669
3715
|
const component = {
|
|
@@ -3688,12 +3734,12 @@ var require_fast_uri = __commonJS({
|
|
|
3688
3734
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3689
3735
|
if (component.path !== void 0) {
|
|
3690
3736
|
if (!options.skipEscape) {
|
|
3691
|
-
component.path =
|
|
3737
|
+
component.path = escapePreservingEscapes(component.path);
|
|
3692
3738
|
if (component.scheme !== void 0) {
|
|
3693
3739
|
component.path = component.path.split("%3A").join(":");
|
|
3694
3740
|
}
|
|
3695
3741
|
} else {
|
|
3696
|
-
component.path =
|
|
3742
|
+
component.path = normalizePercentEncoding(component.path);
|
|
3697
3743
|
}
|
|
3698
3744
|
}
|
|
3699
3745
|
if (options.reference !== "suffix" && component.scheme) {
|
|
@@ -3728,7 +3774,16 @@ var require_fast_uri = __commonJS({
|
|
|
3728
3774
|
return uriTokens.join("");
|
|
3729
3775
|
}
|
|
3730
3776
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3731
|
-
function
|
|
3777
|
+
function getParseError(parsed, matches) {
|
|
3778
|
+
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
3779
|
+
return 'URI path must start with "/" when authority is present.';
|
|
3780
|
+
}
|
|
3781
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
|
|
3782
|
+
return "URI port is malformed.";
|
|
3783
|
+
}
|
|
3784
|
+
return void 0;
|
|
3785
|
+
}
|
|
3786
|
+
function parseWithStatus(uri, opts) {
|
|
3732
3787
|
const options = Object.assign({}, opts);
|
|
3733
3788
|
const parsed = {
|
|
3734
3789
|
scheme: void 0,
|
|
@@ -3739,6 +3794,7 @@ var require_fast_uri = __commonJS({
|
|
|
3739
3794
|
query: void 0,
|
|
3740
3795
|
fragment: void 0
|
|
3741
3796
|
};
|
|
3797
|
+
let malformedAuthorityOrPort = false;
|
|
3742
3798
|
let isIP = false;
|
|
3743
3799
|
if (options.reference === "suffix") {
|
|
3744
3800
|
if (options.scheme) {
|
|
@@ -3759,6 +3815,11 @@ var require_fast_uri = __commonJS({
|
|
|
3759
3815
|
if (isNaN(parsed.port)) {
|
|
3760
3816
|
parsed.port = matches[5];
|
|
3761
3817
|
}
|
|
3818
|
+
const parseError = getParseError(parsed, matches);
|
|
3819
|
+
if (parseError !== void 0) {
|
|
3820
|
+
parsed.error = parsed.error || parseError;
|
|
3821
|
+
malformedAuthorityOrPort = true;
|
|
3822
|
+
}
|
|
3762
3823
|
if (parsed.host) {
|
|
3763
3824
|
const ipv4result = isIPv4(parsed.host);
|
|
3764
3825
|
if (ipv4result === false) {
|
|
@@ -3797,14 +3858,18 @@ var require_fast_uri = __commonJS({
|
|
|
3797
3858
|
parsed.scheme = unescape(parsed.scheme);
|
|
3798
3859
|
}
|
|
3799
3860
|
if (parsed.host !== void 0) {
|
|
3800
|
-
parsed.host = unescape(parsed.host);
|
|
3861
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
3801
3862
|
}
|
|
3802
3863
|
}
|
|
3803
3864
|
if (parsed.path) {
|
|
3804
|
-
parsed.path =
|
|
3865
|
+
parsed.path = normalizePathEncoding(parsed.path);
|
|
3805
3866
|
}
|
|
3806
3867
|
if (parsed.fragment) {
|
|
3807
|
-
|
|
3868
|
+
try {
|
|
3869
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
3870
|
+
} catch {
|
|
3871
|
+
parsed.error = parsed.error || "URI malformed";
|
|
3872
|
+
}
|
|
3808
3873
|
}
|
|
3809
3874
|
}
|
|
3810
3875
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -3813,7 +3878,29 @@ var require_fast_uri = __commonJS({
|
|
|
3813
3878
|
} else {
|
|
3814
3879
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
3815
3880
|
}
|
|
3816
|
-
return parsed;
|
|
3881
|
+
return { parsed, malformedAuthorityOrPort };
|
|
3882
|
+
}
|
|
3883
|
+
function parse3(uri, opts) {
|
|
3884
|
+
return parseWithStatus(uri, opts).parsed;
|
|
3885
|
+
}
|
|
3886
|
+
function normalizeString(uri, opts) {
|
|
3887
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
3888
|
+
}
|
|
3889
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
3890
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
3891
|
+
return {
|
|
3892
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
3893
|
+
malformedAuthorityOrPort
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
function normalizeComparableURI(uri, opts) {
|
|
3897
|
+
if (typeof uri === "string") {
|
|
3898
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
3899
|
+
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
3900
|
+
}
|
|
3901
|
+
if (typeof uri === "object") {
|
|
3902
|
+
return serialize(uri, opts);
|
|
3903
|
+
}
|
|
3817
3904
|
}
|
|
3818
3905
|
var fastUri = {
|
|
3819
3906
|
SCHEMES,
|
|
@@ -17312,6 +17399,8 @@ function registerUpdateFormTool(server) {
|
|
|
17312
17399
|
description: external_exports.string().nullable().optional().describe("SEO description (meta description, og:description). Set null to clear."),
|
|
17313
17400
|
author: external_exports.string().nullable().optional().describe("AI-PROTECTED: Only set when the user explicitly provides an author name. Set null to clear."),
|
|
17314
17401
|
logo_url: external_exports.string().nullable().optional().describe("AI-PROTECTED: Only set when the user explicitly provides a logo URL. Set null to clear."),
|
|
17402
|
+
show_branding: external_exports.boolean().optional().describe("Show Clipform branding. Set false to remove (Pro plan)."),
|
|
17403
|
+
brand_name: external_exports.string().nullable().optional().describe("AI-PROTECTED: Custom brand name shown in footer. Only set when user explicitly provides."),
|
|
17315
17404
|
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.")
|
|
17316
17405
|
},
|
|
17317
17406
|
annotations: {
|
|
@@ -17321,7 +17410,7 @@ function registerUpdateFormTool(server) {
|
|
|
17321
17410
|
openWorldHint: true
|
|
17322
17411
|
}
|
|
17323
17412
|
},
|
|
17324
|
-
async ({ form_id, title, is_live, show_step_counter, disable_back_navigation, total_steps, primary_color, background_color, font_family, description, author, logo_url, tags }) => {
|
|
17413
|
+
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, tags }) => {
|
|
17325
17414
|
const body = {};
|
|
17326
17415
|
if (title !== void 0) body.title = title;
|
|
17327
17416
|
if (is_live !== void 0) body.is_live = is_live;
|
|
@@ -17334,6 +17423,8 @@ function registerUpdateFormTool(server) {
|
|
|
17334
17423
|
if (description !== void 0) body.description = description;
|
|
17335
17424
|
if (author !== void 0) body.author = author;
|
|
17336
17425
|
if (logo_url !== void 0) body.logo_url = logo_url;
|
|
17426
|
+
if (show_branding !== void 0) body.show_branding = show_branding;
|
|
17427
|
+
if (brand_name !== void 0) body.brand_name = brand_name;
|
|
17337
17428
|
if (Object.keys(body).length > 0) {
|
|
17338
17429
|
const result = await callApi(`/forms/${form_id}`, {
|
|
17339
17430
|
method: "PATCH",
|
|
@@ -17374,6 +17465,10 @@ function registerUpdateFormTool(server) {
|
|
|
17374
17465
|
updates.push(`Author \u2192 ${author === null ? "cleared" : `"${author}"`}`);
|
|
17375
17466
|
if (logo_url !== void 0)
|
|
17376
17467
|
updates.push(`Logo URL \u2192 ${logo_url === null ? "cleared" : logo_url}`);
|
|
17468
|
+
if (show_branding !== void 0)
|
|
17469
|
+
updates.push(`Show branding \u2192 ${show_branding}`);
|
|
17470
|
+
if (brand_name !== void 0)
|
|
17471
|
+
updates.push(`Brand name \u2192 ${brand_name === null ? "cleared" : `"${brand_name}"`}`);
|
|
17377
17472
|
if (tags)
|
|
17378
17473
|
updates.push(`Tags \u2192 [${tags.join(", ")}]`);
|
|
17379
17474
|
return textResult(`Form updated: ${updates.join(", ")}`);
|
|
@@ -18612,4 +18707,4 @@ export {
|
|
|
18612
18707
|
JSONRPCMessageSchema,
|
|
18613
18708
|
createServer
|
|
18614
18709
|
};
|
|
18615
|
-
//# sourceMappingURL=chunk-
|
|
18710
|
+
//# sourceMappingURL=chunk-2SXOLMHL.js.map
|