openpencil/packages
Fini b153b37cfe fix(mcp): get_design_prompt reads design.md per-document (no global leak)
The earlier doc-backed fix left one leak: handleGetDesignMd/handleSetDesignMd
still called setDesignMdForPrompt(spec), which wrote into a process-level
module variable `_designMdContent` that get_design_prompt's "style" +
"design-md" sections read. Switching between documents kept the prior
file's policy; get_design_prompt itself had no filePath parameter so it
couldn't even identify the current document.

Fix:
- Delete `_designMdContent` / setDesignMdForPrompt / getDesignMdForPrompt.
- `buildDesignPrompt(section, designMdPolicy?)` takes policy as an explicit
  stateless argument.
- Export `designMdSpecToPromptPolicy(spec)` — pure converter.
- Add `filePath` to get_design_prompt's schema. The route handler opens
  the addressed document, derives the policy from `doc.designMd`, and
  threads it into buildDesignPrompt. Add `design-md` to the section enum
  (previously only returned via the "style" override).
- design-md.ts handlers no longer touch the old setter.

Verified by a two-file live smoke: set design.md on A → get_design_prompt
on B returns "No design.md loaded" with no A-specific tokens.
2026-04-20 00:44:49 +08:00
..
agent-native@e1f90cab96 chore(agent): bump agent-native to v0.4.0 release 2026-04-17 19:04:15 +08:00
pen-acp chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-ai-skills feat(mcp): add alert + toast + progress_bar + fab + breadcrumb + stepper (25 → 31 element tools) 2026-04-19 23:55:52 +08:00
pen-core chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-engine chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-figma chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-mcp fix(mcp): get_design_prompt reads design.md per-document (no global leak) 2026-04-20 00:44:49 +08:00
pen-react chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-renderer chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-sdk chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
pen-types fix(core): design.md lives on PenDocument — kill cross-document leak 2026-04-20 00:37:31 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00