@aroman22/codegraph-vba 1.7.3 → 1.9.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.
- package/dist/mcp/tools.d.ts +20 -1
- package/package.json +7 -7
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
import type CodeGraph from '../index';
|
|
7
7
|
import type { QueryPool } from './query-pool';
|
|
8
8
|
import type { PendingFile } from '../sync';
|
|
9
|
+
import { spawnSync } from 'child_process';
|
|
10
|
+
/** Narrow subprocess seam for testing CLI-only MCP wrappers. */
|
|
11
|
+
export declare const cliProcess: {
|
|
12
|
+
spawnSync: typeof spawnSync;
|
|
13
|
+
};
|
|
9
14
|
/**
|
|
10
15
|
* An expected, recoverable "codegraph can't serve this" condition — most
|
|
11
16
|
* importantly a project with no index. The dispatch catch converts these to
|
|
@@ -167,6 +172,9 @@ export interface ToolAnnotations {
|
|
|
167
172
|
interface PropertySchema {
|
|
168
173
|
type: string;
|
|
169
174
|
description: string;
|
|
175
|
+
items?: {
|
|
176
|
+
type: string;
|
|
177
|
+
};
|
|
170
178
|
enum?: string[];
|
|
171
179
|
default?: unknown;
|
|
172
180
|
}
|
|
@@ -252,7 +260,8 @@ export declare class ToolHandler {
|
|
|
252
260
|
/**
|
|
253
261
|
* Optional allowlist of exposed tools, parsed from the CODEGRAPH_MCP_TOOLS
|
|
254
262
|
* env var (comma-separated short names, e.g. "trace,search,node,context").
|
|
255
|
-
* Unset/empty →
|
|
263
|
+
* Unset/empty → legacy direct calls to read-only tools are allowed, while
|
|
264
|
+
* mutating lifecycle tools remain opt-in. Lets an operator (or an A/B harness)
|
|
256
265
|
* trim the tool surface without rebuilding the client config; the ablated
|
|
257
266
|
* tool is then truly absent from ListTools rather than merely denied on call.
|
|
258
267
|
* Matching is on the short form, so "node" and "codegraph_node" both work.
|
|
@@ -344,6 +353,14 @@ export declare class ToolHandler {
|
|
|
344
353
|
* Execute a tool by name
|
|
345
354
|
*/
|
|
346
355
|
execute(toolName: string, args: Record<string, unknown>): Promise<ToolResult>;
|
|
356
|
+
/** Run the CLI sync command and preserve its complete process output. */
|
|
357
|
+
private handleSync;
|
|
358
|
+
/** Run the CLI-only affected command and preserve its complete process output. */
|
|
359
|
+
private handleAffected;
|
|
360
|
+
/** Resolve symlinks/junctions and enforce mutation-root boundaries. */
|
|
361
|
+
private validateMutationTarget;
|
|
362
|
+
/** Execute a mutating CodeGraph CLI command after enforcing its path allowlist. */
|
|
363
|
+
private executeMutatingTool;
|
|
347
364
|
/**
|
|
348
365
|
* Run a single read tool to completion and return its raw {@link ToolResult},
|
|
349
366
|
* classifying expected failures the same way {@link execute}'s catch does so
|
|
@@ -365,6 +382,8 @@ export declare class ToolHandler {
|
|
|
365
382
|
* NotIndexed/PathRefusal, which {@link executeReadTool} classifies.
|
|
366
383
|
*/
|
|
367
384
|
private dispatchTool;
|
|
385
|
+
/** Run the CLI-only query command and preserve its JSON stdout verbatim. */
|
|
386
|
+
private handleQuery;
|
|
368
387
|
/**
|
|
369
388
|
* Handle codegraph_search
|
|
370
389
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aroman22/codegraph-vba",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Local-first code intelligence for AI agents (MCP). Self-contained — bundles its own runtime.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codegraph-vba": "npm-shim.js"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@aroman22/codegraph-vba-darwin-arm64": "1.
|
|
19
|
-
"@aroman22/codegraph-vba-darwin-x64": "1.
|
|
20
|
-
"@aroman22/codegraph-vba-linux-arm64": "1.
|
|
21
|
-
"@aroman22/codegraph-vba-linux-x64": "1.
|
|
22
|
-
"@aroman22/codegraph-vba-win32-arm64": "1.
|
|
23
|
-
"@aroman22/codegraph-vba-win32-x64": "1.
|
|
18
|
+
"@aroman22/codegraph-vba-darwin-arm64": "1.9.0",
|
|
19
|
+
"@aroman22/codegraph-vba-darwin-x64": "1.9.0",
|
|
20
|
+
"@aroman22/codegraph-vba-linux-arm64": "1.9.0",
|
|
21
|
+
"@aroman22/codegraph-vba-linux-x64": "1.9.0",
|
|
22
|
+
"@aroman22/codegraph-vba-win32-arm64": "1.9.0",
|
|
23
|
+
"@aroman22/codegraph-vba-win32-x64": "1.9.0"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"npm-shim.js",
|