@clipform/mcp-server 3.8.0 → 4.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.
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  FULL_CAPS,
3
3
  getSessionContextWithAuth
4
- } from "./chunk-S6RYUVDM.js";
4
+ } from "./chunk-PDI6VJYQ.js";
5
5
  import {
6
6
  WORKFLOW_TYPES,
7
7
  getDiscoveryParams
8
- } from "./chunk-JRASOR5T.js";
8
+ } from "./chunk-4IAURGG7.js";
9
9
  import {
10
10
  __export
11
- } from "./chunk-G3PMV62Z.js";
11
+ } from "./chunk-PZ5AY32C.js";
12
12
 
13
13
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
14
14
  var external_exports = {};
@@ -14526,14 +14526,43 @@ config(en_default());
14526
14526
 
14527
14527
  // src/prompts.ts
14528
14528
  var WORKFLOW_TYPES2 = WORKFLOW_TYPES;
14529
- var MEDIA_STYLE_ENUM = ["text", "images", "video"];
14529
+ var MAX_PROMPT_QUESTIONS = 20;
14530
+ var clean = (v) => typeof v === "string" ? v.trim().toLowerCase() : "";
14531
+ function normalizeMediaStyle(v) {
14532
+ const t = clean(v);
14533
+ if (/\b(video|slide\w*|narrat\w*|motion)\b/.test(t)) return "video";
14534
+ if (/\b(text|plain|none)\b/.test(t)) return "text";
14535
+ if (/\b(image\w*|photo\w*|still\w*|picture\w*)\b/.test(t)) return "images";
14536
+ return "video";
14537
+ }
14538
+ function normalizeResponseFormat(v) {
14539
+ const t = clean(v);
14540
+ if (!t) return void 0;
14541
+ if (/(all|any|every|both)/.test(t)) return "all";
14542
+ const mentioned = ["video", "audio", "text"].filter((f) => t.includes(f));
14543
+ return mentioned.length === 1 ? mentioned[0] : "all";
14544
+ }
14545
+ function normalizeQuestionCount(v) {
14546
+ const n = parseInt(clean(v), 10);
14547
+ if (Number.isNaN(n) || n < 1) return void 0;
14548
+ return Math.min(n, MAX_PROMPT_QUESTIONS);
14549
+ }
14550
+ function normalizeBool(v) {
14551
+ const t = clean(v);
14552
+ if (["true", "yes", "y", "1", "on"].includes(t)) return true;
14553
+ if (["false", "no", "n", "0", "off"].includes(t)) return false;
14554
+ return void 0;
14555
+ }
14530
14556
  function coercePromptArgs(args) {
14557
+ const { media_style, response_format, question_count, needs_consent, anonymous, needs_contact, ...rest } = args;
14531
14558
  return {
14532
- ...args,
14533
- question_count: args.question_count ? parseInt(args.question_count, 10) : void 0,
14534
- needs_consent: args.needs_consent != null ? args.needs_consent === "true" : void 0,
14535
- anonymous: args.anonymous != null ? args.anonymous === "true" : void 0,
14536
- needs_contact: args.needs_contact != null ? args.needs_contact === "true" : void 0
14559
+ ...rest,
14560
+ media_style: media_style !== void 0 && clean(media_style) !== "" ? normalizeMediaStyle(media_style) : void 0,
14561
+ response_format: normalizeResponseFormat(response_format),
14562
+ question_count: normalizeQuestionCount(question_count),
14563
+ needs_consent: normalizeBool(needs_consent),
14564
+ anonymous: normalizeBool(anonymous),
14565
+ needs_contact: normalizeBool(needs_contact)
14537
14566
  };
14538
14567
  }
14539
14568
  function buildDiscovery(params, args, authMode = "authenticated") {
@@ -14561,16 +14590,17 @@ ${rows}
14561
14590
 
14562
14591
  `;
14563
14592
  }
14564
- function resourceLink(name, uri, title) {
14593
+ function promptMessage(request, guides, workflow) {
14594
+ const parts = [];
14595
+ if (request) parts.push(request);
14596
+ if (guides.length > 0) {
14597
+ const refs = guides.map((g) => `${g.title}: \`${g.uri}\``).join("; ");
14598
+ parts.push(`Read the guide first (${refs}) - or call clipform_get_guide.`);
14599
+ }
14600
+ parts.push(workflow);
14565
14601
  return {
14566
- role: "assistant",
14567
- content: {
14568
- type: "resource_link",
14569
- uri,
14570
- name,
14571
- title,
14572
- mimeType: "text/markdown"
14573
- }
14602
+ role: "user",
14603
+ content: { type: "text", text: parts.join("\n\n") }
14574
14604
  };
