@geohar/pi-svg-mcp 0.10.0-dev.0 → 0.10.0-dev.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 +1 -1
- package/dist/index.js +1 -1
- package/instructions.txt +10 -2
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ so they apply across every client. Pi-extension toggles use `PI_SVG_MCP_*`.
|
|
|
58
58
|
| Variable | Default | Effect |
|
|
59
59
|
|----------|---------|--------|
|
|
60
60
|
| `SVG_MCP_PORT` | `7731` | HTTP port svg-mcp serves on. |
|
|
61
|
-
| `SVG_MCP_VERSION` | `0.10.0-dev.
|
|
61
|
+
| `SVG_MCP_VERSION` | `0.10.0-dev.2` | Pin the PyPI release (`uvx svg-mcp@<v>`). Kept in lockstep with this package's release by `scripts/bump-version.sh`. |
|
|
62
62
|
| `SVG_MCP_DEV` | — | Dev checkout for `uv run --project <dir>` (a path, or `1` for in-repo source). |
|
|
63
63
|
| `PI_SVG_MCP_NAME` | `svg-mcp` | `sharedserver` instance name. |
|
|
64
64
|
| `PI_SVG_MCP_GRACE` | `1h` | `sharedserver` grace period. |
|
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const SHAREDSERVER_MIN_VERSION = "0.6.7";
|
|
|
42
42
|
// scripts/bump-version.sh — a plugin shipped un-updated here served svg-mcp@0.2.6 for
|
|
43
43
|
// several releases. (Track the release this tag publishes; `latest` is not published
|
|
44
44
|
// to the pi extension store, so users on `@latest` can still miss releases.)
|
|
45
|
-
const SVG_MCP_TOOL_VERSION = "0.10.0-dev.
|
|
45
|
+
const SVG_MCP_TOOL_VERSION = "0.10.0-dev.2";
|
|
46
46
|
// ── the diagram-authoring directive ────────────────────────────────
|
|
47
47
|
// Appended to the system prompt so the agent reaches for svg-mcp's tools instead of
|
|
48
48
|
// hand-writing SVG XML. Canonical source: CLAUDE.md.example at the repo root; a
|
package/instructions.txt
CHANGED
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- Canonical reach-for-svg-mcp directive. Copy into your global
|
|
4
4
|
$CLAUDE_CONFIG_DIR/CLAUDE.md, or let an svg-mcp plugin inject it each session
|
|
5
|
-
(
|
|
5
|
+
(injected as a regular-file copy). It directs *approach*; the MCP tool
|
|
6
6
|
descriptions carry the mechanics. -->
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Four rules. Each fires on a **cue you can catch yourself in the middle of**, not on a
|
|
9
9
|
topic you have to remember to think about. That's deliberate: you will not remember to
|
|
10
10
|
"use the tools" — but you can notice yourself about to type a `<` .
|
|
11
11
|
|
|
12
|
+
### 0. Opening svg-mcp for a drawing task? Mint a session first.
|
|
13
|
+
|
|
14
|
+
`create_session` is on the tools: call it ONCE per drawing task, then pass its
|
|
15
|
+
`session_id` on EVERY svg-mcp call that follows (each tool's schema marks the argument).
|
|
16
|
+
Keep the id in the conversation — drawings persist under it, and another chat can pick the
|
|
17
|
+
drawing up with it. A session_id-less call fails with this same guidance: that's the cue
|
|
18
|
+
you skipped the mint, not a bug to route around — run create_session, retry with the id.
|
|
19
|
+
|
|
12
20
|
### 1. About to write `<svg`, or hand-edit XML inside one? That's the cue.
|
|
13
21
|
|
|
14
22
|
Writing markup by hand is the wrong move **even when the shape looks trivial** — that's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geohar/pi-svg-mcp",
|
|
3
|
-
"version": "0.10.0-dev.
|
|
3
|
+
"version": "0.10.0-dev.2",
|
|
4
4
|
"description": "Pi extension: run the svg-mcp MCP server via sharedserver and inject the diagram-authoring directive. Pairs with pi-mcp-adapter, which makes svg-mcp's tools reachable from Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/index.ts
CHANGED
|
@@ -51,7 +51,7 @@ const SHAREDSERVER_MIN_VERSION = "0.6.7"
|
|
|
51
51
|
// scripts/bump-version.sh — a plugin shipped un-updated here served svg-mcp@0.2.6 for
|
|
52
52
|
// several releases. (Track the release this tag publishes; `latest` is not published
|
|
53
53
|
// to the pi extension store, so users on `@latest` can still miss releases.)
|
|
54
|
-
const SVG_MCP_TOOL_VERSION = "0.10.0-dev.
|
|
54
|
+
const SVG_MCP_TOOL_VERSION = "0.10.0-dev.2"
|
|
55
55
|
|
|
56
56
|
type LogFn = (level: "info" | "warn" | "error", message: string) => void
|
|
57
57
|
|