@pecot/visual-mcp 4.0.3-dev.181 → 4.0.3-dev.183

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pecot-v",
3
- "version": "4.0.3-dev.181",
3
+ "version": "4.0.3-dev.183",
4
4
  "description": "pecot-v(pecot-visual)— 可視化・ドキュメント系スキル集(v-drawio, v-slidev, v-evidence)",
5
5
  "author": {
6
6
  "name": "pecot"
@@ -202,8 +202,7 @@ function drawioExportMessage(execution, warningCount) {
202
202
  const pdf = execution.pdfFile === undefined ? '' : ` (PDF: ${execution.pdfFile})`;
203
203
  return `wrote SVG to ${execution.outputFile}${pdf}${warningSuffix(warningCount)}`;
204
204
  }
205
- // annotations は SDK 既定 (readOnlyHint: false / openWorldHint: true) と一致するため付けない。
206
- // どちらのツールもファイルを書き、PNG 生成では viewer.diagrams.net、SVG 生成では embed.diagrams.net へ到達する。
205
+ // 定義書の effects (destructive) と idempotent のとおりに明示する。openWorldHint は SDK 既定 (true) のまま。
207
206
  export const drawioCreateTool = {
208
207
  name: 'drawio_create',
209
208
  config: {
@@ -211,6 +210,7 @@ export const drawioCreateTool = {
211
210
  description: 'Turns drawio XML into a deliverable that opens directly in a browser. Writes viewer HTML (.html; opening it redirects to draw.io) to out_path and, by default, also writes a rendered PNG (useful for checking the rendering). icon:// references are resolved to data URIs and embedded. Before generating, it checks the diagram labels against the text rules and generates nothing if there is a violation. The font and font size are checked against the theme declaration (theme, or the theme of the talk-dir that is an ancestor of the diagram), and the result is returned in theme.',
212
211
  inputSchema: drawioCreateInput,
213
212
  outputSchema: drawioCreateOutput,
213
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
214
214
  },
215
215
  handler: handleDrawioCreate,
216
216
  };
@@ -221,6 +221,7 @@ export const drawioExportTool = {
221
221
  description: 'Exports drawio XML to a static SVG and a sibling PDF. Set pdf: false to suppress the PDF. With print_hash, it exports nothing and returns only the composite hash used for staleness checks. It does not check the diagram text, so pass a .drawio that has gone through drawio_create.',
222
222
  inputSchema: drawioExportInput,
223
223
  outputSchema: drawioExportOutput,
224
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
224
225
  },
225
226
  handler: handleDrawioExport,
226
227
  };
@@ -72,7 +72,7 @@ export const evidenceCreateTool = {
72
72
  inputSchema: evidenceCreateInput,
73
73
  outputSchema: evidenceCreateOutput,
74
74
  // ローカルの spec / 画像を読んで xlsx を書くだけでネットワークには到達しない。
75
- annotations: { openWorldHint: false },
75
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
76
76
  },
77
77
  handler: handleEvidenceCreate,
78
78
  };
@@ -248,11 +248,8 @@ export function setupTool(buildDependencies = chromiumDefaultDependencies, build
248
248
  // 引数を取らないツールは空の z.object を渡す (src/mcp/server.ts の ToolConfig)。
249
249
  inputSchema: z.object({}),
250
250
  outputSchema: setupOutput,
251
- // Claude Code は annotations から自動承認の可否を組み立てるため、既定値と同じでも
252
- // 明示する。ダウンロードでファイルシステムを書き換え (destructive)、外部ホストへ
253
- // 到達する (openWorld)。読み取り専用ではないので readOnlyHint は立てない。
254
- // 取得済みなら skip するため、何度呼んでも状態は変わらない (idempotent)。
255
- annotations: { destructiveHint: true, idempotentHint: true, openWorldHint: true },
251
+ // ダウンロードでファイルシステムを書き換え、外部ホストへ到達する。取得済みなら skip するので idempotent。
252
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
256
253
  },
257
254
  handler,
