@pecot/visual-mcp 3.0.2-dev.55 → 3.0.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/.claude-plugin/plugin.json +1 -1
- package/cli/dist/mcp/result.d.ts +36 -3
- package/cli/dist/mcp/result.js +47 -0
- package/cli/dist/mcp/server.d.ts +1 -1
- package/cli/dist/mcp/server.js +3 -1
- package/cli/dist/mcp/tools/_shared.d.ts +38 -8
- package/cli/dist/mcp/tools/_shared.js +53 -10
- package/cli/dist/mcp/tools/drawio.js +39 -10
- package/cli/dist/mcp/tools/evidence.js +14 -5
- package/cli/dist/mcp/tools/setup.js +27 -38
- package/cli/dist/mcp/tools/slide-dev.js +14 -10
- package/cli/dist/mcp/tools/slide-page.js +17 -13
- package/cli/dist/mcp/tools/slide-theme.js +48 -8
- package/cli/dist/mcp/tools/slide.d.ts +18 -0
- package/cli/dist/mcp/tools/slide.js +121 -7
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
- package/vendor/text-rules/dist/source-hash +1 -1
package/cli/dist/mcp/result.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Writable } from 'node:stream';
|
|
2
|
-
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
3
|
-
import
|
|
2
|
+
import type { CallToolResult, StandardSchemaWithJSON } from '@modelcontextprotocol/server';
|
|
3
|
+
import { z } from 'zod';
|
|
4
4
|
import type { FailureKind } from '../domain/_shared/failure-kind.js';
|
|
5
5
|
/**
|
|
6
6
|
ツールの結果。toCallToolResult が MCP の CallToolResult に変える。
|
|
7
|
-
data はツールごとの項目で、structuredContent
|
|
7
|
+
data はツールごとの項目で、structuredContent の最上位にそのまま並ぶ。宣言は各ツールの outputSchema で、tools/list へは toolOutputSchema で JSON Schema にして渡す。
|
|
8
8
|
*/
|
|
9
9
|
export type ToolResult = SucceededToolResult | FailedToolResult;
|
|
10
10
|
export interface SucceededToolResult {
|
|
@@ -77,4 +77,37 @@ export interface OutputCapture {
|
|
|
77
77
|
MCP サーバの stdout は JSON-RPC 専有なので、既存コマンドの stdout / stderr をこれに差し替えて捕捉する。
|
|
78
78
|
*/
|
|
79
79
|
export declare function createOutputCapture(): OutputCapture;
|
|
80
|
+
/**
|
|
81
|
+
ツールの項目と並べて structuredContent の最上位に置く、全ツールに共通の 4 項目
|
|
82
|
+
*/
|
|
83
|
+
export declare const COMMON_OUTPUT_PROPERTIES: {
|
|
84
|
+
kind: {
|
|
85
|
+
type: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
detail: {
|
|
89
|
+
type: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
log: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
warnings: {
|
|
97
|
+
type: string;
|
|
98
|
+
items: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
ツールの outputSchema(JSON Schema)。最上位の properties にツールの項目と共通の 4 項目を並べ、
|
|
106
|
+
anyOf の枝で「成功の必須項目」か「kind と detail」を求める。成功の必須項目が無ければ anyOf を置かない
|
|
107
|
+
*/
|
|
108
|
+
export declare function toolOutputSchema(output: z.ZodObject): Record<string, unknown>;
|
|
109
|
+
/**
|
|
110
|
+
手組みの JSON Schema を、SDK が受ける形にする。検証は SDK の ajv(2020-12)で、値を変えない
|
|
111
|
+
*/
|
|
112
|
+
export declare function standardOutputSchema(schema: Readonly<Record<string, unknown>>): StandardSchemaWithJSON;
|
|
80
113
|
//# sourceMappingURL=result.d.ts.map
|
package/cli/dist/mcp/result.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// MCP ツールの結果表現 (ToolResult) と、SDK の CallToolResult への変換。
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { Writable } from 'node:stream';
|
|
4
|
+
import { fromJsonSchema } from '@modelcontextprotocol/server';
|
|
5
|
+
import { z } from 'zod';
|
|
4
6
|
import { createWarningCollector, WARNING_LIMIT_BYTES } from './warnings.js';
|
|
5
7
|
import { toPosixPath } from './windows-path.js';
|
|
6
8
|
/**
|
|
@@ -196,4 +198,49 @@ export function createOutputCapture() {
|
|
|
196
198
|
warnings: () => collector.list(pendingBytes === 0 ? undefined : Buffer.concat(pending).toString('utf8')),
|
|
197
199
|
};
|
|
198
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
ツールの項目と並べて structuredContent の最上位に置く、全ツールに共通の 4 項目
|
|
203
|
+
*/
|
|
204
|
+
export const COMMON_OUTPUT_PROPERTIES = {
|
|
205
|
+
kind: { type: 'string', description: 'Failure kind (failure only)' },
|
|
206
|
+
detail: { type: 'string', description: 'Full text of the failure and how to recover (failure only)' },
|
|
207
|
+
log: {
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'Raw output of the command or child process (failure only). Over 64KB, the end is kept and the first line notes the truncation',
|
|
210
|
+
},
|
|
211
|
+
warnings: {
|
|
212
|
+
type: 'array',
|
|
213
|
+
items: { type: 'string' },
|
|
214
|
+
description: 'Warnings raised during the run (omitted when there are none). Beyond 100 warnings or 64KB, the last item tells how many were omitted',
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
const FAILURE_REQUIRED = ['kind', 'detail'];
|
|
218
|
+
const JsonObjectSchema = z.looseObject({
|
|
219
|
+
properties: z.record(z.string(), z.unknown()).optional(),
|
|
220
|
+
required: z.array(z.string()).optional(),
|
|
221
|
+
});
|
|
222
|
+
/**
|
|
223
|
+
ツールの outputSchema(JSON Schema)。最上位の properties にツールの項目と共通の 4 項目を並べ、
|
|
224
|
+
anyOf の枝で「成功の必須項目」か「kind と detail」を求める。成功の必須項目が無ければ anyOf を置かない
|
|
225
|
+
*/
|
|
226
|
+
// zod の型は readonly にできない。
|
|
227
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
228
|
+
export function toolOutputSchema(output) {
|
|
229
|
+
const generated = Object.entries(z.toJSONSchema(output, { io: 'output' })).filter(([key]) => key !== '$schema');
|
|
230
|
+
const { required = [], properties = {}, ...rest } = JsonObjectSchema.parse(Object.fromEntries(generated));
|
|
231
|
+
return {
|
|
232
|
+
type: 'object',
|
|
233
|
+
properties: { ...properties, ...COMMON_OUTPUT_PROPERTIES },
|
|
234
|
+
// 定義書に書き出す順(type・properties・additionalProperties)に合わせる
|
|
235
|
+
...rest,
|
|
236
|
+
...required.length > 0 && { anyOf: [{ required }, { required: [...FAILURE_REQUIRED] }] },
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
手組みの JSON Schema を、SDK が受ける形にする。検証は SDK の ajv(2020-12)で、値を変えない
|
|
241
|
+
*/
|
|
242
|
+
export function standardOutputSchema(schema) {
|
|
243
|
+
// eslint-disable-next-line no-restricted-syntax -- JsonSchemaType は全キーワードの型で、組み立てた object を当てられない
|
|
244
|
+
return fromJsonSchema(schema);
|
|
245
|
+
}
|
|
199
246
|
//# sourceMappingURL=result.js.map
|
package/cli/dist/mcp/server.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface ToolConfig {
|
|
|
17
17
|
readonly description?: string;
|
|
18
18
|
readonly inputSchema: z.ZodObject;
|
|
19
19
|
/**
|
|
20
|
-
|
|
20
|
+
ツールの項目の宣言。toolOutputSchema で共通の 4 項目と anyOf を足した JSON Schema にして、SDK に渡す。
|
|
21
21
|
*/
|
|
22
22
|
readonly outputSchema?: z.ZodObject;
|
|
23
23
|
/**
|
package/cli/dist/mcp/server.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
12
12
|
import { readVersion } from '../version.js';
|
|
13
13
|
import { createExecutionQueue } from './queue.js';
|
|
14
|
+
import { standardOutputSchema, toolOutputSchema } from './result.js';
|
|
14
15
|
import { ignoreRejection } from '../domain/_shared/ignore-rejection.js';
|
|
15
16
|
/**
|
|
16
17
|
progress ハートビートの送出周期 (ms)。
|
|
@@ -105,7 +106,8 @@ export function createMcpServer(tools = [], options = {}) {
|
|
|
105
106
|
const queue = createExecutionQueue();
|
|
106
107
|
const intervalMs = options.progressIntervalMs ?? PROGRESS_HEARTBEAT_INTERVAL_MS;
|
|
107
108
|
for (const tool of tools) {
|
|
108
|
-
|
|
109
|
+
const { outputSchema, ...config } = tool.config;
|
|
110
|
+
server.registerTool(tool.name, { ...config, ...(outputSchema !== undefined && { outputSchema: standardOutputSchema(toolOutputSchema(outputSchema)) }) }, async (arguments_, serverContext) => {
|
|
109
111
|
const heartbeat = startProgressHeartbeat(tool.name, serverContext, intervalMs);
|
|
110
112
|
const context = {
|
|
111
113
|
reportProgress: (message) => { heartbeat?.report(message); },
|
|
@@ -14,14 +14,44 @@ import { type FailedToolResult, type ToolResult } from '../result.js';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const WINDOWS_PATH_NOTE: string;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, z.core.$
|
|
17
|
+
パス引数を拒んだときの項目 (parsePathArguments が作る)。パス引数を持つツールに混ぜる。
|
|
18
|
+
*/
|
|
19
|
+
export declare const PATH_REJECTION_OUTPUT_SHAPE: {
|
|
20
|
+
invalidPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
convertedPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22
|
+
from: z.ZodString;
|
|
23
|
+
to: z.ZodString;
|
|
24
|
+
}, z.core.$strict>>>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
実行時依存か Chromium が無くて止めたときの項目 (ensureRuntimeDependencies・ensureChromium が作る)。
|
|
28
|
+
*/
|
|
29
|
+
export declare const MISSING_RUNTIME_OUTPUT_SHAPE: {
|
|
30
|
+
expectedAt: z.ZodOptional<z.ZodString>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
文面の違反で生成を止めたときの項目。drawio_create と evidence_create に混ぜる。
|
|
34
|
+
*/
|
|
35
|
+
export declare const TEXT_VIOLATION_OUTPUT_SHAPE: {
|
|
36
|
+
violations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
item: z.ZodString;
|
|
38
|
+
ruleId: z.ZodString;
|
|
39
|
+
message: z.ZodString;
|
|
40
|
+
text: z.ZodString;
|
|
41
|
+
}, z.core.$strict>>>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
複数のツールが使う項目の組の説明に、そのツールでいつ入るか (例: `success only`) を足す。
|
|
45
|
+
*/
|
|
46
|
+
export declare function withPresence(shape: Readonly<Record<string, z.ZodType>>, presence: string): Record<string, z.ZodType>;
|
|
47
|
+
/**
|
|
48
|
+
複数のツールが使う項目の組を、そのツールでは省略可にする (例: 失敗のときだけ入る)。
|
|
49
|
+
*/
|
|
50
|
+
export declare function optionalFields(shape: Readonly<Record<string, z.ZodType>>): Record<string, z.ZodType>;
|
|
51
|
+
/**
|
|
52
|
+
ツールの項目と失敗の項目の組を、宣言に無い項目を拒む object にする。共通の 4 項目と anyOf は result.ts の toolOutputSchema が足す。
|
|
53
|
+
*/
|
|
54
|
+
export declare function toolOutputFields(...shapes: readonly Readonly<z.ZodRawShape>[]): z.ZodObject;
|
|
25
55
|
/**
|
|
26
56
|
捕捉した stdout / stderr の文字列。warnings を省くと stderr から取る。
|
|
27
57
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// 11
|
|
1
|
+
// 11 ツールが共有する outputSchema の項目・出力捕捉・エラー整形・実行時ガード。
|
|
2
2
|
// ハンドラは inputSchema と同じ z.object で引数を parse し直して型を得る (`as` を使わないため)。
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -20,17 +20,60 @@ import { toPosixPath } from '../windows-path.js';
|
|
|
20
20
|
*/
|
|
21
21
|
export const WINDOWS_PATH_NOTE = String.raw `Windows-style paths (C:\... / \\wsl.localhost\<distro>\...) are accepted and `
|
|
22
22
|
+ 'converted to an absolute path under /mnt/<drive>/ or inside WSL.';
|
|
23
|
-
const WARNINGS_SCHEMA = z.array(z.string()).optional().describe('Warnings raised during the run (omitted when there are none). '
|
|
24
|
-
+ 'Beyond 100 warnings or 64KB, the last item tells how many were omitted');
|
|
25
23
|
/**
|
|
26
|
-
|
|
24
|
+
パス引数を拒んだときの項目 (parsePathArguments が作る)。パス引数を持つツールに混ぜる。
|
|
27
25
|
*/
|
|
28
|
-
export const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
26
|
+
export const PATH_REJECTION_OUTPUT_SHAPE = {
|
|
27
|
+
invalidPaths: z.array(z.string()).optional().describe('Rejected path arguments as <parameter>=<value> (failure only, kind invalid-path)'),
|
|
28
|
+
convertedPaths: z.record(z.string(), z.strictObject({
|
|
29
|
+
from: z.string().describe('Value that was passed'),
|
|
30
|
+
to: z.string().describe('Path it was converted to'),
|
|
31
|
+
})).optional().describe('Windows-style path arguments converted before the rejection, keyed by parameter name '
|
|
32
|
+
+ '(failure only, kind invalid-path; omitted when nothing was converted)'),
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
実行時依存か Chromium が無くて止めたときの項目 (ensureRuntimeDependencies・ensureChromium が作る)。
|
|
36
|
+
*/
|
|
37
|
+
export const MISSING_RUNTIME_OUTPUT_SHAPE = {
|
|
38
|
+
expectedAt: z.string().optional().describe('Where the missing runtime dependencies or Playwright Chromium are expected '
|
|
39
|
+
+ '(failure only, kind runtime-dependencies-not-installed / chromium-not-installed / chromium-install-failed)'),
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
文面の違反で生成を止めたときの項目。drawio_create と evidence_create に混ぜる。
|
|
43
|
+
*/
|
|
44
|
+
export const TEXT_VIOLATION_OUTPUT_SHAPE = {
|
|
45
|
+
violations: z.array(z.strictObject({
|
|
46
|
+
item: z.string().describe('Where the text is'),
|
|
47
|
+
ruleId: z.string().describe('ID of the violated rule'),
|
|
48
|
+
message: z.string().describe('What is wrong'),
|
|
49
|
+
text: z.string().describe('The checked text'),
|
|
50
|
+
})).optional().describe('Text rule violations (failure only, kind text-violation)'),
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
複数のツールが使う項目の組の説明に、そのツールでいつ入るか (例: `success only`) を足す。
|
|
54
|
+
*/
|
|
55
|
+
// zod のスキーマは readonly の型を持たない。
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
57
|
+
export function withPresence(shape, presence) {
|
|
58
|
+
return Object.fromEntries(Object.entries(shape).map(([key, schema]) => [key, schema.describe(`${schema.description ?? ''} (${presence})`)]));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
複数のツールが使う項目の組を、そのツールでは省略可にする (例: 失敗のときだけ入る)。
|
|
62
|
+
*/
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
64
|
+
export function optionalFields(shape) {
|
|
65
|
+
return Object.fromEntries(Object.entries(shape).map(([key, schema]) => [key, schema.optional()]));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
ツールの項目と失敗の項目の組を、宣言に無い項目を拒む object にする。共通の 4 項目と anyOf は result.ts の toolOutputSchema が足す。
|
|
69
|
+
*/
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
71
|
+
export function toolOutputFields(...shapes) {
|
|
72
|
+
const merged = {};
|
|
73
|
+
for (const shape of shapes)
|
|
74
|
+
Object.assign(merged, shape);
|
|
75
|
+
return z.strictObject(merged);
|
|
76
|
+
}
|
|
34
77
|
function stringArrayOf(value) {
|
|
35
78
|
return Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
36
79
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
// drawio 系 MCP ツール (drawio_create / drawio_export)。
|
|
2
|
-
//
|
|
3
|
-
// ハンドラは対応する CLI コマンドから抽出した execute<Cmd>() をそのまま呼ぶ。
|
|
4
|
-
// `--json` の data 組み立ては commands 側に一本化してある。
|
|
5
|
-
// そのため、ここに残るのは「MCP の引数 → CLI のオプション」と「実行結果 → ToolResult」の写像だけになる。
|
|
6
|
-
//
|
|
7
|
-
// deps はハンドラ内で毎回組み立てる。既定 deps ファクトリは CLAUDE_PLUGIN_ROOT 未設定で throw する。
|
|
8
|
-
// module top-level で評価すると、サーバ起動と tools/list がまとめて落ちる。
|
|
2
|
+
// deps はハンドラ内で組み立てる。既定 deps は CLAUDE_PLUGIN_ROOT 未設定で throw し、top-level だと tools/list ごと落ちる。
|
|
9
3
|
import { z } from 'zod';
|
|
10
4
|
import { assertOutputExtension as assertDrawioExportOutputExtension, drawioExportDefaultDependencies, errorToReason as drawioExportErrorToReason, executeDrawioExport, } from '../../commands/drawio/export.js';
|
|
11
5
|
import { drawioUrlDefaultDependencies, errorData as drawioUrlErrorData, errorToReason as drawioUrlErrorToReason, executeDrawioUrl, } from '../../commands/drawio/url.js';
|
|
@@ -14,7 +8,7 @@ import { failureKindOf } from '../../domain/_shared/failure-kind.js';
|
|
|
14
8
|
import { resolvePluginRoot } from '../../infra/_shared/plugin-root.js';
|
|
15
9
|
import { defaultIconRoot } from '../../infra/drawio/icons.js';
|
|
16
10
|
import { parsePathArguments, toCallToolResult, withoutCommonFailureFields } from '../result.js';
|
|
17
|
-
import { captureCommandOutput, chromiumDefaultDependencies, ensureChromium, failureDetailOf, formatError, normalizeThemeArgument,
|
|
11
|
+
import { captureCommandOutput, chromiumDefaultDependencies, ensureChromium, failureDetailOf, formatError, MISSING_RUNTIME_OUTPUT_SHAPE, normalizeThemeArgument, PATH_REJECTION_OUTPUT_SHAPE, TEXT_VIOLATION_OUTPUT_SHAPE, toolOutputFields, WINDOWS_PATH_NOTE, } from './_shared.js';
|
|
18
12
|
const drawioCreateInput = z.object({
|
|
19
13
|
input_path: z.string().describe('Absolute path of the input .drawio file. ' + WINDOWS_PATH_NOTE),
|
|
20
14
|
mode: z.enum(['view', 'edit']).describe('Purpose of the generated URL (view / edit). The generated URL is the same for both').default('view'),
|
|
@@ -34,6 +28,41 @@ const drawioExportInput = z.object({
|
|
|
34
28
|
print_hash: z.boolean().describe('Compute only the composite hash used for staleness checks, without exporting').default(false),
|
|
35
29
|
pdf: z.boolean().describe('Whether to also write a PDF as a sibling file (<out_path with the extension replaced by .pdf>) alongside the SVG').default(true),
|
|
36
30
|
});
|
|
31
|
+
const drawioThemeFontsOutput = z.strictObject({
|
|
32
|
+
body: z.array(z.string()).describe('Body fonts the labels are checked against'),
|
|
33
|
+
eastAsian: z.string().optional().describe('East Asian font (omitted when the theme does not declare one)'),
|
|
34
|
+
});
|
|
35
|
+
const drawioThemeOutput = z.strictObject({
|
|
36
|
+
source: z.enum(['talk-dir', 'option', 'default']).describe('Where the theme came from: talk-dir (ancestor talk-dir of the diagram), option (theme argument), default (built-in default)'),
|
|
37
|
+
name: z.string().optional().describe('Package name of the theme (omitted for the built-in default)'),
|
|
38
|
+
fonts: drawioThemeFontsOutput.describe('Fonts the labels are checked against'),
|
|
39
|
+
fontSizes: z.strictObject({
|
|
40
|
+
heading: z.number(),
|
|
41
|
+
headingSm: z.number(),
|
|
42
|
+
body: z.number(),
|
|
43
|
+
bodySm: z.number(),
|
|
44
|
+
label: z.number(),
|
|
45
|
+
}).optional().describe('Font sizes (px) the labels are checked against (only when the theme came from a talk-dir or the theme argument)'),
|
|
46
|
+
});
|
|
47
|
+
const drawioCreateShape = {
|
|
48
|
+
event: z.string().describe('drawio.url.done on success, drawio.url.error on failure (omitted when a path argument is rejected)'),
|
|
49
|
+
url: z.string().optional().describe('Generated draw.io URL (success only, when out_path is omitted)'),
|
|
50
|
+
file: z.string().optional().describe('Absolute path of the written viewer HTML (success only, when out_path is given)'),
|
|
51
|
+
png: z.string().nullable().optional().describe('Absolute path of the written PNG, or null when writing it failed (success only, when out_path is given and png is true)'),
|
|
52
|
+
pngFailed: z.boolean().optional().describe('Whether writing the PNG failed (success only, when out_path is given and png is true)'),
|
|
53
|
+
theme: drawioThemeOutput.describe('Theme the font and font size were checked against (success only)'),
|
|
54
|
+
};
|
|
55
|
+
const drawioCreateOutput = toolOutputFields(drawioCreateShape, TEXT_VIOLATION_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
56
|
+
const drawioExportShape = {
|
|
57
|
+
event: z.string().describe('drawio.export.done after exporting, drawio.export.hash with print_hash, drawio.export.error or chromium.unavailable on failure '
|
|
58
|
+
+ '(omitted when a path argument is rejected)'),
|
|
59
|
+
file: z.string().describe('Absolute path of the written SVG; with print_hash, the absolute path of the input (success only)'),
|
|
60
|
+
sourceSha256: z.string().describe('Composite hash of the input and the referenced icons, used for staleness checks (success only)'),
|
|
61
|
+
icons: z.number().describe('Number of icon:// references resolved (success only)'),
|
|
62
|
+
pdf: z.string().nullable().optional().describe('Absolute path of the written PDF, or null when no PDF was written (pdf is false or writing it failed; success only, not with print_hash)'),
|
|
63
|
+
pdfFailed: z.boolean().optional().describe('Whether writing the PDF failed (success only, not with print_hash)'),
|
|
64
|
+
};
|
|
65
|
+
const drawioExportOutput = toolOutputFields(drawioExportShape, MISSING_RUNTIME_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
37
66
|
/**
|
|
38
67
|
message 末尾の警告件数サフィックス。drawio_create / drawio_export で表記を揃える。
|
|
39
68
|
*/
|
|
@@ -184,7 +213,7 @@ export const drawioCreateTool = {
|
|
|
184
213
|
title: 'Output a drawio diagram as a deliverable',
|
|
185
214
|
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.',
|
|
186
215
|
inputSchema: drawioCreateInput,
|
|
187
|
-
outputSchema:
|
|
216
|
+
outputSchema: drawioCreateOutput,
|
|
188
217
|
},
|
|
189
218
|
handler: handleDrawioCreate,
|
|
190
219
|
};
|
|
@@ -194,7 +223,7 @@ export const drawioExportTool = {
|
|
|
194
223
|
title: 'drawio SVG / PDF export',
|
|
195
224
|
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.',
|
|
196
225
|
inputSchema: drawioExportInput,
|
|
197
|
-
outputSchema:
|
|
226
|
+
outputSchema: drawioExportOutput,
|
|
198
227
|
},
|
|
199
228
|
handler: handleDrawioExport,
|
|
200
229
|
};
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
// evidence 系の MCP ツール定義 (evidence_create)。
|
|
2
|
-
//
|
|
3
|
-
// ハンドラは既存 CLI と同じ executeEvidenceCreate を呼び、CLI の `--json` が出すオブジェクトをそのまま項目として返す。
|
|
1
|
+
// evidence 系の MCP ツール定義 (evidence_create)。CLI の `--json` が出すオブジェクトをそのまま項目として返す。
|
|
4
2
|
import path from 'node:path';
|
|
5
3
|
import { z } from 'zod';
|
|
6
4
|
import { errorData, errorToReason, evidenceCreateDefaultDependencies, executeEvidenceCreate, } from '../../commands/evidence-xlsx/create.js';
|
|
7
5
|
import { failureKindOf } from '../../domain/_shared/failure-kind.js';
|
|
8
6
|
import { parsePathArguments, toCallToolResult, withoutCommonFailureFields } from '../result.js';
|
|
9
|
-
import { captureCommandOutput, failureDetailOf,
|
|
7
|
+
import { captureCommandOutput, failureDetailOf, PATH_REJECTION_OUTPUT_SHAPE, TEXT_VIOLATION_OUTPUT_SHAPE, toolOutputFields, WINDOWS_PATH_NOTE, } from './_shared.js';
|
|
10
8
|
const evidenceCreateInput = z.object({
|
|
11
9
|
input_path: z.string().describe('Absolute path of the EvidenceSpec JSON. ' + WINDOWS_PATH_NOTE),
|
|
12
10
|
out_path: z.string().optional().describe('Absolute path of the xlsx to write. If omitted, evidence.xlsx in the same directory as input_path. ' + WINDOWS_PATH_NOTE),
|
|
13
11
|
});
|
|
12
|
+
const evidenceCreateShape = {
|
|
13
|
+
event: z.string().describe('result on success, evidence.create.error on failure (omitted when a path argument is rejected)'),
|
|
14
|
+
outPath: z.string().describe('Absolute path of the written xlsx (success only)'),
|
|
15
|
+
items: z.number().describe('Number of images placed (success only)'),
|
|
16
|
+
annotations: z.number().describe('Number of annotations added (success only)'),
|
|
17
|
+
skipped: z.array(z.strictObject({
|
|
18
|
+
path: z.string().describe('Path of the image as written in the spec'),
|
|
19
|
+
reason: z.enum(['not-found', 'unsupported-format', 'unreadable']).describe('Why the image was skipped'),
|
|
20
|
+
})).describe('Images that were skipped (success only; empty when none)'),
|
|
21
|
+
};
|
|
22
|
+
const evidenceCreateOutput = toolOutputFields(evidenceCreateShape, TEXT_VIOLATION_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
14
23
|
/**
|
|
15
24
|
out_path 省略時の既定。
|
|
16
25
|
|
|
@@ -61,7 +70,7 @@ export const evidenceCreateTool = {
|
|
|
61
70
|
+ ' Places the images listed in the spec in order and adds annotations.'
|
|
62
71
|
+ ' Before generating, it checks the title, captions and annotations against the text rules and generates nothing if there is a violation.',
|
|
63
72
|
inputSchema: evidenceCreateInput,
|
|
64
|
-
outputSchema:
|
|
73
|
+
outputSchema: evidenceCreateOutput,
|
|
65
74
|
// ローカルの spec / 画像を読んで xlsx を書くだけでネットワークには到達しない。
|
|
66
75
|
annotations: { openWorldHint: false },
|
|
67
76
|
},
|
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
// runtime_setup
|
|
2
|
-
//
|
|
3
|
-
// `pecotv mcp` は MCP クライアントの接続タイムアウト (Claude Code の MCP_TIMEOUT は既定
|
|
4
|
-
// 30000ms) に収めるため、起動時に何も取得しない。また、モデルが呼ぶツールの側から 120MB 級の
|
|
5
|
-
// ダウンロードを通知なしに始めることも避けている。
|
|
6
|
-
// そのぶん「取得する」という操作を明示的に呼べる口として本ツールを置く。
|
|
7
|
-
//
|
|
8
|
-
// 取得対象は 2 つある。
|
|
9
|
-
// - 実行時依存 (@slidev/cli / dom-to-pptx / @slidev/parser と、実行時依存の manifest が
|
|
10
|
-
// 宣言するテーマの peer)。単体配布ルートでは npx が起動のたびに node_modules を作り直すため、
|
|
11
|
-
// これらを起動層に載せられない。データ置き場の `mcp-dist/` へ置いて永続させる。
|
|
12
|
-
// 置き場は `PLUGIN_DATA` で選べる。
|
|
13
|
-
// 既定は `$XDG_DATA_HOME/pecot/pecot-visual/mcp-dist`、無ければ `~/.local/share/pecot/pecot-visual/mcp-dist`。
|
|
14
|
-
// プラグインルートでは同梱されているので取得済み判定で通過する。
|
|
15
|
-
// - Playwright Chromium。従来どおり `~/.cache/ms-playwright` へ置く。
|
|
16
|
-
// 取得後に、起動に要る OS のライブラリを確かめ、足りなければ入れる。
|
|
17
|
-
// 参照: #1217、infra/playwright/host-dependencies.ts。bin/pecotv の bootstrap と同じルート。
|
|
18
|
-
//
|
|
19
|
-
// 実行時依存を先に取るのは、取得ロックの置き場所 (installLockPath) が依存ルートの
|
|
20
|
-
// node_modules だからで、先に作っておくと chromium 側もロック付きで走れる。
|
|
21
|
-
//
|
|
22
|
-
// 対応する CLI サブコマンドは持たない。
|
|
23
|
-
// CLI 側の chromium 取得ルートは bin/pecotv の bootstrap (`pecotv drawio url` 等の初回実行) と setup.sh にある。
|
|
24
|
-
// そちらは #543 の設計どおり、同期取得・失敗時 fatal のまま変えていない。
|
|
25
|
-
//
|
|
26
|
-
// 取得中の無音対策は不要。
|
|
27
|
-
// progress ハートビートは createMcpServer が全ツール一律で送っている (src/mcp/server.ts の startProgressHeartbeat)。
|
|
28
|
-
// そのため本ツールが長時間動いている間、クライアントの idle timer はリセットされ続ける。
|
|
1
|
+
// runtime_setup ツール。実行時依存と Chromium を明示的に取得する。MCP の接続タイムアウトを守るため、起動では取得しない。
|
|
2
|
+
// 実行時依存を先に取るのは、取得ロック (installLockPath) が依存ルートの node_modules に置かれるため。
|
|
29
3
|
import { z } from 'zod';
|
|
30
4
|
import { LOCK_CONFLICT_EXIT_CODE, LOCK_WAIT_SECONDS } from '../../infra/_shared/flock.js';
|
|
31
5
|
import { ensureChromiumHostDependencies, hostDependenciesDefaultDependencies, } from '../../infra/playwright/host-dependencies.js';
|
|
32
6
|
import { toCallToolResult } from '../result.js';
|
|
33
|
-
import { chromiumDefaultDependencies, chromiumInstallFailureDetail, runtimeDefaultDependencies, tlsCertificateHint,
|
|
7
|
+
import { chromiumDefaultDependencies, chromiumInstallFailureDetail, runtimeDefaultDependencies, tlsCertificateHint, toolOutputFields, withSpawnOutput, } from './_shared.js';
|
|
8
|
+
function stageOutput(subject) {
|
|
9
|
+
return z.strictObject({
|
|
10
|
+
installed: z.boolean().describe(`Whether ${subject} are in place after this run`),
|
|
11
|
+
downloaded: z.boolean().describe(`Whether this run downloaded or installed ${subject}`),
|
|
12
|
+
durationMs: z.number().describe('Time spent on this stage in milliseconds (0 when skipped)'),
|
|
13
|
+
location: z.string().optional().describe('Where they are placed (omitted when it cannot be determined)'),
|
|
14
|
+
detail: z.string().optional().describe('Why the stage failed, or what it installed'),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const setupShape = {
|
|
18
|
+
event: z.string().describe('setup.done when something was downloaded, setup.skipped when everything was already in place, setup.error on failure'),
|
|
19
|
+
runtime: stageOutput('the runtime dependencies').describe('Result of the runtime dependencies stage'),
|
|
20
|
+
chromium: stageOutput('Playwright Chromium files').describe('Result of the Playwright Chromium stage'),
|
|
21
|
+
hostDeps: stageOutput('the OS libraries required to launch Chromium').describe('Result of the OS libraries stage (omitted when Chromium could not be placed)'),
|
|
22
|
+
};
|
|
23
|
+
const setupOutput = toolOutputFields(setupShape);
|
|
34
24
|
/**
|
|
35
25
|
実行時依存を取得する。
|
|
36
26
|
|
|
@@ -215,16 +205,16 @@ export function setupTool(buildDependencies = chromiumDefaultDependencies, build
|
|
|
215
205
|
// 片方だけを見ると、もう片方の理由が <系統>.detail にしか残らず detail から
|
|
216
206
|
// 消えるため、失敗した系統を全て畳んで載せる。
|
|
217
207
|
const failures = [
|
|
218
|
-
...(runtime.installed ? [] : [{ label: 'runtime dependencies',
|
|
219
|
-
...(chromium.installed ? [] : [{ label: 'Playwright Chromium',
|
|
208
|
+
...(runtime.installed ? [] : [{ label: 'runtime dependencies', kind: 'runtime-install-failed', stage: runtime }]),
|
|
209
|
+
...(chromium.installed ? [] : [{ label: 'Playwright Chromium', kind: 'chromium-install-failed', stage: chromium }]),
|
|
220
210
|
...(hostDependencies === undefined || hostDependencies.installed
|
|
221
211
|
? []
|
|
222
|
-
: [{ label: 'Chromium OS libraries',
|
|
212
|
+
: [{ label: 'Chromium OS libraries', kind: 'chromium-host-deps-missing', stage: hostDependencies }]),
|
|
223
213
|
];
|
|
224
214
|
// OS ライブラリの失敗は「取得」ではなく「足りない」ことを案内するため、取得の失敗と分ける。
|
|
225
215
|
// その detail は足りないライブラリと入れるコマンドまで書いた文なので、前置きを付けずに載せる。
|
|
226
|
-
const acquisitionFailures = failures.filter(failure => failure.
|
|
227
|
-
const hostDependenciesDetail = failures.find(failure => failure.
|
|
216
|
+
const acquisitionFailures = failures.filter(failure => failure.kind !== 'chromium-host-deps-missing');
|
|
217
|
+
const hostDependenciesDetail = failures.find(failure => failure.kind === 'chromium-host-deps-missing')?.stage.detail;
|
|
228
218
|
const detail = [
|
|
229
219
|
...(acquisitionFailures.length === 0
|
|
230
220
|
? []
|
|
@@ -234,12 +224,11 @@ export function setupTool(buildDependencies = chromiumDefaultDependencies, build
|
|
|
234
224
|
].join(' / ');
|
|
235
225
|
const result = withSpawnOutput({
|
|
236
226
|
ok: false,
|
|
237
|
-
//
|
|
238
|
-
kind: failures[0]?.
|
|
227
|
+
// kind には最初に失敗した段の名前を入れる。ほかの失敗した段は、各段の installed で読める。
|
|
228
|
+
kind: failures[0]?.kind ?? 'unknown',
|
|
239
229
|
detail,
|
|
240
230
|
data: {
|
|
241
231
|
event: 'setup.error',
|
|
242
|
-
reason: failures.map(failure => failure.reason).join(','),
|
|
243
232
|
...data,
|
|
244
233
|
},
|
|
245
234
|
}, mergeSpawned(failures.map(failure => failure.stage.spawned)));
|
|
@@ -258,7 +247,7 @@ export function setupTool(buildDependencies = chromiumDefaultDependencies, build
|
|
|
258
247
|
+ 'It skips what is already installed, so it finishes quickly and is safe to call repeatedly.',
|
|
259
248
|
// 引数を取らないツールは空の z.object を渡す (src/mcp/server.ts の ToolConfig)。
|
|
260
249
|
inputSchema: z.object({}),
|
|
261
|
-
outputSchema:
|
|
250
|
+
outputSchema: setupOutput,
|
|
262
251
|
// Claude Code は annotations から自動承認の可否を組み立てるため、既定値と同じでも
|
|
263
252
|
// 明示する。ダウンロードでファイルシステムを書き換え (destructive)、外部ホストへ
|
|
264
253
|
// 到達する (openWorld)。読み取り専用ではないので readOnlyHint は立てない。
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
// slide_dev ツール。talk-dir の Slidev dev サーバを起動し、ブラウザで開ける URL を返す。
|
|
2
|
-
//
|
|
3
|
-
// 対応する CLI サブコマンドは持たない (`runtime_setup` と同じ MCP 専用ツール)。dev サーバの寿命は
|
|
4
|
-
// MCP サーバプロセスに紐づくため、CLI から起動しても呼び出しの終了と同時に落ちるだけで
|
|
5
|
-
// 意味を持たない。プレビュールートを MCP 一本に絞る #1023 の決定にも沿う。
|
|
6
|
-
//
|
|
7
|
-
// 実処理は src/mcp/dev-server-registry.ts が持つ。ここに置くのは引数の写像・実行前ガード・
|
|
8
|
-
// ToolResult への正規化だけで、他のツールが commands/ の execute<Cmd>() を呼ぶ位置に
|
|
9
|
-
// レジストリが入る形になる。
|
|
2
|
+
// dev サーバの寿命が MCP サーバに紐づくため CLI を持たない。実処理は src/mcp/dev-server-registry.ts。
|
|
10
3
|
// 参照するのは引数で受けた talk-dir と、その直下の固定名 (slides.md / node_modules) のみ。
|
|
11
4
|
/* eslint-disable security/detect-non-literal-fs-filename */
|
|
12
5
|
import { existsSync, statSync } from 'node:fs';
|
|
@@ -19,7 +12,7 @@ import { pluginDependencyRoot } from '../../infra/_shared/dependency-root.js';
|
|
|
19
12
|
import { resolvePluginRoot } from '../../infra/_shared/plugin-root.js';
|
|
20
13
|
import { devServerRegistry } from '../dev-server-registry.js';
|
|
21
14
|
import { parsePathArguments, toCallToolResult } from '../result.js';
|
|
22
|
-
import { ensureRuntimeDependencies, runtimeDefaultDependencies,
|
|
15
|
+
import { ensureRuntimeDependencies, MISSING_RUNTIME_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE, runtimeDefaultDependencies, toolOutputFields, WINDOWS_PATH_NOTE, withCapturedOutput, } from './_shared.js';
|
|
23
16
|
// context に AbortSignal を持つため readonly にできない。
|
|
24
17
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
25
18
|
function ensureThemeLinkedWithDefaults(directory, context) {
|
|
@@ -39,6 +32,17 @@ const slideDevInput = z.object({
|
|
|
39
32
|
stop: z.boolean().default(false)
|
|
40
33
|
.describe('Stop the dev server of the talk-dir when true (arguments other than dir have no effect when stopping)'),
|
|
41
34
|
});
|
|
35
|
+
const slideDevShape = {
|
|
36
|
+
event: z.string().describe('slide.dev.started, slide.dev.reused or slide.dev.stopped on success; '
|
|
37
|
+
+ 'slide.dev.error or runtime-dependencies.unavailable on failure (omitted when a path argument is rejected)'),
|
|
38
|
+
dir: z.string().describe('Absolute path of the talk-dir (on success, and on failure with slide.dev.error)'),
|
|
39
|
+
url: z.string().optional().describe('URL that opens the preview in a browser (success only, when started or reused)'),
|
|
40
|
+
port: z.number().optional().describe('Port the server listens on (success only; when stopping, only if a server was running)'),
|
|
41
|
+
reused: z.boolean().optional().describe('Whether the running server was returned as it is (success only, when started or reused)'),
|
|
42
|
+
pid: z.number().optional().describe('Process ID of the dev server, for stopping it by hand (success only, when known)'),
|
|
43
|
+
stopped: z.boolean().optional().describe('Whether a running server was stopped (success only, with stop: true)'),
|
|
44
|
+
};
|
|
45
|
+
const slideDevOutput = toolOutputFields(slideDevShape, MISSING_RUNTIME_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
42
46
|
/**
|
|
43
47
|
spawn する前に talk-dir の体裁を確認する。続行してよければ undefined。
|
|
44
48
|
|
|
@@ -206,7 +210,7 @@ export function slideDevTool(buildRegistry = devServerRegistry, buildRuntimeDepe
|
|
|
206
210
|
+ 'Set stop: true to stop it. '
|
|
207
211
|
+ 'The server runs only while the MCP server process is alive; the preview ends with the session.',
|
|
208
212
|
inputSchema: slideDevInput,
|
|
209
|
-
outputSchema:
|
|
213
|
+
outputSchema: slideDevOutput,
|
|
210
214
|
// annotations は明示しない。
|
|
211
215
|
// `--remote` で全インタフェースに LISTEN するため、openWorldHint: false の明示基準に反する。
|
|
212
216
|
// その基準は、ネットワークに到達しないことが確定していること。
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
// slide_page
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// 対応する CLI サブコマンドは持たない (`slide_dev` / `runtime_setup` と同じ MCP 専用ツール)。
|
|
5
|
-
// 目的はエージェントの「`pages/_references/<layout>.yaml` を Read してから手書きする」ルートを
|
|
6
|
-
// 1 回の呼び出しに畳むことなので、CLI から使う需要が無い。
|
|
7
|
-
//
|
|
8
|
-
// 参照 yaml は `slide theme` と同じ解釈(executeSlideTheme)で探す。
|
|
9
|
-
// talk-dir の references/ が先、次にテーマの references/ で、lint の no-unknown-props などが読む場所と同じ。
|
|
10
|
-
// レイアウト名の一致確認も executeSlideTheme が返す一覧に通す。
|
|
11
|
-
// `_` 始まりと status: hidden の除外規則を書き写すと片方だけ古くなるため、実装は 1 本に保つ。
|
|
1
|
+
// slide_page ツール。レイアウトのスケルトンページを pages/ に書き、参照 yaml と includes を返す。
|
|
2
|
+
// 参照 yaml とレイアウト名は executeSlideTheme で引く。除外規則を書き写すと片方だけ古くなるため。
|
|
12
3
|
// 開くのは引数で受けた talk-dir の下の pages/ と、executeSlideTheme が返した参照 yaml の絶対パス、参照 yaml が宣言した include 名だけ。
|
|
13
4
|
/* eslint-disable security/detect-non-literal-fs-filename */
|
|
14
5
|
import { existsSync } from 'node:fs';
|
|
@@ -21,7 +12,20 @@ import { createDiagnostics } from '../../diagnostics.js';
|
|
|
21
12
|
import { failureKindOf } from '../../domain/_shared/failure-kind.js';
|
|
22
13
|
import { extractSkeleton, isFrontmatterBlock } from '../../domain/slidev-theme/skeleton.js';
|
|
23
14
|
import { parsePathArguments, toCallToolResult } from '../result.js';
|
|
24
|
-
import { captureCommandOutput, formatError,
|
|
15
|
+
import { captureCommandOutput, formatError, optionalFields, PATH_REJECTION_OUTPUT_SHAPE, toolOutputFields, WINDOWS_PATH_NOTE, withPresence, } from './_shared.js';
|
|
16
|
+
import { LAYOUT_CATALOG_OUTPUT_SHAPE } from './slide.js';
|
|
17
|
+
const slidePageShape = {
|
|
18
|
+
event: z.string().describe('slide.page.done on success, slide.page.error on failure (omitted when a path argument is rejected)'),
|
|
19
|
+
layout: z.string().describe('Layout name of the generated page (success only)'),
|
|
20
|
+
category: z.string().describe('Category ID of the layout (success only)'),
|
|
21
|
+
deprecated: z.boolean().describe('Whether the layout is deprecated (success only)'),
|
|
22
|
+
path: z.string().describe('Absolute path of the written page (success only)'),
|
|
23
|
+
skeleton: z.string().describe('Frontmatter written to the page (success only)'),
|
|
24
|
+
reference: z.string().describe('Full text of the reference yaml of the layout (success only)'),
|
|
25
|
+
includes: z.record(z.string(), z.string()).describe('Full text of the shared yaml files the reference yaml includes, keyed by name (success only; empty when none)'),
|
|
26
|
+
...optionalFields(withPresence(LAYOUT_CATALOG_OUTPUT_SHAPE, 'failure only, kind unknown-layout')),
|
|
27
|
+
};
|
|
28
|
+
const slidePageOutput = toolOutputFields(slidePageShape, PATH_REJECTION_OUTPUT_SHAPE);
|
|
25
29
|
/**
|
|
26
30
|
生成するページの拡張子。省略された `file` にはこれを補う。
|
|
27
31
|
*/
|
|
@@ -300,7 +304,7 @@ readReferenceText = file => readFile(file, 'utf8')) {
|
|
|
300
304
|
+ '(passing an unknown name returns categories and layouts in the response). '
|
|
301
305
|
+ 'The generated page must be registered separately as a src: entry in slides.md.',
|
|
302
306
|
inputSchema: slidePageInput,
|
|
303
|
-
outputSchema:
|
|
307
|
+
outputSchema: slidePageOutput,
|
|
304
308
|
// talk-dir 配下の読み取りと 1 ファイルの書き込みだけで、ネットワークには到達しない。
|
|
305
309
|
annotations: { openWorldHint: false },
|
|
306
310
|
},
|
|
@@ -1,18 +1,58 @@
|
|
|
1
|
-
// slide_theme ツール。talk-dir
|
|
2
|
-
//
|
|
3
|
-
// 対応する CLI は `pecotv slide theme`。実処理と `--json` の data 組み立ては
|
|
4
|
-
// commands/slidev-project/theme.ts の executeSlideTheme が持つ単一実装を共有する。
|
|
5
|
-
// ここに置くのは引数の写像と ToolResult への正規化だけ。
|
|
6
|
-
// 読み取りだけで、ネットワークには出ない。
|
|
1
|
+
// slide_theme ツール。talk-dir が参照するテーマの宣言とレイアウトの一覧を返す (`pecotv slide theme` 相当)。
|
|
7
2
|
import { z } from 'zod';
|
|
8
3
|
import { errorToReason, executeSlideTheme, slideThemeDefaultDependencies, } from '../../commands/slidev-project/theme.js';
|
|
9
4
|
import { failureKindOf } from '../../domain/_shared/failure-kind.js';
|
|
10
5
|
import { parsePathArguments, toCallToolResult } from '../result.js';
|
|
11
|
-
import { formatError,
|
|
6
|
+
import { formatError, PATH_REJECTION_OUTPUT_SHAPE, toolOutputFields, WINDOWS_PATH_NOTE, withPresence } from './_shared.js';
|
|
7
|
+
import { LAYOUT_CATALOG_OUTPUT_SHAPE } from './slide.js';
|
|
12
8
|
const slideThemeInput = z.object({
|
|
13
9
|
dir: z.string()
|
|
14
10
|
.describe('Absolute path of the talk-dir whose theme to inspect. Relative paths are not accepted. ' + WINDOWS_PATH_NOTE),
|
|
15
11
|
});
|
|
12
|
+
const sizeOutput = z.strictObject({ width: z.number(), height: z.number() });
|
|
13
|
+
const severityOutput = z.enum(['error', 'warn', 'off']);
|
|
14
|
+
const panelsOutput = z.record(z.string(), sizeOutput).describe('Panel size of the diagram per layout name');
|
|
15
|
+
const rulesOutput = z.record(z.string(), severityOutput).describe('Severity per lint rule ID');
|
|
16
|
+
const declarationFontsOutput = z.strictObject({
|
|
17
|
+
body: z.array(z.string()),
|
|
18
|
+
heading: z.array(z.string()),
|
|
19
|
+
eastAsian: z.string().optional(),
|
|
20
|
+
});
|
|
21
|
+
const markerLayoutsOutput = z.array(z.string());
|
|
22
|
+
const slideThemeShape = {
|
|
23
|
+
event: z.string().describe('slide.theme.done on success, slide.theme.error on failure (omitted when a path argument is rejected)'),
|
|
24
|
+
theme: z.strictObject({
|
|
25
|
+
name: z.string().describe('Package name of the theme'),
|
|
26
|
+
spec: z.string().describe('Theme specification in the dependencies of package.json'),
|
|
27
|
+
declared: z.boolean().describe('Whether the theme has pecot-theme.json'),
|
|
28
|
+
directory: z.string().describe('Absolute path of the theme root'),
|
|
29
|
+
linked: z.boolean().describe('Whether the theme was found in node_modules directly under the talk-dir'),
|
|
30
|
+
}).describe('Theme the talk-dir references (success only)'),
|
|
31
|
+
declaration: z.strictObject({
|
|
32
|
+
schema: z.number(),
|
|
33
|
+
slide: sizeOutput,
|
|
34
|
+
fonts: declarationFontsOutput,
|
|
35
|
+
fontSizes: z.strictObject({
|
|
36
|
+
heading: z.number(),
|
|
37
|
+
headingSm: z.number(),
|
|
38
|
+
body: z.number(),
|
|
39
|
+
bodySm: z.number(),
|
|
40
|
+
label: z.number(),
|
|
41
|
+
}),
|
|
42
|
+
pptx: z.strictObject({ eastAsianFont: z.string().optional(), linkColor: z.string().optional() }),
|
|
43
|
+
lint: z.strictObject({ rules: rulesOutput }),
|
|
44
|
+
layouts: z.strictObject({ references: z.string() }),
|
|
45
|
+
drawio: z.strictObject({ panels: panelsOutput, markerLayouts: markerLayoutsOutput }),
|
|
46
|
+
}).describe('Theme declaration with omitted items filled with defaults (success only)'),
|
|
47
|
+
...withPresence(LAYOUT_CATALOG_OUTPUT_SHAPE, 'success only'),
|
|
48
|
+
lint: z.strictObject({
|
|
49
|
+
referencesDirectories: z.array(z.string()).describe('Directories searched for reference yaml, in priority order'),
|
|
50
|
+
panels: panelsOutput,
|
|
51
|
+
markerLayouts: markerLayoutsOutput.describe('Layout names that have marker cells'),
|
|
52
|
+
rules: rulesOutput,
|
|
53
|
+
}).describe('Input passed to the deck lint (success only)'),
|
|
54
|
+
};
|
|
55
|
+
const slideThemeOutput = toolOutputFields(slideThemeShape, PATH_REJECTION_OUTPUT_SHAPE);
|
|
16
56
|
/**
|
|
17
57
|
`pecotv slide theme` 相当。
|
|
18
58
|
`theme`(名前・指定・宣言の有無・root)、`declaration`、`layouts`、`categories`、`lint`、`warnings` を返す。
|
|
@@ -26,7 +66,7 @@ export function slideThemeTool(buildDependencies = slideThemeDefaultDependencies
|
|
|
26
66
|
+ 'The declaration covers fonts, font sizes, PPTX fonts and link colors, and lint rules. '
|
|
27
67
|
+ 'Skills use it to obtain theme values.',
|
|
28
68
|
inputSchema: slideThemeInput,
|
|
29
|
-
outputSchema:
|
|
69
|
+
outputSchema: slideThemeOutput,
|
|
30
70
|
// 読み取りのみで何も書き換えず、ネットワークにも到達しない。
|
|
31
71
|
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
32
72
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { SlideCreateDependencies } from '../../commands/slidev-project/create.js';
|
|
2
3
|
import type { SlideLintDependencies } from '../../commands/slidev-project/lint.js';
|
|
3
4
|
import type { SlideSyncDependencies } from '../../commands/slidev-project/sync.js';
|
|
@@ -5,6 +6,23 @@ import type { SlideConvertDependencies } from '../../commands/slidev-to-pptx/con
|
|
|
5
6
|
import type { ToolDefinition } from '../server.js';
|
|
6
7
|
import { type RuntimeDependencies } from './_shared.js';
|
|
7
8
|
/**
|
|
9
|
+
見せ方の分類とレイアウトの一覧。slide_create・slide_sync・slide_page・slide_theme が返す。
|
|
10
|
+
*/
|
|
11
|
+
export declare const LAYOUT_CATALOG_OUTPUT_SHAPE: {
|
|
12
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
label: z.ZodString;
|
|
15
|
+
question: z.ZodString;
|
|
16
|
+
}, z.core.$strict>>;
|
|
17
|
+
layouts: z.ZodArray<z.ZodObject<{
|
|
18
|
+
layout: z.ZodString;
|
|
19
|
+
description: z.ZodString;
|
|
20
|
+
category: z.ZodString;
|
|
21
|
+
deprecated: z.ZodBoolean;
|
|
22
|
+
filename: z.ZodString;
|
|
23
|
+
}, z.core.$strict>>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
8
26
|
`pecotv slide create` 相当。`theme` で指定したテーマを参照する Slidev プロジェクトを生成し、
|
|
9
27
|
生成直後のデッキ全体 lint 結果を data に載せて返す (lint 違反は成否に影響しない)。
|
|
10
28
|
*/
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// MCP ツール定義のうち slide 系 4 件 (slide_create / slide_convert / slide_sync / slide_lint)。
|
|
2
|
-
//
|
|
3
|
-
// 各ハンドラは CLI コマンドの execute<Cmd>() を呼び、結果を ToolResult に写すだけにする。
|
|
4
2
|
// deps はハンドラ内で組み立てる (既定 deps は CLAUDE_PLUGIN_ROOT 未設定で throw し、top-level だと tools/list ごと落ちる)。
|
|
5
3
|
import path from 'node:path';
|
|
6
4
|
import { z } from 'zod';
|
|
@@ -10,7 +8,7 @@ import { errorToReason as slideSyncErrorToReason, executeSlideSync, slideSyncDef
|
|
|
10
8
|
import { convertErrorDiagnostics, errorToReason as slideConvertErrorToReason, executeSlideConvert, resolveDefaultOut, slideConvertDefaultDependencies, } from '../../commands/slidev-to-pptx/convert.js';
|
|
11
9
|
import { failureKindOf } from '../../domain/_shared/failure-kind.js';
|
|
12
10
|
import { parsePathArguments, toCallToolResult } from '../result.js';
|
|
13
|
-
import { captureCommandOutput, chromiumDefaultDependencies, ensureChromium, ensureRuntimeDependencies, formatError, normalizeThemeArgument, runtimeDefaultDependencies,
|
|
11
|
+
import { captureCommandOutput, chromiumDefaultDependencies, ensureChromium, ensureRuntimeDependencies, formatError, MISSING_RUNTIME_OUTPUT_SHAPE, normalizeThemeArgument, optionalFields, PATH_REJECTION_OUTPUT_SHAPE, runtimeDefaultDependencies, toolOutputFields, WINDOWS_PATH_NOTE, withPresence, } from './_shared.js';
|
|
14
12
|
/**
|
|
15
13
|
失敗時の ToolResult。data は対応する CLI コマンドの `--json` error payload と同形にする。
|
|
16
14
|
*/
|
|
@@ -22,6 +20,122 @@ function failureResult(event, reason, error, extra = {}) {
|
|
|
22
20
|
data: { event, ...extra },
|
|
23
21
|
};
|
|
24
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
見せ方の分類とレイアウトの一覧。slide_create・slide_sync・slide_page・slide_theme が返す。
|
|
25
|
+
*/
|
|
26
|
+
export const LAYOUT_CATALOG_OUTPUT_SHAPE = {
|
|
27
|
+
categories: z.array(z.strictObject({
|
|
28
|
+
id: z.string().describe('Category ID that layouts[].category refers to'),
|
|
29
|
+
label: z.string().describe('Display name of the category'),
|
|
30
|
+
question: z.string().describe('Question that tells when to choose the category'),
|
|
31
|
+
})).describe('Presentation categories declared by the theme'),
|
|
32
|
+
layouts: z.array(z.strictObject({
|
|
33
|
+
layout: z.string().describe('Layout name'),
|
|
34
|
+
description: z.string().describe('What the layout is for'),
|
|
35
|
+
category: z.string().describe('Category ID (uncategorized when unset or unknown)'),
|
|
36
|
+
deprecated: z.boolean().describe('Whether the layout is deprecated (not to be chosen)'),
|
|
37
|
+
filename: z.string().describe('File name of the reference yaml'),
|
|
38
|
+
})).describe('Selectable layouts (hidden layouts are excluded)'),
|
|
39
|
+
};
|
|
40
|
+
const slideLintViolationsOutput = z.array(z.strictObject({
|
|
41
|
+
file: z.string().describe('Path relative to the talk-dir (absolute when outside it)'),
|
|
42
|
+
line: z.number(),
|
|
43
|
+
column: z.number(),
|
|
44
|
+
rule: z.string().describe('Rule ID'),
|
|
45
|
+
message: z.string(),
|
|
46
|
+
}));
|
|
47
|
+
/**
|
|
48
|
+
lint の集計。slide_lint では成功のとき必ず入り、slide_create・slide_sync の lint では実行できたときだけ入る。
|
|
49
|
+
*/
|
|
50
|
+
const slideLintSummaryShape = {
|
|
51
|
+
outcome: z.enum(['clean', 'violations', 'no-target']).describe('clean (no violations), violations (some found), no-target (no file to lint)'),
|
|
52
|
+
lintedFileCount: z.number().describe('Number of files linted'),
|
|
53
|
+
errorCount: z.number().describe('Number of errors'),
|
|
54
|
+
warningCount: z.number().describe('Number of warnings'),
|
|
55
|
+
violations: slideLintViolationsOutput.describe('Violations found'),
|
|
56
|
+
skippedSymlinkDirectories: z.array(z.string()).describe('Symlinked directories under pages/ that were not linted (relative to the talk-dir)'),
|
|
57
|
+
};
|
|
58
|
+
const deckLintOutput = z.strictObject({
|
|
59
|
+
skipped: z.boolean().describe('Whether the lint could not run (the generation or sync still succeeds)'),
|
|
60
|
+
detail: z.string().optional().describe('Why the lint could not run (only when skipped)'),
|
|
61
|
+
...optionalFields(slideLintSummaryShape),
|
|
62
|
+
}).describe('Lint result of the whole deck (success only)');
|
|
63
|
+
const slideCreateShape = {
|
|
64
|
+
event: z.string().describe('slide.create.done on success; slide.create.error or runtime-dependencies.unavailable on failure (omitted when a path argument is rejected)'),
|
|
65
|
+
projectDir: z.string().describe('Absolute path of the generated talk-dir (success only)'),
|
|
66
|
+
theme: z.strictObject({
|
|
67
|
+
name: z.string().describe('Package name of the theme'),
|
|
68
|
+
spec: z.string().describe('Theme specification written to the dependencies of package.json'),
|
|
69
|
+
}).describe('Theme the talk-dir references (success only)'),
|
|
70
|
+
...withPresence(LAYOUT_CATALOG_OUTPUT_SHAPE, 'success only'),
|
|
71
|
+
lint: deckLintOutput,
|
|
72
|
+
};
|
|
73
|
+
const slideCreateOutput = toolOutputFields(slideCreateShape, MISSING_RUNTIME_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
74
|
+
const pipelineErrorsOutput = z.array(z.strictObject({
|
|
75
|
+
level: z.string().describe('slide or element'),
|
|
76
|
+
slideNumber: z.number().optional(),
|
|
77
|
+
selector: z.string().optional().describe('CSS selector of the element (element level only)'),
|
|
78
|
+
message: z.string(),
|
|
79
|
+
}));
|
|
80
|
+
const perSlideTimingOutput = z.strictObject({
|
|
81
|
+
key: z.string().describe('Step, as <slide> or <slide>/<click>'),
|
|
82
|
+
elapsedMs: z.number(),
|
|
83
|
+
cache: z.enum(['hit', 'miss']).optional(),
|
|
84
|
+
phases: z.record(z.string(), z.number()).optional().describe('Time per phase in milliseconds (converted steps only)'),
|
|
85
|
+
});
|
|
86
|
+
const slideConvertShape = {
|
|
87
|
+
event: z.string().describe('slide.convert.done on success; slide.convert.error, runtime-dependencies.unavailable or chromium.unavailable on failure '
|
|
88
|
+
+ '(omitted when a path argument is rejected)'),
|
|
89
|
+
input: z.string().describe('Absolute path of the converted Slidev project (success only)'),
|
|
90
|
+
output: z.string().describe('Absolute path of the written .pptx (success only)'),
|
|
91
|
+
durationMs: z.number().describe('Time the conversion took in milliseconds (success only)'),
|
|
92
|
+
errors: pipelineErrorsOutput.describe('Conversion errors per slide or element (empty when none). Element-level errors do not fail the call. '
|
|
93
|
+
+ 'Returned on success and on slide.convert.error'),
|
|
94
|
+
animationTimingRemovedSlides: z.number().describe('Number of slides whose p:timing from decorative CSS animations was removed (success only)'),
|
|
95
|
+
timings: z.strictObject({
|
|
96
|
+
scan: z.number(),
|
|
97
|
+
phase1: z.number(),
|
|
98
|
+
phase2: z.number(),
|
|
99
|
+
perSlide: z.array(perSlideTimingOutput),
|
|
100
|
+
outer: z.strictObject({
|
|
101
|
+
cleanBuild: z.number(),
|
|
102
|
+
slidevBuild: z.number(),
|
|
103
|
+
pipeline: z.number(),
|
|
104
|
+
mergeAndPostprocess: z.number(),
|
|
105
|
+
}),
|
|
106
|
+
singlePass: z.looseObject({}).optional().describe('Timing of the single-pass route (only when it was tried)'),
|
|
107
|
+
}).optional().describe('Time spent per stage in milliseconds (success only, when measured)'),
|
|
108
|
+
cache: z.strictObject({
|
|
109
|
+
enabled: z.boolean().describe('Whether the diff cache was used'),
|
|
110
|
+
hits: z.number(),
|
|
111
|
+
misses: z.number(),
|
|
112
|
+
invalidated: z.enum(['none', 'all:env', 'all:manifest', 'all:key', 'all:error', 'partial']).describe('How existing cache entries were invalidated'),
|
|
113
|
+
}).optional().describe('Diff cache result (success only, when the cache was handled)'),
|
|
114
|
+
};
|
|
115
|
+
const slideConvertOutput = toolOutputFields(slideConvertShape, MISSING_RUNTIME_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
116
|
+
const slideSyncShape = {
|
|
117
|
+
event: z.string().describe('slide.sync.done on success; slide.sync.error or runtime-dependencies.unavailable on failure (omitted when a path argument is rejected)'),
|
|
118
|
+
dir: z.string().describe('Absolute path of the synced talk-dir (success only)'),
|
|
119
|
+
nodeModulesTarget: z.string().describe('Where node_modules of the talk-dir links to (success only)'),
|
|
120
|
+
nodeModulesOnly: z.boolean().describe('Whether only node_modules was relinked (success only)'),
|
|
121
|
+
theme: z.strictObject({
|
|
122
|
+
name: z.string().describe('Package name of the theme'),
|
|
123
|
+
spec: z.string().describe('Theme specification in the dependencies of package.json'),
|
|
124
|
+
directory: z.string().describe('Absolute path of the theme root'),
|
|
125
|
+
}).nullable().describe('Theme the talk-dir references, or null when it references none (success only)'),
|
|
126
|
+
migration: z.strictObject({
|
|
127
|
+
removed: z.array(z.string()).describe('Names of the files from the template that were deleted'),
|
|
128
|
+
}).nullable().describe('Result of moving a pre-migration talk-dir onto the theme, or null when it was not moved (success only)'),
|
|
129
|
+
...withPresence(LAYOUT_CATALOG_OUTPUT_SHAPE, 'success only'),
|
|
130
|
+
lint: deckLintOutput,
|
|
131
|
+
};
|
|
132
|
+
const slideSyncOutput = toolOutputFields(slideSyncShape, MISSING_RUNTIME_OUTPUT_SHAPE, PATH_REJECTION_OUTPUT_SHAPE);
|
|
133
|
+
const slideLintShape = {
|
|
134
|
+
event: z.string().describe('slide.lint.done or slide.lint.violations on success, slide.lint.error on failure (omitted when a path argument is rejected)'),
|
|
135
|
+
dir: z.string().describe('Absolute path of the linted talk-dir (success only)'),
|
|
136
|
+
...withPresence(slideLintSummaryShape, 'success only'),
|
|
137
|
+
};
|
|
138
|
+
const slideLintOutput = toolOutputFields(slideLintShape, PATH_REJECTION_OUTPUT_SHAPE);
|
|
25
139
|
const slideCreateInput = z.object({
|
|
26
140
|
project_dir: z.string()
|
|
27
141
|
.describe('Absolute path of the destination directory. Specify a place where the calling agent has write permission for later edits'
|
|
@@ -48,7 +162,7 @@ export function slideCreateTool(buildDependencies = slideCreateDefaultDependenci
|
|
|
48
162
|
+ 'Returns the presentation categories (categories) and the list of selectable layouts (layouts). '
|
|
49
163
|
+ 'Also returns the lint result of the whole deck right after generation (generation counts as successful even with lint violations).',
|
|
50
164
|
inputSchema: slideCreateInput,
|
|
51
|
-
outputSchema:
|
|
165
|
+
outputSchema: slideCreateOutput,
|
|
52
166
|
// git でテーマを取得するため、ネットワークに到達しうる。openWorldHint は明示しない(SDK の既定)。
|
|
53
167
|
},
|
|
54
168
|
handler: async (arguments_) => {
|
|
@@ -123,7 +237,7 @@ export function slideConvertTool(buildDependencies = slideConvertDefaultDependen
|
|
|
123
237
|
title: 'Convert Slidev to PPTX',
|
|
124
238
|
description: 'Converts a Slidev project to PPTX. The duration is proportional to the number of slides (just under 30 seconds for 55 slides).',
|
|
125
239
|
inputSchema: slideConvertInput,
|
|
126
|
-
outputSchema:
|
|
240
|
+
outputSchema: slideConvertOutput,
|
|
127
241
|
},
|
|
128
242
|
handler: async (arguments_,
|
|
129
243
|
// ToolCallContext.signal (AbortSignal は EventTarget で addEventListener を呼ぶため readonly 化できない)。
|
|
@@ -214,7 +328,7 @@ export function slideSyncTool(buildDependencies = slideSyncDefaultDependencies,
|
|
|
214
328
|
+ 'Returns the presentation categories (categories), the list of selectable layouts (layouts), '
|
|
215
329
|
+ 'and the lint result of the whole deck after the sync. A running slide_dev must be stopped with stop: true and started again.',
|
|
216
330
|
inputSchema: slideSyncInput,
|
|
217
|
-
outputSchema:
|
|
331
|
+
outputSchema: slideSyncOutput,
|
|
218
332
|
// theme を渡したときと、node_modules_only・移行済みの talk-dir の通常の sync は、テーマを git で取得しうるため、ネットワークに到達しうる。
|
|
219
333
|
// openWorldHint は明示しない(SDK の既定)。
|
|
220
334
|
},
|
|
@@ -282,7 +396,7 @@ export function slideLintTool(buildDependencies = slideLintDefaultDependencies)
|
|
|
282
396
|
description: 'Lints the whole talk-dir (pages/**/*.md and slides.md) '
|
|
283
397
|
+ 'and returns the list of violations. The call itself succeeds even with violations; outcome is violations when any are found.',
|
|
284
398
|
inputSchema: slideLintInput,
|
|
285
|
-
outputSchema:
|
|
399
|
+
outputSchema: slideLintOutput,
|
|
286
400
|
// 読み取りのみで何も書き換えず、ネットワークにも到達しない。
|
|
287
401
|
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
288
402
|
},
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pecot/visual-mcp",
|
|
3
|
-
"version": "3.0.2
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pecot/visual-mcp",
|
|
9
|
-
"version": "3.0.2
|
|
9
|
+
"version": "3.0.2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cffnpwr/textlint-plugin-comments": "1.0.0",
|
|
@@ -2890,9 +2890,9 @@
|
|
|
2890
2890
|
}
|
|
2891
2891
|
},
|
|
2892
2892
|
"node_modules/kuromojin": {
|
|
2893
|
-
"version": "3.0.
|
|
2894
|
-
"resolved": "https://registry.npmjs.org/kuromojin/-/kuromojin-3.0.
|
|
2895
|
-
"integrity": "sha512-
|
|
2893
|
+
"version": "3.0.2",
|
|
2894
|
+
"resolved": "https://registry.npmjs.org/kuromojin/-/kuromojin-3.0.2.tgz",
|
|
2895
|
+
"integrity": "sha512-rLv5XGZZyiFyZ/4yNwHDxMGPIs0uSdT1d8tc8q5JVUPTMDQlO58ekj1OPpreHTOksRBNny9ODJ2FKt32HIWzbQ==",
|
|
2896
2896
|
"license": "MIT",
|
|
2897
2897
|
"dependencies": {
|
|
2898
2898
|
"@kvs/env": "^2.1.3",
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ff5b1448269ba4d9ac4fc49145b6fa05c1d569b7bb1897bf57748909ed0aebdd
|