@plitzi/sdk-mcp 0.38.6 → 0.38.8

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +397 -0
  2. package/README.md +9 -9
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.js +2 -3
  5. package/dist/modules/mcp/helpers/guide.js +74 -35
  6. package/dist/modules/mcp/index.d.ts +2 -2
  7. package/dist/modules/mcp/server.d.ts +4 -4
  8. package/dist/modules/mcp/server.js +10 -5
  9. package/dist/modules/mcp/tests/cheapMistakes.test.d.ts +1 -0
  10. package/dist/modules/mcp/tests/helpers.d.ts +9 -2
  11. package/dist/modules/mcp/tests/intents.test.d.ts +1 -0
  12. package/dist/modules/mcp/tests/look.test.d.ts +1 -0
  13. package/dist/modules/mcp/tools/apply/index.d.ts +706 -62
  14. package/dist/modules/mcp/tools/apply/index.js +70 -20
  15. package/dist/modules/mcp/tools/describeOperation.d.ts +11 -0
  16. package/dist/modules/mcp/tools/describeOperation.js +40 -0
  17. package/dist/modules/mcp/tools/describeOperation.test.d.ts +1 -0
  18. package/dist/modules/mcp/tools/index.d.ts +1 -6
  19. package/dist/modules/mcp/tools/index.js +12 -9
  20. package/dist/modules/mcp/tools/intents.d.ts +5 -0
  21. package/dist/modules/mcp/tools/intents.js +201 -0
  22. package/dist/modules/mcp/tools/look.d.ts +17 -0
  23. package/dist/modules/mcp/tools/look.js +32 -0
  24. package/dist/modules/mcp/tools/operations/closed.d.ts +7 -0
  25. package/dist/modules/mcp/tools/operations/closed.js +29 -0
  26. package/dist/modules/mcp/tools/operations/index.d.ts +2928 -359
  27. package/dist/modules/mcp/tools/operations/index.js +72 -51
  28. package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.d.ts +1 -1
  29. package/dist/modules/mcp/tools/operations/schema/elements/moveElement.d.ts +1 -1
  30. package/dist/modules/mcp/tools/operations/schema/elements/repeatElement.d.ts +1 -1
  31. package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.d.ts +1 -1
  32. package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.d.ts +1 -1
  33. package/dist/modules/mcp/tools/operations/schema/operations.d.ts +5 -5
  34. package/dist/modules/mcp/tools/operations/schema/shared.d.ts +3 -3
  35. package/dist/modules/mcp/tools/operations/schema/shared.js +7 -6
  36. package/dist/modules/mcp/tools/operations/schemaIds.js +11 -5
  37. package/dist/modules/mcp/tools/operations/style/definitions/patchDefinition.d.ts +90 -0
  38. package/dist/modules/mcp/tools/operations/style/definitions/patchDefinition.js +2 -1
  39. package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinition.d.ts +90 -0
  40. package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinition.js +2 -1
  41. package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinitions.d.ts +90 -0
  42. package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinitions.js +8 -1
  43. package/dist/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.d.ts +90 -0
  44. package/dist/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.js +2 -1
  45. package/dist/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.d.ts +90 -0
  46. package/dist/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.js +2 -1
  47. package/dist/modules/mcp/tools/operations/style/idStyles/patchIdStyle.d.ts +90 -0
  48. package/dist/modules/mcp/tools/operations/style/idStyles/patchIdStyle.js +2 -1
  49. package/dist/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.d.ts +90 -0
  50. package/dist/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.js +2 -1
  51. package/dist/modules/mcp/tools/operations/style/operations.d.ts +639 -9
  52. package/dist/modules/mcp/tools/operations/style/shared.d.ts +394 -0
  53. package/dist/modules/mcp/tools/operations/style/shared.js +26 -8
  54. package/dist/modules/mcp/tools/operations/style/translator.js +26 -1
  55. package/dist/modules/mcp/tools/operations/style/validate.d.ts +4 -0
  56. package/dist/modules/mcp/tools/operations/style/validate.js +63 -0
  57. package/dist/modules/mcp/tools/operations/style/write.d.ts +1 -1
  58. package/dist/modules/mcp/tools/operations/style/write.js +88 -2
  59. package/dist/modules/mcp/tools/render.d.ts +675 -45
  60. package/dist/modules/mcp/tools/render.js +5 -1
  61. package/dist/modules/mcp/tools/shared/draftBatch.d.ts +3 -2
  62. package/dist/modules/mcp/tools/shared/draftBatch.js +16 -5
  63. package/dist/modules/mcp/tools/shared/effects.d.ts +2 -0
  64. package/dist/modules/mcp/tools/shared/effects.js +155 -0
  65. package/dist/modules/mcp/tools/shared/effects.test.d.ts +1 -0
  66. package/dist/modules/mcp/tools/shared/look.d.ts +32 -0
  67. package/dist/modules/mcp/tools/shared/look.js +128 -0
  68. package/dist/modules/mcp/tools/shared/normalizeOperations.d.ts +6 -0
  69. package/dist/modules/mcp/tools/shared/normalizeOperations.js +37 -0
  70. package/dist/modules/mcp/tools/shared/repeats.d.ts +13 -0
  71. package/dist/modules/mcp/tools/shared/repeats.js +38 -0
  72. package/dist/modules/mcp/tools/shared/tool.d.ts +9 -6
  73. package/dist/modules/mcp/tools/shared/tool.js +2 -1
  74. package/dist/modules/mcp/tools/shared/validator/context.d.ts +0 -1
  75. package/dist/modules/mcp/tools/shared/validator/elements.js +0 -1
  76. package/dist/modules/mcp/tools/shared/validator/index.js +25 -2
  77. package/dist/modules/mcp/types/aiSchema.d.ts +13 -1
  78. package/dist/modules/mcp/types/screenshotTypes.d.ts +3 -3
  79. package/dist/modules/mcp/types/toolTypes.d.ts +2 -4
  80. package/dist/options.d.ts +4 -5
  81. package/dist/preview/createPreview.js +9 -18
  82. package/package.json +7 -7
  83. package/skills/plitzi-render/SKILL.md +8 -184
  84. package/skills/plitzi-render/reference/good-call.md +88 -0
  85. package/skills/plitzi-render/reference/interactive.md +64 -0
  86. package/skills/plitzi-render/reference/looks.md +29 -0
  87. package/dist/modules/mcp/tools/preview.d.ts +0 -793
  88. package/dist/modules/mcp/tools/preview.js +0 -37
  89. package/dist/modules/mcp/tools/screenshot.d.ts +0 -1078
  90. package/dist/modules/mcp/tools/screenshot.js +0 -127
  91. package/dist/modules/mcp/tools/validate.d.ts +0 -1069
  92. package/dist/modules/mcp/tools/validate.js +0 -32
