@pecot/visual-mcp 3.1.1-dev.127 → 3.1.1-dev.128

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": "3.1.1-dev.127",
3
+ "version": "3.1.1-dev.128",
4
4
  "description": "pecot-v(pecot-visual)— 可視化・ドキュメント系スキル集(v-drawio, v-slidev, v-evidence)",
5
5
  "author": {
6
6
  "name": "pecot"
@@ -33,7 +33,7 @@ content は文の text と、structuredContent と 1 字も違わない JSON の
33
33
  */
34
34
  export declare function toCallToolResult(result: Readonly<ToolResult>): CallToolResult;
35
35
  /**
36
- CLI の `--json` の失敗の payload から、共通の項目と重なる reason・detail を外す。原因の名前は kind、全文は detail で返すため。
36
+ CLI の `--json` の失敗の payload から reason・detail を外す。原因の名前は共通の kind、全文は共通の detail で返すため。
37
37
  */
38
38
  export declare function withoutCommonFailureFields(data: Readonly<Record<string, unknown>>): Record<string, unknown>;
39
39
  /**
@@ -33,7 +33,7 @@ export function toCallToolResult(result) {
33
33
  };
34
34
  }
35
35
  /**
36
- CLI の `--json` の失敗の payload から、共通の項目と重なる reason・detail を外す。原因の名前は kind、全文は detail で返すため。
36
+ CLI の `--json` の失敗の payload から reason・detail を外す。原因の名前は共通の kind、全文は共通の detail で返すため。
37
37
  */
38
38
  export function withoutCommonFailureFields(data) {
39
39
  const { reason: _reason, detail: _detail, ...rest } = data;
@@ -226,6 +226,10 @@ anyOf の枝で「成功の必須項目」か「kind と detail」を求める
226
226
  // zod の型は readonly にできない。
227
227
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
228
228
  export function toolOutputSchema(output) {
229
+ // 同じ名前だと outputSchema では共通の項目が勝ち、ツールの宣言が知らせなしに消える
230
+ const reserved = Object.keys(COMMON_OUTPUT_PROPERTIES).filter(key => Object.hasOwn(output.shape, key));
231
+ if (reserved.length > 0)
232
+ throw new TypeError(`output keys reserved for the common fields of the MCP result: ${reserved.join(', ')}`);
229
233
  const generated = Object.entries(z.toJSONSchema(output, { io: 'output' })).filter(([key]) => key !== '$schema');
230
234
  const { required = [], properties = {}, ...rest } = JsonObjectSchema.parse(Object.fromEntries(generated));
231
235
  return {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pecot/visual-mcp",
3
- "version": "3.1.1-dev.127",
3
+ "version": "3.1.1-dev.128",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pecot/visual-mcp",
9
- "version": "3.1.1-dev.127",
9
+ "version": "3.1.1-dev.128",
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": "3.1.1-dev.127",
3
+ "version": "3.1.1-dev.128",
4
4
  "type": "module",
5
5
  "description": "pecotv MCP server (standalone distribution)",
6
6
  "license": "MIT",