@grafema/mcp 0.3.29 → 0.4.0

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.
Files changed (46) hide show
  1. package/dist/definitions/enox-tools.d.ts.map +1 -1
  2. package/dist/definitions/enox-tools.js +5 -10
  3. package/dist/definitions/enox-tools.js.map +1 -1
  4. package/dist/definitions/query-tools.d.ts.map +1 -1
  5. package/dist/definitions/query-tools.js +127 -0
  6. package/dist/definitions/query-tools.js.map +1 -1
  7. package/dist/handlers/coverage-handlers.d.ts.map +1 -1
  8. package/dist/handlers/coverage-handlers.js +9 -0
  9. package/dist/handlers/coverage-handlers.js.map +1 -1
  10. package/dist/handlers/documentation-handlers.d.ts.map +1 -1
  11. package/dist/handlers/documentation-handlers.js +26 -5
  12. package/dist/handlers/documentation-handlers.js.map +1 -1
  13. package/dist/handlers/enox-handlers.d.ts +11 -2
  14. package/dist/handlers/enox-handlers.d.ts.map +1 -1
  15. package/dist/handlers/enox-handlers.js +14 -6
  16. package/dist/handlers/enox-handlers.js.map +1 -1
  17. package/dist/handlers/index.d.ts +1 -1
  18. package/dist/handlers/index.d.ts.map +1 -1
  19. package/dist/handlers/index.js +1 -1
  20. package/dist/handlers/index.js.map +1 -1
  21. package/dist/handlers/query-handlers.d.ts +28 -1
  22. package/dist/handlers/query-handlers.d.ts.map +1 -1
  23. package/dist/handlers/query-handlers.js +156 -14
  24. package/dist/handlers/query-handlers.js.map +1 -1
  25. package/dist/server.js +10 -1
  26. package/dist/server.js.map +1 -1
  27. package/dist/types.d.ts +35 -0
  28. package/dist/types.d.ts.map +1 -1
  29. package/package.json +8 -8
  30. package/src/definitions/enox-tools.ts +5 -10
  31. package/src/definitions/query-tools.ts +127 -0
  32. package/src/handlers/coverage-handlers.ts +10 -0
  33. package/src/handlers/documentation-handlers.ts +26 -5
  34. package/src/handlers/enox-handlers.ts +18 -7
  35. package/src/handlers/index.ts +1 -1
  36. package/src/handlers/query-handlers.ts +181 -13
  37. package/src/server.ts +18 -0
  38. package/src/types.ts +29 -0
  39. package/dist/definitions.d.ts +0 -23
  40. package/dist/definitions.d.ts.map +0 -1
  41. package/dist/definitions.js +0 -644
  42. package/dist/definitions.js.map +0 -1
  43. package/dist/handlers.d.ts +0 -61
  44. package/dist/handlers.d.ts.map +0 -1
  45. package/dist/handlers.js +0 -1310
  46. package/dist/handlers.js.map +0 -1
