@clipform/mcp-server 4.2.1 → 4.2.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.
package/dist/index.js CHANGED
@@ -4,11 +4,11 @@ import {
4
4
  createServer,
5
5
  process as process2,
6
6
  serializeMessage
7
- } from "./chunk-BKTCQ5HS.js";
8
- import "./chunk-QG354AVT.js";
9
- import "./chunk-RKMGVU57.js";
10
- import "./chunk-O4LOUBGW.js";
11
- import "./chunk-GZZGKW5A.js";
7
+ } from "./chunk-XOV5ILOJ.js";
8
+ import "./chunk-APCG2RRD.js";
9
+ import "./chunk-5AAKB4S5.js";
10
+ import "./chunk-FGTU764J.js";
11
+ import "./chunk-KZNBYHHR.js";
12
12
  import "./chunk-VPF6MLKM.js";
13
13
  import {
14
14
  setMcpVersion
package/dist/prompts.js CHANGED
@@ -8,9 +8,9 @@ import {
8
8
  normalizeQuestionCount,
9
9
  normalizeResponseFormat,
10
10
  registerPrompts
11
- } from "./chunk-QG354AVT.js";
12
- import "./chunk-O4LOUBGW.js";
13
- import "./chunk-GZZGKW5A.js";
11
+ } from "./chunk-APCG2RRD.js";
12
+ import "./chunk-FGTU764J.js";
13
+ import "./chunk-KZNBYHHR.js";
14
14
  import "./chunk-VPF6MLKM.js";
15
15
  import "./chunk-PBQ5BQWD.js";
16
16
  import "./chunk-PZ5AY32C.js";
package/dist/resources.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  QUIZ_VARIANTS,
4
4
  getGuideUri,
5
5
  registerResources
6
- } from "./chunk-RKMGVU57.js";
7
- import "./chunk-O4LOUBGW.js";
8
- import "./chunk-GZZGKW5A.js";
6
+ } from "./chunk-5AAKB4S5.js";
7
+ import "./chunk-FGTU764J.js";
8
+ import "./chunk-KZNBYHHR.js";
9
9
  import "./chunk-VPF6MLKM.js";
10
10
  import "./chunk-PBQ5BQWD.js";
11
11
  import "./chunk-PZ5AY32C.js";
package/dist/server.js CHANGED
@@ -7,11 +7,11 @@ import {
7
7
  createMcpHandler,
8
8
  createServer,
9
9
  isLegacyRequest
10
- } from "./chunk-BKTCQ5HS.js";
11
- import "./chunk-QG354AVT.js";
12
- import "./chunk-RKMGVU57.js";
13
- import "./chunk-O4LOUBGW.js";
14
- import "./chunk-GZZGKW5A.js";
10
+ } from "./chunk-XOV5ILOJ.js";
11
+ import "./chunk-APCG2RRD.js";
12
+ import "./chunk-5AAKB4S5.js";
13
+ import "./chunk-FGTU764J.js";
14
+ import "./chunk-KZNBYHHR.js";
15
15
  import "./chunk-VPF6MLKM.js";
16
16
  import "./chunk-PBQ5BQWD.js";
17
17
  import "./chunk-PZ5AY32C.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipform/mcp-server",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "mcpName": "io.github.Clipform/mcp-server",
5
5
  "description": "MCP server for building and managing Clipform video forms",
6
6
  "license": "MIT",
@@ -63,9 +63,9 @@
63
63
  "vitest": "^3.2.4",
64
64
  "yaml": "^2.9.0",
65
65
  "zod": "^4.2.0",
66
+ "@clipform/mcp-content": "0.0.0",
66
67
  "@vid-master/eval-kit": "1.0.0",
67
- "@vid-master/form-sources": "1.0.0",
68
- "@clipform/mcp-content": "0.0.0"
68
+ "@vid-master/form-sources": "1.0.0"
69
69
  },
