@cognium/mcp-server 0.4.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -4,6 +4,81 @@ All notable changes to `@cognium/mcp-server` are documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.5.0] - 2026-10-02
8
+
9
+ Tested against `circle-ir` **4.10.0** (range `4.10`) and MCP SDK v2
10
+ (`@modelcontextprotocol/server` **^2.2.0**), with the optional module
11
+ `circle-ir-ai` **4.19.0**. Two tools are added. No tool was removed or
12
+ renamed, and what every existing tool accepts and returns is unchanged.
13
+
14
+ **`circle-ir` moves to a new minor, so an optional module must move with it.**
15
+ A module built against `4.9` is refused at load on `4.10` by design, which
16
+ would leave states 1 and 2 with none of their tools. Release order therefore
17
+ matters: `circle-ir` 4.10.0, then `circle-ir-ai` on 4.10, then this package.
18
+
19
+ ### Added
20
+ - **`find_callers` and `find_callees`** — who calls a method, and what a
21
+ method calls, over `circle-ir`'s navigation index. Java today; the tools
22
+ report `unsupported-language` for a file in a language the index does not
23
+ resolve rather than guessing.
24
+
25
+ Every answer carries a **tier**: `exact` (the receiver's static type was
26
+ known and the target was unique in it), `polymorphic` (dispatch is open,
27
+ with every candidate body listed and the declaring member as the target),
28
+ or `inferred` (bound by the method name alone). `inferred` is a floor and is
29
+ never promoted; it is also never produced when a receiver's type *is* known
30
+ and lacks the method, which on a 405-file Java repository was 78 of 147
31
+ name-only "callers" of a single method.
32
+
33
+ Every call site that could not be resolved carries a **reason** from a
34
+ closed vocabulary — `external`, `dynamic`, `generated`, `parse-error`,
35
+ `unsupported-language`, `unknown` — so an unresolved count can be read
36
+ rather than guessed at. Every answer states its **denominator**: files
37
+ searched, languages, and the directories deliberately skipped. A list cut to
38
+ `limit` reports `truncated` with the real total.
39
+
40
+ Both tools accept either a `symbol` or a `site`. A site is
41
+ `{file, line, method_name}` and not a column, because a chained expression
42
+ reports several calls at one line and column — `b.of().step("a").done()` is
43
+ three calls at one position — so the method name is what completes the key.
44
+
45
+ Both are `readOnlyHint: true`, `openWorldHint: false`, and every successful
46
+ response says `provenance: deterministic`. No model is consulted.
47
+
48
+ When no answer is `exact`, the response carries a `nextStep` line saying
49
+ what to do instead — inspect the candidates, check a receiver, or reach for
50
+ a language server. It sits in the server's envelope, not inside the answer,
51
+ because it is advice rather than a fact about the code.
52
+
53
+ ### Measured
54
+
55
+ The navigation tools were evaluated against compiler-backed ground truth: a
56
+ sample of call sites in WebGoat, each site's callee resolved by the Eclipse
57
+ JDT compiler, with a pinned `ripgrep` answering the same queries as a
58
+ baseline. Java only. Every figure below carries its denominator.
59
+
60
+ - **`exact` precision: 100 %** — of the 143 `exact` answers that landed on a
61
+ site the compiler had resolved, 143 named the compiler's callee and none
62
+ contradicted it.
63
+ - **`inferred` precision: 26.7 %** of 15, where the baseline's name match was
64
+ right 60.6 % of 711. **An `inferred` answer is not evidence that a call
65
+ happens**; it is a name that matched with no receiver type to confirm it.
66
+ It is a lead to check, and the tool will not promote it.
67
+ - **Recall over sites whose target is declared in the repository: 79.6 %**
68
+ (148 of 186), against the baseline's 93.5 % (174 of 186).
69
+ - **Recall over all sampled sites: 34.0 %** (159 of 467), against the
70
+ baseline's 92.3 % (431 of 467) — and capped at **39.8 %** for any tool
71
+ answering from an index, because only 186 of the 467 sampled sites have a
72
+ target declared inside the repository. That row's two columns answer
73
+ different questions and should not be read as one comparison.
74
+
75
+ ### Changed
76
+ - The server's own cache keeps a navigation index per project, separately
77
+ from the scan analyses. It asks the engine for more (the extra type
78
+ information that makes a Java `record` visible) and for less (no cross-file
79
+ taint phase, which navigation does not read), so a caller asking "who calls
80
+ this" does not pay for taint analysis it will not use.
81
+
7
82
  ## [0.4.0] - 2026-10-02
8
83
 
9
84
  Tested against `circle-ir` **4.9.29** (range `4.9`) and MCP SDK v2
