@presentation-md/mcp-server 1.10.4 → 1.11.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
@@ -8,10 +8,10 @@ MCP server that exposes **11** presentation-md tools to any MCP-compatible AI ag
8
8
  npx -y @presentation-md/mcp-server
9
9
  ```
10
10
 
11
- > **Migration:** the old package `@presentation-skill-pack/mcp-server@0.1.0` only shipped 5 tools
12
- > (`render_deck`, `list_themes`, `apply_theme`, `audit_deck`, `generate_deck_prompt`).
13
- > Point clients at `@presentation-md/mcp-server` (this package) to get the full set including
14
- > `export_deck`, `judge_deck`, `import_*`, and `preview_themes`.
11
+ > **Migration:** `@presentation-skill-pack/mcp-server` is deprecated. `0.1.0` only shipped 5 tools;
12
+ > `0.2.0+` is a thin redirect stub that warns and starts this package. Point clients at
13
+ > `@presentation-md/mcp-server` for the full 11-tool set (`export_deck`, `judge_deck`, `import_*`,
14
+ > `preview_themes`, …) without the redirect hop.
15
15
 
16
16
  ## Add to Claude Code / Cursor
17
17
 
@@ -37,11 +37,11 @@ replace it with the block above (or re-run `npx @presentation-md/install cursor`
37
37
  |------|-------------|
38
38
  | `render_deck` | Render a deck JSON spec to a self-contained HTML slide deck; optionally write to a file. |
39
39
  | `export_deck` | Export deck JSON to native, editable PowerPoint (`.pptx`) or HTML. |
40
- | `list_themes` | List all installed themes with name, version, vibe, and description. |
40
+ | `list_themes` | List installed themes (name, version, vibe, description). Optional `shortlist` / `mood` / `query` filters + `include_shortlists` for Theme Discovery defaults. |
41
41
  | `apply_theme` | Swap the theme in `meta.theme` while keeping all slide content unchanged. |
42
42
  | `audit_deck` | Validate deck JSON against the schema and return structured issues with severity (incl. kinetic-wrap tone / visual-beat warnings). |
43
43
  | `judge_deck` | Craft QA tiers: `t1` schema gates, `t2` HTML metrics + screenshots, `t3` agent rubric / panel when keys exist. |
44
- | `generate_deck_prompt` | Build a system prompt with the active theme's palette and deck schema reference for an agent. |
44
+ | `generate_deck_prompt` | Build a system prompt with theme palette, craft mandate, layout recipes, and theme shortlists for intelligent defaults. |
45
45
  | `preview_themes` | Render 1–3 theme HTML previews for visual discovery. Default = title slide; `mode: "layouts"` = multi-slide craft bake (image-hero, bento, ranked-list, stats, quote, code, closing; kinetic-wrapped injects tone). |
46
46
  | `import_pptx` | Import a `.pptx` file into deck JSON (text, tables, images, notes → layouts). |
47
47
  | `import_markdown` | Convert Markdown outline → Deck JSON (`chart` / `html` fences supported). |
@@ -24,7 +24,7 @@ export const generateDeckPromptTool = {
24
24
  const intent = input["intent"] ?? "";
25
25
  const coreRoot = getCoreRoot();
26
26
  const { themesDir, fallbackThemesDirs } = resolveThemesDir();
27
- const [theme, skill, deckSchemaReference, stunning25, themesMd, antiSlop, layoutRecipes] = await Promise.all([
27
+ const [theme, skill, deckSchemaReference, stunning25, themesMd, antiSlop, layoutRecipes, shortlists] = await Promise.all([
28
28
  loadTheme(themeName, { themesDir, fallbackThemesDirs }),
29
29
  readFile(join(coreRoot, "SKILL.md"), "utf-8"),
30
30
  readFile(join(coreRoot, "references", "deck-schema.md"), "utf-8"),
@@ -32,12 +32,14 @@ export const generateDeckPromptTool = {
32
32
  readFile(join(coreRoot, "references", "themes.md"), "utf-8").catch(() => ""),
33
33
  readFile(join(coreRoot, "references", "anti-slop-bans.md"), "utf-8").catch(() => ""),
34
34
  readFile(join(coreRoot, "references", "layout-recipes.md"), "utf-8").catch(() => ""),
35
+ readFile(join(coreRoot, "references", "theme-shortlists.json"), "utf-8").catch(() => ""),
35
36
  ]);
36
37
  const craftMandate = [
37
38
  "CRAFT MANDATE (non-negotiable — beat Gamma / Beautiful.ai / md-slides / frontend-slides / Claude Design canvas on first glance):",
38
39
  "- Prefer stunning-25 themes when the brief matches (see stunning_25_reference). Open that structured proof and match density — do not invent a watered-down palette.",
39
40
  "- Ban Inter-only / purple-on-white / cream-terracotta defaults unless the chosen theme owns them (see anti_slop_reference).",
40
- "- Match a layout_recipes_reference slide map (pitch / launch / wrap / neon / poster / paper / hud / modernist / hard-bento / glass / electric) before freehanding layouts.",
41
+ "- When theme is unsure: use theme_shortlists_reference (or list_themes include_shortlists/mood/query) — pick a 3-theme shortlist, preview, then lock meta.theme. Default shortlist for vague briefs: core-defaults.",
42
+ "- Match a layout_recipes_reference slide map (pitch / launch / wrap / neon / poster / paper / hud / modernist / hard-bento / glass / electric / briefing / quiet-luxe / soft-product / playful / neon-tech / data-editorial / scatterbrain) before freehanding layouts.",
41
43
  "- Include ≥1 image-hero for visual/investor/launch/brand decks (kinetic-wrapped wraps may use ranked/streak/metric/hero-stat instead).",
42
44
  "- Force asymmetry early: every comparison MUST set emphasis left|right; prefer non-1-1 two-column ratios; 5-card grids use columns:\"bento\".",
43
45
  "- Rankings / top-N → layout ranked-list (not custom-html bars). Mega wrap numbers → stat-row variant:\"hero\".",
@@ -45,9 +47,9 @@ export const generateDeckPromptTool = {
45
47
  "- Logo / customer walls → logo-wall. Year wraps (kinetic-wrapped) need tone on ≥3 slides.",
46
48
  "- Wrap / store / launch / investor closes → closing actions[] with solid + outline pills (cta alone is weak on stunning-25).",
47
49
  "- Every closing actions[] pill needs an icon (FA brands for social; rocket/download/calendar/book for CTAs) — PPTX maps icons to glyph prefixes.",
48
- "- Match atmosphere to the brief: loud/thin surfaces (coral, raw-grid, sakura, retro-windows, stencil-tablet, retro-zine, daisy-days, block-frame, creative-mode, capsule, scatterbrain, 8-bit-orbit, cobalt-grid, peoples-platform, bold-signal, broadside, genz-bento, bauhaus, neo-grid-bold, bold-poster, creative-voltage, electric-studio, studio, brutalist-mono, …) for punchy brand energy; neon/vapor/y2k/retro-arcade for cinematic night; aerospace-hud / crt-terminal / blueprint for instrument/tech; aurora-glass / glassmorphism for frosted product; paper/editorial themes (claude, soft-editorial, heritage-editorial, emerald-editorial, vintage-editorial, pink-script, ft-editorial, vellum, paper-ink, long-table, broadsheet, biennale-yellow, pastel-dreamy, editorial-serif, …) for magazine quiet — PPTX keeps washes, double mastheads, dual insets, hero-gated candy/pills/corner blots, always-on loud frames/offset-shadow strips/multi-layer arcade shadows/Win95 bevels/cobalt grid+hatch/plates/tablets, hard-border cards (genz/acid/bauhaus/neo-grid/bold-poster/raw-grid/voltage/Pulse/electric/studio/grove/cartesian/vintage/serif/botanical/glass/crt/mono/signal), neon rim/scanlines/horizon glow/soft aero shadows, mat woodglow+cream rim, HUD reticles/telemetry, and broadside fire rail as native shapes.",
49
- "- Paper honesty: prefer quote + comparison+emphasis + short literary leads; avoid soft corporate card stacks. Fiber grain is HTML-only — ship HTML (or say so) when paper tooth is the brand. vintage-editorial / editorial-serif keep hard/hairline card strokes in PPTX.",
50
- "- Loud honesty: stencil-tablet / retro-zine / daisy-days / block-frame / creative-mode / sakura-chroma / capsule / scatterbrain / 8-bit-orbit / retro-windows / cobalt-grid / genz-bento / bauhaus / neo-grid-bold / bold-poster / raw-grid / creative-voltage / electric-studio / studio / brutalist-mono expect hard frames + offset-shadow strips (or multi-layer arcade / Win95 bevel / cobalt grid+hatch chrome) and hard-border cards on every slide (pills/tape/blocks/chroma may stay hero-gated) — don't invent custom-html stickers for atmosphere.",
50
+ "- Match atmosphere to the brief: loud/thin surfaces (coral, raw-grid, sakura, retro-windows, stencil-tablet, retro-zine, daisy-days, block-frame, creative-mode, capsule, scatterbrain, 8-bit-orbit, cobalt-grid, peoples-platform, bold-signal, broadside, genz-bento, bauhaus, neo-grid-bold, bold-poster, creative-voltage, electric-studio, studio, brutalist-mono, …) for punchy brand energy; neon/vapor/y2k/retro-arcade for cinematic night; aerospace-hud / crt-terminal / blueprint for instrument/tech; aurora-glass / glassmorphism for frosted product; paper/editorial themes (claude, soft-editorial, heritage-editorial, emerald-editorial, vintage-editorial, pink-script, ft-editorial, vellum, paper-ink, long-table, broadsheet, biennale-yellow, pastel-dreamy, editorial-serif, …) for magazine quiet — PPTX keeps washes, double mastheads, dual insets, hero-gated candy/pills/corner blots, always-on loud frames/offset-shadow strips/multi-layer arcade shadows/Win95 bevels/cobalt grid+hatch/plates/tablets, hard-border cards (genz/acid/bauhaus/neo-grid/bold-poster/raw-grid/voltage/Pulse/electric/studio/grove/cartesian/botanical/glass/crt/mono/signal), neon rim/scanlines/horizon glow/soft aero shadows, mat woodglow+cream rim, HUD reticles/telemetry, and broadside fire rail as native shapes. Literary left-rule cards: paper-ink / editorial-serif / vintage-editorial.",
51
+ "- Paper honesty: prefer quote + comparison+emphasis + short literary leads; avoid soft corporate card stacks. Fiber grain is HTML-only — ship HTML (or say so) when paper tooth is the brand. paper-ink / editorial-serif / vintage-editorial keep literary left accent rules in PPTX (no full box stroke).",
52
+ "- Loud honesty: stencil-tablet / retro-zine / daisy-days / block-frame / creative-mode / sakura-chroma / capsule / scatterbrain / 8-bit-orbit / retro-windows / cobalt-grid / genz-bento / bauhaus / neo-grid-bold / bold-poster / raw-grid / creative-voltage / electric-studio / studio / brutalist-mono / editorial-tri-tone expect hard frames + offset-shadow strips (or multi-layer arcade / Win95 bevel / cobalt grid+hatch chrome) and hard-border cards on every slide (pills/tape/blocks/chroma may stay hero-gated) — don't invent custom-html stickers for atmosphere. audit_deck gates a punchy beat on these packs.",
51
53
  "- Atmosphere honesty: neon-noir / vaporwave / y2k-aero / retro-arcade expect cyan/pink rims, rain/arcade scanlines or horizon glow, soft aero shadow stubs, plus a cinematic image-hero or punchy quote — don't flatten into SaaS grids.",
52
54
  "- Poster honesty: coral / peoples-platform / bold-signal / broadside expect hard poster frames + hard-border cards (bold-signal accent rims) and a bold beat (image-hero, comparison, quote, or punchy stats). mat wants a mid-century beat (quote / image-hero / comparison / punchy stats) with woodglow + cream rim chrome.",
53
55
  "- HUD honesty: aerospace-hud / crt-terminal / blueprint expect instrument chrome plus a data beat (chart / data-table / stat-row / ranked-list / timeline / metric-ring) — don't flatten into soft marketing grids.",
@@ -63,7 +65,7 @@ export const generateDeckPromptTool = {
63
65
  "- risograph-zine: prefer comparison+emphasis and a punchy quote — PPTX overprint is layered ovals, not true multiply; cards get hard ink strokes.",
64
66
  "- candy-pop: set meta.company (or meta.marquee) so the yellow ticker brands the deck — never hardcode Jellybean; cards get hard ink borders in PPTX.",
65
67
  "- Add brief notes on 2–4 key slides.",
66
- "- Call audit_deck before shipping; fix warnings that mention asymmetry, image-hero, tone, emphasis, dual CTA, closing icons, atmosphere, poster, mat, cobalt-grid, HUD/tech, bauhaus, genz-bento, glass, electric-studio, brutalist-mono, cartesian, signal, quiet-luxe, soft-product, playful, neon-tech, data-editorial, scatterbrain, or magazine beats.",
68
+ "- Call audit_deck before shipping; fix warnings that mention asymmetry, image-hero, tone, emphasis, dual CTA, closing icons, atmosphere, poster, mat, cobalt-grid, HUD/tech, bauhaus, genz-bento, glass, electric-studio, brutalist-mono, cartesian, signal, quiet-luxe, soft-product, playful, neon-tech, data-editorial, scatterbrain, loud/hard-card, botanical, or magazine beats.",
67
69
  "- Call judge_deck (t1→t2; t3 when stakes are high). Treat local_draft as a floor, not a ship grade. Schema-valid ≠ shippable.",
68
70
  "- Open the theme's structured gallery proof when listed in stunning-25 — match that ceiling, do not water down.",
69
71
  ].join("\n");
@@ -77,6 +79,7 @@ export const generateDeckPromptTool = {
77
79
  stunning_25_reference: stunning25 || undefined,
78
80
  anti_slop_reference: antiSlop || undefined,
79
81
  layout_recipes_reference: layoutRecipes || undefined,
82
+ theme_shortlists_reference: shortlists || undefined,
80
83
  palette: theme.palette,
81
84
  typography: theme.typography
82
85
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generate-deck-prompt.js","sourceRoot":"","sources":["../../src/tools/generate-deck-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC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ire } from "node:module";
1
4
  import { discoverInstalledThemes } from "@presentation-md/core";
2
5
  import { getBundledThemesDir } from "@presentation-md/render";
6
+ function getCoreRoot() {
7
+ const require = createRequire(import.meta.url);
8
+ const coreMain = require.resolve("@presentation-md/core");
9
+ return dirname(dirname(coreMain));
10
+ }
11
+ async function loadJson(rel) {
12
+ try {
13
+ const raw = await readFile(join(getCoreRoot(), "references", rel), "utf-8");
14
+ return JSON.parse(raw);
15
+ }
16
+ catch {
17
+ return null;
18
+ }
19
+ }
3
20
  export const listThemesTool = {
4
21
  name: "list_themes",
5
- description: "List all available presentation-md themes with name, version, vibe, and description.",
22
+ description: "List available presentation-md themes (name, version, vibe, description). Optional filters: shortlist id (theme-shortlists.json), mood/query from the selection index — use for Theme Discovery before locking meta.theme. Set include_shortlists to get the full shortlist catalog for intelligent defaults.",
6
23
  inputSchema: {
7
24
  type: "object",
8
- properties: {}
25
+ properties: {
26
+ shortlist: {
27
+ type: "string",
28
+ description: "Optional shortlist id from theme-shortlists.json (e.g. series-a-pitch, developer-demo, core-defaults).",
29
+ },
30
+ mood: {
31
+ type: "string",
32
+ description: "Optional mood keyword from theme-selection-index.json (e.g. neon, editorial, playful).",
33
+ },
34
+ query: {
35
+ type: "string",
36
+ description: "Optional free-text filter against theme name, vibe, description, aliases, and best_for.",
37
+ },
38
+ include_shortlists: {
39
+ type: "boolean",
40
+ description: "When true, also return the shortlists catalog for Theme Discovery / intelligent defaults.",
41
+ },
42
+ },
9
43
  },
10
- handler: async (_) => {
11
- const discovered = await discoverInstalledThemes({
12
- bundledThemesDir: getBundledThemesDir(),
13
- nodeModulesRoot: process.cwd()
44
+ handler: async (input) => {
45
+ const shortlistId = typeof input["shortlist"] === "string" ? input["shortlist"].trim() : "";
46
+ const mood = typeof input["mood"] === "string" ? input["mood"].trim().toLowerCase() : "";
47
+ const query = typeof input["query"] === "string" ? input["query"].trim().toLowerCase() : "";
48
+ const includeShortlists = input["include_shortlists"] === true;
49
+ const [discovered, shortlistsDoc, selectionIndex] = await Promise.all([
50
+ discoverInstalledThemes({
51
+ bundledThemesDir: getBundledThemesDir(),
52
+ nodeModulesRoot: process.cwd(),
53
+ }),
54
+ loadJson("theme-shortlists.json"),
55
+ loadJson("theme-selection-index.json"),
56
+ ]);
57
+ const shortlists = shortlistsDoc?.shortlists ?? [];
58
+ const selectionByName = new Map((selectionIndex?.themes ?? []).map((t) => [t.name, t]));
59
+ let matchedShortlist;
60
+ let allowNames = null;
61
+ if (shortlistId) {
62
+ matchedShortlist = shortlists.find((s) => s.id === shortlistId);
63
+ if (matchedShortlist) {
64
+ allowNames = new Set(matchedShortlist.themes);
65
+ }
66
+ }
67
+ let themes = discovered.map((d) => {
68
+ const sel = selectionByName.get(d.name);
69
+ return {
70
+ name: d.name,
71
+ version: d.version,
72
+ description: d.manifest.description,
73
+ vibe: d.manifest.vibe,
74
+ source: d.source,
75
+ mood: sel?.mood,
76
+ best_for: sel?.best_for,
77
+ aliases: sel?.aliases,
78
+ scheme: sel?.scheme,
79
+ formality: sel?.formality,
80
+ };
14
81
  });
15
- const themes = discovered.map((d) => ({
16
- name: d.name,
17
- version: d.version,
18
- description: d.manifest.description,
19
- vibe: d.manifest.vibe,
20
- source: d.source
21
- }));
22
- return { themes };
23
- }
82
+ if (allowNames) {
83
+ themes = themes.filter((t) => allowNames.has(t.name));
84
+ }
85
+ if (mood) {
86
+ themes = themes.filter((t) => (t.mood ?? []).some((m) => m.toLowerCase().includes(mood)));
87
+ }
88
+ if (query) {
89
+ themes = themes.filter((t) => {
90
+ const hay = [
91
+ t.name,
92
+ t.vibe ?? "",
93
+ t.description ?? "",
94
+ ...(t.aliases ?? []),
95
+ ...(t.best_for ?? []),
96
+ ...(t.mood ?? []),
97
+ ]
98
+ .join(" ")
99
+ .toLowerCase();
100
+ return hay.includes(query);
101
+ });
102
+ }
103
+ const result = { themes };
104
+ if (matchedShortlist) {
105
+ result.shortlist = matchedShortlist;
106
+ }
107
+ else if (shortlistId) {
108
+ result.shortlist_error = `Unknown shortlist id "${shortlistId}". Call list_themes with include_shortlists:true to see ids.`;
109
+ }
110
+ if (includeShortlists) {
111
+ result.shortlists = shortlists;
112
+ }
113
+ return result;
114
+ },
24
115
  };
25
116
  //# sourceMappingURL=list-themes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-themes.js","sourceRoot":"","sources":["../../src/tools/list-themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,sFAAsF;IACxF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;KACf;IACD,OAAO,EAAE,KAAK,EAAE,CAA0B,EAAE,EAAE;QAC5C,MAAM,UAAU,GAAG,MAAM,uBAAuB,CAAC;YAC/C,gBAAgB,EAAE,mBAAmB,EAAE;YACvC,eAAe,EAAE,OAAO,CAAC,GAAG,EAAE;SAC/B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW;YACnC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI;YACrB,MAAM,EAAE,CAAC,CAAC,MAAM;SACjB,CAAC,CAAC,CAAC;QAEJ,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"list-themes.js","sourceRoot":"","sources":["../../src/tools/list-themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,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CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAC3D,CAAC;QACJ,CAAC;QAED,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC3B,MAAM,GAAG,GAAG;oBACV,CAAC,CAAC,IAAI;oBACN,CAAC,CAAC,IAAI,IAAI,EAAE;oBACZ,CAAC,CAAC,WAAW,IAAI,EAAE;oBACnB,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;oBACpB,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;oBACrB,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;iBAClB;qBACE,IAAI,CAAC,GAAG,CAAC;qBACT,WAAW,EAAE,CAAC;gBACjB,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,MAAM,GAA4B,EAAE,MAAM,EAAE,CAAC;QACnD,IAAI,gBAAgB,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,GAAG,gBAAgB,CAAC;QACtC,CAAC;aAAM,IAAI,WAAW,EAAE,CAAC;YACvB,MAAM,CAAC,eAAe,GAAG,yBAAyB,WAAW,8DAA8D,CAAC;QAC9H,CAAC;QACD,IAAI,iBAAiB,EAAE,CAAC;YACtB,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;QACjC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@presentation-md/mcp-server",
3
- "version": "1.10.4",
3
+ "version": "1.11.0",
4
4
  "description": "MCP server exposing all 11 presentation-md tools (render/export/audit/judge/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.12.3",
18
- "@presentation-md/create-theme": "1.0.32",
19
- "@presentation-md/export": "^1.20.4",
20
- "@presentation-md/render": "1.6.25"
17
+ "@presentation-md/core": "1.13.0",
18
+ "@presentation-md/create-theme": "1.0.34",
19
+ "@presentation-md/export": "^1.21.0",
20
+ "@presentation-md/render": "1.6.27"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^20.0.0",