@@ -1,644 +0,0 @@
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, PROPERTY_ACCESS, 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, PROPERTY_ACCESS)',
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, onboarding, 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
- {
420
- name: 'find_guards',
421
- description: `Find conditional guards protecting a node.
422
-
423
- Returns all SCOPE nodes that guard the given node, walking from inner to outer scope.
424
- Useful for answering "what conditions must be true for this code to execute?"
425
-
426
- Each guard includes:
427
- - scopeId: The SCOPE node ID
428
- - scopeType: Type of conditional (if_statement, else_statement, etc.)
429
- - condition: Raw condition text (e.g., "user !== null")
430
- - constraints: Parsed constraints (if available)
431
- - file/line: Location in source
432
-
433
- Example use cases:
434
- - "What conditions guard this API call?"
435
- - "Is this code protected by a null check?"
436
- - "What's the full guard chain for this function call?"`,
437
- inputSchema: {
438
- type: 'object',
439
- properties: {
440
- nodeId: {
441
- type: 'string',
442
- description: 'ID of the node to find guards for (e.g., CALL, VARIABLE)',
443
- },
444
- },
445
- required: ['nodeId'],
446
- },
447
- },
448
- {
449
- name: 'get_function_details',
450
- description: `Get comprehensive details about a function, including what it calls and who calls it.
451
-
452
- Graph structure:
453
- FUNCTION -[HAS_SCOPE]-> SCOPE -[CONTAINS]-> CALL/METHOD_CALL
454
- CALL -[CALLS]-> FUNCTION (target)
455
-
456
- Returns:
457
- - Function metadata (name, file, line, async)
458
- - calls: What functions/methods this function calls
459
- - calledBy: What functions call this one
460
-
461
- For calls array:
462
- - resolved=true means target function was found
463
- - resolved=false means unknown target (external/dynamic)
464
- - type='CALL' for function calls like foo()
465
- - type='METHOD_CALL' for method calls like obj.method()
466
- - depth field shows transitive level (0=direct, 1+=indirect)
467
-
468
- Use transitive=true to follow call chains (A calls B calls C).
469
- Max transitive depth is 5 to prevent explosion.`,
470
- inputSchema: {
471
- type: 'object',
472
- properties: {
473
- name: {
474
- type: 'string',
475
- description: 'Function name to look up',
476
- },
477
- file: {
478
- type: 'string',
479
- description: 'Optional: file path to disambiguate (partial match)',
480
- },
481
- transitive: {
482
- type: 'boolean',
483
- description: 'Follow call chains recursively (default: false)',
484
- },
485
- },
486
- required: ['name'],
487
- },
488
- },
489
- {
490
- name: 'get_context',
491
- description: `Get deep context for a graph node: source code + full graph neighborhood.
492
-
493
- Shows ALL incoming and outgoing edges grouped by type, with source code
494
- at each connected node's location. Works for ANY node type.
495
-
496
- Use this after find_nodes or query_graph to deep-dive into a specific node.
497
-
498
- Output includes:
499
- - Node info (type, name, semantic ID, location)
500
- - Source code at the node's location
501
- - All outgoing edges (what this node connects to)
502
- - All incoming edges (what connects to this node)
503
- - Code context at each connected node's location
504
-
505
- Primary edges (CALLS, ASSIGNED_FROM, DEPENDS_ON, etc.) include code context.
506
- Structural edges (CONTAINS, HAS_SCOPE, etc.) are shown in compact form.`,
507
- inputSchema: {
508
- type: 'object',
509
- properties: {
510
- semanticId: {
511
- type: 'string',
512
- description: 'Exact semantic ID of the node (from find_nodes or query_graph)',
513
- },
514
- contextLines: {
515
- type: 'number',
516
- description: 'Lines of code context around each reference (default: 3)',
517
- },
518
- edgeType: {
519
- type: 'string',
520
- description: 'Filter by edge type (comma-separated, e.g., "CALLS,ASSIGNED_FROM")',
521
- },
522
- },
523
- required: ['semanticId'],
524
- },
525
- },
526
- {
527
- name: 'get_file_overview',
528
- description: `Get a structured overview of all entities in a file with their relationships.
529
-
530
- Shows imports, exports, classes, functions, and variables with key edges
531
- (CALLS, EXTENDS, ASSIGNED_FROM). Use this for file-level understanding
532
- before diving into specific nodes with get_context.
533
-
534
- Output includes:
535
- - Imports: module sources and imported names
536
- - Exports: named and default exports
537
- - Classes: with methods and their call targets
538
- - Functions: with call targets
539
- - Variables: with assignment sources
540
-
541
- This is the recommended first step when exploring a file.
542
- After using this, use get_context with specific node IDs for details.`,
543
- inputSchema: {
544
- type: 'object',
545
- properties: {
546
- file: {
547
- type: 'string',
548
- description: 'File path (relative to project root or absolute)',
549
- },
550
- include_edges: {
551
- type: 'boolean',
552
- description: 'Include relationship edges like CALLS, EXTENDS (default: true). Set false for faster results.',
553
- },
554
- },
555
- required: ['file'],
556
- },
557
- },
558
- {
559
- name: 'read_project_structure',
560
- description: `Get the directory structure of the project.
561
- Returns a tree of files and directories, useful for understanding
562
- project layout during onboarding.
563
-
564
- Excludes: node_modules, .git, dist, build, .grafema, coverage, .next, .nuxt
565
-
566
- Use this tool when studying a new project to identify services,
567
- packages, and entry points.`,
568
- inputSchema: {
569
- type: 'object',
570
- properties: {
571
- path: {
572
- type: 'string',
573
- description: 'Subdirectory to scan (relative to project root). Default: project root.',
574
- },
575
- depth: {
576
- type: 'number',
577
- description: 'Maximum directory depth (default: 3, max: 5)',
578
- },
579
- include_files: {
580
- type: 'boolean',
581
- description: 'Include files in output, not just directories (default: true)',
582
- },
583
- },
584
- },
585
- },
586
- {
587
- name: 'write_config',
588
- description: `Write or update the Grafema configuration file (.grafema/config.yaml).
589
- Validates all inputs before writing. Creates .grafema/ directory if needed.
590
-
591
- Use this tool after studying the project to save the discovered configuration.
592
- Only include fields you want to override — defaults are used for omitted fields.`,
593
- inputSchema: {
594
- type: 'object',
595
- properties: {
596
- services: {
597
- type: 'array',
598
- items: {
599
- type: 'object',
600
- properties: {
601
- name: { type: 'string', description: 'Service name (e.g., "backend")' },
602
- path: { type: 'string', description: 'Path relative to project root (e.g., "apps/backend")' },
603
- entryPoint: { type: 'string', description: 'Entry point file relative to service path (e.g., "src/index.ts")' },
604
- },
605
- required: ['name', 'path'],
606
- },
607
- description: 'Service definitions (leave empty to use auto-discovery)',
608
- },
609
- plugins: {
610
- type: 'object',
611
- properties: {
612
- indexing: { type: 'array', items: { type: 'string' }, description: 'Indexing plugins' },
613
- analysis: { type: 'array', items: { type: 'string' }, description: 'Analysis plugins' },
614
- enrichment: { type: 'array', items: { type: 'string' }, description: 'Enrichment plugins' },
615
- validation: { type: 'array', items: { type: 'string' }, description: 'Validation plugins' },
616
- },
617
- description: 'Plugin configuration (omit to use defaults)',
618
- },
619
- include: {
620
- type: 'array',
621
- items: { type: 'string' },
622
- description: 'Glob patterns for files to include (e.g., ["src/**/*.ts"])',
623
- },
624
- exclude: {
625
- type: 'array',
626
- items: { type: 'string' },
627
- description: 'Glob patterns for files to exclude (e.g., ["**/*.test.ts"])',
628
- },
629
- workspace: {
630
- type: 'object',
631
- properties: {
632
- roots: {
633
- type: 'array',
634
- items: { type: 'string' },
635
- description: 'Root directories for multi-root workspace',
636
- },
637
- },
638
- description: 'Multi-root workspace config (only for workspaces)',
639
- },
640
- },
641
- },
642
- },
643
- ];
644
- //# sourceMappingURL=definitions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAqBtD,MAAM,CAAC,MAAM,KAAK,GAAqB;IACrC;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE;;;;;;;;;;;;;;;;;;4DAkB2C;QACxD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+DAA+D;iBAC7E;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mCAAmC,aAAa,UAAU,SAAS,GAAG;iBACpF;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kDAAkD;iBAChE;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0DAA0D;iBACxE;aACF;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IACD;QACE,IAAI,EAAE,YA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