@plitzi/sdk-mcp 0.38.7 → 0.38.9
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/CHANGELOG.md +204 -0
- package/README.md +9 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -3
- package/dist/modules/mcp/helpers/guide.js +37 -21
- package/dist/modules/mcp/index.d.ts +2 -2
- package/dist/modules/mcp/server.d.ts +4 -4
- package/dist/modules/mcp/server.js +10 -5
- package/dist/modules/mcp/tests/cheapMistakes.test.d.ts +1 -0
- package/dist/modules/mcp/tests/helpers.d.ts +9 -2
- package/dist/modules/mcp/tests/intents.test.d.ts +1 -0
- package/dist/modules/mcp/tests/look.test.d.ts +1 -0
- package/dist/modules/mcp/tools/apply/index.d.ts +64 -50
- package/dist/modules/mcp/tools/apply/index.js +70 -20
- package/dist/modules/mcp/tools/describeOperation.d.ts +11 -0
- package/dist/modules/mcp/tools/describeOperation.js +40 -0
- package/dist/modules/mcp/tools/describeOperation.test.d.ts +1 -0
- package/dist/modules/mcp/tools/index.d.ts +1 -6
- package/dist/modules/mcp/tools/index.js +12 -9
- package/dist/modules/mcp/tools/intents.d.ts +5 -0
- package/dist/modules/mcp/tools/intents.js +201 -0
- package/dist/modules/mcp/tools/look.d.ts +17 -0
- package/dist/modules/mcp/tools/look.js +32 -0
- package/dist/modules/mcp/tools/operations/closed.d.ts +7 -0
- package/dist/modules/mcp/tools/operations/closed.js +29 -0
- package/dist/modules/mcp/tools/operations/index.d.ts +229 -180
- package/dist/modules/mcp/tools/operations/index.js +72 -51
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/operations.d.ts +2 -2
- package/dist/modules/mcp/tools/operations/schema/shared.d.ts +2 -2
- package/dist/modules/mcp/tools/operations/schema/shared.js +7 -6
- package/dist/modules/mcp/tools/operations/schemaIds.js +4 -4
- package/dist/modules/mcp/tools/render.d.ts +40 -40
- package/dist/modules/mcp/tools/render.js +5 -1
- package/dist/modules/mcp/tools/shared/draftBatch.d.ts +3 -2
- package/dist/modules/mcp/tools/shared/draftBatch.js +16 -5
- package/dist/modules/mcp/tools/shared/effects.d.ts +2 -0
- package/dist/modules/mcp/tools/shared/effects.js +155 -0
- package/dist/modules/mcp/tools/shared/effects.test.d.ts +1 -0
- package/dist/modules/mcp/tools/shared/look.d.ts +32 -0
- package/dist/modules/mcp/tools/shared/look.js +128 -0
- package/dist/modules/mcp/tools/shared/normalizeOperations.d.ts +6 -0
- package/dist/modules/mcp/tools/shared/normalizeOperations.js +37 -0
- package/dist/modules/mcp/tools/shared/repeats.d.ts +13 -0
- package/dist/modules/mcp/tools/shared/repeats.js +38 -0
- package/dist/modules/mcp/tools/shared/tool.d.ts +9 -6
- package/dist/modules/mcp/tools/shared/tool.js +2 -1
- package/dist/modules/mcp/tools/shared/validator/context.d.ts +0 -1
- package/dist/modules/mcp/tools/shared/validator/elements.js +0 -1
- package/dist/modules/mcp/tools/shared/validator/index.js +25 -2
- package/dist/modules/mcp/types/screenshotTypes.d.ts +3 -3
- package/dist/modules/mcp/types/toolTypes.d.ts +2 -4
- package/dist/options.d.ts +4 -5
- package/dist/preview/createPreview.js +9 -18
- package/package.json +7 -7
- package/skills/plitzi-render/SKILL.md +8 -184
- package/skills/plitzi-render/reference/good-call.md +88 -0
- package/skills/plitzi-render/reference/interactive.md +64 -0
- package/skills/plitzi-render/reference/looks.md +29 -0
- package/dist/modules/mcp/tools/preview.d.ts +0 -1423
- package/dist/modules/mcp/tools/preview.js +0 -37
- package/dist/modules/mcp/tools/screenshot.d.ts +0 -1708
- package/dist/modules/mcp/tools/screenshot.js +0 -127
- package/dist/modules/mcp/tools/validate.d.ts +0 -1699
- 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 };
|