@vardum/mcp 0.4.1 → 0.4.2

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
@@ -4,12 +4,14 @@ MCP server for [Vardum](https://vardum.com): lets an AI agent manage assets and
4
4
  Vards using a key scoped to one workspace. Workspace creation, membership,
5
5
  API-key management and domains are managed in the web app with a signed-in session.
6
6
 
7
- This README describes [MCP **0.4.1**](https://www.npmjs.com/package/@vardum/mcp/v/0.4.1),
8
- including revision-guarded Vard editing. The matching client batch uses CLI
9
- **0.8.1** and shared **0.4.1**. This patch makes setup self-contained without
10
- changing the tools or editor protocol. Older MCP 0.3.0 uses the legacy editing
11
- contract; installing it does not enable revision guards. The published 0.1.0
12
- artifact has a broken workspace dependency.
7
+ This README describes [MCP **0.4.2**](https://www.npmjs.com/package/@vardum/mcp/v/0.4.2),
8
+ including revision-guarded Vard editing and recipe help for backgrounds, safe
9
+ area and SVG rendering. The matching client batch uses
10
+ [CLI **0.8.3**](https://www.npmjs.com/package/@vardum/cli/v/0.8.3) and
11
+ [shared **0.4.2**](https://www.npmjs.com/package/@vardum/shared/v/0.4.2).
12
+ The same 11 tools and editor protocol remain; the MCP SDK is now 1.32.1.
13
+ Older MCP 0.3.0 uses the legacy editing contract; installing it does not enable
14
+ revision guards. The published 0.1.0 artifact has a broken workspace dependency.
13
15
 
14
16
  ## Setup
15
17
 
@@ -18,7 +20,7 @@ API key in **Settings → API keys** first; it is restricted to that workspace
18
20
  and its selected permissions. Copy the workspace ID from Settings → General
19
21
  for tool calls. Use Node.js 22 or newer.
20
22
 
21
- These configurations pin **MCP 0.4.1** and need no source-repository access.
23
+ These configurations pin **MCP 0.4.2** and need no source-repository access.
22
24
  Deploy a server advertising `vardEditRevision: 1` from `GET /api/capabilities`
23
25
  before editable Vard reads or mutations; there is no legacy-edit fallback.
24
26
  Use a read key for inspection or a key with the required write permissions for
@@ -27,7 +29,7 @@ mutation. Keep real keys in the client's private configuration, never in Git.
27
29
  Claude Code:
28
30
 
29
31
  ```sh
30
- claude mcp add vardum --env VARDUM_API_KEY=varda_... -- npx -y @vardum/mcp@0.4.1
32
+ claude mcp add vardum --env VARDUM_API_KEY=varda_... -- npx -y @vardum/mcp@0.4.2
31
33
  ```
32
34
 
33
35
  Any client that reads a JSON config (Claude Desktop, Cursor, …):
@@ -37,7 +39,7 @@ Any client that reads a JSON config (Claude Desktop, Cursor, …):
37
39
  "mcpServers": {
38
40
  "vardum": {
39
41
  "command": "npx",
40
- "args": ["-y", "@vardum/mcp@0.4.1"],
42
+ "args": ["-y", "@vardum/mcp@0.4.2"],
41
43
  "env": { "VARDUM_API_KEY": "varda_..." }
42
44
  }
43
45
  }
@@ -124,6 +126,33 @@ revision. Do not automatically repeat a stale replacement list with a new token.
124
126
  An unresolved preview never permits bypassing the revision check or writing
125
127
  expanded folder outputs as manual mappings.
126
128
 
129
+ ## Output recipes
130
+
131
+ The `replace_vard_items` transformation help describes these optional fields:
132
+
133
+ | Field | Contract |
134
+ | --- | --- |
135
+ | `bg` | Opaque six-digit `#rrggbb` output background; requires an explicit format |
136
+ | `pad` | 0–45 percent inset on each edge, at most two decimals; positive values require `w`, `h`, a format and `fit: "contain"` |
137
+ | `format: "svg"` | Vector output from a passive geometric SVG, with contain fit and no `q` |
138
+ | `layer` | Existing SVG group ID; preserves the source canvas and ancestor transforms |
139
+ | `darkLayer` + `darkColor` | Paired SVG-only dark-mode color change for filled shapes in one group |
140
+ | `render: "v2"` | Explicit SVG-to-raster renderer; requires a raster format and `bg` |
141
+
142
+ For example, use this transformation for a new background-backed PNG:
143
+
144
+ ```json
145
+ { "w": 256, "h": 256, "fit": "contain", "format": "png", "bg": "#f4f0e8", "pad": 12.5, "render": "v2" }
146
+ ```
147
+
148
+ Copy existing transformations literally when editing. Omitting `render` retains
149
+ the legacy renderer; do not add `"v2"` to existing mappings automatically.
150
+ Use a matching server that implements these API and renderer features.
151
+ `vardEditRevision: 1` proves the guarded-editor contract only; it does not
152
+ advertise SVG, safe-area or v2 support. The server validates combinations and
153
+ source types. Group selection and SVG output require the supported passive
154
+ geometric SVG subset; unsupported inputs fail without a fallback.
155
+
127
156
  ## Folder rules
128
157
 
129
158
  `create_vard` accepts `name`, optional `isPublic` (defaults private) and optional
package/dist/index.js CHANGED
@@ -522,7 +522,7 @@ server.tool("replace_vard_items", "Replace manual items using the caller's origi
522
522
  transformation: z
523
523
  .record(z.unknown())
524
524
  .nullable()
525
- .describe("Optional transformation parameters (w, h, fit, format, q) or null"),
525
+ .describe("Optional transformation parameters (w, h, fit, format, q, bg, pad, layer, darkLayer, darkColor, render) or null. bg is an opaque #rrggbb background and requires an explicit output format. For new SVG-to-raster recipes with bg, set render to v2 to rasterize vectors at the requested size before compositing. Omit render on existing recipes to preserve their renderer identity. render v2 requires an SVG source, raster format and bg. pad is a 0–45 percent inset per edge, with at most two decimals; positive pad requires w, h, a format and fit contain. SVG output requires a passive geometric SVG source, contain fit and no q. layer selects a named SVG group while preserving its canvas. darkLayer plus darkColor adapts one SVG group to dark mode. Omit bg for transparent padding."),
526
526
  })
527
527
  .strict())
528
528
  .describe("Complete manual item list only; folderRules are preserved"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vardum/mcp",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "MCP server for workspace-scoped Vardum assets and Vards",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,8 +18,8 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@modelcontextprotocol/sdk": "1.31.0",
22
- "@vardum/shared": "^0.4.1",
21
+ "@modelcontextprotocol/sdk": "1.32.1",
22
+ "@vardum/shared": "^0.4.2",
23
23
  "zod": "^3.24.0"
24
24
  },
25
25
  "devDependencies": {