258
255
  };
@@ -210,10 +210,8 @@ export function slideDevTool(buildRegistry = devServerRegistry, buildRuntimeDepe
210
210
  + 'The server runs only while the MCP server process is alive; the preview ends with the session.',
211
211
  inputSchema: slideDevInput,
212
212
  outputSchema: slideDevOutput,
213
- // annotations は明示しない。
214
- // `--remote` で全インタフェースに LISTEN するため、openWorldHint: false の明示基準に反する。
215
- // その基準は、ネットワークに到達しないことが確定していること。
216
- // 子プロセスを起こす以上、readOnlyHint も立てられない。
213
+ // `--remote` で全インタフェースに LISTEN するため、openWorldHint は SDK 既定 (true) のまま。
214
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
217
215
  },
218
216
  handler,
219
217
  };
@@ -306,7 +306,7 @@ readReferenceText = file => readFile(file, 'utf8')) {
306
306
  inputSchema: slidePageInput,
307
307
  outputSchema: slidePageOutput,
308
308
  // talk-dir 配下の読み取りと 1 ファイルの書き込みだけで、ネットワークには到達しない。
309
- annotations: { openWorldHint: false },
309
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
310
310
  },
311
311
  handler: arguments_ => handleSlidePage(arguments_, readReferenceText),
312
312
  };
@@ -163,7 +163,8 @@ export function slideCreateTool(buildDependencies = slideCreateDefaultDependenci
163
163
  + 'Also returns the lint result of the whole deck right after generation (generation counts as successful even with lint violations).',
164
164
  inputSchema: slideCreateInput,
165
165
  outputSchema: slideCreateOutput,
166
- // git でテーマを取得するため、ネットワークに到達しうる。openWorldHint は明示しない(SDK の既定)。
166
+ // git でテーマを取得するため openWorldHint は SDK 既定 (true) のまま。
167
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
167
168
  },
168
169
  handler: async (arguments_) => {
169
170
  const validated = parsePathArguments(slideCreateInput, arguments_, ['project_dir']);
@@ -238,6 +239,7 @@ export function slideConvertTool(buildDependencies = slideConvertDefaultDependen
238
239
  description: 'Converts a Slidev project to PPTX. The duration is proportional to the number of slides (just under 30 seconds for 55 slides).',
239
240
  inputSchema: slideConvertInput,
240
241
  outputSchema: slideConvertOutput,
242
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
241
243
  },
242
244
  handler: async (arguments_,
243
245
  // ToolCallContext.signal (AbortSignal は EventTarget で addEventListener を呼ぶため readonly 化できない)。
@@ -328,8 +330,8 @@ export function slideSyncTool(buildDependencies = slideSyncDefaultDependencies,
328
330
  + 'and the lint result of the whole deck after the sync. A running slide_dev must be stopped with stop: true and started again.',
329
331
  inputSchema: slideSyncInput,
330
332
  outputSchema: slideSyncOutput,
331
- // theme を渡したときと、node_modules_only・移行済みの talk-dir の通常の sync は、テーマを git で取得しうるため、ネットワークに到達しうる。
332
- // openWorldHint は明示しない(SDK の既定)。
333
+ // テーマを git で取得しうるため openWorldHint は SDK 既定 (true) のまま。
334
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
333
335
  },
334
336
  handler: async (arguments_) => {
335
337
  const validated = parsePathArguments(slideSyncInput, arguments_, ['dir']);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pecot/visual-mcp",
3
- "version": "4.0.3-dev.181",
3
+ "version": "4.0.3-dev.183",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pecot/visual-mcp",
9
- "version": "4.0.3-dev.181",
9
+ "version": "4.0.3-dev.183",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@cffnpwr/textlint-plugin-comments": "1.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pecot/visual-mcp",
3
- "version": "4.0.3-dev.181",
3
+ "version": "4.0.3-dev.183",
4
4
  "type": "module",
5
5
  "description": "pecotv MCP server (standalone distribution)",
6
6
  "license": "MIT",