@@ -1,37 +0,0 @@
1
- import { documentOperation } from "./operations/index.js";
2
- import { defineTool } from "./shared/tool.js";
3
- import { z } from "zod";
4
- //#region src/modules/mcp/tools/preview.ts
5
- var previewShape = {
6
- pageRef: z.string().optional().describe("The page to preview, by name; defaults to the space default page"),
7
- operations: z.array(documentOperation).max(100).optional().describe("Unsaved edits to apply to a throwaway clone before rendering, so you can preview a change WITHOUT persisting it (same op vocabulary as plitzi_apply). Omit to preview the current saved state.")
8
- };
9
- var previewTool = defineTool({
10
- name: "plitzi_preview",
11
- title: "Preview (HTML)",
12
- description: "Render a page to a full HTML document to inspect the structure of your edits. Pass unsaved `operations` to preview a change before committing (nothing is persisted). Returns the HTML plus the page path and stateVersion. For a real rendered IMAGE that reveals visual issues like overflow, use plitzi_screenshot.",
13
- inputShape: previewShape,
14
- access: "read",
15
- run: async (input, ctx) => {
16
- if (!ctx.preview || ctx.spaceId === void 0) return {
17
- error: "PREVIEW_UNAVAILABLE",
18
- message: "Visual preview is not enabled on this server.",
19
- hint: "Preview needs the SSR render service; it is unavailable in MCP-only mode."
20
- };
21
- const result = await ctx.preview.render({
22
- spaceId: ctx.spaceId,
23
- env: ctx.env,
24
- pageRef: input.pageRef,
25
- operations: input.operations
26
- });
27
- if (!result.ok) return result;
28
- return {
29
- pageRef: input.pageRef ?? "default",
30
- pagePath: result.pagePath,
31
- stateVersion: result.stateVersion,
32
- html: result.html
33
- };
34
- }
35
- });
36
- //#endregion
37
- export { previewShape, previewTool };