package/README.md CHANGED
@@ -76,6 +76,8 @@ The same stdio config is bundled in the [Cognium SAST plugin](../../plugins/cogn
76
76
  | `describe_sink` | CWE, remediation, CVSS-like severity, and sanitizer list for a sink category. |
77
77
  | `describe_source` | Every framework API pattern circle-ir treats as a source of a given category. |
78
78
  | `find_similar` | Given a finding id, return other findings sharing the same `rule_id` and/or `sink_type`. |
79
+ | `find_callers` | Who calls a method, with a resolution tier on every answer and a reason on every site it could not resolve. Java. |
80
+ | `find_callees` | What a method calls, with the same tiers and reasons. Java. |
79
81
  | `refresh` | Manually invalidate the cache for one project or every project. |
80
82
 
81
83
  ## Resources
@@ -95,6 +97,74 @@ The same stdio config is bundled in the [Cognium SAST plugin](../../plugins/cogn
95
97
  3. Iterate over the highest-severity findings with `explain_finding` for CWE context.
96
98
  4. `find_similar` to catch the same pattern elsewhere.
97
99
  5. Before proposing a fix, `check_sanitizer` any proposed wrapper against the target sink type.
100
+ 6. Before changing a method, `find_callers` on it to see what depends on it.
101
+
102
+ ## Reading a navigation answer
103
+
104
+ `find_callers` and `find_callees` report a **tier** on every answer and a
105
+ **reason** on every call site they could not resolve, because a caller list is
106
+ only useful if you know whether it is complete.
107
+
108
+ | Tier | What it means |
109
+ | ---- | ------------- |
110
+ | `exact` | The receiver's static type was known and the target was unique in it. Act on these. |
111
+ | `polymorphic` | Dispatch is open. `candidates` lists every implementation that could run, and `target` is the declaring member. |
112
+ | `inferred` | Bound by the method name alone, with no receiver type to confirm it. **A lead to check, never a caller.** |
113
+
114
+ `inferred` is a floor and is never promoted. It is also never produced when a
115
+ receiver's type *is* known and lacks the method: on a 405-file Java
116
+ repository, 78 of 147 name-only "callers" of one method had a receiver whose
117
+ own declared type could not have had it, so that case is now no answer plus a
118
+ reason rather than a weak answer.
119
+
120
+ Every non-answer carries one of `external` (the target is outside the searched
121
+ tree — the JDK, a framework), `dynamic` (reflection), `generated` (the member
122
+ only exists after annotation processing, such as a Lombok accessor),
123
+ `parse-error`, `unsupported-language`, or `unknown` (in the tree, and the call
124
+ graph could not bind it). A large `external` count usually means the name is a
125
+ common one, not that the answer is poor.
126
+
127
+ `scope` states what was searched and what was skipped, so a count can be read
128
+ against its denominator, and `truncated` appears whenever a list was cut.
129
+
130
+ ### What the tiers measure
131
+
132
+ The navigation tools resolve **Java**. A file in another language is reported
133
+ as `unsupported-language` and is not counted in `scope.searched`, so an answer
134
+ never implies a language was searched when it was not.
135
+
136
+ These numbers come from an independent evaluation against compiler-backed
137
+ ground truth — a sample of call sites in [WebGoat](https://github.com/WebGoat/WebGoat),
138
+ each site's callee resolved by the Eclipse JDT compiler, with a pinned
139
+ [ripgrep](https://github.com/BurntSushi/ripgrep) answering the same queries as
140
+ a baseline. Every figure carries its denominator, and the baseline is on the
141
+ same line so the comparison is visible rather than asserted.
142
+
143
+ | | this server | ripgrep baseline |
144
+ | --- | --- | --- |
145
+ | `exact` precision | **100 %** of 143 answers that landed on a resolved site | — (it claims no `exact`) |
146
+ | `inferred` precision | 26.7 % of 15 | 60.6 % of 711 |
147
+ | recall, all sampled sites | 34.0 % (159 of 467) | 92.3 % (431 of 467) |
148
+ | recall, targets declared in the repository | 79.6 % (148 of 186) | 93.5 % (174 of 186) |
149
+
150
+ Two of those rows need reading together rather than separately. **Recall over
151
+ all sampled sites is capped at 39.8 % for any tool that answers from an
152
+ index**, because only 186 of the 467 sampled sites have a target declared
153
+ inside the repository at all; the rest are in the JDK or a library. A text
154
+ search answers about a name wherever it is declared, so the two columns of
155
+ that row are answering different questions. The row below it — targets
156
+ declared in the repository — is the one where both columns answer the same
157
+ question.
158
+
159
+ **An `inferred` answer is not evidence that a call happens.** It is a method
160
+ name that matched with no receiver type to confirm it, and on this sample it
161
+ was right 26.7 % of the time. Treat it as a lead to check by opening the site,
162
+ never as a caller. That is why it is a separate tier rather than a weaker
163
+ `exact`: the label is the warning, and the tool will not promote it.
164
+
165
+ What `exact` is worth is the other half of the same point: of the 143 `exact`
166
+ answers that landed on a site the compiler had resolved, **143 named the
167
+ compiler's callee and none contradicted it.**
98
168
 
99
169
  ## Using it as a library
100
170
 
package/dist/cache.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * mtimes and re-run `analyzeProject` only if any file changed. LRU
7
7
  * eviction keeps memory bounded when the LLM hops between projects.
8
8
  */
9
- import { type ProjectAnalysis } from 'circle-ir';
9
+ import { type NavigationIndex, type ProjectAnalysis } from 'circle-ir';
10
10
  /**
11
11
  * Per-project analysis options that participate in the cache key. Two
12
12
  * scans with different profiles / disabled passes must not share a cache
@@ -22,6 +22,7 @@ export interface ProjectScanOptions {
22
22
  }
23
23
  export declare class ProjectCache {
24
24
  private entries;
25
+ private navEntries;
25
26
  private readonly capacity;
26
27
  constructor(capacity?: number);
27
28
  private cacheKey;
@@ -36,6 +37,34 @@ export declare class ProjectCache {
36
37
  analysisMs: number;
37
38
  fileCount: number;
38
39
  }>;
40
+ /**
41
+ * Return a cached navigation index if fresh, else build one.
42
+ *
43
+ * Kept apart from `getOrCompute` on purpose, in both directions:
44
+ *
45
+ * - **It asks the engine for more.** The index needs `navigationTypes`,
46
+ * which makes a Java `record` visible and keeps a nested type's nesting.
47
+ * Sharing an entry with the scan tools would hand them type information
48
+ * they do not expect, so the two never share one.
49
+ * - **It asks the engine to do less.** Navigation needs per-file IR and
50
+ * nothing else, so this runs `analyze` per file rather than
51
+ * `analyzeProject`, skipping the cross-file taint phase entirely. On a
52
+ * large repository that phase is the expensive part, and a caller
53
+ * asking "who calls this method" should not pay for taint analysis it
54
+ * will not read.
55
+ *
56
+ * `parseMs` is the measured wall time of that loop, which is parsing **and**
57
+ * IR extraction — the two are one call and the server cannot separate them.
58
+ * It is handed to the index so `timing.parseMs` carries a real reading
59
+ * rather than a zero, and it over-reports pure parse time rather than
60
+ * guessing at it.
61
+ */
62
+ getOrComputeNavigation(projectRoot: string, opts?: ProjectScanOptions): Promise<{
63
+ index: NavigationIndex;
64
+ cacheHit: boolean;
65
+ parseMs: number;
66
+ fileCount: number;
67
+ }>;
39
68
  /** Invalidate one specific project (all option-keys) or one specific key. */
40
69
  invalidate(projectRoot: string, opts?: ProjectScanOptions): number;
41
70
  /** Invalidate every cached project. */
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAIjE;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAmBD,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAElC,YAAY,QAAQ,SAAI,EAEvB;IAED,OAAO,CAAC,QAAQ;IAIhB;;;;OAIG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC;QAAE,QAAQ,EAAE,eAAe,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CA2ClG;IAED,6EAA6E;IAC7E,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAcjE;IAED,uCAAuC;IACvC,KAAK,IAAI,MAAM,CAId;IAED,IAAI,IAAI,MAAM,CAEb;IAED,OAAO,CAAC,QAAQ;CAOjB"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,WAAW,CAAC;AAInB;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA6BD,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,UAAU,CAAsC;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAElC,YAAY,QAAQ,SAAI,EAEvB;IAED,OAAO,CAAC,QAAQ;IAIhB;;;;OAIG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC;QAAE,QAAQ,EAAE,eAAe,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CA2ClG;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,sBAAsB,CAC1B,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC;QACT,KAAK,EAAE,eAAe,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAwDD;IAED,6EAA6E;IAC7E,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAoBjE;IAED,uCAAuC;IACvC,KAAK,IAAI,MAAM,CAKd;IAED,IAAI,IAAI,MAAM,CAEb;IAED,OAAO,CAAC,QAAQ;CAejB"}
package/dist/cache.js CHANGED
@@ -6,9 +6,9 @@
6
6
  * mtimes and re-run `analyzeProject` only if any file changed. LRU
7
7
  * eviction keeps memory bounded when the LLM hops between projects.
8
8
  */
9
- import { resolve } from 'path';
10
- import { analyzeProject } from 'circle-ir';
11
- import { collectFiles, indexMtimes, mtimesEqual } from './util/files.js';
9
+ import { relative, resolve } from 'path';
10
+ import { analyze, analyzeProject, buildNavigationIndex, } from 'circle-ir';
11
+ import { collectFiles, indexMtimes, mtimesEqual, SKIPPED_DIRECTORIES } from './util/files.js';
12
12
  import { ensureAnalyzer } from './util/wasm.js';
13
13
  function optionsKey(opts) {
14
14
  const parts = [
@@ -20,6 +20,7 @@ function optionsKey(opts) {
20
20
  }
21
21
  export class ProjectCache {
22
22
  entries = new Map();
23
+ navEntries = new Map();
23
24
  capacity;
24
25
  constructor(capacity = 3) {
25
26
  this.capacity = capacity;
@@ -68,6 +69,80 @@ export class ProjectCache {
68
69
  this.evictLRU();
69
70
  return { analysis, cacheHit: false, analysisMs, fileCount: files.length };
70
71
  }
72
+ /**
73
+ * Return a cached navigation index if fresh, else build one.
74
+ *
75
+ * Kept apart from `getOrCompute` on purpose, in both directions:
76
+ *
77
+ * - **It asks the engine for more.** The index needs `navigationTypes`,
78
+ * which makes a Java `record` visible and keeps a nested type's nesting.
79
+ * Sharing an entry with the scan tools would hand them type information
80
+ * they do not expect, so the two never share one.
81
+ * - **It asks the engine to do less.** Navigation needs per-file IR and
82
+ * nothing else, so this runs `analyze` per file rather than
83
+ * `analyzeProject`, skipping the cross-file taint phase entirely. On a
84
+ * large repository that phase is the expensive part, and a caller
85
+ * asking "who calls this method" should not pay for taint analysis it
86
+ * will not read.
87
+ *
88
+ * `parseMs` is the measured wall time of that loop, which is parsing **and**
89
+ * IR extraction — the two are one call and the server cannot separate them.
90
+ * It is handed to the index so `timing.parseMs` carries a real reading
91
+ * rather than a zero, and it over-reports pure parse time rather than
92
+ * guessing at it.
93
+ */
94
+ async getOrComputeNavigation(projectRoot, opts = {}) {
95
+ await ensureAnalyzer();
96
+ const absRoot = resolve(projectRoot);
97
+ const key = `${absRoot}::nav::${optionsKey(opts)}`;
98
+ const langOpt = opts.language;
99
+ const collectOpts = langOpt ? { language: langOpt } : {};
100
+ const currentMtimes = indexMtimes(absRoot, collectOpts);
101
+ const existing = this.navEntries.get(key);
102
+ if (existing && mtimesEqual(existing.mtimes, currentMtimes)) {
103
+ this.navEntries.delete(key);
104
+ this.navEntries.set(key, existing);
105
+ return {
106
+ index: existing.index,
107
+ cacheHit: true,
108
+ parseMs: existing.parseMs,
109
+ fileCount: existing.fileCount,
110
+ };
111
+ }
112
+ const files = collectFiles(absRoot, collectOpts);
113
+ const t0 = Date.now();
114
+ const navFiles = [];
115
+ for (const f of files) {
116
+ navFiles.push({
117
+ // Paths are reported relative to the project root, so an answer does
118
+ // not leak the absolute layout of the machine it was produced on and
119
+ // two runs from different checkouts of the same commit agree.
120
+ path: relative(absRoot, f.filePath) || f.filePath,
121
+ language: f.language,
122
+ source: f.code,
123
+ ir: await analyze(f.code, f.filePath, f.language, { navigationTypes: true }),
124
+ });
125
+ }
126
+ const parseMs = Date.now() - t0;
127
+ const index = buildNavigationIndex(navFiles, {
128
+ parseMs,
129
+ cache: true,
130
+ excluded: SKIPPED_DIRECTORIES.map((d) => ({
131
+ pattern: `**/${d}/**`,
132
+ reason: 'not project source',
133
+ })),
134
+ });
135
+ this.navEntries.set(key, {
136
+ key,
137
+ index,
138
+ mtimes: currentMtimes,
139
+ computedAt: Date.now(),
140
+ parseMs,
141
+ fileCount: files.length,
142
+ });
143
+ this.evictLRU();
144
+ return { index, cacheHit: false, parseMs, fileCount: files.length };
145
+ }
71
146
  /** Invalidate one specific project (all option-keys) or one specific key. */
72
147
  invalidate(projectRoot, opts) {
73
148
  const abs = resolve(projectRoot);
@@ -83,16 +158,23 @@ export class ProjectCache {
83
158
  removed++;
84
159
  }
85
160
  }
161
+ for (const key of [...this.navEntries.keys()]) {
162
+ if (key.startsWith(abs + '::')) {
163
+ this.navEntries.delete(key);
164
+ removed++;
165
+ }
166
+ }
86
167
  return removed;
87
168
  }
88
169
  /** Invalidate every cached project. */
89
170
  clear() {
90
- const n = this.entries.size;
171
+ const n = this.entries.size + this.navEntries.size;
91
172
  this.entries.clear();
173
+ this.navEntries.clear();
92
174
  return n;
93
175
  }
94
176
  size() {
95
- return this.entries.size;
177
+ return this.entries.size + this.navEntries.size;
96
178
  }
97
179
  evictLRU() {
98
180
  while (this.entries.size > this.capacity) {
@@ -101,6 +183,15 @@ export class ProjectCache {
101
183
  break;
102
184
  this.entries.delete(oldestKey);
103
185
  }
186
+ // Navigation indexes are evicted on their own budget: a project can hold
187
+ // one of each, and evicting a scan entry must not drop a navigation index
188
+ // the caller is still querying.
189
+ while (this.navEntries.size > this.capacity) {
190
+ const oldestKey = this.navEntries.keys().next().value;
191
+ if (oldestKey === undefined)
192
+ break;
193
+ this.navEntries.delete(oldestKey);
194
+ }
104
195
  }
105
196
  }
106
197
  //# sourceMappingURL=cache.js.map
package/dist/cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAwB,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAwBhD,SAAS,UAAU,CAAC,IAAwB;IAC1C,MAAM,KAAK,GAAG;QACZ,QAAQ,IAAI,CAAC,QAAQ,IAAI,GAAG,EAAE;QAC9B,YAAY,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClE,UAAU,IAAI,CAAC,iBAAiB,IAAI,SAAS,EAAE;KAChD,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,OAA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E,SAAS,CAAA;CAAE,CAAC,CAQtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,IAAI,GAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,YAAY,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAAO,GACpG,cAAc,CAGhB"}
package/dist/server.js CHANGED
@@ -23,6 +23,7 @@ import { attackSurfaceSummaryConfig, makeAttackSurfaceSummaryHandler } from './t
23
23
  import { listReachableSinksConfig, makeListReachableSinksHandler } from './tools/list-reachable-sinks.js';
24
24
  import { findSimilarConfig, makeFindSimilarHandler } from './tools/find-similar.js';
25
25
  import { refreshConfig, makeRefreshHandler } from './tools/refresh.js';
26
+ import { findCallersConfig, makeFindCallersHandler, findCalleesConfig, makeFindCalleesHandler, } from './tools/navigation.js';
26
27
  const require_ = createRequire(import.meta.url);
27
28
  /**
28
29
  * Server name and version, from the manifest, in one place.
@@ -61,6 +62,8 @@ export function buildServer(opts = {}) {
61
62
  server.registerTool('attack_surface_summary', attackSurfaceSummaryConfig, makeAttackSurfaceSummaryHandler(ctx));
62
63
  server.registerTool('list_reachable_sinks', listReachableSinksConfig, makeListReachableSinksHandler(ctx));
63
64
  server.registerTool('find_similar', findSimilarConfig, makeFindSimilarHandler(ctx));
65
+ server.registerTool('find_callers', findCallersConfig, makeFindCallersHandler(ctx));
66
+ server.registerTool('find_callees', findCalleesConfig, makeFindCalleesHandler(ctx));
64
67
  server.registerTool('refresh', refreshConfig, makeRefreshHandler(ctx));
65
68
  registerResources(server);
66
69
  // A module that throws while registering is refused like any other bad
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAqD,MAAM,8BAA8B,CAAC;AAC9H,OAAO,EAAE,YAAY,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AC,KAAK,UAAU,YAAY,CAChC,IAAI,GAAuD,EAAE;IAE7D,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,GAAG,IAAI;QACP,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAI,GAA+F,EAAE;IAErG,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;IACnC,OAAO,gBAAgB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnF,CAAC"}
@@ -0,0 +1,177 @@
1
+ /**
2
+ * `find_callers` and `find_callees` — who calls a method, and what a method
3
+ * calls, with every answer saying how it was reached.
4
+ *
5
+ * These two differ from the other nine read-only tools in what they promise.
6
+ * A scan reports what it found; these report what they found **and what they
7
+ * could not reach**, because a caller list is only useful if you know whether
8
+ * it is complete. So every response carries three things the engine computes
9
+ * and this tool passes through untouched:
10
+ *
11
+ * - a **tier** per answer. `exact` means the receiver's static type was
12
+ * known and the target was unique in it. `polymorphic` means dispatch is
13
+ * open, with every candidate body listed. `inferred` means bound by name
14
+ * alone — a floor, never a promise, and never produced when a receiver
15
+ * type *is* known and disagrees.
16
+ * - a **reason** per non-answer, from a closed vocabulary, so "7,000 sites
17
+ * unresolved" can be read as "6,900 of them are in the JDK".
18
+ * - a **scope**: how many files were searched, in which languages, and what
19
+ * was deliberately left out. A count without its denominator is not an
20
+ * answer.
21
+ *
22
+ * The envelope this tool adds around that — `projectRoot`, `cacheHit`,
23
+ * `nextStep`, `provenance` — is the server's. The answer-shape fields inside
24
+ * are the engine's and are not rewritten here, because they are compared
25
+ * field for field against a compiler-backed oracle.
26
+ */
27
+ import { z } from 'zod';
28
+ import type { NavigationAnswer, Tier } from 'circle-ir';
29
+ import type { ToolContext, ToolResult } from './types.js';
30
+ /** Cap on `answers[]`. A truncated list always says so. */
31
+ export declare const MAX_NAVIGATION_ANSWERS = 200;
32
+ declare const LANGUAGES: readonly ['java', 'javascript', 'typescript', 'python', 'go', 'rust', 'bash', 'html'];
33
+ export declare const findCallersInputShape: {
34
+ readonly project_root: z.ZodString;
35
+ readonly symbol: z.ZodOptional<z.ZodString>;
36
+ readonly site: z.ZodOptional<z.ZodObject<{
37
+ file: z.ZodString;
38
+ line: z.ZodNumber;
39
+ method_name: z.ZodString;
40
+ }, z.core.$strip>>;
41
+ readonly language: z.ZodOptional<z.ZodEnum<{
42
+ bash: "bash";
43
+ go: "go";
44
+ html: "html";
45
+ java: "java";
46
+ javascript: "javascript";
47
+ python: "python";
48
+ rust: "rust";
49
+ typescript: "typescript";
50
+ }>>;
51
+ readonly limit: z.ZodOptional<z.ZodNumber>;
52
+ readonly tiers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
53
+ exact: "exact";
54
+ inferred: "inferred";
55
+ polymorphic: "polymorphic";
56
+ }>>>;
57
+ };
58
+ export declare const findCalleesInputShape: {
59
+ readonly project_root: z.ZodString;
60
+ readonly symbol: z.ZodOptional<z.ZodString>;
61
+ readonly site: z.ZodOptional<z.ZodObject<{
62
+ file: z.ZodString;
63
+ line: z.ZodNumber;
64
+ method_name: z.ZodString;
65
+ }, z.core.$strip>>;
66
+ readonly language: z.ZodOptional<z.ZodEnum<{
67
+ bash: "bash";
68
+ go: "go";
69
+ html: "html";
70
+ java: "java";
71
+ javascript: "javascript";
72
+ python: "python";
73
+ rust: "rust";
74
+ typescript: "typescript";
75
+ }>>;
76
+ readonly limit: z.ZodOptional<z.ZodNumber>;
77
+ readonly tiers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
78
+ exact: "exact";
79
+ inferred: "inferred";
80
+ polymorphic: "polymorphic";
81
+ }>>>;
82
+ };
83
+ export declare const findCallersConfig: {
84
+ readonly title: 'Find the callers of a symbol';
85
+ readonly description: string;
86
+ readonly inputSchema: {
87
+ readonly project_root: z.ZodString;
88
+ readonly symbol: z.ZodOptional<z.ZodString>;
89
+ readonly site: z.ZodOptional<z.ZodObject<{
90
+ file: z.ZodString;
91
+ line: z.ZodNumber;
92
+ method_name: z.ZodString;
93
+ }, z.core.$strip>>;
94
+ readonly language: z.ZodOptional<z.ZodEnum<{
95
+ bash: "bash";
96
+ go: "go";
97
+ html: "html";
98
+ java: "java";
99
+ javascript: "javascript";
100
+ python: "python";
101
+ rust: "rust";
102
+ typescript: "typescript";
103
+ }>>;
104
+ readonly limit: z.ZodOptional<z.ZodNumber>;
105
+ readonly tiers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
106
+ exact: "exact";
107
+ inferred: "inferred";
108
+ polymorphic: "polymorphic";
109
+ }>>>;
110
+ };
111
+ readonly annotations: {
112
+ readonly readOnlyHint: true;
113
+ readonly destructiveHint: false;
114
+ readonly idempotentHint: true;
115
+ readonly openWorldHint: false;
116
+ };
117
+ };
118
+ export declare const findCalleesConfig: {
119
+ readonly title: 'Find what a symbol calls';
120
+ readonly description: string;
121
+ readonly inputSchema: {
122
+ readonly project_root: z.ZodString;
123
+ readonly symbol: z.ZodOptional<z.ZodString>;
124
+ readonly site: z.ZodOptional<z.ZodObject<{
125
+ file: z.ZodString;
126
+ line: z.ZodNumber;
127
+ method_name: z.ZodString;
128
+ }, z.core.$strip>>;
129
+ readonly language: z.ZodOptional<z.ZodEnum<{
130
+ bash: "bash";
131
+ go: "go";
132
+ html: "html";
133
+ java: "java";
134
+ javascript: "javascript";
135
+ python: "python";
136
+ rust: "rust";
137
+ typescript: "typescript";
138
+ }>>;
139
+ readonly limit: z.ZodOptional<z.ZodNumber>;
140
+ readonly tiers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
141
+ exact: "exact";
142
+ inferred: "inferred";
143
+ polymorphic: "polymorphic";
144
+ }>>>;
145
+ };
146
+ readonly annotations: {
147
+ readonly readOnlyHint: true;
148
+ readonly destructiveHint: false;
149
+ readonly idempotentHint: true;
150
+ readonly openWorldHint: false;
151
+ };
152
+ };
153
+ interface NavigationArgs {
154
+ project_root: string;
155
+ symbol?: string;
156
+ site?: {
157
+ file: string;
158
+ line: number;
159
+ method_name: string;
160
+ };
161
+ language?: (typeof LANGUAGES)[number];
162
+ limit?: number;
163
+ tiers?: Tier[];
164
+ }
165
+ /**
166
+ * What to do when nothing is `exact`.
167
+ *
168
+ * The engine deliberately has no field for this: the answer shape is compared
169
+ * field for field against an oracle, and a hint is advice rather than a fact
170
+ * about the code. So it is computed here, from the answer the engine gave,
171
+ * and lives in the server's envelope.
172
+ */
173
+ export declare function nextStepFor(answer: NavigationAnswer, kind: 'callers' | 'callees'): string | undefined;
174
+ export declare const makeFindCallersHandler: (ctx: ToolContext) => (args: NavigationArgs) => Promise<ToolResult>;
175
+ export declare const makeFindCalleesHandler: (ctx: ToolContext) => (args: NavigationArgs) => Promise<ToolResult>;
176
+ export {};
177
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG1D,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAI1C,QAAA,MAAM,SAAS,YACb,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAClE,CAAC;AA+CX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAAc,CAAC;AACjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAAc,CAAC;AAEjD,eAAO,MAAM,iBAAiB;aAC5B,KAAK,EAAE,8BAA8B;aACrC,WAAW;aAiBX,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;aACX,WAAW;;;;;;CACH,CAAC;AAEX,eAAO,MAAM,iBAAiB;aAC5B,KAAK,EAAE,0BAA0B;aACjC,WAAW;aAUX,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;aACX,WAAW;;;;;;CACH,CAAC;AAEX,UAAU,cAAc;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA+CrG;AAqED,eAAO,MAAM,sBAAsB,QAxDpB,WAAW,YACT,cAAc,KAAG,OAAO,CAAC,UAAU,CAuDQ,CAAC;AAC7D,eAAO,MAAM,sBAAsB,QAzDpB,WAAW,YACT,cAAc,KAAG,OAAO,CAAC,UAAU,CAwDQ,CAAC"}
@@ -0,0 +1,216 @@
1
+ /**
2
+ * `find_callers` and `find_callees` — who calls a method, and what a method
3
+ * calls, with every answer saying how it was reached.
4
+ *
5
+ * These two differ from the other nine read-only tools in what they promise.
6
+ * A scan reports what it found; these report what they found **and what they
7
+ * could not reach**, because a caller list is only useful if you know whether
8
+ * it is complete. So every response carries three things the engine computes
9
+ * and this tool passes through untouched:
10
+ *
11
+ * - a **tier** per answer. `exact` means the receiver's static type was
12
+ * known and the target was unique in it. `polymorphic` means dispatch is
13
+ * open, with every candidate body listed. `inferred` means bound by name
14
+ * alone — a floor, never a promise, and never produced when a receiver
15
+ * type *is* known and disagrees.
16
+ * - a **reason** per non-answer, from a closed vocabulary, so "7,000 sites
17
+ * unresolved" can be read as "6,900 of them are in the JDK".
18
+ * - a **scope**: how many files were searched, in which languages, and what
19
+ * was deliberately left out. A count without its denominator is not an
20
+ * answer.
21
+ *
22
+ * The envelope this tool adds around that — `projectRoot`, `cacheHit`,
23
+ * `nextStep`, `provenance` — is the server's. The answer-shape fields inside
24
+ * are the engine's and are not rewritten here, because they are compared
25
+ * field for field against a compiler-backed oracle.
26
+ */
27
+ import { z } from 'zod';
28
+ import { resolve } from 'path';
29
+ import { textResult, errorResult, READ_ONLY_ANNOTATIONS } from './types.js';
30
+ /** Cap on `answers[]`. A truncated list always says so. */
31
+ export const MAX_NAVIGATION_ANSWERS = 200;
32
+ const TIERS = ['exact', 'polymorphic', 'inferred'];
33
+ const LANGUAGES = [
34
+ 'java', 'javascript', 'typescript', 'python', 'go', 'rust', 'bash', 'html',
35
+ ];
36
+ /**
37
+ * Either a symbol or a site, never both.
38
+ *
39
+ * The site form is keyed on `(file, line, method_name)` and not on a column,
40
+ * because a chained expression reports several calls at one line and column —
41
+ * `b.of().step("a").done()` is three calls at one position — so a
42
+ * `(file, line, col)` triple cannot address one of them. The method name is
43
+ * what completes the key.
44
+ */
45
+ const commonShape = {
46
+ project_root: z.string().describe('Absolute path to the project root.'),
47
+ symbol: z
48
+ .string()
49
+ .optional()
50
+ .describe('Fully-qualified name, e.g. `com.acme.users.User.equals`. A constructor is ' +
51
+ '`com.acme.users.User.<init>`. Give this or `site`, not both.'),
52
+ site: z
53
+ .object({
54
+ file: z.string().describe('Path relative to the project root.'),
55
+ line: z.number().int().positive().describe('1-indexed line.'),
56
+ method_name: z
57
+ .string()
58
+ .describe('The method name as written on that line. Required because one line and ' +
59
+ 'column can hold several calls in a chained expression.'),
60
+ })
61
+ .optional()
62
+ .describe('A call site, when you have a line of code rather than a name.'),
63
+ language: z.enum(LANGUAGES).optional().describe('Restrict the search to one language.'),
64
+ limit: z
65
+ .number()
66
+ .int()
67
+ .positive()
68
+ .max(1000)
69
+ .optional()
70
+ .describe(`Cap on returned answers (default ${MAX_NAVIGATION_ANSWERS}). Truncation is reported.`),
71
+ tiers: z
72
+ .array(z.enum(TIERS))
73
+ .optional()
74
+ .describe('Return only these tiers. Omit for all three. `["exact"]` for answers you can act on.'),
75
+ };
76
+ export const findCallersInputShape = commonShape;
77
+ export const findCalleesInputShape = commonShape;
78
+ export const findCallersConfig = {
79
+ title: 'Find the callers of a symbol',
80
+ description: 'Who calls this method, with a resolution tier on every answer and a reason on every site it ' +
81
+ 'could not resolve. Use it before changing or deleting a method, to see what depends on it, and ' +
82
+ 'to judge the blast radius of a rename.\n\n' +
83
+ 'Read the tiers before acting: `exact` means the receiver\'s static type was known and the target ' +
84
+ 'was unique in it — act on these. `polymorphic` means dispatch is open; `candidates` lists every ' +
85
+ 'implementation that could run, and all of them are reachable. `inferred` means bound by the ' +
86
+ 'method name alone with no receiver type to confirm it — treat it as a lead to check, never as a ' +
87
+ 'caller. An inferred hit is NOT evidence that the method is called from there.\n\n' +
88
+ '`unresolved` is the honest half of the answer: each entry is a site that calls something of this ' +
89
+ 'name which could not be bound, with a reason — `external` (the target is outside the searched ' +
90
+ 'tree, e.g. in the JDK or a framework), `dynamic` (reflection), `generated` (the member only ' +
91
+ 'exists after annotation processing, e.g. a Lombok accessor), `parse-error`, ' +
92
+ '`unsupported-language`, or `unknown` (in the tree, and we failed to bind it). ' +
93
+ 'A large `external` count usually means the name is a common one, not that the answer is poor.\n\n' +
94
+ '`scope` states what was searched and what was skipped, so a count can be read against its ' +
95
+ 'denominator. Deterministic: no model is consulted.',
96
+ inputSchema: findCallersInputShape,
97
+ annotations: READ_ONLY_ANNOTATIONS,
98
+ };
99
+ export const findCalleesConfig = {
100
+ title: 'Find what a symbol calls',
101
+ description: 'What this method calls, with a resolution tier on every answer and a reason on every call it ' +
102
+ 'could not resolve. Use it to understand a method before editing it, to trace what a change will ' +
103
+ 'touch, and to find the project-internal calls inside a body full of framework noise.\n\n' +
104
+ 'Tiers and `unresolved` mean exactly what they do for `find_callers` — `exact` is actionable, ' +
105
+ '`polymorphic` lists every candidate body, `inferred` is a lead and not a fact. In a typical ' +
106
+ 'method body most unresolved entries are `external`: calls into the standard library and ' +
107
+ 'frameworks, which are correctly not answered rather than missing.\n\n' +
108
+ 'A constructor appears as a target ending `.<init>`, while `methodName` is the name as written ' +
109
+ 'at the call site, so the two differ for a `new` expression. Deterministic: no model is consulted.',
110
+ inputSchema: findCalleesInputShape,
111
+ annotations: READ_ONLY_ANNOTATIONS,
112
+ };
113
+ /**
114
+ * What to do when nothing is `exact`.
115
+ *
116
+ * The engine deliberately has no field for this: the answer shape is compared
117
+ * field for field against an oracle, and a hint is advice rather than a fact
118
+ * about the code. So it is computed here, from the answer the engine gave,
119
+ * and lives in the server's envelope.
120
+ */
121
+ export function nextStepFor(answer, kind) {
122
+ const exact = answer.answers.filter((a) => a.tier === 'exact').length;
123
+ if (exact > 0)
124
+ return undefined;
125
+ const polymorphic = answer.answers.filter((a) => a.tier === 'polymorphic').length;
126
+ if (polymorphic > 0) {
127
+ return (`No answer is exact. ${polymorphic} ${plural(polymorphic, 'site', 'sites')} dispatch openly — ` +
128
+ 'read `candidates` on each and decide which implementations matter, rather than assuming one.');
129
+ }
130
+ const inferred = answer.answers.filter((a) => a.tier === 'inferred').length;
131
+ const reasons = tally(answer.unresolved.map((u) => u.reason));
132
+ const unknown = reasons.unknown ?? 0;
133
+ const external = reasons.external ?? 0;
134
+ if (inferred > 0) {
135
+ return (`No answer is exact: ${inferred} ${plural(inferred, 'hit is', 'hits are')} bound by method name ` +
136
+ 'alone. Open each site and check the receiver before relying on it, or narrow the query to the ' +
137
+ 'declaring type. A language server with full type information will do better here than this ' +
138
+ 'call graph can.');
139
+ }
140
+ if (unknown > 0) {
141
+ return (`Nothing resolved, and ${unknown} ${plural(unknown, 'site is', 'sites are')} in the searched tree ` +
142
+ 'but could not be bound — this call graph is insufficient for them. Try a language server, or ' +
143
+ 'grep for the name and read the receivers.');
144
+ }
145
+ if (external > 0 && answer.answers.length === 0) {
146
+ return (`Nothing resolved inside the searched tree: ${external} of the ` +
147
+ `${answer.unresolved.length} ${plural(answer.unresolved.length, 'site', 'sites')} target code ` +
148
+ 'outside it. If you expected a project target, check `scope` — the file may be in an excluded ' +
149
+ 'directory, or the symbol may be spelled differently.');
150
+ }
151
+ if (answer.answers.length === 0 && answer.unresolved.length === 0) {
152
+ return (`No ${kind} found at all. Check the symbol is fully qualified and spelled as the project ` +
153
+ 'declares it, and that `scope.searched.files` is the number of files you expected.');
154
+ }
155
+ return undefined;
156
+ }
157
+ function plural(n, one, many) {
158
+ return n === 1 ? one : many;
159
+ }
160
+ function tally(values) {
161
+ const out = {};
162
+ for (const v of values)
163
+ out[v] = (out[v] ?? 0) + 1;
164
+ return out;
165
+ }
166
+ function makeHandler(kind) {
167
+ return (ctx) => async (args) => {
168
+ if (!args.symbol && !args.site) {
169
+ return errorResult('give either `symbol` or `site`.');
170
+ }
171
+ if (args.symbol && args.site) {
172
+ return errorResult('give `symbol` or `site`, not both.');
173
+ }
174
+ const root = resolve(args.project_root);
175
+ const { index, cacheHit, fileCount } = await ctx.cache.getOrComputeNavigation(root, {
176
+ ...(args.language ? { language: args.language } : {}),
177
+ });
178
+ let symbol = args.symbol;
179
+ if (args.site) {
180
+ symbol = index.symbolAt(args.site.file, args.site.line, args.site.method_name, kind);
181
+ if (!symbol) {
182
+ return textResult({
183
+ projectRoot: root,
184
+ cacheHit,
185
+ query: { kind, site: args.site },
186
+ resolvedSymbol: null,
187
+ answers: [],
188
+ unresolved: [],
189
+ nextStep: `No call to \`${args.site.method_name}\` was found at ${args.site.file}:${args.site.line}, ` +
190
+ 'or the call could not be bound to a symbol to search for. Check the file path is relative ' +
191
+ `to the project root (${fileCount} files were indexed) and that the name is as written.`,
192
+ });
193
+ }
194
+ }
195
+ const opts = {
196
+ limit: args.limit ?? MAX_NAVIGATION_ANSWERS,
197
+ ...(args.tiers ? { tiers: args.tiers } : {}),
198
+ };
199
+ const answer = kind === 'callers'
200
+ ? index.resolveCallers({ symbol: symbol }, opts)
201
+ : index.resolveCallees({ symbol: symbol }, opts);
202
+ const nextStep = nextStepFor(answer, kind);
203
+ // The answer-shape fields are spread through unchanged. Only the
204
+ // envelope is this tool's.
205
+ return textResult({
206
+ projectRoot: root,
207
+ cacheHit,
208
+ ...(args.site ? { resolvedSymbol: symbol } : {}),
209
+ ...answer,
210
+ ...(nextStep ? { nextStep } : {}),
211
+ });
212
+ };
213
+ }
214
+ export const makeFindCallersHandler = makeHandler('callers');
215
+ export const makeFindCalleesHandler = makeHandler('callees');
216
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE5E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,CAAU,CAAC;AAE5D,MAAM,SAAS,GAAG;IAChB,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM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AChB,WAAW,EAAE,IAAI;YACjB,QAAQ;YACR,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,GAAG,MAAM;YACT,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClC,CAAC,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC"}
@@ -6,6 +6,15 @@
6
6
  * `packages/cli/src/cli.ts`.
7
7
  */
8
8
  import type { SupportedLanguage } from 'circle-ir';
9
+ /**
10
+ * Directories skipped during recursive collection.
11
+ *
12
+ * Exported because a navigation answer has to state its own denominator: a
13
+ * caller told "3 callers" is entitled to know that `node_modules` and `dist`
14
+ * were never looked in. The list is the single source for both the walk and
15
+ * the `scope.excluded` the answer carries.
16
+ */
17
+ export declare const SKIPPED_DIRECTORIES: readonly string[];
9
18
  export declare function detectLanguage(filePath: string): SupportedLanguage | null;
10
19
  export interface CollectedFile {
11
20
  filePath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/util/files.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAoCnD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAGzE;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;I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WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,cAAmB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA8CxF;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAMnF"}
@@ -23,8 +23,15 @@ const LANG_MAP = {
23
23
  '.html': 'html',
24
24
  '.htm': 'html',
25
25
  };
26
- /** Directories skipped during recursive collection. */
27
- const SKIP_DIRS = new Set([
26
+ /**
27
+ * Directories skipped during recursive collection.
28
+ *
29
+ * Exported because a navigation answer has to state its own denominator: a
30
+ * caller told "3 callers" is entitled to know that `node_modules` and `dist`
31
+ * were never looked in. The list is the single source for both the walk and
32
+ * the `scope.excluded` the answer carries.
33
+ */
34
+ export const SKIPPED_DIRECTORIES = [
28
35
  'node_modules',
29
36
  '.git',
30
37
  'dist',
@@ -38,7 +45,8 @@ const SKIP_DIRS = new Set([
38
45
  'venv',
39
46
  '.tox',
40
47
  '.pytest_cache',
41
- ]);
48
+ ];
49
+ const SKIP_DIRS = new Set(SKIPPED_DIRECTORIES);
42
50
  export function detectLanguage(filePath) {
43
51
  const ext = extname(filePath).toLowerCase();
44
52
  return LANG_MAP[ext] ?? null;
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/util/files.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG9C,MAAM,QAAQ,GAAsC;IAClD,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB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AAC,CAAC,CAAC,CAAC;YAChB,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;gBAC1B,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;gBAC/B,IAAI,CAAC,IAAI;oBAAE,SAAS;gBACpB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,QAAQ;oBAAE,SAAS;gBACtD,IAAI,CAAC;oBACH,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;gBAClC,CAAC;gBAAC,MAAM,CAAC;oBACP,SAAS;gBACX,CAAC;gBACD,IAAI,GAAG,CAAC,IAAI,IAAI,QAAQ;oBAAE,MAAM;YAClC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAsB,EAAE,CAAsB;IACxE,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACpC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognium/mcp-server",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Model Context Protocol server exposing the circle-ir SAST engine as structured tools for LLM agents (Claude Desktop, Claude Code, Cursor, cognium-ai).",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -66,7 +66,7 @@
66
66
  "dependencies": {
67
67
  "@modelcontextprotocol/core": "^2.2.0",
68
68
  "@modelcontextprotocol/server": "^2.2.0",
69
- "circle-ir": "4.9.29",
69
+ "circle-ir": "4.10.0",
70
70
  "yaml": "^2.9.1",
71
71
  "zod": "^4.6.5"
72
72
  },