@presentation-md/mcp-server 1.33.7 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,7 +42,7 @@ replace it with the block above (or re-run `npx @presentation-md/install cursor`
42
42
  | `audit_deck` | Schema validate **plus** craft gates (asymmetry, loud/atmosphere/paper honesty, dual CTA, data beats). Optional `apply_safe_fixes` auto-repairs structural craft **and inserts missing beats** (image-hero / comparison / data / logo-wall / wrap tones) — returns `json` + `fixes_applied[]`. Optional `remorph_density` (`speaker`/`reading`) runs a non-LLM structural density remorph (split crowded lists / promote notes) before audit. Schema-valid ≠ shippable — call before the user sees a first draft. |
43
43
  | `judge_deck` | Craft QA tiers: `t1` schema gates, `t2` HTML metrics + screenshots (**inline PNGs** by default), `t3` agent rubric / panel when keys exist. |
44
44
  | `generate_deck_prompt` | Build a one-shot craft system prompt (theme palette, anti-slop, layout recipes, custom-html recipes, shortlists) + optional `density` (`speaker` / `reading`) lock. |
45
- | `scaffold_deck` | Scaffold a schema-native Deck JSON skeleton from a layout recipe (`purpose`: pitch / launch / wrap / paper / …). Pre-wires layouts, asymmetry, dual CTA, notes — agents fill copy, then `audit_deck`. Pass `list_purposes: true` for the catalog. |
45
+ | `scaffold_deck` | Scaffold a schema-native Deck JSON skeleton from a layout recipe (`purpose`: pitch / launch / wrap / paper / …). Pre-wires layouts, asymmetry, dual CTA, notes — agents fill copy, then `audit_deck`. Returns **`studio_share_url`** (`?d=`) by default for one-call editable Studio handoff. Pass `list_purposes: true` for the catalog; `include_share_url: false` to skip the link. |
46
46
  | `share_deck_link` | Encode Deck JSON into a Studio `?d=` share URL (same codec as Copy link) for editable handoff after scaffold / audit / apply_theme. |
47
47
  | `deploy_deck` | Opt-in Vercel preview via core `deploy.sh` — dry-run unless `confirm:true` after human approval; `prod` needs `confirm_prod`. |
48
48
  | `preview_themes` | Render 1–3 theme HTML previews for visual discovery. Pass `themes[]` and/or `shortlist` id (fills themes from theme-shortlists.json). **Pick-3 (≥2 themes) auto-defaults to `mode: "layouts"`** (multi-slide craft bake); pass `mode: "title"` only for a cover skim. Pass **`json`** (Deck JSON) for Studio **My deck** restyle across the pick (optional `slide_index`). Title-mode trios return `layouts_recommended`. **Inline PNG screenshots** return as MCP image content by default — set `include_screenshots:false` to skip. Each preview also includes `file_url`, `studio_share_url` (`?d=` for the exact bake), `compare_summary` (mood/swatches/vibe), proof deep-links, and layout bake list. |
@@ -1,11 +1,12 @@
1
1
  import { mkdir, writeFile } from "node:fs/promises";
2
2
  import { dirname } from "node:path";
3
- import { listScaffoldPurposes, resolveScaffoldPurpose, scaffoldDeck, } from "@presentation-md/core";
3
+ import { listScaffoldPurposes, resolveScaffoldPurpose, scaffoldDeck, studioShareLink, } from "@presentation-md/core";
4
4
  import { assertWritablePathInCwd } from "../lib/cwd-path.js";
5
5
  const PURPOSE_ENUM = listScaffoldPurposes().map((p) => p.id);
6
+ const DEFAULT_ORIGIN = "https://presentation-md.vercel.app";
6
7
  export const scaffoldDeckTool = {
7
8
  name: "scaffold_deck",
8
- description: "Scaffold a schema-native Deck JSON skeleton from a layout recipe (pitch / launch / wrap / paper / hud / …). Pre-wires layouts, asymmetry, image-hero, data beats, dual closing CTAs, and speaker notes — agents fill theme-native copy, then audit_deck. Beats frontend-slides freeform vibe drafts with a craft floor on slide one.",
9
+ description: "Scaffold a schema-native Deck JSON skeleton from a layout recipe (pitch / launch / wrap / paper / hud / …). Pre-wires layouts, asymmetry, image-hero, data beats, dual closing CTAs, and speaker notes — agents fill theme-native copy, then audit_deck. Returns studio_share_url (?d=) by default so one call lands an editable Studio link (Hallmark-style one-prompt → shareable artifact, for decks). Beats freeform vibe drafts with a craft floor on slide one.",
9
10
  inputSchema: {
10
11
  type: "object",
11
12
  properties: {
@@ -34,13 +35,21 @@ export const scaffoldDeckTool = {
34
35
  type: "boolean",
35
36
  description: "When true, return the recipe catalog only (no scaffold).",
36
37
  },
38
+ include_share_url: {
39
+ type: "boolean",
40
+ description: "When true (default), also return studio_share_url — Studio ?d= link that hydrates the scaffold for editable handoff. Pass false to skip.",
41
+ },
42
+ origin: {
43
+ type: "string",
44
+ description: `Studio origin for studio_share_url (default ${DEFAULT_ORIGIN}).`,
45
+ },
37
46
  },
38
47
  },
39
48
  handler: async (input) => {
40
49
  if (input["list_purposes"] === true) {
41
50
  return {
42
51
  purposes: listScaffoldPurposes(),
43
- hint: "Pick a purpose + theme, call scaffold_deck again, rewrite placeholder copy, then audit_deck → judge_deck.",
52
+ hint: "Pick a purpose + theme, call scaffold_deck again, rewrite placeholder copy, then audit_deck → judge_deck. studio_share_url ships with the scaffold by default.",
44
53
  };
45
54
  }
46
55
  const rawPurpose = typeof input["purpose"] === "string" ? input["purpose"] : "pitch";
@@ -64,6 +73,20 @@ export const scaffoldDeckTool = {
64
73
  await mkdir(dirname(outputPath), { recursive: true });
65
74
  await writeFile(outputPath, json, "utf-8");
66
75
  }
76
+ const includeShare = input["include_share_url"] !== false;
77
+ let studio_share_url;
78
+ if (includeShare) {
79
+ const origin = typeof input["origin"] === "string" && input["origin"].trim()
80
+ ? input["origin"].trim()
81
+ : DEFAULT_ORIGIN;
82
+ try {
83
+ studio_share_url = await studioShareLink(result.deck, { origin });
84
+ }
85
+ catch {
86
+ // Oversized / CompressionStream edge — still return the scaffold JSON.
87
+ studio_share_url = undefined;
88
+ }
89
+ }
67
90
  return {
68
91
  purpose: result.purpose,
69
92
  recipe_label: result.recipe_label,
@@ -71,7 +94,10 @@ export const scaffoldDeckTool = {
71
94
  slide_count: result.slide_count,
72
95
  json,
73
96
  output_path: outputPath,
74
- hint: result.hint,
97
+ ...(studio_share_url ? { studio_share_url } : {}),
98
+ hint: studio_share_url
99
+ ? `${result.hint} Open studio_share_url for editable Studio handoff (same ?d= as Copy link).`
100
+ : result.hint,
75
101
  };
76
102
  },
77
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-deck.js","sourceRoot":"","sources":["../../src/tools/sca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AC,IAAI,EAAE;gBAC3D,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE;gBACxB,CAAC,CAAC,cAAc,CAAC;YACrB,IAAI,CAAC;gBACH,gBAAgB,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YACpE,CAAC;YAAC,MAAM,CAAC;gBACP,uEAAuE;gBACvE,gBAAgB,GAAG,SAAS,CAAC;YAC/B,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;YAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,IAAI;YACJ,WAAW,EAAE,UAAU;YACvB,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjD,IAAI,EAAE,gBAAgB;gBACpB,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,6EAA6E;gBAC7F,CAAC,CAAC,MAAM,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@presentation-md/mcp-server",
3
- "version": "1.33.7",
3
+ "version": "1.34.0",
4
4
  "description": "MCP server exposing all 14 presentation-md tools (render/export/audit/judge/scaffold/share/deploy/import/preview) to any MCP-compatible AI agent.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,10 +14,10 @@
14
14
  "dependencies": {
15
15
  "@modelcontextprotocol/sdk": "^1.0.0",
16
16
  "zod": "^3.23.0",
17
- "@presentation-md/core": "1.32.2",
18
- "@presentation-md/create-theme": "1.1.37",
19
- "@presentation-md/export": "^1.24.6",
20
- "@presentation-md/render": "1.20.7"
17
+ "@presentation-md/core": "1.33.0",
18
+ "@presentation-md/create-theme": "1.1.38",
19
+ "@presentation-md/export": "^1.24.7",
20
+ "@presentation-md/render": "1.20.8"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^20.0.0",