@clipform/mcp-server 1.44.0 → 1.44.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.
@@ -203,13 +203,6 @@ var FEATURES = {
203
203
  status: "live",
204
204
  category: "responses"
205
205
  },
206
- audio_attachments: {
207
- name: "Audio attachments",
208
- description: "Attach audio files to form nodes",
209
- enabled: false,
210
- status: "planned",
211
- category: "responses"
212
- },
213
206
  transcription: {
214
207
  name: "Auto-transcription",
215
208
  description: "Whisper-powered transcription for audio and video responses",
@@ -2042,7 +2035,6 @@ async function getSessionContext() {
2042
2035
  }
2043
2036
 
2044
2037
  export {
2045
- FEATURES,
2046
2038
  NODE_TYPES,
2047
2039
  NON_COUNTABLE_TYPES,
2048
2040
  FORM_TYPE_KEYS,
@@ -2068,4 +2060,4 @@ export {
2068
2060
  getSessionContextWithAuth,
2069
2061
  getSessionContext
2070
2062
  };
2071
- //# sourceMappingURL=chunk-5GITXD5V.js.map
2063
+ //# sourceMappingURL=chunk-PCCTN3T7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../config/features.js","../../config/node-types.js","../../config/form-types.js","../../config/help-links.js","../../config/index.js","../src/lib/telemetry.ts","../src/lib/api-client.ts","../src/lib/session-context.ts"],"sourcesContent":["/**\n * Feature registry - single source of truth for what Clipform can and cannot do.\n *\n * enabled: runtime gate - does the dashboard/viewer expose this feature?\n * status:\n * 'live' - shipped and working in production\n * 'beta' - available but not fully polished\n * 'planned' - on the roadmap, not yet usable\n *\n * Rules:\n * - Marketing copy, blog posts, and landing pages must only claim features with status 'live'\n * - 'planned' features can be mentioned as \"coming soon\" but never as current capability\n * - When a feature ships: set enabled to true, status to 'live'\n * - Everything else derives from this file (PRODUCT.features, FEATURE_FLAGS, content claims)\n *\n * @type {Record<string, { name: string, description: string, enabled: boolean, status: 'live' | 'beta' | 'planned', category: string }>}\n */\nexport const FEATURES = {\n // -- Builder --\n visual_form_builder: {\n name: 'Visual form builder',\n description: 'Drag-and-drop node-based form builder powered by React Flow',\n enabled: true,\n status: 'live',\n category: 'builder',\n },\n form_themes: {\n name: 'Form themes',\n description: 'Customise primary colour, background colour, and font',\n enabled: true,\n status: 'live',\n category: 'builder',\n },\n media_prompts: {\n name: 'Media prompts',\n description: 'Attach video, audio, or images to any question node',\n enabled: true,\n status: 'live',\n category: 'builder',\n },\n node_logic: {\n name: 'Node routing logic',\n description: 'Define the order nodes appear in - currently supports linear paths (A to B to C)',\n enabled: true,\n status: 'live',\n category: 'builder',\n },\n branching: {\n name: 'Conditional branching',\n description: 'Choice nodes route to different destinations based on which option is picked',\n enabled: false,\n status: 'planned',\n category: 'builder',\n },\n custom_scores: {\n name: 'Custom scoring',\n description: 'Assign scores to choice options for quizzes and assessments',\n enabled: false,\n status: 'planned',\n category: 'builder',\n },\n text_response: {\n name: 'Text response option',\n description: 'Allow free-text input alongside choice options',\n enabled: false,\n status: 'planned',\n category: 'builder',\n },\n custom_fonts: {\n name: 'Custom fonts',\n description: 'Upload and use custom fonts in forms',\n enabled: false,\n status: 'planned',\n category: 'builder',\n },\n brand_name: {\n name: 'Custom brand name',\n description: 'Replace Clipform branding with your own brand name',\n enabled: false,\n status: 'planned',\n category: 'builder',\n },\n allow_resume: {\n name: 'Session resume',\n description: 'Respondents can continue a form where they left off',\n enabled: true,\n status: 'live',\n category: 'builder',\n },\n\n // -- Node types --\n node_start: {\n name: 'Start node',\n description: 'Entry point for every form',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_choice: {\n name: 'Multiple choice',\n description: 'Single or multi-select questions with configurable options',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_open: {\n name: 'Open-ended questions',\n description: 'Free-form responses via text, audio, or video',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_contact: {\n name: 'Contact form',\n description: 'Structured fields (name, email, phone, company) with consent checkboxes',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_button: {\n name: 'Button',\n description: 'Simple navigation or statement node',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_redirect: {\n name: 'Redirect',\n description: 'Terminal node that sends respondents to an external URL',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_end_screen: {\n name: 'End screen',\n description: 'Configurable thank-you screen with messaging, CTAs, and share button',\n enabled: true,\n status: 'live',\n category: 'node-types',\n },\n node_scale: {\n name: 'Scale / rating',\n description: 'Numerical rating questions (1-10, stars, etc.)',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_file_upload: {\n name: 'File upload',\n description: 'Collect files from respondents',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_booking: {\n name: 'Booking',\n description: 'Calendly or Google Meet scheduling embedded in the form',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_payment: {\n name: 'Payment',\n description: 'Collect payments via Stripe or Paddle inline',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_binary: {\n name: 'Binary choice',\n description: 'Two-option choice node (yes/no, this/that)',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_link_list: {\n name: 'Link list',\n description: 'Terminal node showing a list of links to choose from',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_file_download: {\n name: 'File download',\n description: 'Provide files for respondents to download',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n node_shopping: {\n name: 'Shopping',\n description: 'Product recommendations with direct checkout',\n enabled: false,\n status: 'planned',\n category: 'node-types',\n },\n\n // -- Response formats --\n text_responses: {\n name: 'Text responses',\n description: 'Respondents type free-form text answers',\n enabled: true,\n status: 'live',\n category: 'responses',\n },\n audio_responses: {\n name: 'Audio responses',\n description: 'Respondents record audio directly in the browser',\n enabled: true,\n status: 'live',\n category: 'responses',\n },\n video_responses: {\n name: 'Video responses',\n description: 'Respondents record video directly in the browser',\n enabled: true,\n status: 'live',\n category: 'responses',\n },\n transcription: {\n name: 'Auto-transcription',\n description: 'Whisper-powered transcription for audio and video responses',\n enabled: true,\n status: 'live',\n category: 'responses',\n },\n\n // -- Analytics --\n analytics_overview: {\n name: 'Analytics dashboard',\n description: 'Views, starts, completions with daily time series',\n enabled: true,\n status: 'live',\n category: 'analytics',\n },\n analytics_demographics: {\n name: 'Demographic breakdown',\n description: 'Country, browser, device, and referrer source analytics',\n enabled: true,\n status: 'live',\n category: 'analytics',\n },\n utm_tracking: {\n name: 'UTM parameter tracking',\n description: 'Track utm_source, utm_medium, utm_campaign on form views',\n enabled: false,\n status: 'planned',\n category: 'analytics',\n },\n csv_export: {\n name: 'CSV export',\n description: 'Export response data to CSV, including transcriptions and media links',\n enabled: true,\n status: 'live',\n category: 'analytics',\n },\n tracked_links: {\n name: 'Tracked links',\n description: 'URL tracking and click-through analytics for shared form links',\n enabled: false,\n status: 'planned',\n category: 'analytics',\n },\n\n // -- Sharing & embedding --\n public_share_links: {\n name: 'Public share links',\n description: 'Share forms via a public URL',\n enabled: true,\n status: 'live',\n category: 'sharing',\n },\n share_node: {\n name: 'Share individual nodes',\n description: 'Share a direct link to a specific node within a form',\n enabled: false,\n status: 'planned',\n category: 'sharing',\n },\n embed_inline: {\n name: 'Inline embed',\n description: 'Embed forms on external websites via script tag or JavaScript API',\n enabled: true,\n status: 'live',\n category: 'sharing',\n },\n embed_widget: {\n name: 'Embed widget',\n description: 'Floating button that opens a form in a modal overlay',\n enabled: false,\n status: 'planned',\n category: 'sharing',\n },\n embed_slots: {\n name: 'Embed slots',\n description: 'Named slots that point an embed at a form, so content can be swapped from the dashboard without changing the embed code',\n enabled: false,\n status: 'beta',\n category: 'sharing',\n },\n remove_branding: {\n name: 'Remove branding',\n description: 'Hide Clipform watermark (Pro plan)',\n enabled: true,\n status: 'live',\n category: 'sharing',\n },\n\n // -- AI --\n ai_form_generation: {\n name: 'AI form generation',\n description: 'Generate complete forms from a text prompt via MCP or dashboard',\n enabled: true,\n status: 'live',\n category: 'ai',\n },\n ai_tts: {\n name: 'AI text-to-speech',\n description: 'Generate voiceover audio for form prompts',\n enabled: true,\n status: 'live',\n category: 'ai',\n },\n\n // -- API --\n public_api: {\n name: 'Public API',\n description: 'REST API for form creation, node management, and response collection',\n enabled: true,\n status: 'live',\n category: 'api',\n },\n api_keys: {\n name: 'API key management',\n description: 'Self-service API key creation in the dashboard',\n enabled: false,\n status: 'planned',\n category: 'api',\n },\n\n // -- Integrations --\n webhooks: {\n name: 'Webhooks',\n description: 'Send response data to external URLs on form completion',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n // Per-integration lifecycle (split from the old coarse `integrations` flag so\n // each can ship independently). integration-catalog.js carries the metadata\n // and derives is_active from these. None are live yet.\n integration_stripe: {\n name: 'Stripe',\n description: 'Accept payments directly in your forms',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_paddle: {\n name: 'Paddle',\n description: 'Accept payments with Paddle',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_square: {\n name: 'Square',\n description: 'Accept payments with Square',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_calendly: {\n name: 'Calendly',\n description: 'Schedule meetings directly in your forms',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_calcom: {\n name: 'Cal.com',\n description: 'Open-source scheduling platform for booking meetings',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_docusign: {\n name: 'DocuSign',\n description: 'Collect signatures in your forms',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_zapier: {\n name: 'Zapier',\n description: 'Connect to 5,000+ apps and automate workflows',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_make: {\n name: 'Make',\n description: 'Advanced automation and integrations',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_hubspot: {\n name: 'HubSpot',\n description: 'Sync responses to HubSpot CRM',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_salesforce: {\n name: 'Salesforce',\n description: 'Sync responses to Salesforce CRM',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_slack: {\n name: 'Slack',\n description: 'Send notifications to Slack channels',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n integration_shopify: {\n name: 'Shopify',\n description: 'Product recommendations from quiz results with direct checkout',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n notifications: {\n name: 'Response notifications',\n description: 'Email or webhook alerts when new responses arrive',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n import_typeform: {\n name: 'Typeform importer',\n description: 'Import forms from Typeform into Clipform',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n import_tally: {\n name: 'Tally importer',\n description: 'Import forms from Tally into Clipform',\n enabled: false,\n status: 'planned',\n category: 'integrations',\n },\n};\n\n/**\n * Backwards-compatible FEATURE_FLAGS object.\n * Maps the old flag names to FEATURES[key].enabled so existing dashboard code\n * keeps working without changes. Migrate consumers to FEATURES.x.enabled over time.\n */\nexport const FEATURE_FLAGS = {\n get ENABLE_BRANCHING() { return FEATURES.branching.enabled; },\n get ENABLE_CUSTOM_SCORES() { return FEATURES.custom_scores.enabled; },\n get ENABLE_TEXT_RESPONSE() { return FEATURES.text_response.enabled; },\n get INLINE_EMBED() { return FEATURES.embed_inline.enabled; },\n get WIDGET_EMBED() { return FEATURES.embed_widget.enabled; },\n get WEBHOOKS() { return FEATURES.webhooks.enabled; },\n get INTEGRATIONS() { return Object.entries(FEATURES).some(([k, f]) => k.startsWith('integration_') && f.enabled); },\n get CUSTOM_FONTS() { return FEATURES.custom_fonts.enabled; },\n get TRACKED_LINKS() { return FEATURES.tracked_links.enabled; },\n get SHARE_NODE() { return FEATURES.share_node.enabled; },\n get BRAND_NAME() { return FEATURES.brand_name.enabled; },\n get CSV_EXPORT() { return FEATURES.csv_export.enabled; },\n get ALLOW_RESUME() { return FEATURES.allow_resume.enabled; },\n get UTM_ANALYTICS() { return FEATURES.utm_tracking.enabled; },\n get API_KEYS() { return FEATURES.api_keys.enabled; },\n get NOTIFICATIONS() { return FEATURES.notifications.enabled; },\n get IMPORT_TYPEFORM() { return FEATURES.import_typeform.enabled; },\n get IMPORT_TALLY() { return FEATURES.import_tally.enabled; },\n};\n\nexport function getLiveFeatures() {\n return Object.values(FEATURES).filter(f => f.status === 'live');\n}\n\nexport function getPlannedFeatures() {\n return Object.values(FEATURES).filter(f => f.status === 'planned');\n}\n\nexport function getFeaturesByCategory(category) {\n return Object.values(FEATURES).filter(f => f.category === category);\n}\n","// @vid-master/config/node-types\n// Static node type definitions — single source of truth for all apps.\n// New node types require code changes (new component, renderer, etc.),\n// so this data is version-controlled rather than stored in the database.\n\nimport { FEATURES } from './features.js';\n\n// Canonical answer-format and consent enums (single source of truth). The node\n// schemas below reference these, and all apps import them, so they cannot drift.\nexport const RESPONSE_FORMATS = ['text', 'audio', 'video'];\nexport const CONSENT_TYPES = ['consent', 'opt_in'];\n\nexport const NODE_TYPES = {\n start: {\n label: 'Start',\n shorthand: 'Start',\n icon: 'ArrowRight',\n color: '#D1FAE5',\n description: 'Entry point for the form - connects to the first node',\n category: 'start',\n sort_order: 0,\n has_options: false,\n is_terminal: false,\n show_nav_bar: false,\n loading: 'eager',\n supports_prompt: false,\n supports_media: false,\n is_system: true,\n show_in_results: false,\n default_config: null,\n config_schema: null,\n response_schema: null,\n output_schema: null,\n },\n choice: {\n label: 'Multiple Choice',\n shorthand: 'Multi',\n icon: 'CheckSquare',\n color: '#DBEAFE',\n description: 'Single or multiple choice node with predefined options',\n category: 'input',\n sort_order: 1,\n has_options: true,\n min_options: 1,\n max_options: 6,\n max_option_length: 36,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'eager',\n supports_prompt: true,\n supports_media: true,\n is_system: false,\n show_in_results: true,\n default_config: {\n selection_mode: 'single',\n choice: { enable_branching: true, record_scores: false },\n randomise_options: false,\n show_option_count: false,\n options: [\n { content: 'Option 1' },\n { content: 'Option 2' },\n ],\n },\n config_schema: {\n type: 'object',\n properties: {\n choice: {\n type: 'object',\n properties: {\n enable_branching: {\n type: 'boolean',\n label: 'Enable branching logic',\n default: true,\n description: 'Allow each option to have its own logic path. When disabled, all options share a single jump action.',\n },\n show_answer_feedback: {\n type: 'boolean',\n label: 'Show answer feedback',\n default: false,\n description: 'Show correct/incorrect feedback after selection (requires scored options).',\n },\n record_scores: {\n type: 'boolean',\n label: 'Mark correct answer',\n default: false,\n description: 'Select which option is the correct answer.',\n },\n },\n },\n selection_mode: {\n enum: ['single', 'multiple'],\n type: 'string',\n label: 'Selection mode',\n default: 'single',\n description: 'Allow single or multiple selections',\n },\n allow_text_response: {\n type: 'boolean',\n label: 'Allow text response',\n default: false,\n description: 'Allow free-text response in addition to options (single choice only)',\n },\n randomise_options: {\n type: 'boolean',\n label: 'Randomise options',\n default: false,\n description: 'Show options in random order',\n },\n show_option_count: {\n type: 'boolean',\n label: 'Show option count',\n default: false,\n description: 'Display number of options',\n },\n content_media_type: {\n enum: ['upload', 'recorded'],\n type: 'string',\n label: 'Content media type',\n description: 'How the node media was provided',\n },\n },\n },\n response_schema: {\n type: 'string',\n description: 'Selected option ID',\n },\n output_schema: {\n type: 'object',\n required: ['type', 'label', 'option_id'],\n properties: {\n type: { type: 'string', const: 'choice' },\n label: { type: 'string', description: 'Human-readable option label' },\n option_id: { type: 'string', format: 'uuid', description: 'Selected option UUID' },\n },\n },\n },\n open: {\n label: 'Open Ended',\n shorthand: 'Open',\n icon: 'Type',\n color: '#DBEAFE',\n description: 'Free-form text responses from users',\n category: 'input',\n sort_order: 2,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'eager',\n supports_prompt: true,\n supports_media: true,\n is_system: false,\n show_in_results: true,\n default_config: {\n formats: [\n { order: 0, format: 'text' },\n { order: 1, format: 'audio' },\n { order: 2, format: 'video' },\n ],\n },\n config_schema: {\n type: 'object',\n properties: {\n formats: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n format: { enum: RESPONSE_FORMATS, type: 'string' },\n order: { type: 'number' },\n },\n },\n label: 'Allowed response formats',\n description: 'Which formats the user can respond with, in display order',\n },\n content_media_type: {\n enum: ['upload', 'recorded'],\n type: 'string',\n label: 'Content media type',\n description: 'How the node media was provided',\n },\n },\n },\n response_schema: {\n type: 'object',\n required: ['response_type'],\n properties: {\n text: {\n type: 'string',\n description: 'Text response (when response_type is text) or transcribed text from audio/video',\n },\n media: {\n type: 'object',\n properties: {\n type: { enum: ['audio', 'video'], type: 'string' },\n storage_path: { type: 'string' },\n facing_mode: { enum: ['user', 'environment'], type: 'string' },\n preview_crop: {\n type: 'object',\n properties: {\n stream_width: { type: 'number' },\n stream_height: { type: 'number' },\n preview_width: { type: 'number' },\n preview_height: { type: 'number' },\n },\n },\n },\n description: 'Media response (when response_type is audio or video)',\n },\n response_type: {\n enum: RESPONSE_FORMATS,\n type: 'string',\n },\n transcription: {\n type: 'object',\n properties: {\n text: { type: 'string' },\n language: { type: 'string' },\n duration: { type: 'number' },\n words: { type: 'array' },\n },\n description: 'Whisper transcription data for audio/video responses',\n },\n },\n },\n output_schema: {\n type: 'object',\n required: ['type'],\n properties: {\n type: { type: 'string', const: 'text' },\n text: { type: 'string', description: 'Text response or transcription' },\n media: {\n type: 'object',\n properties: {\n type: { enum: ['audio', 'video'], type: 'string' },\n storage_path: { type: 'string' },\n facing_mode: { enum: ['user', 'environment'], type: 'string' },\n preview_crop: {\n type: 'object',\n properties: {\n stream_width: { type: 'number' },\n stream_height: { type: 'number' },\n preview_width: { type: 'number' },\n preview_height: { type: 'number' },\n },\n },\n },\n },\n transcription: {\n type: 'object',\n properties: {\n text: { type: 'string' },\n language: { type: 'string' },\n },\n },\n },\n },\n },\n scale: {\n label: 'Scale',\n shorthand: 'Scale',\n icon: 'BarChart3',\n color: '#DBEAFE',\n description: 'Numerical rating or scale node (1-10, etc.)',\n category: 'input',\n sort_order: 3,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'eager',\n supports_prompt: true,\n supports_media: true,\n is_system: false,\n show_in_results: true,\n default_config: null,\n config_schema: {\n type: 'object',\n properties: {\n max: { type: 'number', label: 'Maximum value', default: 10, required: true },\n min: { type: 'number', label: 'Minimum value', default: 1, required: true },\n step: { min: 0.1, type: 'number', label: 'Step increment', default: 1 },\n left_label: { type: 'string', label: 'Left label', placeholder: 'Not likely' },\n right_label: { type: 'string', label: 'Right label', placeholder: 'Very likely' },\n show_numbers: { type: 'boolean', label: 'Show numbers', default: true },\n },\n },\n response_schema: {\n type: 'number',\n description: 'Selected scale value',\n },\n output_schema: null,\n },\n booking: {\n label: 'Booking',\n shorthand: 'Booking',\n icon: 'Calendar',\n color: '#E9D5FF',\n description: null,\n category: 'action',\n sort_order: 4,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: true,\n default_config: null,\n config_schema: {\n type: 'object',\n oneOf: [\n {\n required: ['calendly'],\n properties: {\n calendly: {\n type: 'object',\n properties: {\n event_name: { type: 'string', label: 'Event name', description: 'Display name for the event' },\n event_type_uri: { type: 'string', label: 'Event type URI', format: 'uri', description: 'Your Calendly event type URI', placeholder: 'https://calendly.com/your-link' },\n },\n },\n },\n },\n {\n required: ['google_meet'],\n properties: {\n google_meet: {\n type: 'object',\n properties: {\n duration: { type: 'number', label: 'Duration (minutes)', default: 30, description: 'Meeting duration in minutes' },\n calendar_id: { type: 'string', label: 'Calendar', description: 'Google Calendar to use for bookings' },\n event_title: { type: 'string', label: 'Event title', default: 'Meeting', description: 'Default title for scheduled meetings' },\n calendar_name: { type: 'string', label: 'Calendar name', description: 'Display name for the selected calendar' },\n },\n },\n },\n },\n ],\n description: 'Booking provider configuration (one provider per node)',\n },\n response_schema: {\n type: 'object',\n oneOf: [\n {\n required: ['calendly'],\n properties: {\n calendly: {\n type: 'object',\n required: ['event_uri', 'scheduled_time'],\n properties: {\n event_uri: { type: 'string', format: 'uri' },\n event_type: { type: 'string' },\n invitee_uri: { type: 'string', format: 'uri' },\n reschedule_url: { type: 'string', format: 'uri' },\n scheduled_time: { type: 'string', format: 'date-time' },\n cancellation_url: { type: 'string', format: 'uri' },\n },\n },\n },\n },\n ],\n description: 'Booking response with provider-specific data',\n },\n output_schema: null,\n },\n contact: {\n label: 'Contact Form',\n shorthand: 'Contact',\n icon: 'User',\n color: '#CFFAFE',\n description: 'Collect standardized contact information (name, email, phone, company)',\n category: 'input',\n sort_order: 5,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: false,\n default_config: {\n fields: [\n { id: 'first_name', type: 'first_name', label: 'First Name', enabled: true, required: true },\n { id: 'email', type: 'email', label: 'Email', enabled: true, required: true },\n ],\n consent_items: [\n { id: 'default-consent', name: 'Privacy policy', label: 'I agree to the privacy policy and terms of service', order: 0, type: 'consent' },\n ],\n },\n config_schema: {\n type: 'object',\n required: ['fields'],\n properties: {\n title: { type: 'string' },\n fields: {\n type: 'array',\n minItems: 1,\n items: {\n type: 'object',\n required: ['id', 'required'],\n properties: {\n id: { type: 'string' },\n type: { enum: ['text', 'textarea', 'email', 'tel', 'url'], type: 'string' },\n label: { type: 'string' },\n order: { type: 'number' },\n required: { type: 'boolean', default: true },\n is_custom: { type: 'boolean', default: false },\n },\n },\n },\n description: { type: 'string' },\n consent_items: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: { type: 'string' },\n name: { type: 'string' },\n label: { type: 'string' },\n order: { type: 'number' },\n type: { type: 'string', enum: CONSENT_TYPES },\n },\n },\n },\n },\n },\n response_schema: {\n type: 'object',\n required: ['fields'],\n properties: {\n fields: {\n type: 'array',\n items: {\n type: 'object',\n required: ['id', 'type', 'label', 'value'],\n properties: {\n id: { type: 'string' },\n type: { type: 'string' },\n label: { type: 'string' },\n value: { type: 'string' },\n },\n },\n description: 'Contact form field entries with metadata',\n },\n consent: {\n type: 'array',\n items: {\n type: 'object',\n required: ['id', 'name', 'label', 'accepted', 'type'],\n properties: {\n id: { type: 'string' },\n name: { type: 'string' },\n label: { type: 'string' },\n accepted: { type: 'boolean' },\n type: { type: 'string', enum: CONSENT_TYPES },\n },\n },\n description: 'Consent checkbox entries',\n },\n },\n },\n output_schema: {\n type: 'object',\n required: ['type', 'fields'],\n properties: {\n type: { type: 'string', const: 'contact' },\n fields: {\n type: 'array',\n items: {\n type: 'object',\n required: ['type', 'value'],\n properties: {\n type: { type: 'string' },\n value: { type: 'string' },\n },\n },\n },\n },\n },\n },\n file_upload: {\n label: 'File Upload',\n shorthand: 'Upload',\n icon: 'Upload',\n color: '#CFFAFE',\n description: 'Collect file uploads from respondents',\n category: 'input',\n sort_order: 6,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: true,\n default_config: null,\n config_schema: {\n type: 'object',\n properties: {\n max_files: { max: 20, min: 1, type: 'number', label: 'Max files', default: 5, description: 'Maximum number of files respondents can upload' },\n max_file_size_mb: { max: 500, min: 1, type: 'number', label: 'Max file size (MB)', default: 50, description: 'Maximum size per file (1-500 MB)' },\n allowed_media_types: {\n type: 'array',\n items: { enum: ['images', 'videos', 'documents', 'all'], type: 'string' },\n label: 'Allowed media types',\n default: ['images', 'documents'],\n enumLabels: {\n all: 'All file types',\n images: 'Images (JPEG, PNG, GIF, WebP, HEIC)',\n videos: 'Videos (MP4, MOV, WebM, AVI)',\n documents: 'Documents (PDF, DOC, DOCX, XLS, XLSX, TXT, CSV)',\n },\n description: 'Select which types of files respondents can upload',\n },\n },\n },\n response_schema: {\n type: 'object',\n required: ['files'],\n properties: {\n files: {\n type: 'array',\n items: {\n type: 'object',\n required: ['id', 'name', 'storage_path', 'url', 'mime_type', 'size', 'uploaded_at'],\n properties: {\n id: { type: 'string', format: 'uuid', description: 'Unique file identifier' },\n url: { type: 'string', format: 'uri', description: 'Signed Supabase Storage URL for download' },\n name: { type: 'string', description: 'Original filename' },\n size: { type: 'integer', minimum: 1, description: 'File size in bytes' },\n mime_type: { type: 'string', description: 'File MIME type' },\n uploaded_at: { type: 'string', format: 'date-time', description: 'ISO timestamp of upload completion' },\n storage_path: { type: 'string', description: 'Full storage path: workspace_id/form_id/node_id/uuid.ext' },\n },\n },\n minItems: 1,\n description: 'Array of uploaded file metadata',\n },\n },\n },\n output_schema: null,\n },\n payment: {\n label: 'Payment',\n shorthand: 'Payment',\n icon: 'DollarSign',\n color: '#E9D5FF',\n description: null,\n category: 'action',\n sort_order: 7,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: true,\n default_config: { amount: null, currency: 'usd', provider: 'stripe' },\n config_schema: {\n type: 'object',\n required: ['amount', 'currency', 'provider'],\n properties: {\n amount: { type: 'number', label: 'Amount (in cents)', minimum: 50, required: true, description: 'Payment amount in cents (e.g., 5000 = $50.00)' },\n currency: { enum: ['usd', 'eur', 'gbp', 'cad', 'aud'], type: 'string', label: 'Currency', default: 'usd', required: true, description: 'Three-letter ISO currency code' },\n provider: { enum: ['stripe', 'paddle'], type: 'string', label: 'Payment Provider', default: 'stripe', required: true, description: 'Payment provider to use' },\n workspace_integration_id: { type: 'string', label: 'Workspace Integration ID', description: 'UUID of the workspace_integrations record for the connected payment account' },\n },\n description: 'Payment configuration with provider-agnostic flat structure',\n },\n response_schema: {\n type: 'object',\n oneOf: [\n {\n required: ['stripe'],\n properties: {\n stripe: {\n type: 'object',\n required: ['payment_intent_id', 'status', 'amount', 'currency'],\n properties: {\n name: { type: 'string', description: 'Customer name from Stripe billing details' },\n email: { type: 'string', format: 'email', description: 'Customer email from Stripe billing details' },\n amount: { type: 'number', description: 'Payment amount in cents' },\n status: { enum: ['pending', 'succeeded', 'failed'], type: 'string', description: 'Payment status' },\n currency: { type: 'string', description: 'Three-letter ISO currency code (e.g., usd, eur)' },\n payment_intent_id: { type: 'string', description: 'Stripe payment intent ID' },\n },\n },\n },\n },\n {\n required: ['square'],\n properties: {\n square: {\n type: 'object',\n properties: {\n amount: { type: 'number' },\n status: { type: 'string' },\n order_id: { type: 'string' },\n payment_id: { type: 'string' },\n },\n },\n },\n },\n {\n required: ['paddle'],\n properties: {\n paddle: {\n type: 'object',\n properties: {\n amount: { type: 'number' },\n status: { type: 'string' },\n order_id: { type: 'string' },\n checkout_id: { type: 'string' },\n },\n },\n },\n },\n ],\n description: 'Payment response with provider-specific data',\n },\n output_schema: null,\n },\n binary: {\n label: 'Binary',\n shorthand: 'A/B',\n icon: 'CircleCheck',\n color: '#DBEAFE',\n description: 'Two-option choice - yes/no, true/false, or this vs that',\n category: 'input',\n sort_order: 1.5,\n has_options: true,\n min_options: 2,\n max_options: 2,\n max_option_length: 12,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'eager',\n supports_prompt: true,\n supports_media: true,\n is_system: false,\n show_in_results: true,\n default_config: {\n choice: { enable_branching: true },\n options: [\n { content: 'Yes' },\n { content: 'No' },\n ],\n },\n config_schema: {\n type: 'object',\n properties: {\n choice: {\n type: 'object',\n properties: {\n enable_branching: {\n type: 'boolean',\n label: 'Enable branching logic',\n default: true,\n description: 'Allow each option to have its own logic path.',\n },\n },\n },\n content_media_type: {\n enum: ['upload', 'recorded'],\n type: 'string',\n label: 'Content media type',\n description: 'How the node media was provided',\n },\n },\n },\n response_schema: {\n type: 'string',\n description: 'Selected option ID',\n },\n output_schema: {\n type: 'object',\n required: ['type', 'label', 'option_id'],\n properties: {\n type: { type: 'string', const: 'binary' },\n label: { type: 'string', description: 'Human-readable option label' },\n option_id: { type: 'string', format: 'uuid', description: 'Selected option UUID' },\n },\n },\n },\n button: {\n label: 'Button',\n shorthand: 'Button',\n icon: 'RectangleHorizontal',\n color: '#DBEAFE',\n description: 'Simple button for acknowledgment or navigation',\n category: 'input',\n sort_order: 3,\n has_options: true,\n min_options: 1,\n max_options: 1,\n max_option_length: 28,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'eager',\n supports_prompt: true,\n supports_media: true,\n is_system: false,\n show_in_results: false,\n default_config: { options: [{ content: 'Continue' }] },\n config_schema: {\n type: 'object',\n properties: {\n button_text: { type: 'string', label: 'Button text', default: 'Continue' },\n button_style: { enum: ['primary', 'secondary', 'outline'], type: 'string', label: 'Button style', default: 'primary' },\n },\n },\n response_schema: {\n type: 'string',\n description: 'Selected option ID',\n },\n output_schema: {\n type: 'object',\n required: ['type', 'label', 'option_id'],\n properties: {\n type: { type: 'string', const: 'button' },\n label: { type: 'string', description: 'Human-readable option label' },\n option_id: { type: 'string', format: 'uuid', description: 'Selected option UUID' },\n },\n },\n },\n redirect: {\n label: 'Redirect',\n shorthand: 'Redirect',\n icon: 'ExternalLink',\n color: '#FFEDD5',\n description: 'Redirect users to an external URL',\n category: 'end',\n sort_order: 101,\n has_options: false,\n is_terminal: true,\n show_nav_bar: false,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: false,\n default_config: { url: '', auto_redirect: true },\n config_schema: {\n type: 'object',\n properties: {\n url: { type: 'string', label: 'Redirect URL', placeholder: 'https://example.com' },\n auto_redirect: { type: 'boolean', label: 'Auto-redirect', default: true, description: 'Automatically redirect to the URL instead of showing a button' },\n },\n },\n response_schema: {\n type: 'string',\n description: 'URL the user was redirected to',\n },\n output_schema: null,\n },\n link_list: {\n label: 'Link List',\n shorthand: 'Links',\n icon: 'ExternalLink',\n color: '#FFEDD5',\n description: 'Display a list of links for users to choose from',\n category: 'end',\n sort_order: 102,\n has_options: false,\n is_terminal: true,\n show_nav_bar: false,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: false,\n default_config: { links: [{ id: 'default', url: '', title: '', description: '', order: 0 }], auto_redirect: false },\n config_schema: {\n type: 'object',\n properties: {\n links: {\n type: 'array',\n items: {\n type: 'object',\n required: ['id', 'url'],\n properties: {\n id: { type: 'string' },\n url: { type: 'string', label: 'URL', placeholder: 'https://example.com' },\n title: { type: 'string', label: 'Heading' },\n description: { type: 'string', label: 'Description' },\n order: { type: 'number', label: 'Sort order' },\n },\n },\n label: 'Links',\n minItems: 1,\n },\n auto_redirect: { type: 'boolean', label: 'Auto-redirect', default: false, description: 'Automatically redirect to the URL instead of showing a button' },\n },\n },\n response_schema: {\n type: 'string',\n description: 'URL of the link that was clicked',\n },\n output_schema: null,\n },\n file_download: {\n label: 'File Download',\n shorthand: 'Download',\n icon: 'Download',\n color: '#E9D5FF',\n description: 'Provide a file for respondents to download',\n category: 'action',\n sort_order: 103,\n has_options: false,\n is_terminal: false,\n show_nav_bar: true,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: true,\n default_config: null,\n config_schema: {\n type: 'object',\n properties: {\n files: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n file_name: { type: 'string', label: 'Display file name', required: true },\n file_path: { type: 'string', label: 'File path in storage', required: true },\n file_size: { type: 'number', label: 'File size in bytes' },\n mime_type: { type: 'string', label: 'MIME type' },\n },\n },\n label: 'Downloadable files',\n },\n button_text: { type: 'string', label: 'Button text', default: 'Download Files' },\n description: { type: 'string', label: 'Description text' },\n },\n },\n response_schema: {\n type: 'object',\n required: ['files'],\n properties: {\n files: {\n type: 'array',\n items: {\n type: 'object',\n required: ['file_path', 'file_name', 'downloaded_at'],\n properties: {\n file_name: { type: 'string', description: 'Display name of the file' },\n file_path: { type: 'string', description: 'Storage path of the downloaded file' },\n downloaded_at: { type: 'string', format: 'date-time', description: 'Timestamp when download was initiated' },\n },\n },\n description: 'List of files downloaded by respondent',\n },\n },\n },\n output_schema: null,\n },\n shopping: {\n label: 'Shopping',\n shorthand: 'Shop',\n icon: 'ShoppingBag',\n color: '#E9D5FF',\n description: 'Product recommendations with direct checkout',\n category: 'action',\n sort_order: 8,\n has_options: false,\n is_terminal: true,\n show_nav_bar: true,\n loading: 'lazy',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: false,\n default_config: { provider: 'shopify', cta_mode: 'checkout', source_mode: 'manual' },\n config_schema: {\n type: 'object',\n required: ['provider', 'cta_mode'],\n properties: {\n title: { type: 'string', label: 'Heading', description: 'Heading shown above the product list' },\n description: { type: 'string', label: 'Description', description: 'Body text shown below the heading' },\n provider: { enum: ['shopify'], type: 'string', label: 'Provider', default: 'shopify', description: 'Ecommerce provider' },\n workspace_integration_id: { type: 'string', label: 'Workspace Integration ID', description: 'UUID of the workspace_integrations record for the connected store' },\n cta_mode: { enum: ['checkout', 'add_to_cart'], type: 'string', label: 'CTA Mode', default: 'checkout', description: 'Whether to go to checkout or add to cart' },\n source_mode: { enum: ['manual', 'collection'], type: 'string', label: 'Product source', default: 'manual', description: 'How products are selected: manually picked or from a collection' },\n collection_id: { type: 'string', label: 'Collection ID', description: 'Shopify collection GID (when source_mode is collection)' },\n collection_title: { type: 'string', label: 'Collection title', description: 'Display name of the selected collection' },\n products: {\n type: 'array',\n label: 'Selected Products',\n description: 'Products to show (static mode)',\n items: {\n type: 'object',\n properties: {\n product_id: { type: 'string', description: 'Shopify product GID' },\n variant_id: { type: 'string', description: 'Shopify variant GID' },\n title: { type: 'string' },\n handle: { type: 'string' },\n image_url: { type: 'string' },\n price: { type: 'string' },\n currency: { type: 'string' },\n recommended: { type: 'boolean', default: true, description: 'Pre-ticked in viewer' },\n },\n },\n },\n product_mappings: {\n type: 'array',\n label: 'Score-based product mappings',\n description: 'Map score ranges to different product sets. First matching range wins.',\n items: {\n type: 'object',\n required: ['min', 'max'],\n properties: {\n min: { type: 'integer', label: 'Minimum score (inclusive)' },\n max: { type: 'integer', label: 'Maximum score (inclusive)' },\n message: { type: 'string', label: 'Message' },\n products: { type: 'array', description: 'Products for this score range' },\n },\n },\n },\n },\n description: 'Shopping configuration with provider-agnostic structure',\n },\n response_schema: null,\n output_schema: null,\n },\n end_screen: {\n label: 'Ending',\n shorthand: 'End',\n icon: 'Flag',\n color: '#FFEDD5',\n description: 'Final screen shown when form is completed',\n category: 'end',\n sort_order: 999,\n has_options: false,\n is_terminal: true,\n show_nav_bar: false,\n loading: 'eager',\n supports_prompt: false,\n supports_media: false,\n is_system: false,\n show_in_results: false,\n default_config: null,\n config_schema: {\n type: 'object',\n properties: {\n title: { type: 'string', label: 'Title', default: 'Thank you!', description: 'Heading shown on completion' },\n message: { type: 'string', label: 'Message', default: 'Your response has been submitted.', description: 'Message shown on completion' },\n show_score: { type: 'boolean', label: 'Show score', default: false, description: 'Display score on the end screen (e.g. \"You scored 4 out of 5\")' },\n icon: { type: 'string', label: 'Icon', enum: ['tick', 'trophy', 'star', 'crown', 'party', 'none'], default: 'tick', description: 'Icon shown above the title' },\n show_share_button: { type: 'boolean', label: 'Show share button', default: false, description: 'Show a share button above the CTA' },\n cta_type: { type: 'string', label: 'CTA type', enum: ['none', 'restart', 'external_link'], default: 'none', description: 'Primary call-to-action button type' },\n cta_text: { type: 'string', label: 'CTA button text', default: 'Continue', description: 'Button label for the CTA' },\n cta_url: { type: 'string', label: 'CTA URL', format: 'uri', description: 'URL to open (only for external_link CTA type)', placeholder: 'https://example.com' },\n score_ranges: {\n type: 'array',\n label: 'Score-based content',\n description: 'Show different content based on cumulative score. First matching range wins.',\n items: {\n type: 'object',\n required: ['min', 'max', 'title'],\n properties: {\n min: { type: 'integer', label: 'Minimum score (inclusive)' },\n max: { type: 'integer', label: 'Maximum score (inclusive)' },\n title: { type: 'string', label: 'Title' },\n message: { type: 'string', label: 'Message' },\n },\n },\n },\n scoring_results: {\n type: 'array',\n label: 'Category-based results',\n description: 'Results keyed by scoring category. The winning category (highest non-knocked-out score) determines which result is shown.',\n items: {\n type: 'object',\n required: ['category', 'title'],\n properties: {\n category: { type: 'string', label: 'Category key (must match keys used in option scores)' },\n title: { type: 'string', label: 'Title' },\n message: { type: 'string', label: 'Message' },\n cta_url: { type: 'string', label: 'CTA URL', format: 'uri' },\n cta_text: { type: 'string', label: 'CTA button text' },\n },\n },\n },\n },\n },\n response_schema: null,\n output_schema: null,\n },\n};\n\n// Availability is derived from the FEATURES registry (single source of truth).\n// Each node type `x` maps to feature `node_x`; the throw below makes a missing\n// or renamed feature fail loudly at import, and a vitest guards the mapping.\nfor (const [type, def] of Object.entries(NODE_TYPES)) {\n const feature = FEATURES[`node_${type}`];\n if (!feature) {\n throw new Error(`NODE_TYPES.${type}: no matching FEATURES[\"node_${type}\"] entry`);\n }\n def.is_active = feature.enabled;\n}\n\n// Derived exports\n\n/** Sorted list of all node types with their type key included */\nexport const NODE_TYPES_LIST = Object.entries(NODE_TYPES)\n .map(([type, def]) => ({ type, ...def }))\n .sort((a, b) => a.sort_order - b.sort_order);\n\n/** All valid node type keys */\nexport const NODE_TYPE_KEYS = Object.keys(NODE_TYPES);\n\n/** Response schemas keyed by node type */\nexport const RESPONSE_SCHEMAS = Object.fromEntries(\n Object.entries(NODE_TYPES).map(([k, v]) => [k, v.response_schema])\n);\n\n/** Config schemas keyed by node type */\nexport const CONFIG_SCHEMAS = Object.fromEntries(\n Object.entries(NODE_TYPES).map(([k, v]) => [k, v.config_schema])\n);\n\n/** Output schemas keyed by node type */\nexport const OUTPUT_SCHEMAS = Object.fromEntries(\n Object.entries(NODE_TYPES).map(([k, v]) => [k, v.output_schema])\n);\n\n/** Metadata subset used by viewer for layout decisions */\nexport const NODE_TYPE_METADATA = Object.fromEntries(\n Object.entries(NODE_TYPES).map(([k, v]) => [k, {\n supports_prompt: v.supports_prompt,\n supports_media: v.supports_media,\n is_terminal: v.is_terminal,\n show_nav_bar: v.show_nav_bar,\n category: v.category,\n loading: v.loading,\n }])\n);\n\n/** Terminal node type keys (is_terminal === true) */\nexport const TERMINAL_TYPES = Object.entries(NODE_TYPES)\n .filter(([, v]) => v.is_terminal)\n .map(([k]) => k);\n\n/** Node types excluded from counts (system + terminal) */\nexport const NON_COUNTABLE_TYPES = Object.entries(NODE_TYPES)\n .filter(([, v]) => v.is_system || v.is_terminal)\n .map(([k]) => k);\n\n/** Supabase .not() filter string for non-countable types */\nexport const NON_COUNTABLE_FILTER = `(${NON_COUNTABLE_TYPES.map(t => `\"${t}\"`).join(',')})`;\n\n/** Node types excluded from results and responses views */\nexport const RESULTS_EXCLUDED_TYPES = Object.entries(NODE_TYPES)\n .filter(([, v]) => !v.show_in_results)\n .map(([k]) => k);\n\n/** Check if a node type is terminal */\nexport function isTerminalType(type) {\n return NODE_TYPE_METADATA[type]?.is_terminal === true;\n}\n\n","// @vid-master/config/form-types\n// Static form type definitions — single source of truth for all apps.\n// Workflow prose (step-by-step instructions) and craft guides remain in the\n// MCP server. This registry defines structural metadata only.\n\nimport { FEATURES } from './features.js';\nimport { NODE_TYPES } from './node-types.js';\n\nexport const FORM_TYPES = {\n quiz: {\n label: 'Quiz',\n description: 'Scored knowledge quiz with narrated video questions',\n sort_order: 1,\n category: 'assessment',\n aliases: ['trivia', 'test', 'exam'],\n variants: ['personality', 'comprehension', 'composition'],\n required_features: [],\n required_node_types: ['choice', 'end_screen'],\n default_media_style: 'video',\n guide_uri: 'clipform://guides/quiz',\n guide_description: 'Craft knowledge for writing engaging quizzes - difficulty curves, question psychology, narration style, scoring',\n discovery: [\n { key: 'topic', question: 'What topic or subject area?', fallback: 'General trivia', mode: 'all' },\n { key: 'question_count', question: 'How many questions?', fallback: '8', mode: 'all' },\n { key: 'media_style', question: 'Video with narration (recommended), images, or text only?', fallback: 'Video with narration', mode: 'full' },\n ],\n variant_discovery: {\n personality: [\n { key: 'topic', question: \"What's the theme? (Which X are you?)\", fallback: 'General personality', mode: 'all' },\n { key: 'categories', question: 'What outcome categories? (3-5 results)', fallback: 'Infer 4 categories from the theme', mode: 'full' },\n { key: 'question_count', question: 'How many questions?', fallback: '8', mode: 'all' },\n ],\n comprehension: [\n { key: 'youtube_url', question: \"What's the YouTube URL?\", fallback: 'REQUIRED - cannot proceed without it', mode: 'all' },\n { key: 'question_count', question: 'How many questions?', fallback: '8', mode: 'all' },\n { key: 'audience', question: \"Who's the audience? (kids, teens, adults)\", fallback: 'General adults', mode: 'full' },\n ],\n composition: [\n { key: 'topic', question: 'What topic? (flags, movies, geography, music...)', fallback: 'General trivia', mode: 'all' },\n { key: 'question_count', question: 'How many questions? (composition quizzes use ~2 nodes per question - 5-6 is the sweet spot)', fallback: '5', mode: 'all' },\n ],\n },\n variant_guide_uris: {\n personality: 'clipform://guides/quiz/personality',\n comprehension: 'clipform://guides/quiz/comprehension',\n composition: 'clipform://guides/quiz/composition',\n },\n variant_descriptions: {\n personality: 'Addendum for personality quizzes - category design, option weighting, outcome writing, no right/wrong answers',\n comprehension: 'Addendum for YouTube comprehension quizzes - extracting questions from transcripts, distractor design, audience adaptation',\n composition: 'Addendum for composition quizzes - guess-and-reveal formats built from rendered compositions: mechanic selection, the clue/reveal node pair, difficulty design',\n },\n prompt: { name: 'create-quiz', title: 'Create a Quiz', description: 'Build a scored knowledge quiz with narrated video questions' },\n },\n\n survey: {\n label: 'Survey',\n description: 'Feedback survey, NPS form, or research questionnaire',\n sort_order: 2,\n category: 'feedback',\n aliases: ['feedback', 'poll', 'nps', 'questionnaire'],\n variants: [],\n required_features: [],\n required_node_types: ['choice', 'open', 'end_screen'],\n default_media_style: 'text',\n guide_uri: 'clipform://guides/survey',\n guide_description: 'Craft knowledge for feedback surveys, NPS, and research forms - brevity, rating scales, respondent fatigue',\n discovery: [\n { key: 'topic', question: 'What are you measuring? (satisfaction, NPS, feedback on what?)', fallback: 'General satisfaction', mode: 'all' },\n { key: 'anonymous', question: 'Anonymous or identified responses?', fallback: 'Anonymous', mode: 'full' },\n ],\n variant_discovery: {},\n variant_guide_uris: {},\n variant_descriptions: {},\n prompt: { name: 'create-survey', title: 'Create a Survey', description: 'Build a feedback survey, NPS form, or research questionnaire' },\n },\n\n interview: {\n label: 'Interview',\n description: 'Async video interview, case study, or expert input collection',\n sort_order: 3,\n category: 'collection',\n aliases: ['case-study', 'callout'],\n variants: [],\n required_features: [],\n required_node_types: ['open', 'contact', 'end_screen'],\n default_media_style: 'video',\n guide_uri: 'clipform://guides/interview',\n guide_description: 'Craft knowledge for building interview forms - warm-up pacing, open questions, consent, video responses',\n discovery: [\n { key: 'purpose', question: 'What are you collecting? (case studies, feedback, expert input)', fallback: 'General responses', mode: 'all' },\n { key: 'response_format', question: 'How should people respond? (video, audio, text, all)', fallback: 'All formats', mode: 'full' },\n { key: 'needs_consent', question: 'Need a consent statement?', fallback: 'Yes', mode: 'full' },\n ],\n variant_discovery: {},\n variant_guide_uris: {},\n variant_descriptions: {},\n prompt: { name: 'create-interview', title: 'Create an Interview', description: 'Build an async video interview for collecting case studies, feedback, or expert input' },\n },\n\n funnel: {\n label: 'Funnel',\n description: 'Lead qualification funnel with conditional routing',\n sort_order: 4,\n category: 'qualification',\n aliases: ['lead-gen', 'qualification', 'lead-magnet'],\n variants: [],\n required_features: ['branching'],\n required_node_types: ['choice', 'contact', 'end_screen'],\n default_media_style: 'text',\n guide_uri: 'clipform://guides/funnel',\n guide_description: 'Craft knowledge for lead qualification funnels - planned feature, conditional routing coming soon',\n discovery: [],\n variant_discovery: {},\n variant_guide_uris: {},\n variant_descriptions: {},\n prompt: { name: 'create-funnel', title: 'Create a Funnel', description: 'Lead qualification funnels with branching logic are planned but not yet available' },\n },\n\n testimonial: {\n label: 'Testimonial',\n description: 'Video testimonial and story collection form',\n sort_order: 5,\n category: 'collection',\n aliases: ['story', 'review'],\n variants: [],\n required_features: [],\n required_node_types: ['open', 'contact', 'end_screen'],\n default_media_style: 'video',\n guide_uri: 'clipform://guides/testimonial',\n guide_description: 'Craft knowledge for collecting testimonials and customer stories on video - storytelling prompts, comfort techniques, consent',\n discovery: [\n { key: 'use_case', question: 'What stories are you collecting? (customer success, employee, partner)', fallback: 'Customer success stories', mode: 'all' },\n { key: 'media_style', question: 'Video responses (recommended), audio, or text?', fallback: 'Video', mode: 'full' },\n ],\n variant_discovery: {},\n variant_guide_uris: {},\n variant_descriptions: {},\n prompt: { name: 'create-testimonial', title: 'Collect Testimonials', description: 'Build a video testimonial collection form - capture authentic customer stories on camera' },\n },\n\n application: {\n label: 'Application',\n description: 'Structured application form for jobs, programmes, or grants',\n sort_order: 6,\n category: 'collection',\n aliases: ['job-application', 'admission', 'enrollment', 'grant'],\n variants: [],\n required_features: [],\n required_node_types: ['open', 'choice', 'contact', 'end_screen'],\n default_media_style: 'video',\n guide_uri: 'clipform://guides/application',\n guide_description: 'Craft knowledge for application and evaluation forms - multi-section structure, video responses for behavioural questions, screening',\n discovery: [\n { key: 'role', question: 'What role or position?', fallback: 'General application', mode: 'all' },\n ],\n variant_discovery: {},\n variant_guide_uris: {},\n variant_descriptions: {},\n prompt: { name: 'create-application', title: 'Create an Application Form', description: 'Build a structured application form with video responses for behavioural questions' },\n },\n\n booking: {\n label: 'Booking',\n description: 'Event registration, course signup, or booking form',\n sort_order: 7,\n category: 'registration',\n aliases: ['registration', 'signup', 'event', 'rsvp', 'workshop'],\n variants: [],\n required_features: [],\n required_node_types: ['contact', 'choice', 'end_screen'],\n default_media_style: 'text',\n guide_uri: 'clipform://guides/booking',\n guide_description: 'Craft knowledge for event registration and booking forms - minimal friction, video welcome, confirmation flow',\n discovery: [\n { key: 'event_name', question: \"What's the event name?\", fallback: 'Event registration', mode: 'all' },\n { key: 'event_type', question: 'What type? (workshop, webinar, meetup, conference)', fallback: 'Event', mode: 'full' },\n ],\n variant_discovery: {},\n variant_guide_uris: {},\n variant_descriptions: {},\n prompt: { name: 'create-booking', title: 'Create a Booking Form', description: 'Build an event registration or booking form with a personal video welcome' },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Derived exports\n// ---------------------------------------------------------------------------\n\n// Availability is derived from dependencies (single source of truth): a form type\n// is active iff every required feature is enabled and every required node type is\n// active. No hand-set flag to drift - e.g. funnel auto-hides while branching is planned.\nfor (const def of Object.values(FORM_TYPES)) {\n const featuresLive = def.required_features.every((k) => FEATURES[k]?.enabled === true);\n const nodesLive = def.required_node_types.every((t) => NODE_TYPES[t]?.is_active === true);\n def.is_active = featuresLive && nodesLive;\n}\n\nexport const FORM_TYPES_LIST = Object.entries(FORM_TYPES)\n .map(([key, def]) => ({ key, ...def }))\n .sort((a, b) => a.sort_order - b.sort_order);\n\nexport const FORM_TYPE_KEYS = Object.keys(FORM_TYPES);\n\nexport const WORKFLOW_TYPES = FORM_TYPE_KEYS.filter(\n key => FORM_TYPES[key].is_active\n);\n\nexport const FORM_TYPE_ALIASES = Object.fromEntries(\n Object.entries(FORM_TYPES).flatMap(([key, def]) =>\n def.aliases.map(alias => [alias, key])\n )\n);\n\nexport const ALL_VARIANTS = Object.entries(FORM_TYPES).flatMap(\n ([, def]) => def.variants\n);\n\nexport function resolveFormType(input) {\n const normalised = input.toLowerCase().trim();\n if (FORM_TYPES[normalised]) return normalised;\n return FORM_TYPE_ALIASES[normalised] ?? null;\n}\n\nexport function getDiscoveryParams(formType, variant, mode = 'full') {\n const def = FORM_TYPES[formType];\n if (!def) return [];\n\n let params;\n if (variant && def.variant_discovery?.[variant]) {\n params = def.variant_discovery[variant];\n } else {\n params = def.discovery;\n }\n\n if (mode === 'demo') {\n return params.filter(p => p.mode === 'all');\n }\n return params;\n}\n\nexport function isFormTypeAvailable(formType, features) {\n const def = FORM_TYPES[formType];\n if (!def || !def.is_active) return false;\n return def.required_features.every(\n featureKey => features[featureKey]?.enabled === true\n );\n}\n\nexport function getAvailableFormTypes(features) {\n return FORM_TYPE_KEYS.filter(key => isFormTypeAvailable(key, features));\n}\n","// @vid-master/config/help-links\n// Single source of truth for every in-product \"Learn more\" deep-link (#394).\n// In-product copy stays a short, actionable summary; the full explanation\n// lives in docs and we link to it, so the two can't drift.\n//\n// HELP_TOPICS is pure data (docs path + anchor, no base URL) so the docs\n// link-check script (apps/docs/scripts/check-help-links.mjs) can verify every\n// anchor resolves to a real heading without touching env. Consumers use\n// HELP_LINKS from the package root, which composes full URLs off\n// BUSINESS.urls.docs.\n\n/**\n * Keyed by concept. `path` is relative to the docs site root (which already\n * includes the /docs basePath); `anchor` must match a heading slug in the\n * target page (custom [#anchor] syntax or the auto-generated slug).\n */\nexport const HELP_TOPICS = {\n goLive: { path: '/guides/sharing', anchor: 'go-live' },\n cantGoLive: { path: '/guides/sharing', anchor: 'cant-go-live' },\n liveAndDraft: { path: '/guides/managing-forms', anchor: 'live-and-draft' },\n publishingChanges: { path: '/guides/managing-forms', anchor: 'publishing-changes' },\n embedding: { path: '/guides/embed', anchor: null },\n};\n\n/** Compose full HELP_LINKS URLs from a docs base URL (no trailing slash). */\nexport function buildHelpLinks(docsBaseUrl) {\n const links = {};\n for (const [key, { path, anchor }] of Object.entries(HELP_TOPICS)) {\n links[key] = `${docsBaseUrl}${path}${anchor ? `#${anchor}` : ''}`;\n }\n return links;\n}\n","import { FEATURES, getLiveFeatures } from './features.js';\nimport { HELP_TOPICS, buildHelpLinks } from './help-links.js';\n\n// @vid-master/config - Essential shared configuration\n\n/**\n * Environment Detection\n * Automatically detects dev/localhost vs production\n */\nconst isServer = typeof window === 'undefined';\nconst isBrowser = typeof window !== 'undefined';\n\n// Detect localhost/development environment\nconst isLocalhost = isBrowser && (\n window.location.hostname === 'localhost' ||\n window.location.hostname === '127.0.0.1' ||\n window.location.hostname.includes('local')\n);\n\nconst isDevelopment = isServer\n ? process.env.NODE_ENV !== 'production'\n : isLocalhost;\n\nexport const ENV = {\n isDevelopment,\n isProduction: !isDevelopment,\n isLocalhost: isDevelopment, // alias for clarity\n};\n\n/**\n * Cookie domain for cross-subdomain auth & tracking\n * undefined in dev (browsers reject explicit domain on localhost)\n * .clipform.io in production (covers www., app., and apex)\n */\nexport const COOKIE_DOMAIN = ENV.isDevelopment ? undefined : '.clipform.io';\n\n/**\n * Browser is accessing the app via the Cloudflare dev tunnel\n * (e.g. dashboard-dev.smith-forge.com → routes to local Next.js).\n * In that case browser fetches must use the matching tunnel hostnames,\n * because the browser cannot reach localhost on the dev's machine.\n */\nconst isTunnelBrowser = isBrowser &&\n window.location.hostname.endsWith('.smith-forge.com');\n\nexport function getUrls() {\n if (isTunnelBrowser) {\n return {\n marketing: 'https://marketing-dev.smith-forge.com',\n dashboard: 'https://dashboard-dev.smith-forge.com',\n viewer: 'https://viewer-dev.smith-forge.com',\n api: 'https://api-dev.smith-forge.com',\n mcp: 'https://api-dev.smith-forge.com/mcp',\n docs: 'https://clipform.io/docs',\n };\n }\n\n if (ENV.isDevelopment) {\n // Per-worktree overrides: a parallel worktree can run its own full stack on\n // a distinct port block by setting NEXT_PUBLIC_*_URL in its .env.local (plus\n // a matching `-p` / PORT). Without these the apps resolve each other at the\n // base ports below and would cross-wire to another worktree's servers.\n // Direct `process.env.NEXT_PUBLIC_*` reads (not destructured) so Next inlines\n // them into client bundles - every app that imports this package client-side\n // transpiles it (see each app's next.config transpilePackages).\n const api = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3003';\n return {\n marketing: process.env.NEXT_PUBLIC_MARKETING_URL || 'http://localhost:3002',\n dashboard: process.env.NEXT_PUBLIC_DASHBOARD_URL || 'http://localhost:3000',\n viewer: process.env.NEXT_PUBLIC_VIEWER_URL || 'http://localhost:3001',\n api,\n // No separate MCP host in dev - tools live on the api subpath.\n mcp: api + '/mcp',\n // The docs app serves under basePath /docs (matching prod\n // clipform.io/docs), so the dev URL must include it too.\n docs: process.env.NEXT_PUBLIC_DOCS_URL || 'http://localhost:3004/docs',\n };\n }\n\n return {\n marketing: 'https://www.clipform.io',\n dashboard: 'https://app.clipform.io',\n viewer: 'https://clipform.io',\n api: 'https://api.clipform.io',\n // Dedicated subdomain for the remote MCP server. Same Render service\n // as `api`, just routed by Host header. Token audience is bound here.\n mcp: 'https://mcp.clipform.io',\n docs: 'https://clipform.io/docs',\n };\n}\n\n/**\n * Core business information - UPDATE THESE AS NEEDED\n */\nexport const BUSINESS = {\n name: \"Clipform\",\n tagline: \"Video-Driven Form Builder\",\n description:\n \"Create engaging forms that combine video content with interactive questions. Capture authentic responses with text, audio, or video recordings.\",\n shortDescription:\n \"Interactive video forms that capture authentic responses. Build engaging forms in minutes.\",\n domain: \"clipform.io\",\n email: {\n support: \"support@clipform.io\",\n sales: \"sales@clipform.io\",\n hello: \"hello@clipform.io\",\n },\n urls: getUrls(),\n};\n\n/**\n * In-product \"Learn more\" deep-links (#394) - single source of truth, keyed\n * by concept. Anchors are CI-checked against real docs headings\n * (apps/docs/scripts/check-help-links.mjs). Never hardcode docs URLs in UI.\n */\nexport const HELP_LINKS = buildHelpLinks(BUSINESS.urls.docs);\nexport { HELP_TOPICS };\n\n/** URL builders — single source of truth for public-facing links */\nexport function viewerUrl(shareId) {\n return `${BUSINESS.urls.viewer}/${shareId}`;\n}\nexport function formUrl(shareId) {\n return `${BUSINESS.urls.dashboard}/save/${shareId}`;\n}\n\n/**\n * Brand assets and visual identity\n */\nexport const BRAND = {\n logo: {\n primary: \"/logo.svg\",\n withText: \"/logo_text.svg\",\n icon: \"/favicon.ico\",\n iconSvg: \"/icon.svg\",\n appleTouchIcon: \"/apple-touch-icon.png\",\n minWidth: \"120px\",\n maxWidth: \"200px\",\n spacing: \"16px\",\n },\n colors: {\n primary: \"#171717\",\n secondary: \"#404040\",\n accent: \"#3182CE\",\n background: \"#FAFAFA\",\n surface: \"#FFFFFF\",\n border: \"#E5E5E5\",\n muted: \"#737373\",\n },\n fonts: {\n body: \"Inter, sans-serif\",\n headings: \"'Satoshi', Inter, sans-serif\",\n logo: \"'Plus Jakarta Sans', sans-serif\",\n satoshiImport: \"https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap\",\n },\n /** HSL design tokens for CSS variable overrides */\n hsl: {\n background: \"0 0% 98%\",\n foreground: \"0 0% 25%\",\n muted: \"0 0% 96%\",\n mutedForeground: \"0 0% 45%\",\n popover: \"0 0% 100%\",\n popoverForeground: \"0 0% 9%\",\n card: \"0 0% 100%\",\n cardForeground: \"0 0% 9%\",\n border: \"0 0% 90%\",\n primary: \"0 0% 9%\",\n primaryForeground: \"0 0% 98%\",\n secondary: \"0 0% 96%\",\n secondaryForeground: \"0 0% 9%\",\n accent: \"0 0% 96%\",\n accentForeground: \"0 0% 9%\",\n ring: \"0 0% 64%\",\n darkBackground: \"0 0% 6%\",\n darkForeground: \"0 0% 92%\",\n darkMuted: \"0 0% 12%\",\n darkMutedForeground: \"0 0% 64%\",\n darkPopover: \"0 0% 8%\",\n darkPopoverForeground: \"0 0% 92%\",\n darkCard: \"0 0% 8%\",\n darkCardForeground: \"0 0% 98%\",\n darkBorder: \"0 0% 16%\",\n darkPrimary: \"0 0% 98%\",\n darkPrimaryForeground: \"0 0% 9%\",\n darkSecondary: \"0 0% 14%\",\n darkSecondaryForeground: \"0 0% 98%\",\n darkAccent: \"0 0% 16%\",\n darkAccentForeground: \"0 0% 92%\",\n darkRing: \"0 0% 30%\",\n },\n};\n\n/**\n * Plan limits — shared between API (enforcement), dashboard (UI gating), and viewer (branding)\n *\n * Keyed by plan_version string (e.g. 'free_v1', 'pro_v1') so we can\n * grandfather old limits when pricing changes. New signups get the version\n * from CURRENT_PLAN_VERSIONS; existing companies keep theirs until\n * explicitly migrated.\n */\nexport const PLAN_LIMITS = {\n free_v1: {\n tier: 0,\n name: 'Free',\n price: '$0',\n period: 'forever',\n stripe_price_id: { test: null, live: null },\n node_limit: null,\n form_limit: 5,\n show_branding: true,\n custom_theme: false,\n response_limit: 100,\n features: [\n 'Up to 5 forms',\n 'Unlimited questions per form',\n '100 responses per month',\n 'Full AI tooling (TTS, media, video)',\n 'Clipform branding',\n ],\n },\n free_internal_v1: {\n tier: 0,\n name: 'Free (Internal)',\n price: '$0',\n period: 'forever',\n stripe_price_id: { test: null, live: null },\n node_limit: null,\n form_limit: null,\n show_branding: true,\n custom_theme: false,\n response_limit: null,\n features: [\n 'Unlimited questions',\n 'Unlimited forms',\n 'Unlimited responses',\n 'Video integration',\n 'Clipform branding',\n ],\n },\n pro_v1: {\n tier: 1,\n name: 'Pro',\n price: '$25',\n period: '/month',\n stripe_price_id: { test: 'price_1TZnmhCWdEPD0KoNWWJTc3B6', live: 'price_1TZnrZEJOD9ik3LhhFwGZ6ut' },\n node_limit: null,\n form_limit: null,\n show_branding: false,\n custom_theme: true,\n response_limit: null,\n features: [\n 'Unlimited forms',\n 'Unlimited questions',\n 'Unlimited responses',\n 'Custom themes & colors',\n 'Remove Clipform branding',\n ],\n },\n};\n\n/** Maps tier integer → version string assigned to new signups */\nexport const CURRENT_PLAN_VERSIONS = { 0: 'free_v1', 1: 'pro_v1' };\n\n/**\n * Product information and features\n */\nexport const PRODUCT = {\n features: {\n get core() {\n return getLiveFeatures()\n .filter(f => ['node-types', 'responses', 'builder', 'analytics', 'ai'].includes(f.category))\n .map(f => f.name);\n },\n get premium() {\n return getLiveFeatures()\n .filter(f => ['sharing', 'api'].includes(f.category))\n .map(f => f.name);\n },\n },\n // Derived from PLAN_LIMITS (source of truth)\n get pricing() {\n const free = PLAN_LIMITS[CURRENT_PLAN_VERSIONS[0]];\n const pro = PLAN_LIMITS[CURRENT_PLAN_VERSIONS[1]];\n return {\n free: { name: free.name, price: free.price, period: free.period, features: free.features },\n pro: { name: pro.name, price: pro.price, period: pro.period, features: pro.features },\n };\n },\n};\n\n/**\n * Social media links\n */\nexport const SOCIAL = {\n twitter: \"@clipform\",\n linkedin: \"company/clipform\",\n github: \"clipform\",\n urls: {\n twitter: \"https://twitter.com/clipform\",\n linkedin: \"https://linkedin.com/company/clipform\",\n github: \"https://github.com/clipform\",\n },\n};\n\n/**\n * Legal and compliance\n */\n/**\n * Legal facts - single source of truth for /terms and /privacy (#459).\n * Pages derive entity names, contacts, dates, and numbers from here;\n * never hardcode them in page copy.\n *\n * Drafting principle: minimum legally-required disclosure only. No voluntary\n * commitments, no named vendors in public docs (categories of recipients\n * satisfy UK GDPR Art 13(1)(e)), no published DPA until a customer requests\n * one. Shortest legally-sufficient wording everywhere.\n */\nexport const LEGAL = {\n company: \"Reco Ventures Ltd.\",\n companyCountry: \"United Kingdom\",\n governingLaw: \"England and Wales\",\n copyright: \"© 2026 Clipform. All rights reserved.\",\n privacy: \"/privacy\",\n terms: \"/terms\",\n privacyEmail: \"hello@clipform.io\", // GDPR contact - no separate DPO mailbox\n termsUpdated: \"2026-06-06\",\n privacyUpdated: \"2026-06-06\",\n minAge: 18, // contract capacity; no parental-consent handling\n billing: {\n processor: \"Stripe\", // live\n model: \"monthly-recurring\", // auto-renews; cancel effective end of period\n refunds: \"none\", // except at our sole discretion\n },\n // Total liability capped at fees paid in the prior 12 months (free = zero),\n // plus standard as-is / no indirect damages wording.\n liabilityCapMonths: 12,\n // Account/data deletion completed within this window (incl. Mux assets +\n // Supabase storage; backups may persist briefly beyond).\n deletionDays: 30,\n // Aggregated/anonymized data: rights reserved via quiet drafting - folded\n // into the content licence (terms s5) and lawful-bases (privacy s3) rather\n // than a standalone billboard section. Covers product improvement,\n // benchmarks, published insights; never re-identified.\n //\n // Internal only - NOT rendered anywhere. Kept current so a DPA can be\n // produced the day a customer requests one. Public docs disclose\n // categories of recipients only.\n subprocessors: [\n { name: \"Supabase\", purpose: \"Database and file storage\" },\n { name: \"Mux\", purpose: \"Video hosting and streaming\" },\n { name: \"Vercel\", purpose: \"Web hosting\" },\n { name: \"Render\", purpose: \"API hosting\" },\n { name: \"AWS\", purpose: \"Video rendering (Lambda)\" },\n { name: \"PostHog\", purpose: \"Product analytics and error tracking\" },\n { name: \"Cloudflare\", purpose: \"DNS, CDN, email routing\" },\n { name: \"Stripe\", purpose: \"Payment processing\" },\n { name: \"Anthropic\", purpose: \"AI form generation\" },\n { name: \"OpenAI\", purpose: \"AI form generation\" },\n ],\n};\n\n/**\n * Standard contact form field definitions\n * Source of truth for both dashboard (field picker) and viewer (form rendering)\n */\nexport const CONTACT_FIELDS = [\n { id: 'first_name', label: 'First Name', type: 'text', placeholder: 'Enter first name', order: 1 },\n { id: 'last_name', label: 'Last Name', type: 'text', placeholder: 'Enter last name', order: 2 },\n { id: 'email', label: 'Email Address', type: 'email', placeholder: 'you@example.com', order: 3 },\n { id: 'phone', label: 'Phone Number', type: 'tel', placeholder: '(555) 123-4567', order: 4 },\n];\n\nexport const CONTACT_FIELDS_MAP = Object.fromEntries(\n CONTACT_FIELDS.map(f => [f.id, f])\n);\n\n/**\n * Node type definitions — re-exported from node-types.js\n */\nexport {\n NODE_TYPES,\n NODE_TYPES_LIST,\n NODE_TYPE_KEYS,\n RESPONSE_FORMATS,\n CONSENT_TYPES,\n NODE_TYPE_METADATA,\n RESPONSE_SCHEMAS,\n CONFIG_SCHEMAS,\n OUTPUT_SCHEMAS,\n TERMINAL_TYPES,\n NON_COUNTABLE_TYPES,\n NON_COUNTABLE_FILTER,\n RESULTS_EXCLUDED_TYPES,\n isTerminalType,\n} from './node-types.js';\n\nexport {\n validateAgainstSchema,\n validateConfig,\n validateOptions,\n validateResponse,\n validateOutput,\n} from './validate.js';\n\nexport { FEATURE_FLAGS, FEATURES, getLiveFeatures, getPlannedFeatures, getFeaturesByCategory } from './features.js';\n\nexport { ANALYTICS_METRICS, ANALYTICS_INVARIANTS, ANALYTICS_BREAKDOWNS, ANALYTICS_FUNNEL_ORDER, getMetricLabel } from './analytics.js';\n\n/**\n * Form type definitions — re-exported from form-types.js\n */\nexport {\n FORM_TYPES,\n FORM_TYPES_LIST,\n FORM_TYPE_KEYS,\n WORKFLOW_TYPES,\n FORM_TYPE_ALIASES,\n ALL_VARIANTS,\n resolveFormType,\n getDiscoveryParams,\n isFormTypeAvailable,\n getAvailableFormTypes,\n} from './form-types.js';\n\nexport { validateFormForPublish } from './graph-validation.js';\n\n/**\n * Node logic grammar constants — re-exported from logic-types.js\n */\nexport {\n LOGIC_ACTION_TYPES,\n LOGIC_CONDITION_OPS,\n LOGIC_VAR_TYPES,\n LOGIC_TARGET_TYPES,\n} from './logic-types.js';\n\n/**\n * Integration catalog definitions — re-exported from integration-catalog.js\n */\nexport {\n INTEGRATION_CATALOG,\n INTEGRATION_CATALOG_LIST,\n INTEGRATION_SLUGS,\n getIntegrationsByCategory,\n getIntegrationsByTags,\n} from './integration-catalog.js';\n\n/**\n * API key prefixes — shared between API (validation) and dashboard (generation)\n */\nexport const API_KEY_PREFIXES = ['cf_', 'cf_live_', 'cf_test_'];\nexport const API_KEY_PREFIX = 'cf_';\n\n/**\n * Input validation limits — shared between API routes and MCP server\n */\nexport const VALIDATION_LIMITS = {\n form: {\n title: { max: 1000 },\n nodes: { max: 100 },\n },\n node: {\n prompt: { max: 5000, media_max: 60 },\n options: { max: 50 },\n },\n};\n\n/**\n * Theme defaults and colour validation — single source of truth\n * All colours must be 6-digit hex (#RRGGBB). No rgba, no shorthand.\n */\nexport const HEX_COLOR_REGEX = /^#[0-9A-Fa-f]{6}$/;\n\nexport const THEME_DEFAULTS = {\n primary_color: '#374151',\n background_color: '#F3F4F6',\n font_family: 'Inter',\n};\n\n/**\n * AI-protected form fields — fields the AI must NOT set unless the user\n * explicitly requests it. Everything else is AI-mutable (set freely).\n *\n * Used by MCP tools to guard descriptions and omit defaults.\n */\nexport const AI_PROTECTED_FIELDS = {\n font_family: {\n reason: 'Brand/design decision — do not set unless the user explicitly requests a different font.',\n },\n author: {\n reason: 'Brand identity — do not invent. Only set when the user provides a value.',\n },\n brand_name: {\n reason: 'Brand identity — do not invent. Only set when the user provides a value.',\n },\n logo_url: {\n reason: 'Brand identity — do not invent. Only set when the user provides a value.',\n },\n is_live: {\n reason: 'Going live is a deliberate action. Never auto-publish unless the user asks.',\n },\n};\n\n/**\n * Ken Burns / Slideshow constants — single source of truth.\n * Used by Remotion compositions, API slideshow route, and MCP tools.\n */\nexport const KEN_BURNS_EFFECTS = [\n 'pan-left',\n 'pan-right',\n 'pan-up',\n 'pan-down',\n 'zoom-in-pan-left',\n 'zoom-in-pan-right',\n 'zoom-in',\n 'zoom-out',\n 'static',\n];\n\nexport const KEN_BURNS_PRESETS = [\n 'cinematic',\n 'dramatic',\n 'calm',\n 'documentary',\n 'dreamy',\n 'moody',\n 'energetic',\n];\n\nexport const KEN_BURNS_EASINGS = ['ease-in-out', 'ease-in', 'ease-out', 'linear'];\n\nexport const KEN_BURNS_FIT_MODES = ['cover', 'blur-pad', 'auto'];\n\nexport const SLIDESHOW_TRANSITIONS = [\n 'fade',\n 'fadeblack',\n 'fadewhite',\n 'slideleft',\n 'slideright',\n 'circlecrop',\n 'circleopen',\n 'circleclose',\n 'dissolve',\n 'pixelize',\n 'radial',\n 'smoothleft',\n 'smoothright',\n 'wipeleft',\n 'wiperight',\n 'diagtl',\n 'diagbr',\n 'hblur',\n];\n\n/**\n * Composition IDs that require a Mapbox access token.\n * Map is the primitive (#453); GlobeToCity/CityToGlobe/MapPin are its\n * presets/aliases.\n */\nexport const MAP_COMPOSITIONS = ['Map', 'GlobeToCity', 'CityToGlobe', 'MapPin'];\n\n/**\n * Composition registry - single source of truth for which compositions the MCP\n * server exposes and at what access tier, plus their kind (for docs/tooling).\n *\n * - `tier`: 'public' (everyone) | 'labs' (CLIPFORM_LABS) | 'social'\n * (CLIPFORM_SOCIAL, marketing templates). The MCP PUBLIC/LABS/SOCIAL lists\n * derive from this (see packages/mcp-server/src/lib/config.ts).\n * - `kind`: 'bed' (full-bleed Scene layer 0) | 'overlay' (Scene asset layer) |\n * 'container' (Scene itself) | 'template' (whole pre-baked video).\n * - `scene_layer`: usable as a Scene layer (#652). SCENE_LAYER_IDS in\n * packages/remotion derives from this - never hand-list layer ids there.\n * `kind` says where a comp sits when layered; `scene_layer` says whether it\n * may be (most beds render standalone only).\n *\n * Variant presets (e.g. a 'neon' StatCounter) are NOT separate entries - they\n * are the base composition + a `preset` prop. Render-only/dev compositions\n * (test cards, Map preset-aliases, DataBar) are intentionally absent: they are\n * registered in Remotion but not advertised on the MCP.\n */\nexport const COMPOSITION_REGISTRY = [\n // Beds (full-bleed backgrounds)\n { id: 'MediaSlideshow', tier: 'public', kind: 'bed', scene_layer: true },\n { id: 'Map', tier: 'public', kind: 'bed', scene_layer: true },\n { id: 'Grid', tier: 'public', kind: 'bed', scene_layer: true },\n { id: 'GridList', tier: 'public', kind: 'bed' },\n { id: 'ObscuredReveal', tier: 'public', kind: 'bed' },\n { id: 'Timeline', tier: 'public', kind: 'bed' },\n { id: 'NumberLine', tier: 'public', kind: 'bed' },\n { id: 'CountdownRing', tier: 'public', kind: 'bed' },\n { id: 'CountrySilhouetteClip', tier: 'public', kind: 'bed', scene_layer: true },\n // TODO(consolidation): collapse to one FlagReveal { country } - these three\n // are the same component with hardcoded flag paths (a recipe, not a tool).\n { id: 'FlagRevealGB', tier: 'public', kind: 'bed' },\n { id: 'FlagRevealJP', tier: 'public', kind: 'bed' },\n { id: 'FlagRevealBR', tier: 'public', kind: 'bed' },\n { id: 'ColorCards', tier: 'public', kind: 'bed', scene_layer: true },\n { id: 'TitleCard', tier: 'public', kind: 'bed' },\n { id: 'ParallaxImage', tier: 'public', kind: 'bed' },\n { id: 'Spin3D', tier: 'labs', kind: 'bed', scene_layer: true },\n // Overlays (assets layered on a bed)\n { id: 'TextReveal', tier: 'public', kind: 'overlay', scene_layer: true },\n { id: 'EmojiPuzzle', tier: 'public', kind: 'overlay', scene_layer: true },\n { id: 'BeforeAfter', tier: 'public', kind: 'overlay', scene_layer: true },\n { id: 'StatCounter', tier: 'labs', kind: 'overlay', scene_layer: true },\n { id: 'ListReveal', tier: 'labs', kind: 'overlay', scene_layer: true },\n // Container\n { id: 'Scene', tier: 'labs', kind: 'container' },\n // Social marketing templates (gated)\n { id: 'ShortFormQuiz', tier: 'social', kind: 'template' },\n { id: 'ScorecardQuiz', tier: 'social', kind: 'template' },\n { id: 'ScorecardGK', tier: 'social', kind: 'template' },\n { id: 'CountrySilhouetteQuiz', tier: 'social', kind: 'template' },\n];\n\nconst compositionIdsByTier = (tier) =>\n COMPOSITION_REGISTRY.filter((c) => c.tier === tier).map((c) => c.id);\n\nexport const PUBLIC_COMPOSITION_IDS = compositionIdsByTier('public');\nexport const LABS_COMPOSITION_IDS = compositionIdsByTier('labs');\nexport const SOCIAL_COMPOSITION_IDS = compositionIdsByTier('social');\n\n/** Compositions usable as Scene layers (#652) - the single source for\n * SCENE_LAYER_IDS in packages/remotion and (via sync-schemas) the API's\n * per-layer validation allowlist. */\nexport const SCENE_LAYER_COMPOSITION_IDS = COMPOSITION_REGISTRY\n .filter((c) => c.scene_layer)\n .map((c) => c.id);\n\n/**\n * Minimum plan tier for an MCP tool to appear in tools/list on the remote\n * (OAuth) MCP server (#471). Tools not listed default to 0 (every plan).\n * Presentation-level only - real enforcement (rate limits, plan checks)\n * stays in the API routes. stdio/API-key sessions always see all tools.\n *\n * To gate a tool, add e.g. `clipform_render_composition: 1`.\n */\nexport const MCP_TOOL_TIERS = {};\n","const telemetryEnabled =\n process.env.DO_NOT_TRACK !== \"1\" &&\n process.env.CLIPFORM_TELEMETRY !== \"off\";\n\nlet mcpVersion = \"unknown\";\n\nexport function setMcpVersion(version: string) {\n mcpVersion = version;\n}\n\nfunction getApiBaseUrl(): string | null {\n return process.env.API_URL || null;\n}\n\nexport interface ErrorReport {\n error_type: string;\n error_message: string;\n tool_name?: string;\n status_code?: number;\n api_path?: string;\n}\n\nexport function reportError(report: ErrorReport) {\n if (!telemetryEnabled) return;\n const base = getApiBaseUrl();\n if (!base) return;\n\n const payload = {\n ...report,\n error_message: report.error_message.slice(0, 500),\n mcp_version: mcpVersion,\n runtime: detectRuntime(),\n timestamp: new Date().toISOString(),\n };\n\n fetch(`${base}/v1/telemetry/errors`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n signal: AbortSignal.timeout(2_000),\n }).catch(() => {});\n}\n\nexport function isServerFault(status: number): boolean {\n return status >= 500;\n}\n\nfunction detectRuntime(): string {\n if (process.env.CLAUDE_CODE) return \"claude-code\";\n if (process.env.CURSOR_SESSION_ID) return \"cursor\";\n return \"stdio\";\n}\n","import { getMcpAuth } from \"./auth-context.js\";\nimport { reportError, isServerFault } from \"./telemetry.js\";\n\nfunction getApiBaseUrl(): string {\n const url = process.env.API_URL;\n if (!url) {\n throw new Error(\n \"API_URL must be set (e.g. http://localhost:3003 or https://api.clipform.io)\"\n );\n }\n return url;\n}\n\n\nfunction getAuthHeaders(): Record<string, string> {\n const authCtx = getMcpAuth();\n const apiKey = authCtx?.api_key || process.env.CLIPFORM_API_KEY;\n if (!apiKey) {\n throw new Error(\"CLIPFORM_API_KEY must be set.\");\n }\n\n return { \"Authorization\": `Bearer ${apiKey}` };\n}\n\ninterface ApiOptions {\n method?: string;\n body?: Record<string, unknown>;\n params?: Record<string, string>;\n timeoutMs?: number;\n}\n\ntype ApiResult =\n | { ok: true; data: Record<string, unknown> }\n | { ok: false; status: number; error: string };\n\nexport async function callApi(\n path: string,\n options: ApiOptions = {}\n): Promise<ApiResult> {\n const { body, params, timeoutMs = 30_000 } = options;\n const method = options.method || (body ? \"POST\" : \"GET\");\n\n const base = getApiBaseUrl();\n const prefix = path.startsWith(\"/internal/\") ? \"\" : \"/v1\";\n let url = `${base}${prefix}${path}`;\n if (params) {\n const searchParams = new URLSearchParams(params);\n url += `?${searchParams.toString()}`;\n }\n\n // Creative endpoints (/internal/*) authenticate with the same Bearer API\n // key as everything else. The X-Service-Secret header the MCP used to send\n // is webhook-trigger auth only and was dropped here (#412 F7).\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n ...getAuthHeaders(),\n };\n\n const fetchOptions: RequestInit = {\n method,\n headers,\n signal: AbortSignal.timeout(timeoutMs),\n };\n\n if (body && method !== \"GET\") {\n fetchOptions.body = JSON.stringify(body);\n }\n\n let response: Response;\n try {\n response = await fetch(url, fetchOptions);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n reportError({\n error_type: \"connection_error\",\n error_message: message,\n tool_name: getMcpAuth()?.tool_name,\n api_path: `${prefix}${path}`,\n });\n return {\n ok: false,\n status: 0,\n error: `Failed to connect to API at ${url}.\\n\\nError: ${message}`,\n };\n }\n\n if (response.status === 204) {\n return { ok: true, data: {} };\n }\n\n const data = (await response.json()) as Record<string, unknown>;\n\n if (!response.ok) {\n const hint = recoveryHint(response.status, path);\n const apiMsg = (data.error as string) || `API error (${response.status})`;\n const errorMsg = hint ? `${apiMsg} - ${hint}` : apiMsg;\n if (isServerFault(response.status)) {\n reportError({\n error_type: `http_${response.status}`,\n error_message: errorMsg,\n tool_name: getMcpAuth()?.tool_name,\n status_code: response.status,\n api_path: `${prefix}${path}`,\n });\n }\n return {\n ok: false,\n status: response.status,\n error: errorMsg,\n };\n }\n\n return { ok: true, data };\n}\n\n/** Next-step hint by status + path so an agent can recover instead of\n * retrying blind (#651). The raw API message stays first, hint second. */\nexport function recoveryHint(status: number, path: string): string | undefined {\n if (status === 401 || status === 403) {\n return \"Check credentials: the key comes from CLIPFORM_API_KEY or the OAuth session - read clipform://context/session for the active workspace and auth mode.\";\n }\n if (status === 404) {\n if (/^\\/forms\\/[^/]+\\/nodes\\//.test(path)) {\n return \"Call clipform_get_form to list this form's nodes and their IDs.\";\n }\n if (/^\\/forms\\/[^/]+/.test(path)) {\n return \"Call clipform_list_forms to find valid form IDs (UUIDs, not the share_id from a form URL).\";\n }\n }\n return undefined;\n}\n\nexport function errorResult(message: string) {\n return {\n content: [{ type: \"text\" as const, text: message }],\n isError: true,\n };\n}\n\nexport function textResult(text: string) {\n return {\n content: [{ type: \"text\" as const, text }],\n };\n}\n","import { BUSINESS } from \"@vid-master/config\";\nimport { callApi } from \"./api-client.js\";\n\nexport type AuthMode = \"authenticated\" | \"anonymous\";\n\nexport interface SessionContextResult {\n text: string;\n authMode: AuthMode;\n}\n\nexport async function getSessionContextWithAuth(): Promise<SessionContextResult> {\n let result;\n try {\n result = await callApi(\"/me\", { method: \"GET\" });\n } catch {\n return { text: \"\", authMode: \"anonymous\" };\n }\n if (!result.ok) return { text: \"\", authMode: \"anonymous\" };\n\n const me = result.data as any;\n // The API's auth_mode is \"api_key\" | \"session\" | \"anonymous\". Anything\n // credentialed counts as authenticated - the old `=== \"oauth\"` check\n // matched nothing the API returns, so API-key sessions were labelled\n // anonymous with a \"sign in to unlock\" nudge right next to their real\n // plan (#412 F6).\n const apiAuthMode: string = (me.auth_mode as string) ?? \"anonymous\";\n const authMode: AuthMode = apiAuthMode === \"anonymous\" ? \"anonymous\" : \"authenticated\";\n const plan = me.plan;\n const lines: string[] = [];\n\n lines.push(\"## Your Session\");\n if (authMode === \"authenticated\") {\n lines.push(\n apiAuthMode === \"api_key\"\n ? \"Auth: API key (workspace-scoped)\"\n : \"Auth: signed in (connected to a Clipform account)\"\n );\n lines.push(`Workspace: ${me.workspace?.name ?? \"Unknown\"} (${me.workspace?.id ?? \"?\"})`);\n if (me.user_id) lines.push(`User: ${me.user_id}`);\n if (me.company_id) lines.push(`Company: ${me.company_id}`);\n } else {\n lines.push(\"Auth: anonymous (not connected to a Clipform account)\");\n if (me.workspace) {\n lines.push(`Workspace: ${me.workspace.name} (${me.workspace.id})`);\n }\n }\n lines.push(`Plan: ${plan.name} (tier ${plan.tier})`);\n if (plan.node_limit !== null) {\n lines.push(`Question limit: ${plan.node_limit} per form`);\n } else {\n lines.push(\"Questions: unlimited\");\n }\n if (plan.form_limit !== null) {\n lines.push(`Form limit: ${plan.form_limit} forms`);\n } else {\n lines.push(\"Forms: unlimited\");\n }\n if (plan.custom_theme === false) {\n lines.push(\"Custom themes: not available on this plan\");\n }\n if (authMode === \"anonymous\") {\n lines.push(`\\nTo unlock your full plan: sign in to your Clipform account.`);\n }\n\n return { text: lines.join(\"\\n\"), authMode };\n}\n\nexport async function getSessionContext(): Promise<string> {\n const { text } = await getSessionContextWithAuth();\n return text;\n}\n"],"mappings":";;;;;AAiBO,IAAM,WAAW;AAAA;AAAA,EAEtB,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,eAAe;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,YAAY;AAAA,IACV,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,UAAU;AA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";
6
6
  import {
7
7
  __export
8
8
  } from "./chunk-HCZI2UJ5.js";
@@ -4097,6 +4097,10 @@ function resourceLink(name, uri, title) {
4097
4097
  }
4098
4098
  };
4099
4099
  }
