@clipform/mcp-server 2.10.2 → 2.10.3
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/caps-DBnfcEyJ.d.ts +20 -0
- package/dist/{chunk-UBJ7CZL2.js → chunk-A5RVUIGS.js} +17 -7
- package/dist/chunk-A5RVUIGS.js.map +1 -0
- package/dist/{chunk-IL26A4IN.js → chunk-O35IVA4L.js} +20 -6
- package/dist/chunk-O35IVA4L.js.map +1 -0
- package/dist/{chunk-4QF4KGPE.js → chunk-QZO6MGNN.js} +230 -186
- package/dist/{chunk-4QF4KGPE.js.map → chunk-QZO6MGNN.js.map} +1 -1
- package/dist/{chunk-NCWQ42GI.js → chunk-ZOBK6CK7.js} +29 -29
- package/dist/{chunk-NCWQ42GI.js.map → chunk-ZOBK6CK7.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/instrument.d.ts +15 -3
- package/dist/instrument.js +4 -4
- package/dist/instrument.js.map +1 -1
- package/dist/prompts.d.ts +3 -2
- package/dist/prompts.js +2 -2
- package/dist/resources.d.ts +3 -1
- package/dist/resources.js +2 -2
- package/dist/server.d.ts +12 -1
- package/dist/server.js +6 -4
- package/package.json +1 -1
- package/dist/chunk-IL26A4IN.js.map +0 -1
- package/dist/chunk-UBJ7CZL2.js.map +0 -1
|
@@ -6,20 +6,22 @@ import {
|
|
|
6
6
|
getWorkflowText,
|
|
7
7
|
objectType,
|
|
8
8
|
registerPrompts
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QZO6MGNN.js";
|
|
10
10
|
import {
|
|
11
11
|
GUIDE_TYPES,
|
|
12
12
|
QUIZ_VARIANTS,
|
|
13
|
+
applyCapsToGuide,
|
|
13
14
|
fetchGuideText,
|
|
14
15
|
getGuideUri,
|
|
15
16
|
guideFallbackText,
|
|
16
17
|
registerResources
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-A5RVUIGS.js";
|
|
18
19
|
import {
|
|
19
20
|
ACTIVE_NODE_TYPES,
|
|
20
21
|
CONTACT_FIELDS,
|
|
21
22
|
FEATURE_FLAGS,
|
|
22
23
|
FORM_TYPE_ALIASES,
|
|
24
|
+
FULL_CAPS,
|
|
23
25
|
KEN_BURNS_EFFECTS,
|
|
24
26
|
KEN_BURNS_FIT_MODES,
|
|
25
27
|
KEN_BURNS_PRESETS,
|
|
@@ -30,13 +32,14 @@ import {
|
|
|
30
32
|
SLIDESHOW_TRANSITIONS,
|
|
31
33
|
bfsOrder,
|
|
32
34
|
callApi,
|
|
35
|
+
capsFromToolsets,
|
|
33
36
|
defaultTarget,
|
|
34
37
|
errorResult,
|
|
35
38
|
exposedCompositionIds,
|
|
36
39
|
resolveFormType,
|
|
37
40
|
structuredResult,
|
|
38
41
|
textResult
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-O35IVA4L.js";
|
|
40
43
|
import {
|
|
41
44
|
getMcpAuth,
|
|
42
45
|
runWithMcpTool
|
|
@@ -20456,7 +20459,7 @@ mainlandOnly excludes small islands and overseas territories (e.g. Corsica for F
|
|
|
20456
20459
|
}
|
|
20457
20460
|
|
|
20458
20461
|
// src/tools/get-guide.ts
|
|
20459
|
-
function registerGetGuideTool(server) {
|
|
20462
|
+
function registerGetGuideTool(server, caps = FULL_CAPS) {
|
|
20460
20463
|
const aliasHint = Object.entries(FORM_TYPE_ALIASES).map(([alias, target]) => `${alias} \u2192 ${target}`).join(", ");
|
|
20461
20464
|
server.registerTool(
|
|
20462
20465
|
"clipform_get_guide",
|
|
@@ -20491,7 +20494,7 @@ Quiz variants (optional): ${QUIZ_VARIANTS.join(", ")} - appends variant-specific
|
|
|
20491
20494
|
const type = resolved;
|
|
20492
20495
|
const validVariant = type === "quiz" ? variant : void 0;
|
|
20493
20496
|
const uri = getGuideUri(type, validVariant);
|
|
20494
|
-
const content = await fetchGuideText(uri) ?? guideFallbackText(uri);
|
|
20497
|
+
const content = applyCapsToGuide(await fetchGuideText(uri) ?? guideFallbackText(uri), caps);
|
|
20495
20498
|
return {
|
|
20496
20499
|
content: [{
|
|
20497
20500
|
type: "resource",
|
|
@@ -20507,7 +20510,7 @@ Quiz variants (optional): ${QUIZ_VARIANTS.join(", ")} - appends variant-specific
|
|
|
20507
20510
|
}
|
|
20508
20511
|
|
|
20509
20512
|
// src/tools/get-workflow.ts
|
|
20510
|
-
function registerGetWorkflowTool(server) {
|
|
20513
|
+
function registerGetWorkflowTool(server, caps = FULL_CAPS) {
|
|
20511
20514
|
const aliasHint = Object.entries(FORM_TYPE_ALIASES).map(([alias, target]) => `${alias} \u2192 ${target}`).join(", ");
|
|
20512
20515
|
server.registerTool(
|
|
20513
20516
|
"clipform_get_workflow",
|
|
@@ -20567,7 +20570,7 @@ Optional args by type:
|
|
|
20567
20570
|
}
|
|
20568
20571
|
const type = resolved;
|
|
20569
20572
|
const validVariant = type === "quiz" ? variant : void 0;
|
|
20570
|
-
const text = await getWorkflowText(type, args, validVariant);
|
|
20573
|
+
const text = await getWorkflowText(type, args, validVariant, caps);
|
|
20571
20574
|
return textResult(text);
|
|
20572
20575
|
}
|
|
20573
20576
|
);
|
|
@@ -20577,29 +20580,25 @@ Optional args by type:
|
|
|
20577
20580
|
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
20578
20581
|
var pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
|
|
20579
20582
|
var MCP_VERSION = pkg.version;
|
|
20583
|
+
function buildInstructions(caps) {
|
|
20584
|
+
return [
|
|
20585
|
+
"Clipform builds interactive video-style forms. When the brief is clear, build the form directly; when it's vague, ask one or two short questions first.",
|
|
20586
|
+
caps.media && "Prefer rich media: video over images over plain text.",
|
|
20587
|
+
caps.media ? "Before building, derive a register from the topic and audience (e.g. hype, playful, warm, considered, elegant, sombre); if the user states a mood explicitly, that wins. State the register once, then apply it to every rendering choice - narration tone, motion preset, music, pacing. Never mix registers in one form." : "Before building, derive a register from the topic and audience (e.g. hype, playful, warm, considered, elegant, sombre); if the user states a mood explicitly, that wins. State the register once, then apply it to every question, option, and end-screen line. Never mix registers in one form.",
|
|
20588
|
+
"At the start of a build, call clipform_get_workflow to load the recipe for the form type, and clipform_get_guide for craft detail.",
|
|
20589
|
+
"Every *_id argument is a UUID returned by the tools - not the short share_id from a form URL.",
|
|
20590
|
+
"For an account-scoped request, call clipform_whoami first to confirm the active workspace and plan.",
|
|
20591
|
+
caps.media ? "Deleting a form, node, or its media is permanent; those tools ask the user to confirm before running." : "Deleting a form or node is permanent; those tools ask the user to confirm before running."
|
|
20592
|
+
].filter((line) => typeof line === "string").join(" ");
|
|
20593
|
+
}
|
|
20580
20594
|
function createServer(options) {
|
|
20595
|
+
const caps = capsFromToolsets(options?.toolsets);
|
|
20581
20596
|
const server = new McpServer(
|
|
20582
20597
|
{
|
|
20583
20598
|
name: "clipform-mcp-server",
|
|
20584
20599
|
version: MCP_VERSION
|
|
20585
20600
|
},
|
|
20586
|
-
{
|
|
20587
|
-
// Lands directly in the client's system prompt. This is the only
|
|
20588
|
-
// high-level guidance external clients (claude.ai, Desktop, ChatGPT App)
|
|
20589
|
-
// receive - they have no equivalent of the bot's system prompt. It is
|
|
20590
|
-
// also the correct home for cross-tool / sequencing guidance, which must
|
|
20591
|
-
// NOT go in individual tool descriptions (treated as prompt injection at
|
|
20592
|
-
// directory review).
|
|
20593
|
-
instructions: [
|
|
20594
|
-
"Clipform builds interactive video-style forms. When the brief is clear, build the form directly; when it's vague, ask one or two short questions first.",
|
|
20595
|
-
"Prefer rich media: video over images over plain text.",
|
|
20596
|
-
"Before building, derive a register from the topic and audience (e.g. hype, playful, warm, considered, elegant, sombre); if the user states a mood explicitly, that wins. State the register once, then apply it to every rendering choice - narration tone, motion preset, music, pacing. Never mix registers in one form.",
|
|
20597
|
-
"At the start of a build, call clipform_get_workflow to load the recipe for the form type, and clipform_get_guide for craft detail.",
|
|
20598
|
-
"Every *_id argument is a UUID returned by the tools - not the short share_id from a form URL.",
|
|
20599
|
-
"For an account-scoped request, call clipform_whoami first to confirm the active workspace and plan.",
|
|
20600
|
-
"Deleting a form, node, or its media is permanent; those tools ask the user to confirm before running."
|
|
20601
|
-
].join(" ")
|
|
20602
|
-
}
|
|
20601
|
+
{ instructions: buildInstructions(caps) }
|
|
20603
20602
|
);
|
|
20604
20603
|
const _registerTool = server.registerTool.bind(server);
|
|
20605
20604
|
server.registerTool = (name, config2, handler) => {
|
|
@@ -20658,16 +20657,17 @@ function createServer(options) {
|
|
|
20658
20657
|
registerListAssetsTool(server);
|
|
20659
20658
|
registerCheckRenderTool(server);
|
|
20660
20659
|
registerFetchBoundaryTool(server);
|
|
20661
|
-
registerGetGuideTool(server);
|
|
20662
|
-
registerGetWorkflowTool(server);
|
|
20663
|
-
registerPrompts(server);
|
|
20664
|
-
registerResources(server);
|
|
20660
|
+
registerGetGuideTool(server, caps);
|
|
20661
|
+
registerGetWorkflowTool(server, caps);
|
|
20662
|
+
registerPrompts(server, caps);
|
|
20663
|
+
registerResources(server, caps);
|
|
20665
20664
|
return server;
|
|
20666
20665
|
}
|
|
20667
20666
|
|
|
20668
20667
|
export {
|
|
20669
20668
|
JSONRPCMessageSchema,
|
|
20670
20669
|
RENDER_TIMING,
|
|
20670
|
+
buildInstructions,
|
|
20671
20671
|
createServer
|
|
20672
20672
|
};
|
|
20673
|
-
//# sourceMappingURL=chunk-
|
|
20673
|
+
//# sourceMappingURL=chunk-ZOBK6CK7.js.map
|