70
70
  "scripts": {
71
71
  "start": "node dist/index.js",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.Clipform/mcp-server",
4
4
  "title": "Clipform",
5
5
  "description": "Interactive video forms that capture authentic responses. Build engaging forms in minutes.",
6
- "version": "4.2.1",
6
+ "version": "4.2.2",
7
7
  "websiteUrl": "https://www.clipform.io",
8
8
  "icons": [
9
9
  {
@@ -23,7 +23,7 @@
23
23
  "registryType": "npm",
24
24
  "registryBaseUrl": "https://registry.npmjs.org",
25
25
  "identifier": "@clipform/mcp-server",
26
- "version": "4.2.1",
26
+ "version": "4.2.2",
27
27
  "runtimeHint": "npx",
28
28
  "transport": {
29
29
  "type": "stdio"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lib/caps.ts","../src/lib/anon-notice.ts","../src/lib/session-context.ts"],"sourcesContent":["import type { McpToolset } from \"@vid-master/config\";\n\n/**\n * What a connected surface can actually do, derived from the connect-time\n * toolset filter (#3309) so the guidance layers (server instructions, prompt\n * recipes, `clipform_get_workflow`, craft guides) never reference a tool the\n * surface doesn't register (#3681).\n *\n * The Claude Connectors Directory surface (`mcp.clipform.io/forms`) is\n * account + forms only: no media generation and no research helpers. A\n * workflow that still says \"call clipform_generate_tts\" there sends the model\n * at a tool that doesn't exist, which shows up in review as failed tool\n * calls. Every guidance producer takes a ServerCaps and gates on it.\n */\nexport interface ServerCaps {\n /** Narration, video, image, music, render, and asset tools are registered. */\n media: boolean;\n /** News lookup and the generation audit log are registered. */\n research: boolean;\n}\n\n/** Every toolset registered - stdio/npx and the bare remote endpoint. */\nexport const FULL_CAPS: ServerCaps = Object.freeze({ media: true, research: true });\n\nexport function capsFromToolsets(toolsets?: readonly McpToolset[]): ServerCaps {\n if (toolsets === undefined) return FULL_CAPS;\n return {\n media: toolsets.includes(\"media\"),\n research: toolsets.includes(\"research\"),\n };\n}\n","import { getMcpAuth } from \"./auth-context.js\";\n\n/**\n * #4650: anonymous (preview) accounts are temporary. Date-free by design -\n * the purge is not enforced yet, so no expiry date or day count is promised\n * (exact dates are follow-up #4662). Defined once; every anonymous-lane\n * surface (create/update_form text, whoami, session resource) reuses it.\n */\nexport const ANON_PREVIEW_NOTICE =\n \"Preview accounts are temporary - claim yours to keep your forms.\";\n\n/** The notice for an anonymous MCP caller, or null for everyone else. */\nexport function anonPreviewNotice(): string | null {\n return getMcpAuth()?.is_anonymous ? ANON_PREVIEW_NOTICE : null;\n}\n","import { BUSINESS, PLAN_LIMITS, CURRENT_PLAN_VERSIONS } from \"@vid-master/config\";\nimport { callApi } from \"./api-client.js\";\nimport { ANON_PREVIEW_NOTICE } from \"./anon-notice.js\";\nimport { getMcpAuth } from \"./auth-context.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 me: any;\n const authCtx = getMcpAuth();\n if (authCtx?.loadInternalContent && !authCtx.api_key) {\n // #4657: the no-workspace anon lane (get_workflow with no mint) has no\n // workspace for /me to describe, so plan caps default to Free.\n const free = PLAN_LIMITS[CURRENT_PLAN_VERSIONS[0]];\n me = {\n auth_mode: \"anonymous\",\n plan: {\n name: free.name,\n tier: free.tier,\n node_limit: free.node_limit,\n form_limit: free.form_limit ?? null,\n custom_theme: free.custom_theme,\n },\n };\n } else {\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 me = result.data as any;\n }\n // The API's auth_mode is \"api_key\" | \"oauth\" | \"session\" | \"anonymous\".\n // Anything credentialed counts as authenticated - the old `=== \"oauth\"`\n // check 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 // The anon MCP lane runs as a minted bot key (/me says \"api_key\"), so the\n // auth context is the truth for anonymous (#4653).\n const apiAuthMode: string = getMcpAuth()?.is_anonymous\n ? \"anonymous\"\n : ((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 // Workspace NAME only - the workspace UUID and the raw user_id/company_id\n // are internal database identifiers the model never needs (response\n // hygiene / disclosure guard, #2976).\n lines.push(`Workspace: ${me.workspace?.name ?? \"Unknown\"}`);\n } else {\n lines.push(\"Auth: anonymous (not connected to a Clipform account)\");\n if (me.workspace) {\n lines.push(`Workspace: ${me.workspace.name}`);\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 // Neutral statement of fact, no upsell/CTA copy (commerce sweep, #2976):\n // an anonymous session's forms are not tied to an account until one signs in.\n lines.push(`\\nAnonymous session: forms are not tied to a Clipform account until you sign in.`);\n lines.push(ANON_PREVIEW_NOTICE);\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":";;;;;;;;;;AAsBO,IAAM,YAAwB,OAAO,OAAO,EAAE,OAAO,MAAM,UAAU,KAAK,CAAC;AAE3E,SAAS,iBAAiB,UAA8C;AAC7E,MAAI,aAAa,OAAW,QAAO;AACnC,SAAO;AAAA,IACL,OAAO,SAAS,SAAS,OAAO;AAAA,IAChC,UAAU,SAAS,SAAS,UAAU;AAAA,EACxC;AACF;;;ACtBO,IAAM,sBACX;AAGK,SAAS,oBAAmC;AACjD,SAAO,WAAW,GAAG,eAAe,sBAAsB;AAC5D;;;ACFA,eAAsB,4BAA2D;AAC/E,MAAI;AACJ,QAAM,UAAU,WAAW;AAC3B,MAAI,SAAS,uBAAuB,CAAC,QAAQ,SAAS;AAGpD,UAAM,OAAO,YAAY,sBAAsB,CAAC,CAAC;AACjD,SAAK;AAAA,MACH,WAAW;AAAA,MACX,MAAM;AAAA,QACJ,MAAM,KAAK;AAAA,QACX,MAAM,KAAK;AAAA,QACX,YAAY,KAA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