cgraphx 1.1.0 → 1.2.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/README.md +0 -1
- package/dist/.claude-template/skills/cgraphx/SKILL.md +3 -3
- package/dist/.claude-template/skills/cgraphx/agent-prompt.md +1 -1
- package/dist/.claude-template/skills/cgraphx-guide/SKILL.md +94 -0
- package/dist/.claude-template/skills/cgraphx-guide/how-to-use.html +403 -0
- package/dist/.claude-template/skills/clarify-requirements/SKILL.md +19 -8
- package/dist/.claude-template/skills/code-impact-docgen/SKILL.md +186 -176
- package/dist/.claude-template/skills/code-impact-docgen/template-design-html.md +357 -0
- package/dist/.claude-template/skills/code-impact-docgen/template-design-md.md +164 -0
- package/dist/.claude-template/skills/code-impact-init/SKILL.md +47 -47
- package/dist/.claude-template/skills/developer-timeline/SKILL.md +9 -0
- package/dist/.claude-template/skills/write-api-doc/SKILL.md +317 -0
- package/dist/.claude-template/skills/write-api-doc/template-api-html.md +422 -0
- package/dist/.claude-template/skills/write-plan/SKILL.md +38 -16
- package/dist/.claude-template/skills/write-prd/SKILL.md +32 -8
- package/dist/.claude-template/skills/write-spec/SKILL.md +34 -9
- package/dist/bin/codegraph.js +0 -100
- package/dist/bin/codegraph.js.map +1 -1
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +13 -0
- package/dist/resolution/index.js.map +1 -1
- package/dist/resolution/scope-index.d.ts +86 -0
- package/dist/resolution/scope-index.d.ts.map +1 -0
- package/dist/resolution/scope-index.js +143 -0
- package/dist/resolution/scope-index.js.map +1 -0
- package/dist/resolution/stdlib-blocklist.d.ts +53 -0
- package/dist/resolution/stdlib-blocklist.d.ts.map +1 -0
- package/dist/resolution/stdlib-blocklist.js +143 -0
- package/dist/resolution/stdlib-blocklist.js.map +1 -0
- package/dist/search/ast-helpers.d.ts +42 -0
- package/dist/search/ast-helpers.d.ts.map +1 -0
- package/dist/search/ast-helpers.js +106 -0
- package/dist/search/ast-helpers.js.map +1 -0
- package/dist/search/call-sites.d.ts +398 -0
- package/dist/search/call-sites.d.ts.map +1 -0
- package/dist/search/call-sites.js +1433 -0
- package/dist/search/call-sites.js.map +1 -0
- package/dist/search/context.d.ts +134 -0
- package/dist/search/context.d.ts.map +1 -0
- package/dist/search/context.js +575 -0
- package/dist/search/context.js.map +1 -0
- package/dist/search/impact.d.ts +139 -0
- package/dist/search/impact.d.ts.map +1 -0
- package/dist/search/impact.js +646 -0
- package/dist/search/impact.js.map +1 -0
- package/dist/search/related.d.ts +178 -0
- package/dist/search/related.d.ts.map +1 -0
- package/dist/search/related.js +667 -0
- package/dist/search/related.js.map +1 -0
- package/dist/search/slice.d.ts +148 -0
- package/dist/search/slice.d.ts.map +1 -0
- package/dist/search/slice.js +460 -0
- package/dist/search/slice.js.map +1 -0
- package/dist/search/snr-constants.d.ts +41 -0
- package/dist/search/snr-constants.d.ts.map +1 -0
- package/dist/search/snr-constants.js +44 -0
- package/dist/search/snr-constants.js.map +1 -0
- package/dist/search/types.d.ts +28 -0
- package/dist/search/types.d.ts.map +1 -0
- package/dist/search/types.js +12 -0
- package/dist/search/types.js.map +1 -0
- package/dist/timeline/cli.d.ts.map +1 -1
- package/dist/timeline/cli.js +22 -3
- package/dist/timeline/cli.js.map +1 -1
- package/dist/timeline/store.d.ts +5 -0
- package/dist/timeline/store.d.ts.map +1 -1
- package/dist/timeline/store.js +23 -3
- package/dist/timeline/store.js.map +1 -1
- package/package.json +1 -1
- package/scripts/agent-eval/block-cgraphx-and-gitnexus-cli-hook.sh +43 -0
- package/scripts/agent-eval/block-cgraphx-cli-hook.sh +32 -0
- package/scripts/agent-eval/block-cgraphx-cli-settings.json +16 -0
- package/scripts/agent-eval/cli-vs-mcp-3arm.sh +121 -0
- package/scripts/agent-eval/multi-tool-eval.sh +171 -0
- package/scripts/agent-eval/parse-cli-vs-mcp.mjs +232 -0
- package/scripts/agent-eval/parse-multi-tool.mjs +242 -0
- package/scripts/agent-eval/subagent-token-cost.py +188 -0
- package/dist/.claude-template/skills/code-impact-docgen/template-business-html.md +0 -242
- package/dist/.claude-template/skills/code-impact-docgen/template-business-md.md +0 -107
- package/dist/.claude-template/skills/code-impact-docgen/template-technical-html.md +0 -205
- package/dist/.claude-template/skills/code-impact-docgen/template-technical-md.md +0 -155
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Method context — static structural info about where a method lives.
|
|
4
|
+
*
|
|
5
|
+
* Complements `cgraphx calls` (dynamic call edges) with the STATIC shape:
|
|
6
|
+
* signature, enclosing class hierarchy, injected fields, sibling methods,
|
|
7
|
+
* project imports. Use when the agent wants to understand "what environment
|
|
8
|
+
* does this method operate in" rather than "what does it call" or "who
|
|
9
|
+
* calls it".
|
|
10
|
+
*
|
|
11
|
+
* Output sections (per spec, "Standard" scope):
|
|
12
|
+
* 1. Method signature (modifiers + return type + name + params + annotations)
|
|
13
|
+
* 2. Enclosing class (name + extends + implements)
|
|
14
|
+
* 3. Injected fields (@Resource / @Autowired / @Inject) — already have helper
|
|
15
|
+
* 4. Sibling methods (SNR-ranked, biz verbs first, top 10 default)
|
|
16
|
+
* 5. Project imports (filter java.* / javax.* / jakarta.* stdlib)
|
|
17
|
+
*
|
|
18
|
+
* Isolation: lives under `src/search/`, imports nothing from the indexed
|
|
19
|
+
* pipeline. Reuses call-sites helpers (resolveMethodSymbol, findEnclosingClassType,
|
|
20
|
+
* extractInjectedFields, collectSameClassMethodNames) which were promoted
|
|
21
|
+
* to `export` for impact.ts.
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}) : function(o, v) {
|
|
37
|
+
o["default"] = v;
|
|
38
|
+
});
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.searchContext = searchContext;
|
|
58
|
+
exports.extractInterfaceAnnotations = extractInterfaceAnnotations;
|
|
59
|
+
exports.formatContextResult = formatContextResult;
|
|
60
|
+
const fs_1 = require("fs");
|
|
61
|
+
const path = __importStar(require("path"));
|
|
62
|
+
const grammars_1 = require("../extraction/grammars");
|
|
63
|
+
const call_sites_1 = require("./call-sites");
|
|
64
|
+
const ast_helpers_1 = require("./ast-helpers");
|
|
65
|
+
const snr_constants_1 = require("./snr-constants");
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
// Main entry
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
async function searchContext(projectRoot, symbol, options = {}) {
|
|
70
|
+
const { topSiblings = 10, languages = ['java', 'kotlin'], filterStdlibImports = true, } = options;
|
|
71
|
+
await (0, grammars_1.loadGrammarsForLanguages)(languages);
|
|
72
|
+
// 1. Resolve symbol → method_declaration AST node
|
|
73
|
+
const resolved = await (0, call_sites_1.resolveMethodSymbol)(projectRoot, symbol, languages);
|
|
74
|
+
const content = await fs_1.promises.readFile(resolved.file, 'utf-8');
|
|
75
|
+
const relPath = path.relative(projectRoot, resolved.file).replace(/\\/g, '/');
|
|
76
|
+
// 2. Extract method signature
|
|
77
|
+
const method = extractMethodSignature(resolved.methodNode);
|
|
78
|
+
// 3. Find enclosing class + extract hierarchy
|
|
79
|
+
const classNode = (0, call_sites_1.findEnclosingClassType)(resolved.methodNode);
|
|
80
|
+
const enclosingClass = classNode ? extractClassHierarchy(classNode) : null;
|
|
81
|
+
// 4. Injected fields (reuse call-sites helper)
|
|
82
|
+
const injectedFields = classNode
|
|
83
|
+
? [...(0, call_sites_1.extractInjectedFields)(classNode).values()]
|
|
84
|
+
: [];
|
|
85
|
+
// 5. Sibling methods (SNR-ranked, top N)
|
|
86
|
+
const siblings = classNode
|
|
87
|
+
? extractSiblingMethods(classNode, resolved.methodNode, topSiblings)
|
|
88
|
+
: [];
|
|
89
|
+
// 6. Imports (filtered)
|
|
90
|
+
const fileNode = getFileRootNode(content, resolved.file, languages);
|
|
91
|
+
const imports = fileNode
|
|
92
|
+
? extractImports(fileNode, filterStdlibImports)
|
|
93
|
+
: [];
|
|
94
|
+
// 7. Implemented interface annotations (look up each implemented interface
|
|
95
|
+
// by name, parse its source, extract annotations declared on the
|
|
96
|
+
// interface). Only attached when the enclosing class declares ≥1
|
|
97
|
+
// implements interface — otherwise the field is omitted entirely.
|
|
98
|
+
let implementedInterfaces;
|
|
99
|
+
if (enclosingClass && enclosingClass.implementsInterfaces.length > 0) {
|
|
100
|
+
implementedInterfaces = await extractInterfaceAnnotations(enclosingClass.implementsInterfaces, projectRoot, languages);
|
|
101
|
+
}
|
|
102
|
+
const result = {
|
|
103
|
+
symbol,
|
|
104
|
+
filePath: relPath,
|
|
105
|
+
method,
|
|
106
|
+
enclosingClass,
|
|
107
|
+
injectedFields,
|
|
108
|
+
siblingMethods: siblings,
|
|
109
|
+
imports,
|
|
110
|
+
};
|
|
111
|
+
if (implementedInterfaces) {
|
|
112
|
+
result.implementedInterfaces = implementedInterfaces;
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
// AST extraction
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
function getFileRootNode(content, file, languages) {
|
|
120
|
+
const language = (0, grammars_1.detectLanguage)(file, content);
|
|
121
|
+
if (!languages.includes(language))
|
|
122
|
+
return null;
|
|
123
|
+
const parser = (0, grammars_1.getParser)(language);
|
|
124
|
+
if (!parser)
|
|
125
|
+
return null;
|
|
126
|
+
const tree = parser.parse(content);
|
|
127
|
+
return tree?.rootNode ?? null;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Extract method signature: annotations + modifiers + return type + name +
|
|
131
|
+
* parameters + throws clause.
|
|
132
|
+
*/
|
|
133
|
+
function extractMethodSignature(methodNode) {
|
|
134
|
+
const annotations = (0, ast_helpers_1.extractAnnotations)(methodNode);
|
|
135
|
+
const modifiers = (0, ast_helpers_1.extractModifiers)(methodNode);
|
|
136
|
+
const returnType = methodNode.childForFieldName('type')?.text ?? 'void';
|
|
137
|
+
const name = methodNode.childForFieldName('name')?.text ?? '<anonymous>';
|
|
138
|
+
const parameters = extractParameters(methodNode);
|
|
139
|
+
const throwsClause = extractThrowsClause(methodNode);
|
|
140
|
+
return {
|
|
141
|
+
annotations,
|
|
142
|
+
modifiers,
|
|
143
|
+
returnType,
|
|
144
|
+
name,
|
|
145
|
+
parameters,
|
|
146
|
+
throwsClause,
|
|
147
|
+
startLine: methodNode.startPosition.row + 1,
|
|
148
|
+
endLine: methodNode.endPosition.row + 1,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function extractClassHierarchy(classNode) {
|
|
152
|
+
const nameChild = classNode.childForFieldName('name');
|
|
153
|
+
if (!nameChild)
|
|
154
|
+
return null;
|
|
155
|
+
const kindMap = {
|
|
156
|
+
class_declaration: 'class',
|
|
157
|
+
interface_declaration: 'interface',
|
|
158
|
+
enum_declaration: 'enum',
|
|
159
|
+
record_declaration: 'record',
|
|
160
|
+
annotation_type_declaration: 'class', // treat @interface as class for hierarchy purposes
|
|
161
|
+
};
|
|
162
|
+
const kind = kindMap[classNode.type] ?? 'class';
|
|
163
|
+
const annotations = (0, ast_helpers_1.extractAnnotations)(classNode);
|
|
164
|
+
const modifiers = (0, ast_helpers_1.extractModifiers)(classNode);
|
|
165
|
+
// extends — tree-sitter-java exposes the extends clause as field name
|
|
166
|
+
// `superclass` (node type `super_class`); field name not node type.
|
|
167
|
+
const superClassNode = classNode.childForFieldName('superclass') ?? classNode.childForFieldName('super_class');
|
|
168
|
+
const extendsClass = superClassNode?.text ?? null;
|
|
169
|
+
// implements — tree-sitter-java exposes the implements clause as field name
|
|
170
|
+
// `interfaces` (node type `super_interfaces`). Walk type_identifier children
|
|
171
|
+
// to enumerate each implemented interface.
|
|
172
|
+
const implementsNode = classNode.childForFieldName('interfaces') ?? classNode.childForFieldName('super_interfaces');
|
|
173
|
+
const implementsInterfaces = [];
|
|
174
|
+
if (implementsNode) {
|
|
175
|
+
(0, ast_helpers_1.walkTree)(implementsNode, (n) => {
|
|
176
|
+
if (n.type === 'type_identifier' && n.parent?.type !== 'scoped_type_identifier') {
|
|
177
|
+
// top-level type_identifier in the implements list
|
|
178
|
+
if (n.text !== extendsClass)
|
|
179
|
+
implementsInterfaces.push(n.text);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
name: nameChild.text,
|
|
185
|
+
kind,
|
|
186
|
+
annotations,
|
|
187
|
+
modifiers,
|
|
188
|
+
extendsClass,
|
|
189
|
+
implementsInterfaces,
|
|
190
|
+
startLine: classNode.startPosition.row + 1,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Look up each named interface in the project and extract the annotations
|
|
195
|
+
* declared on it. Used by `### Implemented interfaces` so an agent can see
|
|
196
|
+
* cross-cutting routing/permission annotations (e.g. `@Center("sopub_api")`,
|
|
197
|
+
* `@RequestMapping("/api/v1")`) that live on the interface, not the impl.
|
|
198
|
+
*
|
|
199
|
+
* Lookup is file-name heuristic first (`findFilesWithClass`, the same
|
|
200
|
+
* heuristic `resolveMethodSymbol` uses), so it doesn't scan every file in a
|
|
201
|
+
* large monorepo. The matching file is then AST-parsed and walked to find
|
|
202
|
+
* the `interface_declaration` whose `name` child equals the lookup name.
|
|
203
|
+
*
|
|
204
|
+
* Never throws — on any failure (file not found, parse error, AST mismatch)
|
|
205
|
+
* returns the not-found sentinel so the caller can surface it inline rather
|
|
206
|
+
* than abort the whole context.
|
|
207
|
+
*/
|
|
208
|
+
async function extractInterfaceAnnotations(interfaceNames, projectRoot, languages) {
|
|
209
|
+
const out = [];
|
|
210
|
+
for (const name of interfaceNames) {
|
|
211
|
+
out.push(await lookupSingleInterface(name, projectRoot, languages));
|
|
212
|
+
}
|
|
213
|
+
return out;
|
|
214
|
+
}
|
|
215
|
+
async function lookupSingleInterface(interfaceName, projectRoot, languages) {
|
|
216
|
+
try {
|
|
217
|
+
const candidateFiles = await (0, call_sites_1.findFilesWithClass)(projectRoot, interfaceName);
|
|
218
|
+
for (const file of candidateFiles) {
|
|
219
|
+
const content = await fs_1.promises.readFile(file, 'utf-8');
|
|
220
|
+
const language = (0, grammars_1.detectLanguage)(file, content);
|
|
221
|
+
if (!languages.includes(language))
|
|
222
|
+
continue;
|
|
223
|
+
const parser = (0, grammars_1.getParser)(language);
|
|
224
|
+
if (!parser)
|
|
225
|
+
continue;
|
|
226
|
+
const tree = parser.parse(content);
|
|
227
|
+
if (!tree)
|
|
228
|
+
continue;
|
|
229
|
+
const ifaceNode = findInterfaceByName(tree.rootNode, interfaceName);
|
|
230
|
+
if (ifaceNode) {
|
|
231
|
+
return {
|
|
232
|
+
name: interfaceName,
|
|
233
|
+
file: path.relative(projectRoot, file).replace(/\\/g, '/'),
|
|
234
|
+
line: ifaceNode.startPosition.row + 1,
|
|
235
|
+
annotations: extractInterfaceAnnotationTexts(ifaceNode),
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
// swallow — treat as not found rather than aborting context
|
|
242
|
+
}
|
|
243
|
+
return { name: interfaceName, file: null, line: null, annotations: [] };
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Find the first `interface_declaration` node named `interfaceName` under
|
|
247
|
+
* `root`. Tree-sitter-kotlin emits interfaces as `class_declaration` with an
|
|
248
|
+
* `interface` modifier, so both forms are covered.
|
|
249
|
+
*/
|
|
250
|
+
function findInterfaceByName(root, interfaceName) {
|
|
251
|
+
let found = null;
|
|
252
|
+
(0, ast_helpers_1.walkTree)(root, (n) => {
|
|
253
|
+
if (found)
|
|
254
|
+
return;
|
|
255
|
+
if (n.type !== 'interface_declaration' && n.type !== 'class_declaration')
|
|
256
|
+
return;
|
|
257
|
+
const nameNode = n.childForFieldName('name');
|
|
258
|
+
if (!nameNode || nameNode.text !== interfaceName)
|
|
259
|
+
return;
|
|
260
|
+
// For class_declaration (Kotlin), only match if it's actually an interface
|
|
261
|
+
if (n.type === 'class_declaration' && !isKotlinInterface(n))
|
|
262
|
+
return;
|
|
263
|
+
found = n;
|
|
264
|
+
});
|
|
265
|
+
return found;
|
|
266
|
+
}
|
|
267
|
+
function isKotlinInterface(classNode) {
|
|
268
|
+
const modifiers = classNode.childForFieldName('modifiers');
|
|
269
|
+
if (!modifiers)
|
|
270
|
+
return false;
|
|
271
|
+
for (const child of modifiers.children) {
|
|
272
|
+
if (child?.type === 'class_modifier' && child.text === 'interface')
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Extract annotation texts from an interface_declaration's `modifiers` child,
|
|
279
|
+
* normalized to short-name + arguments. Unlike `extractAnnotations` in
|
|
280
|
+
* ast-helpers.ts which strips the argument list entirely (returning `@Center`),
|
|
281
|
+
* this keeps the arguments so routing/permission values survive (e.g.
|
|
282
|
+
* `@Center("sopub_api")`). The package prefix is stripped for readability —
|
|
283
|
+
* agents match on the short name and the argument is the load-bearing part.
|
|
284
|
+
*/
|
|
285
|
+
function extractInterfaceAnnotationTexts(node) {
|
|
286
|
+
const out = [];
|
|
287
|
+
const modifiers = node.children.find((c) => c?.type === 'modifiers');
|
|
288
|
+
if (!modifiers)
|
|
289
|
+
return out;
|
|
290
|
+
for (const child of modifiers.children) {
|
|
291
|
+
if (!child)
|
|
292
|
+
continue;
|
|
293
|
+
if (child.type !== 'annotation' && child.type !== 'marker_annotation')
|
|
294
|
+
continue;
|
|
295
|
+
const nameNode = child.childForFieldName('name');
|
|
296
|
+
if (!nameNode)
|
|
297
|
+
continue;
|
|
298
|
+
const shortName = nameNode.text.split('.').pop() ?? nameNode.text;
|
|
299
|
+
// annotation_argument_list only exists on `annotation` (not marker_annotation)
|
|
300
|
+
const argList = child.children.find((c) => c?.type === 'annotation_argument_list');
|
|
301
|
+
if (argList) {
|
|
302
|
+
out.push(`@${shortName}${argList.text}`);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
out.push(`@${shortName}`);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return out;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Extract other methods declared directly in the class body, excluding the
|
|
312
|
+
* queried method itself (matched by name + start line). SNR-ranked: biz verbs
|
|
313
|
+
* first, getter/setter/toString last, with `@Override` boost.
|
|
314
|
+
*/
|
|
315
|
+
function extractSiblingMethods(classNode, queriedMethod, topN) {
|
|
316
|
+
const queriedName = queriedMethod.childForFieldName('name')?.text ?? '';
|
|
317
|
+
const queriedLine = queriedMethod.startPosition.row;
|
|
318
|
+
// Find the class_body direct child
|
|
319
|
+
let body = null;
|
|
320
|
+
for (const child of classNode.children) {
|
|
321
|
+
if (child?.type === 'class_body' || child?.type === 'interface_body' || child?.type === 'enum_body') {
|
|
322
|
+
body = child;
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (!body)
|
|
327
|
+
return [];
|
|
328
|
+
const siblings = [];
|
|
329
|
+
for (const child of body.children) {
|
|
330
|
+
if (!child)
|
|
331
|
+
continue;
|
|
332
|
+
if (child.type !== 'method_declaration' &&
|
|
333
|
+
child.type !== 'constructor_declaration' &&
|
|
334
|
+
child.type !== 'compact_constructor_declaration')
|
|
335
|
+
continue;
|
|
336
|
+
// Skip the queried method itself
|
|
337
|
+
const name = child.childForFieldName('name')?.text ?? '';
|
|
338
|
+
if (name === queriedName && child.startPosition.row === queriedLine)
|
|
339
|
+
continue;
|
|
340
|
+
const annotations = (0, ast_helpers_1.extractAnnotations)(child);
|
|
341
|
+
const modifiers = (0, ast_helpers_1.extractModifiers)(child);
|
|
342
|
+
const returnType = child.childForFieldName('type')?.text ?? 'void';
|
|
343
|
+
const paramCount = countParameters(child);
|
|
344
|
+
const snrScore = computeSiblingSnr(name, annotations, modifiers);
|
|
345
|
+
siblings.push({
|
|
346
|
+
name,
|
|
347
|
+
snrScore,
|
|
348
|
+
modifiers,
|
|
349
|
+
annotations,
|
|
350
|
+
returnType,
|
|
351
|
+
paramCount,
|
|
352
|
+
startLine: child.startPosition.row + 1,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
siblings.sort((a, b) => b.snrScore - a.snrScore || a.startLine - b.startLine);
|
|
356
|
+
return siblings.slice(0, topN);
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* SNR scoring for sibling method declarations. Combines:
|
|
360
|
+
* - method-name rules (reuse call-sites logic — biz verb +30, getter -20)
|
|
361
|
+
* - @Override boost (+20) — interface contract, important for understanding role
|
|
362
|
+
* - public modifier (+5) — part of the class's API
|
|
363
|
+
* - private/protected (-5) — internal helper
|
|
364
|
+
* - static (+5) — utility/factory method, often relevant
|
|
365
|
+
*/
|
|
366
|
+
function computeSiblingSnr(name, annotations, modifiers) {
|
|
367
|
+
let score = 0;
|
|
368
|
+
// Method-name rules (mirrors call-sites.ts method-name section)
|
|
369
|
+
if (snr_constants_1.OBJECT_METHODS.has(name))
|
|
370
|
+
score -= 80;
|
|
371
|
+
else if (snr_constants_1.MAP_OPS.has(name))
|
|
372
|
+
score -= 25;
|
|
373
|
+
else if (snr_constants_1.RE_GETTER.test(name))
|
|
374
|
+
score -= 20;
|
|
375
|
+
else if (snr_constants_1.RE_SETTER.test(name))
|
|
376
|
+
score -= 20;
|
|
377
|
+
else if (snr_constants_1.RE_BOOL_GETTER.test(name))
|
|
378
|
+
score -= 15;
|
|
379
|
+
else if (snr_constants_1.RE_BIZ_VERB.test(name))
|
|
380
|
+
score += 30;
|
|
381
|
+
// Annotation boosts
|
|
382
|
+
if (annotations.includes('@Override'))
|
|
383
|
+
score += 20;
|
|
384
|
+
if (annotations.some((a) => TEST_ANNOTATIONS.has(a)))
|
|
385
|
+
score += 25;
|
|
386
|
+
// Modifier nudges
|
|
387
|
+
if (modifiers.includes('public'))
|
|
388
|
+
score += 5;
|
|
389
|
+
if (modifiers.includes('private') || modifiers.includes('protected'))
|
|
390
|
+
score -= 5;
|
|
391
|
+
if (modifiers.includes('static'))
|
|
392
|
+
score += 5;
|
|
393
|
+
return score;
|
|
394
|
+
}
|
|
395
|
+
const TEST_ANNOTATIONS = new Set(['@Test', '@ParameterizedTest', '@BeforeEach', '@AfterEach', '@BeforeAll', '@AfterAll']);
|
|
396
|
+
/**
|
|
397
|
+
* Extract imports from the file. If filterStdlibImports, exclude:
|
|
398
|
+
* - java.* / javax.* / jakarta.* (Java SE + Jakarta EE)
|
|
399
|
+
* - kotlin.* (for Kotlin files)
|
|
400
|
+
*/
|
|
401
|
+
function extractImports(rootNode, filterStdlib) {
|
|
402
|
+
const imports = [];
|
|
403
|
+
(0, ast_helpers_1.walkTree)(rootNode, (n) => {
|
|
404
|
+
if (n.type !== 'import_declaration')
|
|
405
|
+
return;
|
|
406
|
+
// import_declaration's full text contains the entire `import x.y.Z;`
|
|
407
|
+
const text = n.text.replace(/^import\s+(static\s+)?/, '').replace(/;\s*$/, '');
|
|
408
|
+
if (filterStdlib && isStdlibImport(text))
|
|
409
|
+
return;
|
|
410
|
+
imports.push(text);
|
|
411
|
+
});
|
|
412
|
+
return imports;
|
|
413
|
+
}
|
|
414
|
+
function isStdlibImport(importPath) {
|
|
415
|
+
return (importPath.startsWith('java.') ||
|
|
416
|
+
importPath.startsWith('javax.') ||
|
|
417
|
+
importPath.startsWith('jakarta.') ||
|
|
418
|
+
importPath.startsWith('kotlin.') ||
|
|
419
|
+
importPath.startsWith('kotlinx.'));
|
|
420
|
+
}
|
|
421
|
+
// ---------------------------------------------------------------------------
|
|
422
|
+
// Small AST helpers (shared helpers live in ./ast-helpers.ts)
|
|
423
|
+
// ---------------------------------------------------------------------------
|
|
424
|
+
function extractParameters(methodNode) {
|
|
425
|
+
const out = [];
|
|
426
|
+
const params = methodNode.childForFieldName('parameters');
|
|
427
|
+
if (!params)
|
|
428
|
+
return out;
|
|
429
|
+
for (const child of params.children) {
|
|
430
|
+
if (!child)
|
|
431
|
+
continue;
|
|
432
|
+
if (child.type === 'formal_parameter' || child.type === 'spread_parameter') {
|
|
433
|
+
out.push(child.text.trim());
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return out;
|
|
437
|
+
}
|
|
438
|
+
function countParameters(methodNode) {
|
|
439
|
+
const params = methodNode.childForFieldName('parameters');
|
|
440
|
+
if (!params)
|
|
441
|
+
return 0;
|
|
442
|
+
let count = 0;
|
|
443
|
+
for (const child of params.children) {
|
|
444
|
+
if (child?.type === 'formal_parameter' || child?.type === 'spread_parameter')
|
|
445
|
+
count++;
|
|
446
|
+
}
|
|
447
|
+
return count;
|
|
448
|
+
}
|
|
449
|
+
function extractThrowsClause(methodNode) {
|
|
450
|
+
const out = [];
|
|
451
|
+
const throwsNode = methodNode.childForFieldName('throws');
|
|
452
|
+
if (!throwsNode)
|
|
453
|
+
return out;
|
|
454
|
+
(0, ast_helpers_1.walkTree)(throwsNode, (n) => {
|
|
455
|
+
if (n.type === 'type_identifier')
|
|
456
|
+
out.push(n.text);
|
|
457
|
+
});
|
|
458
|
+
return out;
|
|
459
|
+
}
|
|
460
|
+
// ---------------------------------------------------------------------------
|
|
461
|
+
// Formatter (CLI markdown)
|
|
462
|
+
// ---------------------------------------------------------------------------
|
|
463
|
+
function formatContextResult(result) {
|
|
464
|
+
const lines = [];
|
|
465
|
+
const m = result.method;
|
|
466
|
+
// Header
|
|
467
|
+
const annotationsStr = m.annotations.length > 0 ? `${m.annotations.join(' ')} ` : '';
|
|
468
|
+
const modifiersStr = m.modifiers.length > 0 ? `${m.modifiers.join(' ')} ` : '';
|
|
469
|
+
lines.push(`## \`${annotationsStr}${modifiersStr}${m.returnType} ${m.name}(...)\``);
|
|
470
|
+
lines.push(`\`${result.filePath}:${m.startLine}-${m.endLine}\``);
|
|
471
|
+
// Full signature line
|
|
472
|
+
lines.push('');
|
|
473
|
+
lines.push('### Signature');
|
|
474
|
+
const fullSignature = formatFullSignature(m);
|
|
475
|
+
for (const line of fullSignature) {
|
|
476
|
+
lines.push(`> ${line}`);
|
|
477
|
+
}
|
|
478
|
+
// Enclosing class
|
|
479
|
+
if (result.enclosingClass) {
|
|
480
|
+
const c = result.enclosingClass;
|
|
481
|
+
lines.push('');
|
|
482
|
+
lines.push('### Enclosing class');
|
|
483
|
+
const classAnnotations = c.annotations.length > 0 ? `${c.annotations.join(' ')} ` : '';
|
|
484
|
+
const classModifiers = c.modifiers.length > 0 ? `${c.modifiers.join(' ')} ` : '';
|
|
485
|
+
lines.push(`**${classAnnotations}${classModifiers}${c.kind} ${c.name}**`);
|
|
486
|
+
if (c.extendsClass)
|
|
487
|
+
lines.push(`- extends: \`${c.extendsClass}\``);
|
|
488
|
+
if (c.implementsInterfaces.length > 0) {
|
|
489
|
+
lines.push(`- implements: ${c.implementsInterfaces.map((i) => `\`${i}\``).join(', ')}`);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
// Implemented interfaces — annotations declared on each implemented
|
|
493
|
+
// interface (looked up by parsing the interface source). Lets an agent see
|
|
494
|
+
// cross-cutting routing/permission annotations (e.g. `@Center("sopub_api")`)
|
|
495
|
+
// without an extra Read. Only rendered when the class declares implements
|
|
496
|
+
// AND the implementedInterfaces array is populated.
|
|
497
|
+
if (result.implementedInterfaces && result.implementedInterfaces.length > 0) {
|
|
498
|
+
lines.push('');
|
|
499
|
+
lines.push('### Implemented interfaces');
|
|
500
|
+
for (const iface of result.implementedInterfaces) {
|
|
501
|
+
const suffix = formatInterfaceAnnotationSuffix(iface);
|
|
502
|
+
lines.push(`- \`${iface.name}\` ${suffix}`);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
// Injected fields
|
|
506
|
+
if (result.injectedFields.length > 0) {
|
|
507
|
+
lines.push('');
|
|
508
|
+
lines.push('### Injected fields (cross-boundary collaborators)');
|
|
509
|
+
for (const f of result.injectedFields) {
|
|
510
|
+
lines.push(`- @${f.annotation} \`${f.fieldType} ${f.fieldName}\``);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
// Sibling methods
|
|
514
|
+
if (result.siblingMethods.length > 0) {
|
|
515
|
+
lines.push('');
|
|
516
|
+
lines.push(`### Sibling methods (top ${result.siblingMethods.length}, SNR-ranked)`);
|
|
517
|
+
for (const s of result.siblingMethods) {
|
|
518
|
+
const tag = s.snrScore >= 30 ? ' **[biz]**' : '';
|
|
519
|
+
const overrides = s.annotations.includes('@Override') ? ' @Override' : '';
|
|
520
|
+
const visibility = s.modifiers.includes('public') ? 'public' : s.modifiers.includes('private') ? 'private' : s.modifiers[0] ?? '';
|
|
521
|
+
lines.push(`- \`${visibility} ${s.returnType} ${s.name}(${s.paramCount} arg${s.paramCount === 1 ? '' : 's'})\` L${s.startLine}${overrides}${tag}`);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
// Imports
|
|
525
|
+
if (result.imports.length > 0) {
|
|
526
|
+
lines.push('');
|
|
527
|
+
lines.push(`### Imports (${result.imports.length}, project-internal)`);
|
|
528
|
+
for (const imp of result.imports) {
|
|
529
|
+
lines.push(`- \`${imp}\``);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return lines.join('\n');
|
|
533
|
+
}
|
|
534
|
+
function formatFullSignature(m) {
|
|
535
|
+
const parts = [];
|
|
536
|
+
if (m.annotations.length > 0)
|
|
537
|
+
parts.push(m.annotations.join(' '));
|
|
538
|
+
if (m.modifiers.length > 0)
|
|
539
|
+
parts.push(m.modifiers.join(' '));
|
|
540
|
+
parts.push(m.returnType);
|
|
541
|
+
parts.push(`${m.name}(${m.parameters.join(', ')})`);
|
|
542
|
+
if (m.throwsClause.length > 0) {
|
|
543
|
+
parts.push(`throws ${m.throwsClause.join(', ')}`);
|
|
544
|
+
}
|
|
545
|
+
// Wrap long signatures
|
|
546
|
+
const full = parts.join(' ');
|
|
547
|
+
if (full.length <= 100)
|
|
548
|
+
return [full];
|
|
549
|
+
// Multi-line breakdown for long signatures
|
|
550
|
+
const head = [
|
|
551
|
+
...m.annotations,
|
|
552
|
+
...m.modifiers,
|
|
553
|
+
m.returnType,
|
|
554
|
+
`${m.name}(`,
|
|
555
|
+
].join(' ');
|
|
556
|
+
return [head, ` ${m.parameters.join(',\n ')}`, `)${m.throwsClause.length > 0 ? ` throws ${m.throwsClause.join(', ')}` : ''}`];
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Render the trailing portion of a `### Implemented interfaces` bullet.
|
|
560
|
+
*
|
|
561
|
+
* annotations + source known → `@Center("sopub_api") — \`path:line\``
|
|
562
|
+
* source known, no annotations → `— (no annotations) — \`path:line\``
|
|
563
|
+
* source not found → `— (interface source not found)`
|
|
564
|
+
*/
|
|
565
|
+
function formatInterfaceAnnotationSuffix(iface) {
|
|
566
|
+
if (iface.file === null || iface.line === null) {
|
|
567
|
+
return '— (interface source not found)';
|
|
568
|
+
}
|
|
569
|
+
const sourceLoc = `\`${iface.file}:${iface.line}\``;
|
|
570
|
+
if (iface.annotations.length === 0) {
|
|
571
|
+
return `— (no annotations) — ${sourceLoc}`;
|
|
572
|
+
}
|
|
573
|
+
return `${iface.annotations.join(' ')} — ${sourceLoc}`;
|
|
574
|
+
}
|
|
575
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/search/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkIH,sCAmEC;AAoGD,kEAUC;AA8PD,kDA6EC;AA5nBD,2BAAoC;AACpC,2CAA6B;AAC7B,qDAA6F;AAG7F,6CAKsB;AACtB,+CAIuB;AACvB,mDAOyB;AAqGzB,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAEvE,KAAK,UAAU,aAAa,CACjC,WAAmB,EACnB,MAAc,EACd,UAA0B,EAAE;IAE5B,MAAM,EACJ,WAAW,GAAG,EAAE,EAChB,SAAS,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC9B,mBAAmB,GAAG,IAAI,GAC3B,GAAG,OAAO,CAAC;IAEZ,MAAM,IAAA,mCAAwB,EAAC,SAAS,CAAC,CAAC;IAE1C,kDAAkD;IAClD,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAmB,EAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC3E,MAAM,OAAO,GAAG,MAAM,aAAE,CAAC,QAAQ,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