@grafema/mcp 0.1.0-alpha.1

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/dist/config.js ADDED
@@ -0,0 +1,165 @@
1
+ /**
2
+ * MCP Server Configuration
3
+ */
4
+ import { join } from 'path';
5
+ import { existsSync, readFileSync, writeFileSync, readdirSync } from 'fs';
6
+ import { pathToFileURL } from 'url';
7
+ import { log } from './utils.js';
8
+ // === PLUGIN IMPORTS ===
9
+ import {
10
+ // Indexing
11
+ JSModuleIndexer, RustModuleIndexer,
12
+ // Analysis
13
+ JSASTAnalyzer, ExpressRouteAnalyzer, SocketIOAnalyzer, DatabaseAnalyzer, FetchAnalyzer, ServiceLayerAnalyzer, ReactAnalyzer, RustAnalyzer,
14
+ // Enrichment
15
+ MethodCallResolver, AliasTracker, ValueDomainAnalyzer, MountPointResolver, PrefixEvaluator, InstanceOfResolver, HTTPConnectionEnricher, RustFFIEnricher,
16
+ // Validation
17
+ CallResolverValidator, EvalBanValidator, SQLInjectionValidator, ShadowingDetector, GraphConnectivityValidator, DataFlowValidator, TypeScriptDeadCodeValidator, } from '@grafema/core';
18
+ export const DEFAULT_CONFIG = {
19
+ plugins: {
20
+ indexing: ['JSModuleIndexer'],
21
+ analysis: [
22
+ 'JSASTAnalyzer',
23
+ 'ExpressRouteAnalyzer',
24
+ 'SocketIOAnalyzer',
25
+ 'DatabaseAnalyzer',
26
+ 'FetchAnalyzer',
27
+ 'ServiceLayerAnalyzer',
28
+ ],
29
+ enrichment: [
30
+ 'MethodCallResolver',
31
+ 'AliasTracker',
32
+ 'ValueDomainAnalyzer',
33
+ 'MountPointResolver',
34
+ 'PrefixEvaluator',
35
+ 'HTTPConnectionEnricher',
36
+ ],
37
+ validation: [
38
+ 'CallResolverValidator',
39
+ 'EvalBanValidator',
40
+ 'SQLInjectionValidator',
41
+ 'ShadowingDetector',
42
+ 'GraphConnectivityValidator',
43
+ 'DataFlowValidator',
44
+ 'TypeScriptDeadCodeValidator',
45
+ ],
46
+ },
47
+ discovery: {
48
+ enabled: true,
49
+ customOnly: false,
50
+ },
51
+ };
52
+ export const BUILTIN_PLUGINS = {
53
+ // Indexing
54
+ JSModuleIndexer: () => new JSModuleIndexer(),
55
+ RustModuleIndexer: () => new RustModuleIndexer(),
56
+ // Analysis
57
+ JSASTAnalyzer: () => new JSASTAnalyzer(),
58
+ ExpressRouteAnalyzer: () => new ExpressRouteAnalyzer(),
59
+ SocketIOAnalyzer: () => new SocketIOAnalyzer(),
60
+ DatabaseAnalyzer: () => new DatabaseAnalyzer(),
61
+ FetchAnalyzer: () => new FetchAnalyzer(),
62
+ ServiceLayerAnalyzer: () => new ServiceLayerAnalyzer(),
63
+ ReactAnalyzer: () => new ReactAnalyzer(),
64
+ RustAnalyzer: () => new RustAnalyzer(),
65
+ // Enrichment
66
+ MethodCallResolver: () => new MethodCallResolver(),
67
+ AliasTracker: () => new AliasTracker(),
68
+ ValueDomainAnalyzer: () => new ValueDomainAnalyzer(),
69
+ MountPointResolver: () => new MountPointResolver(),
70
+ PrefixEvaluator: () => new PrefixEvaluator(),
71
+ InstanceOfResolver: () => new InstanceOfResolver(),
72
+ HTTPConnectionEnricher: () => new HTTPConnectionEnricher(),
73
+ RustFFIEnricher: () => new RustFFIEnricher(),
74
+ // Validation
75
+ CallResolverValidator: () => new CallResolverValidator(),
76
+ EvalBanValidator: () => new EvalBanValidator(),
77
+ SQLInjectionValidator: () => new SQLInjectionValidator(),
78
+ ShadowingDetector: () => new ShadowingDetector(),
79
+ GraphConnectivityValidator: () => new GraphConnectivityValidator(),
80
+ DataFlowValidator: () => new DataFlowValidator(),
81
+ TypeScriptDeadCodeValidator: () => new TypeScriptDeadCodeValidator(),
82
+ };
83
+ // === CONFIG LOADING ===
84
+ export function loadConfig(projectPath) {
85
+ const configPath = join(projectPath, '.grafema', 'config.json');
86
+ if (!existsSync(configPath)) {
87
+ try {
88
+ const grafemaDir = join(projectPath, '.grafema');
89
+ if (!existsSync(grafemaDir)) {
90
+ const { mkdirSync } = require('fs');
91
+ mkdirSync(grafemaDir, { recursive: true });
92
+ }
93
+ writeFileSync(configPath, JSON.stringify(DEFAULT_CONFIG, null, 2));
94
+ log(`[Grafema MCP] Created default config: ${configPath}`);
95
+ }
96
+ catch (err) {
97
+ log(`[Grafema MCP] Failed to create config: ${err.message}`);
98
+ }
99
+ return DEFAULT_CONFIG;
100
+ }
101
+ try {
102
+ const configContent = readFileSync(configPath, 'utf-8');
103
+ const config = JSON.parse(configContent);
104
+ log(`[Grafema MCP] Loaded config from ${configPath}`);
105
+ return { ...DEFAULT_CONFIG, ...config };
106
+ }
107
+ catch (err) {
108
+ log(`[Grafema MCP] Failed to load config: ${err.message}, using defaults`);
109
+ return DEFAULT_CONFIG;
110
+ }
111
+ }
112
+ export async function loadCustomPlugins(projectPath) {
113
+ const pluginsDir = join(projectPath, '.grafema', 'plugins');
114
+ if (!existsSync(pluginsDir)) {
115
+ return { plugins: [], pluginMap: {} };
116
+ }
117
+ const customPlugins = [];
118
+ const pluginMap = {};
119
+ try {
120
+ const files = readdirSync(pluginsDir).filter((f) => f.endsWith('.js') || f.endsWith('.mjs'));
121
+ for (const file of files) {
122
+ try {
123
+ const pluginPath = join(pluginsDir, file);
124
+ const pluginUrl = pathToFileURL(pluginPath).href;
125
+ const module = await import(pluginUrl);
126
+ const PluginClass = module.default || module[file.replace(/\.(m?js)$/, '')];
127
+ if (PluginClass && typeof PluginClass === 'function') {
128
+ const pluginName = PluginClass.name || file.replace(/\.(m?js)$/, '');
129
+ customPlugins.push(new PluginClass());
130
+ pluginMap[pluginName] = PluginClass;
131
+ log(`[Grafema MCP] Loaded custom plugin: ${pluginName} from ${file}`);
132
+ }
133
+ }
134
+ catch (err) {
135
+ log(`[Grafema MCP] Failed to load plugin ${file}: ${err.message}`);
136
+ }
137
+ }
138
+ }
139
+ catch (err) {
140
+ log(`[Grafema MCP] Error loading custom plugins: ${err.message}`);
141
+ }
142
+ return { plugins: customPlugins, pluginMap };
143
+ }
144
+ // === PLUGIN INSTANTIATION ===
145
+ export function createPlugins(pluginNames, customPluginMap = {}) {
146
+ const plugins = [];
147
+ const availablePlugins = {
148
+ ...BUILTIN_PLUGINS,
149
+ ...Object.fromEntries(Object.entries(customPluginMap).map(([name, PluginClass]) => [
150
+ name,
151
+ () => new PluginClass(),
152
+ ])),
153
+ };
154
+ for (const name of pluginNames) {
155
+ const factory = availablePlugins[name];
156
+ if (factory) {
157
+ plugins.push(factory());
158
+ log(`[Grafema MCP] Enabled plugin: ${name}`);
159
+ }
160
+ else {
161
+ log(`[Grafema MCP] Warning: Unknown plugin ${name}`);
162
+ }
163
+ }
164
+ return plugins;
165
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ */
4
+ interface SchemaProperty {
5
+ type: string;
6
+ description: string;
7
+ enum?: string[];
8
+ items?: {
9
+ type: string;
10
+ };
11
+ }
12
+ export interface ToolDefinition {
13
+ name: string;
14
+ description: string;
15
+ inputSchema: {
16
+ type: 'object';
17
+ properties: Record<string, SchemaProperty>;
18
+ required?: string[];
19
+ };
20
+ }
21
+ export declare const TOOLS: ToolDefinition[];
22
+ export {};
23
+ //# sourceMappingURL=definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAC3C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,KAAK,EAAE,cAAc,EA8ZjC,CAAC"}
@@ -0,0 +1,419 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ */
4
+ import { DEFAULT_LIMIT, MAX_LIMIT } from './utils.js';
5
+ export const TOOLS = [
6
+ {
7
+ name: 'query_graph',
8
+ description: `Execute a Datalog query on the code graph.
9
+
10
+ Available predicates:
11
+ - node(Id, Type) - match nodes by type
12
+ - edge(Src, Dst, Type) - match edges
13
+ - attr(Id, Name, Value) - match node attributes (name, file, line, etc.)
14
+
15
+ NODE TYPES:
16
+ - MODULE, FUNCTION, METHOD, CLASS, VARIABLE, PARAMETER
17
+ - CALL, METHOD_CALL, CALL_SITE
18
+ - http:route, http:request, db:query, socketio:emit, socketio:on
19
+
20
+ EDGE TYPES:
21
+ - CONTAINS, CALLS, DEPENDS_ON, ASSIGNED_FROM, INSTANCE_OF, PASSES_ARGUMENT
22
+
23
+ EXAMPLES:
24
+ violation(X) :- node(X, "MODULE").
25
+ violation(X) :- node(X, "FUNCTION"), attr(X, "file", "src/api.js").
26
+ violation(X) :- node(X, "CALL"), \\+ edge(X, _, "CALLS").`,
27
+ inputSchema: {
28
+ type: 'object',
29
+ properties: {
30
+ query: {
31
+ type: 'string',
32
+ description: 'Datalog query. Must define violation/1 predicate for results.',
33
+ },
34
+ limit: {
35
+ type: 'number',
36
+ description: `Max results to return (default: ${DEFAULT_LIMIT}, max: ${MAX_LIMIT})`,
37
+ },
38
+ offset: {
39
+ type: 'number',
40
+ description: 'Skip first N results for pagination (default: 0)',
41
+ },
42
+ explain: {
43
+ type: 'boolean',
44
+ description: 'Show step-by-step query execution to debug empty results',
45
+ },
46
+ },
47
+ required: ['query'],
48
+ },
49
+ },
50
+ {
51
+ name: 'find_calls',
52
+ description: `Find all calls to a specific function or method.
53
+ Returns call sites with file locations and whether they're resolved.`,
54
+ inputSchema: {
55
+ type: 'object',
56
+ properties: {
57
+ name: {
58
+ type: 'string',
59
+ description: 'Function or method name to find calls for',
60
+ },
61
+ className: {
62
+ type: 'string',
63
+ description: 'Optional: class name for method calls',
64
+ },
65
+ limit: {
66
+ type: 'number',
67
+ description: `Max results (default: ${DEFAULT_LIMIT}, max: ${MAX_LIMIT})`,
68
+ },
69
+ offset: {
70
+ type: 'number',
71
+ description: 'Skip first N results (default: 0)',
72
+ },
73
+ },
74
+ required: ['name'],
75
+ },
76
+ },
77
+ {
78
+ name: 'find_nodes',
79
+ description: `Find nodes in the graph by type, name, or file.`,
80
+ inputSchema: {
81
+ type: 'object',
82
+ properties: {
83
+ type: {
84
+ type: 'string',
85
+ description: 'Node type (e.g., FUNCTION, CLASS, MODULE)',
86
+ },
87
+ name: {
88
+ type: 'string',
89
+ description: 'Node name pattern',
90
+ },
91
+ file: {
92
+ type: 'string',
93
+ description: 'File path pattern',
94
+ },
95
+ limit: {
96
+ type: 'number',
97
+ description: `Max results (default: ${DEFAULT_LIMIT}, max: ${MAX_LIMIT})`,
98
+ },
99
+ offset: {
100
+ type: 'number',
101
+ description: 'Skip first N results (default: 0)',
102
+ },
103
+ },
104
+ },
105
+ },
106
+ {
107
+ name: 'trace_alias',
108
+ description: `Trace an alias chain to find the original source.
109
+ For code like: const alias = obj.method; alias();
110
+ This traces "alias" back to "obj.method".`,
111
+ inputSchema: {
112
+ type: 'object',
113
+ properties: {
114
+ variableName: {
115
+ type: 'string',
116
+ description: 'Variable name to trace',
117
+ },
118
+ file: {
119
+ type: 'string',
120
+ description: 'File path where the variable is defined',
121
+ },
122
+ },
123
+ required: ['variableName', 'file'],
124
+ },
125
+ },
126
+ {
127
+ name: 'trace_dataflow',
128
+ description: `Trace data flow from/to a variable or expression.`,
129
+ inputSchema: {
130
+ type: 'object',
131
+ properties: {
132
+ source: {
133
+ type: 'string',
134
+ description: 'Variable or node ID to trace from',
135
+ },
136
+ file: {
137
+ type: 'string',
138
+ description: 'File path',
139
+ },
140
+ direction: {
141
+ type: 'string',
142
+ description: 'forward, backward, or both (default: forward)',
143
+ enum: ['forward', 'backward', 'both'],
144
+ },
145
+ max_depth: {
146
+ type: 'number',
147
+ description: 'Maximum trace depth (default: 10)',
148
+ },
149
+ limit: {
150
+ type: 'number',
151
+ description: `Max results (default: ${DEFAULT_LIMIT})`,
152
+ },
153
+ },
154
+ required: ['source'],
155
+ },
156
+ },
157
+ {
158
+ name: 'check_invariant',
159
+ description: `Check a code invariant using a Datalog rule.
160
+ Returns violations if the invariant is broken.`,
161
+ inputSchema: {
162
+ type: 'object',
163
+ properties: {
164
+ rule: {
165
+ type: 'string',
166
+ description: 'Datalog rule defining violation/1',
167
+ },
168
+ description: {
169
+ type: 'string',
170
+ description: 'Human-readable description',
171
+ },
172
+ limit: {
173
+ type: 'number',
174
+ description: `Max violations (default: ${DEFAULT_LIMIT})`,
175
+ },
176
+ offset: {
177
+ type: 'number',
178
+ description: 'Skip first N violations (default: 0)',
179
+ },
180
+ },
181
+ required: ['rule'],
182
+ },
183
+ },
184
+ {
185
+ name: 'discover_services',
186
+ description: `Discover services in the project without full analysis.`,
187
+ inputSchema: {
188
+ type: 'object',
189
+ properties: {},
190
+ },
191
+ },
192
+ {
193
+ name: 'analyze_project',
194
+ description: `Run full analysis on the project or a specific service.`,
195
+ inputSchema: {
196
+ type: 'object',
197
+ properties: {
198
+ service: {
199
+ type: 'string',
200
+ description: 'Optional: analyze only this service',
201
+ },
202
+ force: {
203
+ type: 'boolean',
204
+ description: 'Force re-analysis even if already analyzed',
205
+ },
206
+ index_only: {
207
+ type: 'boolean',
208
+ description: 'Only index modules, skip full analysis',
209
+ },
210
+ },
211
+ },
212
+ },
213
+ {
214
+ name: 'get_analysis_status',
215
+ description: `Get the current analysis status and progress.`,
216
+ inputSchema: {
217
+ type: 'object',
218
+ properties: {},
219
+ },
220
+ },
221
+ {
222
+ name: 'get_stats',
223
+ description: `Get graph statistics: node and edge counts by type.`,
224
+ inputSchema: {
225
+ type: 'object',
226
+ properties: {},
227
+ },
228
+ },
229
+ {
230
+ name: 'get_schema',
231
+ description: `Get the graph schema: available node and edge types.`,
232
+ inputSchema: {
233
+ type: 'object',
234
+ properties: {
235
+ type: {
236
+ type: 'string',
237
+ description: 'nodes, edges, or all (default: all)',
238
+ enum: ['nodes', 'edges', 'all'],
239
+ },
240
+ },
241
+ },
242
+ },
243
+ // Guarantee tools
244
+ {
245
+ name: 'create_guarantee',
246
+ description: `Create a new code guarantee.
247
+
248
+ Two types supported:
249
+ 1. Datalog-based: Uses rule field with Datalog query (violation/1)
250
+ 2. Contract-based: Uses type + schema for JSON validation
251
+
252
+ Examples:
253
+ - Datalog: name="no-eval" rule="violation(X) :- node(X, \"CALL\"), attr(X, \"name\", \"eval\")."
254
+ - Contract: name="orders" type="guarantee:queue" priority="critical" schema={...}`,
255
+ inputSchema: {
256
+ type: 'object',
257
+ properties: {
258
+ name: {
259
+ type: 'string',
260
+ description: 'Unique name for the guarantee',
261
+ },
262
+ // Datalog-based fields
263
+ rule: {
264
+ type: 'string',
265
+ description: 'Datalog rule defining violation/1 (for Datalog-based guarantees)',
266
+ },
267
+ severity: {
268
+ type: 'string',
269
+ description: 'Severity for Datalog guarantees: error, warning, or info',
270
+ enum: ['error', 'warning', 'info'],
271
+ },
272
+ // Contract-based fields
273
+ type: {
274
+ type: 'string',
275
+ description: 'Guarantee type for contract-based: guarantee:queue, guarantee:api, guarantee:permission',
276
+ enum: ['guarantee:queue', 'guarantee:api', 'guarantee:permission'],
277
+ },
278
+ priority: {
279
+ type: 'string',
280
+ description: 'Priority level: critical, important, observed, tracked',
281
+ enum: ['critical', 'important', 'observed', 'tracked'],
282
+ },
283
+ status: {
284
+ type: 'string',
285
+ description: 'Lifecycle status: discovered, reviewed, active, changing, deprecated',
286
+ enum: ['discovered', 'reviewed', 'active', 'changing', 'deprecated'],
287
+ },
288
+ owner: {
289
+ type: 'string',
290
+ description: 'Owner of the guarantee (team or person)',
291
+ },
292
+ schema: {
293
+ type: 'object',
294
+ description: 'JSON Schema for contract-based validation',
295
+ },
296
+ condition: {
297
+ type: 'string',
298
+ description: 'Condition expression for the guarantee',
299
+ },
300
+ description: {
301
+ type: 'string',
302
+ description: 'Human-readable description',
303
+ },
304
+ governs: {
305
+ type: 'array',
306
+ items: { type: 'string' },
307
+ description: 'Node IDs that this guarantee governs',
308
+ },
309
+ },
310
+ required: ['name'],
311
+ },
312
+ },
313
+ {
314
+ name: 'list_guarantees',
315
+ description: `List all defined guarantees.`,
316
+ inputSchema: {
317
+ type: 'object',
318
+ properties: {},
319
+ },
320
+ },
321
+ {
322
+ name: 'check_guarantees',
323
+ description: `Check all guarantees or specific ones.`,
324
+ inputSchema: {
325
+ type: 'object',
326
+ properties: {
327
+ names: {
328
+ type: 'array',
329
+ items: { type: 'string' },
330
+ description: 'List of guarantee names to check (omit to check all)',
331
+ },
332
+ },
333
+ },
334
+ },
335
+ {
336
+ name: 'delete_guarantee',
337
+ description: `Delete a guarantee by name.`,
338
+ inputSchema: {
339
+ type: 'object',
340
+ properties: {
341
+ name: {
342
+ type: 'string',
343
+ description: 'Name of guarantee to delete',
344
+ },
345
+ },
346
+ required: ['name'],
347
+ },
348
+ },
349
+ {
350
+ name: 'get_coverage',
351
+ description: `Get analysis coverage for a path.`,
352
+ inputSchema: {
353
+ type: 'object',
354
+ properties: {
355
+ path: {
356
+ type: 'string',
357
+ description: 'Path to check coverage for',
358
+ },
359
+ depth: {
360
+ type: 'number',
361
+ description: 'Directory depth to report (default: 2)',
362
+ },
363
+ },
364
+ },
365
+ },
366
+ {
367
+ name: 'get_documentation',
368
+ description: `Get documentation about Grafema usage.`,
369
+ inputSchema: {
370
+ type: 'object',
371
+ properties: {
372
+ topic: {
373
+ type: 'string',
374
+ description: 'Topic: queries, types, guarantees, or overview',
375
+ },
376
+ },
377
+ },
378
+ },
379
+ {
380
+ name: 'report_issue',
381
+ description: `Report a bug or issue with Grafema to GitHub.
382
+
383
+ Use this tool when you encounter:
384
+ - Unexpected errors or crashes
385
+ - Incorrect analysis results
386
+ - Missing features that should exist
387
+ - Documentation issues
388
+
389
+ The tool will create a GitHub issue automatically if GITHUB_TOKEN is configured.
390
+ If not configured, it will return a pre-formatted issue template that the user
391
+ can manually submit at https://github.com/Disentinel/grafema/issues/new
392
+
393
+ IMPORTANT: Always ask the user for permission before reporting an issue.
394
+ Include relevant context: error messages, file paths, query used, etc.`,
395
+ inputSchema: {
396
+ type: 'object',
397
+ properties: {
398
+ title: {
399
+ type: 'string',
400
+ description: 'Brief issue title (e.g., "Query returns empty results for FUNCTION nodes")',
401
+ },
402
+ description: {
403
+ type: 'string',
404
+ description: 'Detailed description of the issue',
405
+ },
406
+ context: {
407
+ type: 'string',
408
+ description: 'Relevant context: error messages, queries, file paths, etc.',
409
+ },
410
+ labels: {
411
+ type: 'array',
412
+ items: { type: 'string' },
413
+ description: 'Labels: bug, enhancement, documentation, question',
414
+ },
415
+ },
416
+ required: ['title', 'description'],
417
+ },
418
+ },
419
+ ];
@@ -0,0 +1,34 @@
1
+ /**
2
+ * MCP Tool Handlers
3
+ */
4
+ import type { ToolResult, QueryGraphArgs, FindCallsArgs, FindNodesArgs, TraceAliasArgs, TraceDataFlowArgs, CheckInvariantArgs, AnalyzeProjectArgs, GetSchemaArgs, CreateGuaranteeArgs, CheckGuaranteesArgs, DeleteGuaranteeArgs, GetCoverageArgs, GetDocumentationArgs } from './types.js';
5
+ export declare function handleQueryGraph(args: QueryGraphArgs): Promise<ToolResult>;
6
+ export declare function handleFindCalls(args: FindCallsArgs): Promise<ToolResult>;
7
+ export declare function handleFindNodes(args: FindNodesArgs): Promise<ToolResult>;
8
+ export declare function handleTraceAlias(args: TraceAliasArgs): Promise<ToolResult>;
9
+ export declare function handleTraceDataFlow(args: TraceDataFlowArgs): Promise<ToolResult>;
10
+ export declare function handleCheckInvariant(args: CheckInvariantArgs): Promise<ToolResult>;
11
+ export declare function handleAnalyzeProject(args: AnalyzeProjectArgs): Promise<ToolResult>;
12
+ export declare function handleGetAnalysisStatus(): Promise<ToolResult>;
13
+ export declare function handleGetStats(): Promise<ToolResult>;
14
+ export declare function handleGetSchema(args: GetSchemaArgs): Promise<ToolResult>;
15
+ /**
16
+ * Create a new guarantee (Datalog-based or contract-based)
17
+ */
18
+ export declare function handleCreateGuarantee(args: CreateGuaranteeArgs): Promise<ToolResult>;
19
+ /**
20
+ * List all guarantees (both Datalog-based and contract-based)
21
+ */
22
+ export declare function handleListGuarantees(): Promise<ToolResult>;
23
+ /**
24
+ * Check guarantees (both Datalog-based and contract-based)
25
+ */
26
+ export declare function handleCheckGuarantees(args: CheckGuaranteesArgs): Promise<ToolResult>;
27
+ /**
28
+ * Delete a guarantee
29
+ */
30
+ export declare function handleDeleteGuarantee(args: DeleteGuaranteeArgs): Promise<ToolResult>;
31
+ export declare function handleGetCoverage(args: GetCoverageArgs): Promise<ToolResult>;
32
+ export declare function handleGetDocumentation(args: GetDocumentationArgs): Promise<ToolResult>;
33
+ export declare function handleReportIssue(args: import('./types.js').ReportIssueArgs): Promise<ToolResult>;
34
+ //# sourceMappingURL=handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AAKpB,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CA8EhF;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CA2E9E;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAiD9E;AAID,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CA2DhF;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CA+DtF;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CA4CxF;AAID,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoBxF;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,UAAU,CAAC,CAYnE;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAe1D;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAwB9E;AAID;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CA6D1F;AAED;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,UAAU,CAAC,CAyChE;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwG1F;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CA8B1F;AAID,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,CAalF;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwE5F;AAID,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,OAAO,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,CAiEvG"}