@clipform/mcp-server 1.22.1 → 1.22.2

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,6 +1,8 @@
1
1
  import {
2
- getSessionContext
3
- } from "./chunk-Z7CP5LVY.js";
2
+ WORKFLOW_TYPES,
3
+ getDiscoveryParams,
4
+ getSessionContextWithAuth
5
+ } from "./chunk-ZDSVE6D3.js";
4
6
  import {
5
7
  __export
6
8
  } from "./chunk-HCZI2UJ5.js";
@@ -4047,7 +4049,7 @@ var coerce = {
4047
4049
  var NEVER = INVALID;
4048
4050
 
4049
4051
  // src/prompts.ts
4050
- var WORKFLOW_TYPES = ["quiz", "survey", "interview", "funnel", "testimonial", "application", "booking"];
4052
+ var WORKFLOW_TYPES2 = WORKFLOW_TYPES;
4051
4053
  var MEDIA_STYLE_ENUM = ["text", "images", "video"];
4052
4054
  function coercePromptArgs(args) {
4053
4055
  return {
@@ -4058,9 +4060,20 @@ function coercePromptArgs(args) {
4058
4060
  needs_contact: args.needs_contact != null ? args.needs_contact === "true" : void 0
4059
4061
  };
4060
4062
  }
4061
- function buildDiscovery(params, args) {
4062
- const missing = params.filter((p) => args[p.key] == null);
4063
+ function buildDiscovery(params, args, authMode = "oauth") {
4064
+ const effectiveParams = authMode === "anonymous" ? params.filter((p) => p.mode === "all") : [...params];
4065
+ const missing = effectiveParams.filter((p) => args[p.key] == null);
4063
4066
  if (missing.length === 0) return "";
4067
+ if (authMode === "anonymous") {
4068
+ const defaults = missing.map((p) => `- **${p.key}**: ${p.fallback}`).join("\n");
4069
+ return `## Quick Build Mode
4070
+
4071
+ Using smart defaults (sign in for full customisation):
4072
+
4073
+ ${defaults}
4074
+
4075
+ `;
4076
+ }
4064
4077
  const rows = missing.map((p) => `| ${p.question} | ${p.fallback} |`).join("\n");
4065
4078
  return `## Before You Build
4066
4079
 
@@ -4072,41 +4085,6 @@ ${rows}
4072
4085
 
4073
4086
  `;
4074
4087
  }
4075
- var QUIZ_DISCOVERY = [
4076
- { key: "topic", question: "What topic or subject area?", fallback: "General trivia" },
4077
- { key: "question_count", question: "How many questions?", fallback: "8" },
4078
- { key: "media_style", question: "Video + narration, images, or text only?", fallback: "Video with narration" }
4079
- ];
4080
- var PERSONALITY_DISCOVERY = [
4081
- { key: "topic", question: "What's the theme? (Which X are you?)", fallback: "General personality" },
4082
- { key: "categories", question: "What outcome categories? (3-5 results)", fallback: "Infer 4 categories from the theme" },
4083
- { key: "question_count", question: "How many questions?", fallback: "8" }
4084
- ];
4085
- var COMPREHENSION_DISCOVERY = [
4086
- { key: "youtube_url", question: "What's the YouTube URL?", fallback: "REQUIRED - cannot proceed without it" },
4087
- { key: "question_count", question: "How many questions?", fallback: "8" },
4088
- { key: "audience", question: "Who's the audience? (kids, teens, adults)", fallback: "General adults" }
4089
- ];
4090
- var SURVEY_DISCOVERY = [
4091
- { key: "topic", question: "What are you measuring? (satisfaction, NPS, feedback on what?)", fallback: "General satisfaction" },
4092
- { key: "anonymous", question: "Anonymous or identified responses?", fallback: "Anonymous" }
4093
- ];
4094
- var INTERVIEW_DISCOVERY = [
4095
- { key: "purpose", question: "What are you collecting? (case studies, feedback, expert input)", fallback: "General responses" },
4096
- { key: "response_format", question: "How should people respond? (video, audio, text, all)", fallback: "All formats" },
4097
- { key: "needs_consent", question: "Need a consent statement?", fallback: "Yes" }
4098
- ];
4099
- var TESTIMONIAL_DISCOVERY = [
4100
- { key: "use_case", question: "What stories are you collecting? (customer success, employee, partner)", fallback: "Customer success stories" },
4101
- { key: "media_style", question: "Video responses, audio, or text?", fallback: "Video" }
4102
- ];
4103
- var APPLICATION_DISCOVERY = [
4104
- { key: "role", question: "What role or position?", fallback: "General application" }
4105
- ];
4106
- var BOOKING_DISCOVERY = [
4107
- { key: "event_name", question: "What's the event name?", fallback: "Event registration" },
4108
- { key: "event_type", question: "What type? (workshop, webinar, meetup, conference)", fallback: "Event" }
4109
- ];
4110
4088
  function resourceLink(name, uri, title) {
4111
4089
  return {
4112
4090
  role: "assistant",
@@ -4119,12 +4097,11 @@ function resourceLink(name, uri, title) {
4119
4097
  }
4120
4098
  };
4121
4099
  }
4122
- function quizWorkflow(args, sessionContext) {
4100
+ function quizWorkflow(args, sessionContext, authMode = "oauth") {
4123
4101
  const topic = args.topic ? ` about "${args.topic}"` : "";
4124
4102
  const count = args.question_count ?? 8;
4125
- const media = args.media_style ?? "video";
4126
- const discovery = buildDiscovery(QUIZ_DISCOVERY, args);
4127
- return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a great ${count}-question ${media} quiz${topic} with Clipform. Read the attached quiz guide for craft knowledge on question design, difficulty curves, and narration style.
4103
+ const discovery = buildDiscovery(getDiscoveryParams("quiz", void 0, authMode === "anonymous" ? "demo" : "full"), args, authMode);
4104
+ return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a great ${count}-question video quiz${topic} with Clipform. Read the attached quiz guide for craft knowledge on question design, difficulty curves, and narration style.
4128
4105
 
4129
4106
  ## Workflow
4130
4107
 
@@ -4138,25 +4115,27 @@ function quizWorkflow(args, sessionContext) {
4138
4115
  - randomise_options: true in config
4139
4116
  - score: 1 on correct option, score: 0 on wrong
4140
4117
  - 3-4 wrong answers per question
4141
- 5. **Generate narration** with clipform_generate_tts - batch ALL questions in a single call (pass an array of items). Tease the question - do NOT reveal the answer or read options aloud. Keep each narration 5-15 seconds.${media !== "text" ? `
4118
+ 5. **Generate narration** with clipform_generate_tts - batch ALL questions in a single call (pass an array of items). Tease the question - do NOT reveal the answer or read options aloud. Keep each narration 5-15 seconds.
4142
4119
  6. **Build video** for each question:
4143
4120
  - clipform_search_media (kind: "image") - 3 images per question
4144
4121
  - clipform_generate_video - creates Ken Burns video synced to audio
4145
- 7. **Attach media** with clipform_upload_node_media. Include captions, set show_captions: true.` : ""}
4146
- ${media !== "text" ? "8" : "6"}. **Update end screen** with clipform_update_node - EVERY quiz must have:
4122
+ 7. **Attach media** with clipform_upload_node_media. Include captions, set show_captions: true.
4123
+ 8. **Update end screen** with clipform_update_node - EVERY quiz must have:
4147
4124
  - show_score: true, icon: "trophy"
4148
4125
  - show_share_button: true (drives virality)
4149
4126
  - cta_type: "restart", cta_text: a short challenge like "Beat your score?" or "Try again?"
4150
4127
  - title and message that fit the quiz's voice - short, punchy, and specific to the topic (not generic "Good job!"). Example: title: "Well played!", message: "Share your score and challenge a friend."
4151
4128
  - NOTE: Personalised messages per score tier (score_ranges) are coming soon. For now, write one great end screen message that works for all scores.
4152
- ${media !== "text" ? "9" : "7"}. **Publish** with clipform_update_form
4153
- ${media !== "text" ? "10" : "8"}. **Tag the form** - pass tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4154
- ${media !== "text" ? "11" : "9"}. **Log** with clipform_log_generation (sources, images, attributions)`;
4129
+ 9. **Publish** with clipform_update_form
4130
+ 10. **Tag the form** - pass tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4131
+ 11. **Log** with clipform_log_generation (sources, images, attributions)
4132
+
4133
+ > **Text-only override:** If the user explicitly asked for text-only (no video), skip steps 6-7 (video production and media attachment). Still generate narration in step 5.`;
4155
4134
  }
4156
- function personalityQuizWorkflow(args, sessionContext) {
4135
+ function personalityQuizWorkflow(args, sessionContext, authMode = "oauth") {
4157
4136
  const topic = args.topic ? ` - "${args.topic}"` : "";
4158
4137
  const count = args.question_count ?? 8;
4159
- const discovery = buildDiscovery(PERSONALITY_DISCOVERY, args);
4138
+ const discovery = buildDiscovery(getDiscoveryParams("quiz", "personality", authMode === "anonymous" ? "demo" : "full"), args, authMode);
4160
4139
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a ${count}-question personality quiz${topic} with Clipform. Read the attached personality quiz guide for craft knowledge on category design, option weighting, and outcome writing.
4161
4140
 
4162
4141
  ## How it differs from a knowledge quiz
@@ -4188,11 +4167,10 @@ There are NO correct answers. Each option should feel equally valid - the quiz i
4188
4167
  9. **Tag the form** - pass tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4189
4168
  10. **Log** with clipform_log_generation`;
4190
4169
  }
4191
- function comprehensionQuizWorkflow(args, sessionContext) {
4170
+ function comprehensionQuizWorkflow(args, sessionContext, authMode = "oauth") {
4192
4171
  const count = args.question_count ?? 8;
4193
- const media = args.media_style ?? "video";
4194
4172
  const audienceLabel = args.audience ? ` (${args.audience})` : "";
4195
- const discovery = buildDiscovery(COMPREHENSION_DISCOVERY, args);
4173
+ const discovery = buildDiscovery(getDiscoveryParams("quiz", "comprehension", authMode === "anonymous" ? "demo" : "full"), args, authMode);
4196
4174
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a ${count}-question comprehension quiz from a YouTube video. Read the attached quiz and comprehension guides for craft knowledge on question design and distractor techniques.
4197
4175
 
4198
4176
  ## Comprehension Quiz Workflow
@@ -4217,20 +4195,20 @@ function comprehensionQuizWorkflow(args, sessionContext) {
4217
4195
  - randomise_options: true in config
4218
4196
  - score: 1 on correct option, score: 0 on wrong
4219
4197
  - 3-4 wrong answers per question - make distractors plausible (things someone might guess without watching)
4220
- 7. **Generate narration** with clipform_generate_tts - batch ALL questions in a single call. Reference the video naturally: "If you watched closely, you'll know this one..." Keep each narration 5-10 seconds.${media !== "text" ? `
4198
+ 7. **Generate narration** with clipform_generate_tts - batch ALL questions in a single call. Reference the video naturally: "If you watched closely, you'll know this one..." Keep each narration 5-10 seconds.
4221
4199
  8. **Build video** for each question:
4222
4200
  - clipform_search_media (kind: "image") - 3 images per question
4223
4201
  - clipform_generate_video - Ken Burns video synced to audio
4224
- 9. **Attach media** with clipform_upload_node_media. Include captions, set show_captions: true.` : ""}
4225
- ${media !== "text" ? "10" : "8"}. **Update end screen** with clipform_update_node:
4202
+ 9. **Attach media** with clipform_upload_node_media. Include captions, set show_captions: true.
4203
+ 10. **Update end screen** with clipform_update_node:
4226
4204
  - show_score: true, icon: "trophy"
4227
4205
  - show_share_button: true
4228
4206
  - cta_type: "restart", cta_text: "Rewatch and try again?"
4229
4207
  - title and message that reference the video. Example: title: "How well do you know this video?", message: "Share your score and see if your friends were really paying attention."
4230
4208
  - NOTE: Personalised messages per score tier (score_ranges) are coming soon. For now, write one great end screen message.
4231
- ${media !== "text" ? "11" : "9"}. **Publish** with clipform_update_form
4232
- ${media !== "text" ? "12" : "10"}. **Tag** - tags: ["quiz", "comprehension", "youtube"] + 2-3 topic words from the video
4233
- ${media !== "text" ? "13" : "11"}. **Log** with clipform_log_generation - include the YouTube URL, video title, and channel as sources
4209
+ 11. **Publish** with clipform_update_form
4210
+ 12. **Tag** - tags: ["quiz", "comprehension", "youtube"] + 2-3 topic words from the video
4211
+ 13. **Log** with clipform_log_generation - include the YouTube URL, video title, and channel as sources
4234
4212
 
4235
4213
  ## Question Types for Comprehension
4236
4214
 
@@ -4242,13 +4220,15 @@ ${media !== "text" ? "13" : "11"}. **Log** with clipform_log_generation - includ
4242
4220
  | Contrast | "The video compares X and Y. What was the key difference?" | Comprehension depth |
4243
4221
  | Conclusion | "What was the presenter's final point?" | Watched to the end |
4244
4222
 
4245
- Wrong answers should sound right to someone who didn't watch but googled the topic. The quiz should be unfair to non-watchers and fair to watchers.`;
4223
+ Wrong answers should sound right to someone who didn't watch but googled the topic. The quiz should be unfair to non-watchers and fair to watchers.
4224
+
4225
+ > **Text-only override:** If the user explicitly asked for text-only (no video), skip steps 8-9 (video production and media attachment). Still generate narration in step 7.`;
4246
4226
  }
4247
- function interviewWorkflow(args, sessionContext) {
4227
+ function interviewWorkflow(args, sessionContext, authMode = "oauth") {
4248
4228
  const purpose = args.purpose ?? "responses";
4249
4229
  const format = args.response_format ?? "all";
4250
4230
  const consent = args.needs_consent ?? true;
4251
- const discovery = buildDiscovery(INTERVIEW_DISCOVERY, args);
4231
+ const discovery = buildDiscovery(getDiscoveryParams("interview", void 0, authMode === "anonymous" ? "demo" : "full"), args, authMode);
4252
4232
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build an interview form for collecting ${purpose} with Clipform. Read the attached interview guide for craft knowledge on question design and pacing.
4253
4233
 
4254
4234
  ## Workflow
@@ -4267,10 +4247,10 @@ function interviewWorkflow(args, sessionContext) {
4267
4247
  10. **Tag the form** - pass tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4268
4248
  11. **Log** with clipform_log_generation`;
4269
4249
  }
4270
- function surveyWorkflow(args, sessionContext) {
4250
+ function surveyWorkflow(args, sessionContext, authMode = "oauth") {
4271
4251
  const topic = args.topic ? ` for ${args.topic}` : "";
4272
4252
  const anonymous = args.anonymous ?? true;
4273
- const discovery = buildDiscovery(SURVEY_DISCOVERY, args);
4253
+ const discovery = buildDiscovery(getDiscoveryParams("survey", void 0, authMode === "anonymous" ? "demo" : "full"), args, authMode);
4274
4254
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a survey${topic} with Clipform. Read the attached survey guide for craft knowledge on question design and reducing respondent fatigue.
4275
4255
 
4276
4256
  ## Workflow
@@ -4291,15 +4271,14 @@ function surveyWorkflow(args, sessionContext) {
4291
4271
 
4292
4272
  ## Key rule: 5 questions max. Every extra question costs completions.`;
4293
4273
  }
4294
- function funnelWorkflow(_args, sessionContext) {
4274
+ function funnelWorkflow(_args, sessionContext, _authMode = "oauth") {
4295
4275
  return `${sessionContext ? sessionContext + "\n\n" : ""}Funnel capabilities with conditional routing and branching logic are planned but not yet available.
4296
4276
 
4297
4277
  In the meantime, you can build a simple linear qualification form using the survey or quiz workflow. Use the create-survey or create-quiz prompt instead.`;
4298
4278
  }
4299
- function testimonialWorkflow(args, sessionContext) {
4279
+ function testimonialWorkflow(args, sessionContext, authMode = "oauth") {
4300
4280
  const useCase = args.use_case ?? "customer stories";
4301
- const media = args.media_style ?? "video";
4302
- const discovery = buildDiscovery(TESTIMONIAL_DISCOVERY, args);
4281
+ const discovery = buildDiscovery(getDiscoveryParams("testimonial", void 0, authMode === "anonymous" ? "demo" : "full"), args, authMode);
4303
4282
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a testimonial collection form for ${useCase} with Clipform. Read the attached testimonial guide for craft knowledge on storytelling prompts and making respondents comfortable.
4304
4283
 
4305
4284
  ## Workflow
@@ -4313,19 +4292,21 @@ function testimonialWorkflow(args, sessionContext) {
4313
4292
  - "What was your biggest challenge before?"
4314
4293
  - "What was the experience like working with us?"
4315
4294
  - "What's different now? What would you tell someone considering it?"
4316
- 5. **Add consent node** - "I agree that my response may be used in marketing materials, on the website, and in sales presentations."${media !== "text" ? `
4317
- 6. **Generate narration** with clipform_generate_tts - batch all prompts in a single call. Warm, appreciative tone - "We'd love to hear your story..." Keep each narration 5-8 seconds.` : ""}${media !== "text" ? `
4318
- 7. **Optional: build video** for the intro/warm-up question to set the tone.` : ""}
4319
- ${media !== "text" ? "8" : "6"}. **Update end screen** - "Thank you for sharing your story! Your experience will help others."
4295
+ 5. **Add consent node** - "I agree that my response may be used in marketing materials, on the website, and in sales presentations."
4296
+ 6. **Generate narration** with clipform_generate_tts - batch all prompts in a single call. Warm, appreciative tone - "We'd love to hear your story..." Keep each narration 5-8 seconds.
4297
+ 7. **Optional: build video** for the intro/warm-up question to set the tone.
4298
+ 8. **Update end screen** - "Thank you for sharing your story! Your experience will help others."
4320
4299
  - icon: "party"
4321
4300
  - No score, no restart CTA
4322
- ${media !== "text" ? "9" : "7"}. **Publish** with clipform_update_form
4323
- ${media !== "text" ? "10" : "8"}. **Tag the form** - pass tags: format "testimonial", genre "story", and 2-3 topic words
4324
- ${media !== "text" ? "11" : "9"}. **Log** with clipform_log_generation`;
4301
+ 9. **Publish** with clipform_update_form
4302
+ 10. **Tag the form** - pass tags: format "testimonial", genre "story", and 2-3 topic words
4303
+ 11. **Log** with clipform_log_generation
4304
+
4305
+ > **Text-only override:** If the user explicitly asked for text-only (no video), skip steps 6-7 (narration and video production).`;
4325
4306
  }
4326
- function applicationWorkflow(args, sessionContext) {
4307
+ function applicationWorkflow(args, sessionContext, authMode = "oauth") {
4327
4308
  const role = args.role ?? "an application";
4328
- const discovery = buildDiscovery(APPLICATION_DISCOVERY, args);
4309
+ const discovery = buildDiscovery(getDiscoveryParams("application", void 0, authMode === "anonymous" ? "demo" : "full"), args, authMode);
4329
4310
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build ${role} form with Clipform. Read the attached application guide for craft knowledge on structuring multi-section applications.
4330
4311
 
4331
4312
  ## Workflow
@@ -4346,10 +4327,10 @@ function applicationWorkflow(args, sessionContext) {
4346
4327
  10. **Tag the form** - pass tags: format "application", genre "screening", and 2-3 topic words
4347
4328
  11. **Log** with clipform_log_generation`;
4348
4329
  }
4349
- function bookingWorkflow(args, sessionContext) {
4330
+ function bookingWorkflow(args, sessionContext, authMode = "oauth") {
4350
4331
  const eventName = args.event_name ?? "an event";
4351
4332
  const eventType = args.event_type ?? "event";
4352
- const discovery = buildDiscovery(BOOKING_DISCOVERY, args);
4333
+ const discovery = buildDiscovery(getDiscoveryParams("booking", void 0, authMode === "anonymous" ? "demo" : "full"), args, authMode);
4353
4334
  return `${sessionContext ? sessionContext + "\n\n" : ""}${discovery}Here's how to build a ${eventType} registration form for ${eventName} with Clipform. Read the attached booking guide for craft knowledge on keeping registrations fast.
4354
4335
 
4355
4336
  ## Workflow
@@ -4385,11 +4366,11 @@ var QUIZ_VARIANT_BUILDERS = {
4385
4366
  "comprehension": comprehensionQuizWorkflow
4386
4367
  };
4387
4368
  async function getWorkflowText(type, args = {}, variant) {
4388
- const sessionContext = await getSessionContext();
4369
+ const { text: sessionContext, authMode } = await getSessionContextWithAuth();
4389
4370
  if (type === "quiz" && variant) {
4390
- return QUIZ_VARIANT_BUILDERS[variant](args, sessionContext);
4371
+ return QUIZ_VARIANT_BUILDERS[variant](args, sessionContext, authMode);
4391
4372
  }
4392
- return WORKFLOW_BUILDERS[type](args, sessionContext);
4373
+ return WORKFLOW_BUILDERS[type](args, sessionContext, authMode);
4393
4374
  }
4394
4375
  function registerPrompts(server) {
4395
4376
  server.registerPrompt(
@@ -4685,17 +4666,9 @@ export {
4685
4666
  ZodFirstPartyTypeKind,
4686
4667
  objectType,
4687
4668
  external_exports,
4688
- WORKFLOW_TYPES,
4669
+ WORKFLOW_TYPES2 as WORKFLOW_TYPES,
4689
4670
  buildDiscovery,
4690
- QUIZ_DISCOVERY,
4691
- PERSONALITY_DISCOVERY,
4692
- COMPREHENSION_DISCOVERY,
4693
- SURVEY_DISCOVERY,
4694
- INTERVIEW_DISCOVERY,
4695
- TESTIMONIAL_DISCOVERY,
4696
- APPLICATION_DISCOVERY,
4697
- BOOKING_DISCOVERY,
4698
4671
  getWorkflowText,
4699
4672
  registerPrompts
4700
4673
  };
4701
- //# sourceMappingURL=chunk-DWFACCUE.js.map
4674
+ //# sourceMappingURL=chunk-LMGXTF23.js.map