@grafema/mcp 0.2.0-beta → 0.2.5-beta

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/src/types.ts CHANGED
@@ -45,6 +45,7 @@ export interface QueryGraphArgs {
45
45
  limit?: number;
46
46
  offset?: number;
47
47
  format?: 'table' | 'json' | 'tree';
48
+ explain?: boolean;
48
49
  }
49
50
 
50
51
  export interface FindCallsArgs {
@@ -52,6 +53,7 @@ export interface FindCallsArgs {
52
53
  limit?: number;
53
54
  offset?: number;
54
55
  include_indirect?: boolean;
56
+ className?: string;
55
57
  }
56
58
 
57
59
  export interface TraceAliasArgs {
@@ -190,7 +192,7 @@ export interface GraphBackend {
190
192
  export interface GraphNode {
191
193
  id: string;
192
194
  type: string;
193
- name: string;
195
+ name?: string; // Optional - some nodes (BRANCH, CASE, LOOP) don't have names
194
196
  file?: string;
195
197
  line?: number;
196
198
  [key: string]: unknown;
@@ -265,6 +267,27 @@ export interface GetFunctionDetailsArgs {
265
267
  // Re-export types from core for convenience
266
268
  export type { CallInfo, CallerInfo, FindCallsOptions } from '@grafema/core';
267
269
 
270
+ /**
271
+ * Datalog query result binding
272
+ */
273
+ export interface DatalogBinding {
274
+ name: string;
275
+ value: string;
276
+ }
277
+
278
+ /**
279
+ * Call result structure for filtering
280
+ */
281
+ export interface CallResult {
282
+ id: string;
283
+ name?: string;
284
+ object?: string;
285
+ file?: string;
286
+ line?: number;
287
+ resolved: boolean;
288
+ target: { type: string; name: string; file?: string; line?: number } | null;
289
+ }
290
+
268
291
  /**
269
292
  * Information about a conditional guard (SCOPE node)
270
293
  */
@@ -276,3 +299,32 @@ export interface GuardInfo {
276
299
  file: string;
277
300
  line: number;
278
301
  }
302
+
303
+ // === PROJECT STRUCTURE (REG-173) ===
304
+
305
+ export interface ReadProjectStructureArgs {
306
+ path?: string;
307
+ depth?: number;
308
+ include_files?: boolean;
309
+ }
310
+
311
+ // === WRITE CONFIG (REG-173) ===
312
+
313
+ export interface WriteConfigArgs {
314
+ services?: Array<{
315
+ name: string;
316
+ path: string;
317
+ entryPoint?: string;
318
+ }>;
319
+ plugins?: {
320
+ indexing?: string[];
321
+ analysis?: string[];
322
+ enrichment?: string[];
323
+ validation?: string[];
324
+ };
325
+ include?: string[];
326
+ exclude?: string[];
327
+ workspace?: {
328
+ roots?: string[];
329
+ };
330
+ }
package/src/utils.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { appendFileSync, existsSync, mkdirSync, readdirSync, unlinkSync, statSync } from 'fs';
6
- import { join, basename } from 'path';
6
+ import { join } from 'path';
7
7
  import type { PaginationParams, ToolResult } from './types.js';
8
8
 
9
9
  // === CONSTANTS ===
@@ -83,7 +83,7 @@ export function normalizeLimit(limit: number | undefined | null): number {
83
83
  }
84
84
 
85
85
  export function formatPaginationInfo(params: PaginationParams): string {
86
- const { limit, offset, returned, total, hasMore } = params;
86
+ const { limit: _limit, offset, returned, total, hasMore } = params;
87
87
  let info = `\nšŸ“„ Pagination: showing ${returned}`;
88
88
  if (total !== undefined) {
89
89
  info += ` of ${total}`;