@clipform/mcp-server 5.4.1 → 5.5.1

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.
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  FULL_CAPS,
3
3
  getSessionContext
4
- } from "./chunk-NWOLQJ3Z.js";
4
+ } from "./chunk-SOK5Z76R.js";
5
5
  import {
6
6
  ALL_VARIANTS,
7
7
  FORM_TYPES,
8
8
  FORM_TYPE_KEYS,
9
9
  callApi
10
- } from "./chunk-IWMRSNMO.js";
10
+ } from "./chunk-MDTLZRW2.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-QZZFZGY6.js.map
149
+ //# sourceMappingURL=chunk-MVF3AIQX.js.map
@@ -31,7 +31,7 @@ import {
31
31
  union,
32
32
  unknown,
33
33
  url
34
- } from "./chunk-HOKPAJLX.js";
34
+ } from "./chunk-GT7V45HP.js";
35
35
  import {
36
36
  GUIDE_TYPES,
37
37
  QUIZ_VARIANTS,
@@ -40,7 +40,7 @@ import {
40
40
  getGuideUri,
41
41
  guideFallbackText,
42
42
  registerResources
43
- } from "./chunk-QZZFZGY6.js";
43
+ } from "./chunk-MVF3AIQX.js";
44
44
  import {
45
45
  ANON_PREVIEW_LINK_LABEL,
46
46
  ANON_PREVIEW_NOTICE,
@@ -54,7 +54,7 @@ import {
54
54
  isPreviewViewerUrl,
55
55
  previewOnlyNotice,
56
56
  withAdoptedNotice
57
- } from "./chunk-NWOLQJ3Z.js";
57
+ } from "./chunk-SOK5Z76R.js";
58
58
  import {
59
59
  ACTIVE_NODE_TYPES,
60
60
  ANON_MCP_BLOCKED_NODE_TYPES,
@@ -95,7 +95,7 @@ import {
95
95
  stripGatedConfigKeys,
96
96
  structuredResult,
97
97
  textResult
98
- } from "./chunk-IWMRSNMO.js";
98
+ } from "./chunk-MDTLZRW2.js";
99
99
  import {
100
100
  getMcpAuth,
101
101
  runWithMcpAuth,
@@ -16233,7 +16233,7 @@ var CaptionSchema = external_exports.object({
16233
16233
  });
16234
16234
  var OptionSchema = external_exports.object({
16235
16235
  content: external_exports.string().describe("Option text"),
16236
- is_correct: external_exports.boolean().optional().describe("Mark this as the correct answer for a quiz (maps to score 1; other options score 0). Use this OR score, not both."),
16236
+ is_correct: external_exports.boolean().optional().describe("Mark this option as a correct answer for a quiz. Stored as the answer key; when score is not given it also sets score 1 (or 0 on the others)."),
16237
16237
  score: external_exports.number().optional().describe("Score value for this option (for scored quizzes). Use 1 for correct, 0 for wrong. Scored options automatically enable correct-answer marking (record_scores) and correct/incorrect answer feedback on the node; set config.choice.show_answer_feedback: false to hide the feedback."),
16238
16238
  // `scores` (category-based) is gated behind custom_scores (planned, #767) -
16239
16239
  // omitted from the schema while off so the MCP doesn't accept a not-live field.
@@ -16337,7 +16337,6 @@ function applyNodeDefaults(node, rng2 = Math.random) {
16337
16337
  if (o.score == null && typeof o.is_correct === "boolean") {
16338
16338
  o.score = o.is_correct ? 1 : 0;
16339
16339
  }
16340
- delete o.is_correct;
16341
16340
  }
16342
16341
  }
16343
16342
  const supportsRecordScores = def?.config_schema?.properties?.choice?.properties?.record_scores !== void 0;
@@ -16822,6 +16821,36 @@ var videoask = {
16822
16821
  }
16823
16822
  };
16824
16823
 
16824
+ // ../form-sources/dist/form-tools.js
16825
+ var FORM_TOOL_HOSTS = [
16826
+ { label: "Jotform", hosts: ["jotform.com"] },
16827
+ { label: "Microsoft Forms", hosts: ["forms.office.com", "forms.microsoft.com", "forms.cloud.microsoft"] },
16828
+ { label: "SurveyMonkey", hosts: ["surveymonkey.com"] },
16829
+ { label: "HubSpot Forms", hosts: ["hsforms.com"] },
16830
+ { label: "Airtable", hosts: ["airtable.com"] },
16831
+ { label: "Fillout", hosts: ["fillout.com"] },
16832
+ { label: "Paperform", hosts: ["paperform.co"] },
16833
+ { label: "Wufoo", hosts: ["wufoo.com"] },
16834
+ { label: "Cognito Forms", hosts: ["cognitoforms.com"] },
16835
+ { label: "Zoho Forms", hosts: ["zohopublic.com", "forms.zoho.com"] },
16836
+ { label: "Heyflow", hosts: ["heyflow.com", "heyflow.app"] },
16837
+ { label: "VideoAsk", hosts: ["videoask.com"] },
16838
+ { label: "Typeform", hosts: ["typeform.com"] }
16839
+ ];
16840
+ function detectFormToolLabel(url2) {
16841
+ let hostname;
16842
+ try {
16843
+ hostname = new URL(url2).hostname.toLowerCase();
16844
+ } catch {
16845
+ return "other";
16846
+ }
16847
+ for (const { label, hosts } of FORM_TOOL_HOSTS) {
16848
+ if (hosts.some((h) => hostname === h || hostname.endsWith("." + h)))
16849
+ return label;
16850
+ }
16851
+ return "other";
16852
+ }
16853
+
16825
16854
  // ../form-sources/dist/index.js
16826
16855
  var IMPORTABLE_PROVIDERS = ["google", "typeform", "tally"];
16827
16856
  function detectProvider(url2) {
@@ -16848,6 +16877,14 @@ function detectImportPlatform(url2) {
16848
16877
  const provider = detectProvider(url2);
16849
16878
  return provider && IMPORTABLE_PROVIDERS.includes(provider) ? provider : null;
16850
16879
  }
16880
+ var SUPPORTED_LIST = "clipform_import_form only supports Google Forms (docs.google.com or forms.gle), Typeform (form.typeform.com/to/...), and Tally (tally.so) links.";
16881
+ function unsupportedUrlMessage(label) {
16882
+ if (label === "Typeform") {
16883
+ return `Unsupported URL (Typeform, not a public share link). Use the form's public form.typeform.com/to/... link. ${SUPPORTED_LIST}`;
16884
+ }
16885
+ const base = `Unsupported URL (${label}). ${SUPPORTED_LIST}`;
16886
+ return label === "VideoAsk" ? `${base} VideoAsk import is not available yet.` : base;
16887
+ }
16851
16888
  function pluralQuestions(n) {
16852
16889
  return `${n} question${n === 1 ? "" : "s"}`;
16853
16890
  }
@@ -16886,9 +16923,7 @@ function registerImportFormTool(server) {
16886
16923
  async ({ url: url2 }) => {
16887
16924
  const platform = detectImportPlatform(url2);
16888
16925
  if (!platform) {
16889
- return errorResult(
16890
- "Unsupported URL. clipform_import_form only supports Google Forms (docs.google.com or forms.gle), Typeform (form.typeform.com/to/...), and Tally (tally.so) links."
16891
- );
16926
+ return errorResult(unsupportedUrlMessage(detectFormToolLabel(url2)));
16892
16927
  }
16893
16928
  const meResult = await callApi("/me", { method: "GET" });
16894
16929
  if (!meResult.ok) {
@@ -20610,4 +20645,4 @@ export {
20610
20645
  * MIT Licensed
20611
20646
  *)
20612
20647
  */
20613
- //# sourceMappingURL=chunk-3YKZSC7H.js.map
20648
+ //# sourceMappingURL=chunk-RTAHKKU4.js.map