4100
+ 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:";
4101
+ var TAGS_LINE = "- tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words";
4102
+ var ATTACH_MEDIA_STEP = "**Attach media** with clipform_upload_node_media (batch all uploads in one call). Include captions, set show_captions: true and fit_media: true (generated renders must not be cropped).";
4103
+ var REPUBLISH_STEP = "**Republish** with clipform_update_form (is_live: true) - forms are live from creation, but media and edits added since are only visible in the live form after republishing. Never skip this when you attached anything.";
4100
4104
  function quizWorkflow(args, sessionContext, authMode = "authenticated") {
4101
4105
  const topic = args.topic ? ` about "${args.topic}"` : "";
4102
4106
  const count = args.question_count ?? 8;
@@ -4107,7 +4111,7 @@ function quizWorkflow(args, sessionContext, authMode = "authenticated") {
4107
4111
 
4108
4112
  1. **Research** the topic - find surprising facts, common misconceptions, myth-busters
4109
4113
  2. **Write questions** - follow the difficulty curve (easy start, hard middle, satisfying end). Target ${count} questions.
4110
- 3. **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:
4114
+ 3. ${BUILD_ONCE_STEP}
4111
4115
  - Settings: show_step_counter: true, disable_back_navigation: true
4112
4116
  - 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. The viewer shuffles options at render time, so list them in any order. Scored options enable correct-answer marking automatically.
4113
4117
  - Final end_screen node - EVERY quiz must have:
@@ -4116,13 +4120,13 @@ function quizWorkflow(args, sessionContext, authMode = "authenticated") {
4116
4120
  - cta_type: "restart", cta_text: a short challenge like "Beat your score?" or "Try again?"
4117
4121
  - 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."
4118
4122
  - NOTE: Personalised messages per score tier (score_ranges) are coming soon. For now, write one great end screen message that works for all scores.
4119
- - tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4123
+ ${TAGS_LINE}
4120
4124
  4. **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.
4121
- 5. **Build video** for each question:
4122
- - clipform_search_media (kind: "image") - 3 images per question, batch all queries in one call
4123
- - clipform_generate_video with wait: false per question - fires all renders in parallel - then collect URLs with clipform_check_render
4124
- 6. **Attach media** with clipform_upload_node_media (batch all uploads in one call). Include captions, set show_captions: true and fit_media: true (generated renders must not be cropped).
4125
- 7. **Publish** with clipform_update_form
4125
+ 5. **Build video** for each question - pick per question; mixing treatments across one quiz is fine:
4126
+ - Default - narrated slideshow: clipform_search_media (kind: "image", 3 images per question, batch all queries in one call), then clipform_generate_video with wait: false per question - fires all renders in parallel - then collect URLs with clipform_check_render.
4127
+ - Designed visual - when a composition fits the question or the user asks for one (e.g. a grid reveal): clipform_list_compositions to see what's available, then clipform_render_composition with wait: false per clip. Compositions take narration via sound.narration.
4128
+ 6. ${ATTACH_MEDIA_STEP}
4129
+ 7. ${REPUBLISH_STEP}
4126
4130
  8. **Log** with clipform_log_generation (sources, images, attributions)
4127
4131
 
4128
4132
  > **Text-only override:** If the user explicitly asked for text-only (no video), skip steps 5-6 (video production and media attachment). Still generate narration in step 4.`;
@@ -4143,7 +4147,7 @@ There are NO correct answers. Each option should feel equally valid - the quiz i
4143
4147
 
4144
4148
  1. **Define 3-5 outcome categories** conceptually - these guide your question design even though automated scoring is not yet available.
4145
4149
  2. **Write questions** - each question should feel revealing but fun. Target ${count} questions.
4146
- 3. **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:
4150
+ 3. ${BUILD_ONCE_STEP}
4147
4151
  - Settings: show_step_counter: true, disable_back_navigation: true
4148
4152
  - One choice node per question: config { choice: { show_answer_feedback: false } } (no right/wrong!)
4149
4153
  - Do NOT set randomise_options (option order matters for personality quizzes - lead with the most appealing)
@@ -4154,10 +4158,10 @@ There are NO correct answers. Each option should feel equally valid - the quiz i
4154
4158
  - cta_type: "restart", cta_text: "Find out again?" or "Take it again?"
4155
4159
  - Write a title and message that feel personal and shareable. Example: title: "Thanks for playing!", message: "Share this quiz with friends and compare your answers."
4156
4160
  - NOTE: Automated result screens per category (scoring_results) are coming soon. For now, write one engaging end screen.
4157
- - tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4161
+ ${TAGS_LINE}
4158
4162
  4. **Generate narration** with clipform_generate_tts - batch ALL questions in a single call. Conversational, reflective tone. "What does this say about you?" not "Do you know the answer?"
4159
4163
  5. **Build video** + **attach media** (same as knowledge quiz workflow)
4160
- 6. **Publish** with clipform_update_form
4164
+ 6. ${REPUBLISH_STEP}
4161
4165
  7. **Log** with clipform_log_generation`;
4162
4166
  }
4163
4167
  function comprehensionQuizWorkflow(args, sessionContext, authMode = "authenticated") {
@@ -4180,7 +4184,7 @@ function comprehensionQuizWorkflow(args, sessionContext, authMode = "authenticat
4180
4184
  - Include 1-2 inference questions: "Based on the video, why does the presenter believe...?"
4181
4185
  - Avoid questions answerable without watching (e.g., common knowledge about the topic)
4182
4186
  4. **Adapt to the audience**${audienceLabel} - simplify language for younger audiences, focus on concrete/visual details rather than abstract arguments
4183
- 5. **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:
4187
+ 5. ${BUILD_ONCE_STEP}
4184
4188
  - Settings: show_step_counter: true, disable_back_navigation: true
4185
4189
  - 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.
4186
4190
  - Final end_screen node:
@@ -4194,8 +4198,8 @@ function comprehensionQuizWorkflow(args, sessionContext, authMode = "authenticat
4194
4198
  7. **Build video** for each question:
4195
4199
  - clipform_search_media (kind: "image") - 3 images per question, batch all queries in one call
4196
4200
  - clipform_generate_video with wait: false per question - fires all renders in parallel - then collect URLs with clipform_check_render
4197
- 8. **Attach media** with clipform_upload_node_media (batch all uploads in one call). Include captions, set show_captions: true and fit_media: true (generated renders must not be cropped).
4198
- 9. **Publish** with clipform_update_form
4201
+ 8. ${ATTACH_MEDIA_STEP}
4202
+ 9. ${REPUBLISH_STEP}
4199
4203
  10. **Log** with clipform_log_generation - include the YouTube URL, video title, and channel as sources
4200
4204
 
4201
4205
  ## Question Types for Comprehension
@@ -4223,7 +4227,7 @@ function compositionQuizWorkflow(args, sessionContext, authMode = "authenticated
4223
4227
  1. **Discover what's renderable** - call clipform_list_compositions. Availability varies by session; choose mechanics ONLY from what it returns. Match each question to a mechanic via the composition guide's matrix. Mix 2-3 mechanics across the quiz; for questions with no fitting composition, use the base quiz's Ken Burns pipeline instead.
4224
4228
  2. **Write questions** - difficulty curve as in the base guide. Difficulty = subject obscurity (Japan's flag vs Kiribati's), never clue degradation. ${count} questions \u2248 ${count * 2 + 1} nodes (each question is a clue + reveal pair) - check the plan's node limit.
4225
4229
  3. **Render all clips** with clipform_render_composition, wait: false on EVERY call - fire the full batch (clue clip + reveal clip per question), then collect URLs with clipform_check_render. Chain-state compositions: clue clip animate: true, reveal clip animate: false + answer props.
4226
- 4. **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:
4230
+ 4. ${BUILD_ONCE_STEP}
4227
4231
  - Settings: show_step_counter: true, disable_back_navigation: true
4228
4232
  - Per question, a PAIR of nodes:
4229
4233
  - Clue node (type: "choice"): question as prompt, config { choice: { show_answer_feedback: true }, randomise_options: true }, options with score: 1 on the correct answer and score: 0 on 2-3 wrong ones. Scored options enable correct-answer marking automatically.
@@ -4232,7 +4236,7 @@ function compositionQuizWorkflow(args, sessionContext, authMode = "authenticated
4232
4236
  - tags: format "quiz", genre "trivia", and 2-3 topic words
4233
4237
  5. **Generate narration** with clipform_generate_tts - batch ALL items in one call. The visual does the teasing: set stakes, never describe what's on screen or read the clue aloud. Reveal narration can celebrate.
4234
4238
  6. **Attach media** with clipform_upload_node_media (batch all uploads in one call) - clue clip on each choice node, reveal clip on each button node. Include captions, set show_captions: true and fit_media: true (generated renders must not be cropped).
4235
- 7. **Publish** with clipform_update_form
4239
+ 7. ${REPUBLISH_STEP}
4236
4240
  8. **Log** with clipform_log_generation - record the composition IDs used per question alongside sources and attributions`;
4237
4241
  }
4238
4242
  function interviewWorkflow(args, sessionContext, authMode = "authenticated") {
@@ -4245,16 +4249,16 @@ function interviewWorkflow(args, sessionContext, authMode = "authenticated") {
4245
4249
  ## Workflow
4246
4250
 
4247
4251
  1. **Identify the ask** - what do you need from respondents? ${purpose}.
4248
- 2. **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:
4252
+ 2. ${BUILD_ONCE_STEP}
4249
4253
  - Settings: show_step_counter: true, disable_back_navigation: false
4250
4254
  - Warm-up question first (type: "open") - something easy: "Tell us your name and role"
4251
4255
  - 2-3 core questions (type: "open") - one topic per question.${format === "all" ? " Enable text + audio + video responses." : ` Enable ${format} responses.`}
4252
4256
  - Contact collection (type: "contact") - first name + email minimum${consent ? `
4253
4257
  - Consent node - "I agree that my response may be used in [context]"` : ""}
4254
4258
  - End screen that sets expectations: "Thanks! We'll be in touch."
4255
- - tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4259
+ ${TAGS_LINE}
4256
4260
  3. **Optional - Rich Media:** Add TTS narration (clipform_generate_tts, batch all questions in one call) with a warm, inviting tone - "We'd love to hear your story..." Video backgrounds (clipform_search_media \u2192 clipform_generate_video) on the intro question can set a professional tone.
4257
- 4. **Publish** with clipform_update_form
4261
+ 4. ${REPUBLISH_STEP}
4258
4262
  5. **Log** with clipform_log_generation`;
4259
4263
  }
4260
4264
  function surveyWorkflow(args, sessionContext, authMode = "authenticated") {
@@ -4266,16 +4270,16 @@ function surveyWorkflow(args, sessionContext, authMode = "authenticated") {
4266
4270
  ## Workflow
4267
4271
 
4268
4272
  1. **Define the key metric** - what's the one number you care about? (NPS, satisfaction, likelihood to recommend)
4269
- 2. **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:
4273
+ 2. ${BUILD_ONCE_STEP}
4270
4274
  - Settings: show_step_counter: true, disable_back_navigation: false
4271
4275
  - Key metric question FIRST (type: "choice" or "rating") - while attention is highest
4272
4276
  - One "why?" follow-up (type: "open") - "What's the main reason for your score?"
4273
4277
  - 2-3 specific questions (type: "choice") - only ask what you'll act on${!anonymous ? `
4274
4278
  - Contact collection (type: "contact") - name + email for follow-up` : ""}
4275
4279
  - End screen: "Thanks for your feedback!"
4276
- - tags: one format (quiz/survey/interview/feedback/lead-gen), one genre (trivia/personality/nps/poll/testimonial), and 2-3 topic words
4280
+ ${TAGS_LINE}
4277
4281
  3. **Optional - Rich Media:** For a more engaging experience, add TTS narration (clipform_generate_tts) for the intro or key questions, video backgrounds (clipform_search_media \u2192 clipform_generate_video), or background music (clipform_search_music).
4278
- 4. **Publish** with clipform_update_form
4282
+ 4. ${REPUBLISH_STEP}
4279
4283
  5. **Log** with clipform_log_generation
4280
4284
 
4281
4285
  ## Key rule: 5 questions max. Every extra question costs completions.`;
@@ -4293,7 +4297,7 @@ function testimonialWorkflow(args, sessionContext, authMode = "authenticated") {
4293
4297
  ## Workflow
4294
4298
 
4295
4299
  1. **Define the story arc** - what transformation or experience do you want to capture?
4296
- 2. **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:
4300
+ 2. ${BUILD_ONCE_STEP}
4297
4301
  - Settings: show_step_counter: true, disable_back_navigation: false
4298
4302
  - Warm-up question (type: "open") - "Tell us your name and [role/relationship/context]". Enable video + audio + text responses.
4299
4303
  - 2-3 storytelling prompts (type: "open") - follow the before \u2192 during \u2192 after arc. Enable video responses. Example prompts:
@@ -4305,7 +4309,7 @@ function testimonialWorkflow(args, sessionContext, authMode = "authenticated") {
4305
4309
  - tags: format "testimonial", genre "story", and 2-3 topic words
4306
4310
  3. **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.
4307
4311
  4. **Optional: build video** for the intro/warm-up question to set the tone.
4308
- 5. **Publish** with clipform_update_form
4312
+ 5. ${REPUBLISH_STEP}
4309
4313
  6. **Log** with clipform_log_generation
4310
4314
 
4311
4315
  > **Text-only override:** If the user explicitly asked for text-only (no video), skip steps 3-4 (narration and video production).`;
@@ -4318,7 +4322,7 @@ function applicationWorkflow(args, sessionContext, authMode = "authenticated") {
4318
4322
  ## Workflow
4319
4323
 
4320
4324
  1. **Define what you're screening for** - what qualifications matter, and what questions reveal fit?
4321
- 2. **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:
4325
+ 2. ${BUILD_ONCE_STEP}
4322
4326
  - Settings: show_step_counter: true, disable_back_navigation: false
4323
4327
  - Contact collection first (type: "contact") - name, email, phone - while motivation is high
4324
4328
  - 2-3 structured screening questions (type: "choice") - experience level, availability, relevant qualifications. These help you filter quickly.
@@ -4327,7 +4331,7 @@ function applicationWorkflow(args, sessionContext, authMode = "authenticated") {
4327
4331
  - End screen: "Your application has been submitted. We'll review it and get back to you." icon: "tick", no score, no restart
4328
4332
  - tags: format "application", genre "screening", and 2-3 topic words
4329
4333
  3. **Optional - Rich Media:** Add TTS narration (clipform_generate_tts) - professional and welcoming: "Thanks for your interest - let's get to know you." Video backgrounds (clipform_search_media \u2192 clipform_generate_video) on the intro can make the application feel more personal.
4330
- 4. **Publish** with clipform_update_form
4334
+ 4. ${REPUBLISH_STEP}
4331
4335
  5. **Log** with clipform_log_generation`;
4332
4336
  }
4333
4337
  function bookingWorkflow(args, sessionContext, authMode = "authenticated") {
@@ -4339,14 +4343,14 @@ function bookingWorkflow(args, sessionContext, authMode = "authenticated") {
4339
4343
  ## Workflow
4340
4344
 
4341
4345
  1. **Define the essentials** - what info do you actually need from attendees? Keep the list short.
4342
- 2. **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:
4346
+ 2. ${BUILD_ONCE_STEP}
4343
4347
  - Settings: show_step_counter: false (it's so short, a counter adds unnecessary UI), disable_back_navigation: false
4344
4348
  - Contact collection (type: "contact") - name + email minimum. Add phone only if needed.
4345
4349
  - 1-3 event-specific questions (type: "choice") - session preferences, dietary requirements, experience level. Only ask what you'll use.
4346
4350
  - End screen: "You're registered! Here's what to expect." Include event details (date, time, location/link) in the message. icon: "tick", no score, no restart, cta_type: "external_link" with a URL to calendar invite or event page (if available)
4347
4351
  - tags: format "registration", genre "${eventType}", and 2-3 topic words
4348
4352
  3. **Optional: add welcome video** - a short intro from the host. Generate narration with clipform_generate_tts, then build a video with clipform_search_media + clipform_generate_video.
4349
- 4. **Publish** with clipform_update_form
4353
+ 4. ${REPUBLISH_STEP}
4350
4354
  5. **Log** with clipform_log_generation
4351
4355
 
4352
4356
  ## Key rule: 3-5 fields max. Every extra field costs registrations.`;
@@ -4705,4 +4709,4 @@ export {
4705
4709
  getWorkflowText,
4706
4710
  registerPrompts
4707
4711
  };
4708
- //# sourceMappingURL=chunk-YAJTUAON.js.map
4712
+ //# sourceMappingURL=chunk-VTRO7ZC3.js.map