14575
14605
  }
14576
14606
  var BUILD_ONCE_STEP = "**Build the whole form in ONE clipform_create_form call** - pass nodes, settings, and tags together; do NOT create an empty form and add nodes one by one:";
@@ -14658,37 +14688,37 @@ var comprehensionQuizWorkflow = (args, sessionContext, authMode, caps) => {
14658
14688
  const audienceLabel = args.audience ? ` (${args.audience})` : "";
14659
14689
  const discovery = buildDiscovery(getDiscoveryParams("quiz", "comprehension", authMode === "anonymous" ? "demo" : "full"), args, authMode);
14660
14690
  const steps = numbered([
14661
- `**Get the video content** - ask the user to paste the video's transcript, closed captions, or a detailed summary of its key points (this workflow does not extract YouTube captions itself). Use the YouTube URL, if given, only as a reference/source link${caps.research ? " for the audit log" : ""}, not as something to fetch.`,
14691
+ `**Get the source material** - ask the user to paste the transcript, document text, or notes (or a detailed summary of the key points) the quiz should test. Use any link they give only as a reference${caps.research ? " for the audit log" : ""}, not as something to fetch.`,
14662
14692
  `**Analyse the content** - identify:
14663
- - Key claims, facts, or arguments made in the video
14664
- - Specific details a casual viewer might miss
14665
- - The video's main thesis or conclusion
14693
+ - Key claims, facts, or arguments made in the source
14694
+ - Specific details a casual reader or viewer might miss
14695
+ - The source's main thesis or conclusion
14666
14696
  - Any surprising or counterintuitive points`,
14667
- `**Write comprehension questions** - these test whether someone WATCHED the video, not general knowledge:
14668
- - "According to the video, what is the main reason...?"
14669
- - "What example does the video use to illustrate...?"
14670
- - Include 1-2 inference questions: "Based on the video, why does the presenter believe...?"
14671
- - Avoid questions answerable without watching (e.g., common knowledge about the topic)`,
14697
+ `**Write comprehension questions** - these test whether someone engaged with the source, not general knowledge:
14698
+ - "According to the source, what is the main reason...?"
14699
+ - "What example does the source use to illustrate...?"
14700
+ - Include 1-2 inference questions: "Based on the source, why does the author believe...?"
14701
+ - Avoid questions answerable without the source (e.g., common knowledge about the topic)`,
14672
14702
  `**Adapt to the audience**${audienceLabel} - simplify language for younger audiences, focus on concrete/visual details rather than abstract arguments`,
14673
14703
  `${BUILD_ONCE_STEP}
14674
14704
  - Settings: show_step_counter: true, disable_back_navigation: true
14675
- - One choice node per question: config { choice: { show_answer_feedback: true }, randomise_options: true }, options with score: 1 on the correct answer and score: 0 on 3-4 plausible wrong ones - make distractors things someone might guess without watching. The viewer shuffles options at render time, so list them in any order. Scored options enable correct-answer marking automatically.
14705
+ - One choice node per question: config { choice: { show_answer_feedback: true }, randomise_options: true }, options with score: 1 on the correct answer and score: 0 on 3-4 plausible wrong ones - make distractors things someone might guess without the source. The viewer shuffles options at render time, so list them in any order. Scored options enable correct-answer marking automatically.
14676
14706
  - Final end_screen node:
14677
14707
  - show_score: true, icon: "trophy"
14678
14708
  - show_share_button: true
14679
- - cta_type: "restart", cta_text: "Rewatch and try again?"
14680
- - 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."
14709
+ - cta_type: "restart", cta_text: "Try again?"
14710
+ - title and message that reference the source. Example: title: "How well do you know this?", message: "Share your score and see if your friends were really paying attention."
14681
14711
  - NOTE: Personalised messages per score tier (score_ranges) are coming soon. For now, write one great end screen message.
14682
- - tags: ["quiz", "comprehension", "youtube"] + 2-3 topic words from the video`,
14683
- caps.media && `**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.`,
14712
+ - tags: ["quiz", "comprehension"] + 2-3 topic words from the source`,
14713
+ caps.media && `**Generate narration** with clipform_generate_tts - batch ALL questions in a single call. Reference the source naturally: "If you were paying attention, you'll know this one..." Keep each narration 5-10 seconds.`,
14684
14714
  caps.media && `**Build video** for each question:
14685
14715
  - clipform_search_media (kind: "image") - 3 images per question, batch all queries in one call
14686
14716
  - clipform_render_video_template (template: "slideshow", controls.items + controls.audio_url) with wait: false per question - fires all renders in parallel - then collect URLs with clipform_check_render`,
14687
14717
  caps.media && ATTACH_MEDIA_STEP,
14688
14718
  REPUBLISH_STEP,
14689
- caps.research && `${LOG_STEP} - include the YouTube URL and video title/channel as sources, using whatever of those the user provided`
14719
+ caps.research && `${LOG_STEP} - include the source title and link as sources, using whatever of those the user provided`
14690
14720
  ]);
14691
- return `${intro(sessionContext, 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.
14721
+ return `${intro(sessionContext, discovery)}Here's how to build a ${count}-question comprehension quiz from source material. Read the attached quiz and comprehension guides for craft knowledge on question design and distractor techniques.
14692
14722
 
14693
14723
  ## Comprehension Quiz Workflow
14694
14724
 
@@ -14937,54 +14967,61 @@ async function getWorkflowText(type, args = {}, variant, caps = FULL_CAPS) {
14937
14967
  }
14938
14968
  return WORKFLOW_BUILDERS[type](args, sessionContext, authMode, caps);
14939
14969
  }
14970
+ function blankAsOmitted(schema) {
14971
+ const std = schema?.["~standard"];
14972
+ if (!std?.validate) return schema;
14973
+ return Object.create(schema, {
14974
+ "~standard": {
14975
+ value: {
14976
+ ...std,
14977
+ validate: (value, ...rest) => {
14978
+ const cleaned = value && typeof value === "object" ? Object.fromEntries(
14979
+ Object.entries(value).filter(
14980
+ ([, v]) => !(typeof v === "string" && v.trim() === "")
14981
+ )
14982
+ ) : value;
14983
+ return std.validate(cleaned, ...rest);
14984
+ }
14985
+ }
14986
+ }
14987
+ });
14988
+ }
14940
14989
  function registerPrompts(server, caps = FULL_CAPS) {
14941
- const mediaStyleArg = caps.media ? { media_style: external_exports.enum(MEDIA_STYLE_ENUM).optional().default("video").describe("Media style: text only, still images, or slideshow video with narration (default: video)") } : {};
14990
+ const _registerPrompt = server.registerPrompt.bind(server);
14991
+ const registerPrompt = ((name, config2, cb) => _registerPrompt(name, config2?.argsSchema ? { ...config2, argsSchema: blankAsOmitted(config2.argsSchema) } : config2, cb));
14992
+ const mediaStyleArg = caps.media ? { media_style: external_exports.string().optional().describe("Media style: text, images, or video (default: video)") } : {};
14942
14993
  const styleNote = (args) => caps.media ? `, ${args.media_style ?? "video"} style` : "";
14943
- server.registerPrompt(
14994
+ registerPrompt(
14944
14995
  "create-quiz",
14945
14996
  {
14946
14997
  title: "Create a Quiz",
14947
14998
  description: "Build a scored knowledge quiz with narrated video questions",
14948
- argsSchema: {
14999
+ argsSchema: external_exports.object({
14949
15000
  topic: external_exports.string().optional().describe("Quiz topic (e.g. 'Space exploration', 'Premier League')"),
14950
- question_count: external_exports.string().optional().default("8").describe("Number of questions (default: 8)"),
15001
+ question_count: external_exports.string().optional().describe("Number of questions (default: 8)"),
14951
15002
  ...mediaStyleArg
14952
- }
15003
+ })
14953
15004
  },
14954
15005
  async (rawArgs) => {
14955
15006
  const args = coercePromptArgs(rawArgs);
14956
15007
  return {
14957
15008
  messages: [
14958
- {
14959
- role: "user",
14960
- content: {
14961
- type: "text",
14962
- text: `I want to create a quiz${args.topic ? ` about "${args.topic}"` : ""}. ${args.question_count ?? 8} questions${styleNote(args)}.`
14963
- }
14964
- },
14965
- resourceLink("guide-quiz", "clipform://guides/quiz", "Quiz Writing Guide"),
14966
- {
14967
- role: "assistant",
14968
- content: {
14969
- type: "text",
14970
- text: await getWorkflowText("quiz", args, void 0, caps)
14971
- }
14972
- }
15009
+ promptMessage(`I want to create a quiz${args.topic ? ` about "${args.topic}"` : ""}. ${args.question_count ?? 8} questions${styleNote(args)}.`, [{ title: "Quiz Writing Guide", uri: "clipform://guides/quiz" }], await getWorkflowText("quiz", args, void 0, caps))
14973
15010
  ]
14974
15011
  };
14975
15012
  }
14976
15013
  );
14977
- server.registerPrompt(
15014
+ registerPrompt(
14978
15015
  "create-personality-quiz",
14979
15016
  {
14980
15017
  title: "Create a Personality Quiz",
14981
15018
  description: "Build a 'Which X are you?' personality quiz with category-based scoring and outcome screens",
14982
- argsSchema: {
15019
+ argsSchema: external_exports.object({
14983
15020
  topic: external_exports.string().optional().describe("Quiz theme (e.g. 'Which city are you?', 'What's your work style?')"),
14984
15021
  categories: external_exports.string().optional().describe("Comma-separated outcome categories (e.g. 'Creative, Analytical, Leader, Collaborator')"),
14985
- question_count: external_exports.string().optional().default("8").describe("Number of questions (default: 8)"),
15022
+ question_count: external_exports.string().optional().describe("Number of questions (default: 8)"),
14986
15023
  ...mediaStyleArg
14987
- }
15024
+ })
14988
15025
  },
14989
15026
  async (rawArgs) => {
14990
15027
  const args = coercePromptArgs(rawArgs);
@@ -14993,351 +15030,174 @@ function registerPrompts(server, caps = FULL_CAPS) {
14993
15030
  Outcome categories: ${args.categories}` : "";
14994
15031
  return {
14995
15032
  messages: [
14996
- {
14997
- role: "user",
14998
- content: {
14999
- type: "text",
15000
- text: `I want to create a personality quiz${args.topic ? ` - "${args.topic}"` : ""}. ${args.question_count ?? 8} questions${styleNote(args)}.${categoriesNote}`
15001
- }
15002
- },
15003
- resourceLink("guide-quiz", "clipform://guides/quiz", "Quiz Writing Guide"),
15004
- resourceLink("guide-quiz-personality", "clipform://guides/quiz/personality", "Personality Quiz Addendum"),
15005
- {
15006
- role: "assistant",
15007
- content: {
15008
- type: "text",
15009
- text: await getWorkflowText("quiz", args, "personality", caps)
15010
- }
15011
- }
15033
+ promptMessage(`I want to create a personality quiz${args.topic ? ` - "${args.topic}"` : ""}. ${args.question_count ?? 8} questions${styleNote(args)}.${categoriesNote}`, [{ title: "Quiz Writing Guide", uri: "clipform://guides/quiz" }, { title: "Personality Quiz Addendum", uri: "clipform://guides/quiz/personality" }], await getWorkflowText("quiz", args, "personality", caps))
15012
15034
  ]
15013
15035
  };
15014
15036
  }
15015
15037
  );
15016
- server.registerPrompt(
15038
+ registerPrompt(
15017
15039
  "create-interview",
15018
15040
  {
15019
15041
  title: "Create an Interview",
15020
15042
  description: "Build a form to collect case studies, async video interviews, expert input, or journalist responses",
15021
- argsSchema: {
15043
+ argsSchema: external_exports.object({
15022
15044
  purpose: external_exports.string().optional().describe("What you're collecting (e.g. 'case study', 'expert input', 'journalist responses')"),
15023
- response_format: external_exports.enum(["video", "audio", "text", "all"]).optional().default("all").describe("How respondents reply (default: all - video, audio, and text)"),
15024
- needs_consent: external_exports.string().optional().default("true").describe("Include a consent statement (default: true)")
15025
- }
15045
+ response_format: external_exports.string().optional().describe("How respondents reply: video, audio, text, or all (default: all)"),
15046
+ needs_consent: external_exports.string().optional().describe("Include a consent statement: yes or no (default: yes)")
15047
+ })
15026
15048
  },
15027
15049
  async (rawArgs) => {
15028
15050
  const args = coercePromptArgs(rawArgs);
15029
15051
  return {
15030
15052
  messages: [
15031
- {
15032
- role: "user",
15033
- content: {
15034
- type: "text",
15035
- text: `I want to collect ${args.purpose ?? "responses"} from people. Responses via ${args.response_format ?? "all"}.${args.needs_consent ?? true ? " Include consent." : ""}`
15036
- }
15037
- },
15038
- resourceLink("guide-interview", "clipform://guides/interview", "Interview Guide"),
15039
- {
15040
- role: "assistant",
15041
- content: {
15042
- type: "text",
15043
- text: await getWorkflowText("interview", args, void 0, caps)
15044
- }
15045
- }
15053
+ promptMessage(`I want to collect ${args.purpose ?? "responses"} from people. Responses via ${args.response_format ?? "all"}.${args.needs_consent ?? true ? " Include consent." : ""}`, [{ title: "Interview Guide", uri: "clipform://guides/interview" }], await getWorkflowText("interview", args, void 0, caps))
15046
15054
  ]
15047
15055
  };
15048
15056
  }
15049
15057
  );
15050
- server.registerPrompt(
15058
+ registerPrompt(
15051
15059
  "create-survey",
15052
15060
  {
15053
15061
  title: "Create a Survey",
15054
15062
  description: "Build a feedback survey, NPS form, or research questionnaire",
15055
- argsSchema: {
15063
+ argsSchema: external_exports.object({
15056
15064
  topic: external_exports.string().optional().describe("What feedback you're collecting (e.g. 'NPS', 'event feedback', 'product satisfaction')"),
15057
- anonymous: external_exports.string().optional().default("true").describe("Whether the survey is anonymous (default: true)")
15058
- }
15065
+ anonymous: external_exports.string().optional().describe("Whether the survey is anonymous: yes or no (default: yes)")
15066
+ })
15059
15067
  },
15060
15068
  async (rawArgs) => {
15061
15069
  const args = coercePromptArgs(rawArgs);
15062
15070
  return {
15063
15071
  messages: [
15064
- {
15065
- role: "user",
15066
- content: {
15067
- type: "text",
15068
- text: `I want to create a survey${args.topic ? ` for ${args.topic}` : ""}. ${args.anonymous ?? true ? "Anonymous" : "Identified"} respondents.`
15069
- }
15070
- },
15071
- resourceLink("guide-survey", "clipform://guides/survey", "Survey & Feedback Guide"),
15072
- {
15073
- role: "assistant",
15074
- content: {
15075
- type: "text",
15076
- text: await getWorkflowText("survey", args, void 0, caps)
15077
- }
15078
- }
15072
+ promptMessage(`I want to create a survey${args.topic ? ` for ${args.topic}` : ""}. ${args.anonymous ?? true ? "Anonymous" : "Identified"} respondents.`, [{ title: "Survey & Feedback Guide", uri: "clipform://guides/survey" }], await getWorkflowText("survey", args, void 0, caps))
15079
15073
  ]
15080
15074
  };
15081
15075
  }
15082
15076
  );
15083
- server.registerPrompt(
15084
- "create-comprehension-quiz",
15085
- {
15086
- title: "Create a YouTube Comprehension Quiz",
15087
- description: "Build a comprehension quiz from a YouTube video - tests whether the viewer actually watched and understood the content",
15088
- argsSchema: {
15089
- youtube_url: external_exports.string().optional().describe("YouTube video URL to create the quiz from"),
15090
- question_count: external_exports.string().optional().default("8").describe("Number of questions (default: 8)"),
15091
- audience: external_exports.string().optional().describe("Target audience (e.g. 'children aged 5-8', 'university students', 'general')"),
15092
- ...mediaStyleArg
15093
- }
15094
- },
15095
- async (rawArgs) => {
15096
- const args = coercePromptArgs(rawArgs);
15097
- const urlNote = args.youtube_url ? ` The video is: ${args.youtube_url}` : "";
15098
- const audienceNote = args.audience ? ` Target audience: ${args.audience}.` : "";
15099
- return {
15100
- messages: [
15101
- {
15102
- role: "user",
15103
- content: {
15104
- type: "text",
15105
- text: `I want to create a comprehension quiz based on a YouTube video. ${args.question_count ?? 8} questions${styleNote(args)}.${urlNote}${audienceNote}`
15106
- }
15107
- },
15108
- resourceLink("guide-quiz", "clipform://guides/quiz", "Quiz Writing Guide"),
15109
- resourceLink("guide-quiz-comprehension", "clipform://guides/quiz/comprehension", "Comprehension Quiz Addendum"),
15110
- {
15111
- role: "assistant",
15112
- content: {
15113
- type: "text",
15114
- text: await getWorkflowText("quiz", args, "comprehension", caps)
15115
- }
15116
- }
15117
- ]
15118
- };
15119
- }
15120
- );
15121
- if (caps.media) server.registerPrompt(
15077
+ if (caps.media) registerPrompt(
15122
15078
  "create-composition-quiz",
15123
15079
  {
15124
15080
  title: "Create a Composition Quiz",
15125
15081
  description: "Build a guess-and-reveal quiz from rendered compositions - flag sweeps, Rebus puzzles, blur reveals, odd-one-out grids - instead of stock-image slideshows",
15126
- argsSchema: {
15082
+ argsSchema: external_exports.object({
15127
15083
  topic: external_exports.string().optional().describe("Quiz topic (e.g. 'world flags', 'movie emoji', '90s music')"),
15128
- question_count: external_exports.string().optional().default("5").describe("Number of questions (default: 5 - one scored choice node per question)")
15129
- }
15084
+ question_count: external_exports.string().optional().describe("Number of questions (default: 5 - one scored choice node per question)")
15085
+ })
15130
15086
  },
15131
15087
  async (rawArgs) => {
15132
15088
  const args = coercePromptArgs(rawArgs);
15133
15089
  return {
15134
15090
  messages: [
15135
- {
15136
- role: "user",
15137
- content: {
15138
- type: "text",
15139
- text: `I want to create a composition quiz${args.topic ? ` about "${args.topic}"` : ""}. ${args.question_count ?? 5} questions, guess-and-reveal style.`
15140
- }
15141
- },
15142
- resourceLink("guide-quiz", "clipform://guides/quiz", "Quiz Writing Guide"),
15143
- resourceLink("guide-quiz-composition", "clipform://guides/quiz/composition", "Composition Quiz Addendum"),
15144
- {
15145
- role: "assistant",
15146
- content: {
15147
- type: "text",
15148
- text: await getWorkflowText("quiz", args, "composition", caps)
15149
- }
15150
- }
15091
+ promptMessage(`I want to create a composition quiz${args.topic ? ` about "${args.topic}"` : ""}. ${args.question_count ?? 5} questions, guess-and-reveal style.`, [{ title: "Quiz Writing Guide", uri: "clipform://guides/quiz" }, { title: "Composition Quiz Addendum", uri: "clipform://guides/quiz/composition" }], await getWorkflowText("quiz", args, "composition", caps))
15151
15092
  ]
15152
15093
  };
15153
15094
  }
15154
15095
  );
15155
- server.registerPrompt(
15096
+ registerPrompt(
15156
15097
  "create-funnel",
15157
15098
  {
15158
15099
  title: "Create a Funnel",
15159
15100
  description: "Lead qualification funnels with branching logic are planned but not yet available. Build a linear qualification survey or quiz directly with clipform_create_form now instead of branching.",
15160
- argsSchema: {}
15101
+ argsSchema: external_exports.object({})
15161
15102
  },
15162
15103
  async () => ({
15163
15104
  messages: [
15164
- {
15165
- role: "assistant",
15166
- content: {
15167
- type: "text",
15168
- text: await getWorkflowText("funnel")
15169
- }
15170
- }
15105
+ promptMessage(null, [], await getWorkflowText("funnel"))
15171
15106
  ]
15172
15107
  })
15173
15108
  );
15174
- server.registerPrompt(
15109
+ registerPrompt(
15175
15110
  "create-testimonial",
15176
15111
  {
15177
15112
  title: "Collect Testimonials",
15178
15113
  description: "Build a video testimonial collection form - capture authentic customer stories on camera",
15179
- argsSchema: {
15114
+ argsSchema: external_exports.object({
15180
15115
  use_case: external_exports.string().optional().describe("What stories you're collecting (e.g. 'customer success', 'product review', 'case study')"),
15181
15116
  ...mediaStyleArg
15182
- }
15117
+ })
15183
15118
  },
15184
15119
  async (args) => ({
15185
15120
  messages: [
15186
- {
15187
- role: "user",
15188
- content: {
15189
- type: "text",
15190
- text: `I want to collect ${args.use_case ?? "testimonials"} from people on video.`
15191
- }
15192
- },
15193
- resourceLink("guide-testimonial", "clipform://guides/testimonial", "Testimonial & Story Collection Guide"),
15194
- {
15195
- role: "assistant",
15196
- content: {
15197
- type: "text",
15198
- text: await getWorkflowText("testimonial", args, void 0, caps)
15199
- }
15200
- }
15121
+ promptMessage(`I want to collect ${args.use_case ?? "testimonials"} from people on video.`, [{ title: "Testimonial & Story Collection Guide", uri: "clipform://guides/testimonial" }], await getWorkflowText("testimonial", coercePromptArgs(args), void 0, caps))
15201
15122
  ]
15202
15123
  })
15203
15124
  );
15204
- server.registerPrompt(
15125
+ registerPrompt(
15205
15126
  "create-application",
15206
15127
  {
15207
15128
  title: "Create an Application Form",
15208
15129
  description: "Build a structured application form - job applications, programme admissions, grant proposals with video responses",
15209
- argsSchema: {
15130
+ argsSchema: external_exports.object({
15210
15131
  role: external_exports.string().optional().describe("What the application is for (e.g. 'Software Engineer', 'Scholarship', 'Membership')")
15211
- }
15132
+ })
15212
15133
  },
15213
15134
  async (args) => ({
15214
15135
  messages: [
15215
- {
15216
- role: "user",
15217
- content: {
15218
- type: "text",
15219
- text: `I want to create an application form${args.role ? ` for ${args.role}` : ""}.`
15220
- }
15221
- },
15222
- resourceLink("guide-application", "clipform://guides/application", "Application & Evaluation Guide"),
15223
- {
15224
- role: "assistant",
15225
- content: {
15226
- type: "text",
15227
- text: await getWorkflowText("application", args, void 0, caps)
15228
- }
15229
- }
15136
+ promptMessage(`I want to create an application form${args.role ? ` for ${args.role}` : ""}.`, [{ title: "Application & Evaluation Guide", uri: "clipform://guides/application" }], await getWorkflowText("application", coercePromptArgs(args), void 0, caps))
15230
15137
  ]
15231
15138
  })
15232
15139
  );
15233
- server.registerPrompt(
15140
+ registerPrompt(
15234
15141
  "create-booking",
15235
15142
  {
15236
15143
  title: "Create a Booking Form",
15237
15144
  description: "Build an event registration, course signup, or booking form with a personal video welcome",
15238
- argsSchema: {
15145
+ argsSchema: external_exports.object({
15239
15146
  event_name: external_exports.string().optional().describe("Name of the event or offering (e.g. 'Design Workshop', 'Intro Call')"),
15240
15147
  event_type: external_exports.string().optional().describe("Type of event (e.g. 'workshop', 'webinar', 'consultation', 'course')")
15241
- }
15148
+ })
15242
15149
  },
15243
15150
  async (args) => ({
15244
15151
  messages: [
15245
- {
15246
- role: "user",
15247
- content: {
15248
- type: "text",
15249
- text: `I want to create a registration form for ${args.event_name ?? "an event"}.${args.event_type ? ` Type: ${args.event_type}.` : ""}`
15250
- }
15251
- },
15252
- resourceLink("guide-booking", "clipform://guides/booking", "Booking & Registration Guide"),
15253
- {
15254
- role: "assistant",
15255
- content: {
15256
- type: "text",
15257
- text: await getWorkflowText("booking", args, void 0, caps)
15258
- }
15259
- }
15152
+ promptMessage(`I want to create a registration form for ${args.event_name ?? "an event"}.${args.event_type ? ` Type: ${args.event_type}.` : ""}`, [{ title: "Booking & Registration Guide", uri: "clipform://guides/booking" }], await getWorkflowText("booking", coercePromptArgs(args), void 0, caps))
15260
15153
  ]
15261
15154
  })
15262
15155
  );
15263
- server.registerPrompt(
15156
+ registerPrompt(
15264
15157
  "create-intake",
15265
15158
  {
15266
15159
  title: "Create a Client Intake Form",
15267
15160
  description: "Build a warm client intake or onboarding form - capture contact details and what the client needs",
15268
- argsSchema: {
15161
+ argsSchema: external_exports.object({
15269
15162
  use_case: external_exports.string().optional().describe("What kind of business or service (e.g. 'massage', 'coaching', 'personal training', 'agency')"),
15270
- response_format: external_exports.enum(["video", "audio", "text", "all"]).optional().describe("How people answer the open question (default: all)")
15271
- }
15163
+ response_format: external_exports.string().optional().describe("How people answer the open question: video, audio, text, or all (default: all)")
15164
+ })
15272
15165
  },
15273
15166
  async (args) => ({
15274
15167
  messages: [
15275
- {
15276
- role: "user",
15277
- content: {
15278
- type: "text",
15279
- text: `I want to create a client intake form${args.use_case ? ` for a ${args.use_case} business` : ""}.`
15280
- }
15281
- },
15282
- resourceLink("guide-intake", "clipform://guides/intake", "Client Intake & Onboarding Guide"),
15283
- {
15284
- role: "assistant",
15285
- content: {
15286
- type: "text",
15287
- text: await getWorkflowText("intake", args, void 0, caps)
15288
- }
15289
- }
15168
+ promptMessage(`I want to create a client intake form${args.use_case ? ` for a ${args.use_case} business` : ""}.`, [{ title: "Client Intake & Onboarding Guide", uri: "clipform://guides/intake" }], await getWorkflowText("intake", coercePromptArgs(args), void 0, caps))
15290
15169
  ]
15291
15170
  })
15292
15171
  );
15293
- server.registerPrompt(
15172
+ registerPrompt(
15294
15173
  "create-lead-capture",
15295
15174
  {
15296
15175
  title: "Create a Lead Capture Form",
15297
15176
  description: "Build a short lead capture or enquiry form - turn interest into a contact with minimal friction",
15298
- argsSchema: {
15177
+ argsSchema: external_exports.object({
15299
15178
  use_case: external_exports.string().optional().describe("What you're capturing leads for (e.g. 'a service', 'a product', 'a waitlist', 'a quote')")
15300
- }
15179
+ })
15301
15180
  },
15302
15181
  async (args) => ({
15303
15182
  messages: [
15304
- {
15305
- role: "user",
15306
- content: {
15307
- type: "text",
15308
- text: `I want to create a lead capture form${args.use_case ? ` for ${args.use_case}` : ""}.`
15309
- }
15310
- },
15311
- resourceLink("guide-lead-capture", "clipform://guides/lead-capture", "Lead Capture Guide"),
15312
- {
15313
- role: "assistant",
15314
- content: {
15315
- type: "text",
15316
- text: await getWorkflowText("lead-capture", args, void 0, caps)
15317
- }
15318
- }
15183
+ promptMessage(`I want to create a lead capture form${args.use_case ? ` for ${args.use_case}` : ""}.`, [{ title: "Lead Capture Guide", uri: "clipform://guides/lead-capture" }], await getWorkflowText("lead-capture", coercePromptArgs(args), void 0, caps))
15319
15184
  ]
15320
15185
  })
15321
15186
  );
15322
15187
  }
15323
15188
 
15324
15189
  export {
15325
- $constructor,
15326
- defineLazy,
15327
- clone,
15328
- normalizeParams,
15329
- parse,
15330
- parseAsync,
15331
- safeParse,
15332
- safeParseAsync,
15333
- $ZodType,
15334
- $ZodObject,
15190
+ NEVER,
15335
15191
  toJSONSchema,
15336
15192
  iso_exports,
15193
+ safeParse2 as safeParse,
15337
15194
  string2 as string,
15195
+ email2 as email,
15196
+ url,
15338
15197
  number2 as number,
15339
15198
  boolean2 as boolean,
15340
15199
  _null3 as _null,
15200
+ any,
15341
15201
  unknown,
15342
15202
  array,
15343
15203
  object,
@@ -15348,14 +15208,20 @@ export {
15348
15208
  record,
15349
15209
  _enum2 as _enum,
15350
15210
  literal,
15351
- ZodOptional,
15352
15211
  optional,
15353
- custom,
15212
+ lazy,
15354
15213
  preprocess,
15214
+ ZodIssueCode,
15215
+ coerce_exports,
15355
15216
  external_exports,
15356
15217
  WORKFLOW_TYPES2 as WORKFLOW_TYPES,
15218
+ normalizeMediaStyle,
15219
+ normalizeResponseFormat,
15220
+ normalizeQuestionCount,
15221
+ normalizeBool,
15222
+ coercePromptArgs,
15357
15223
  buildDiscovery,
15358
15224
  getWorkflowText,
15359
15225
  registerPrompts
15360
15226
  };
15361
- //# sourceMappingURL=chunk-KWR2WJQI.js.map
15227
+ //# sourceMappingURL=chunk-5RUWQOYD.js.map