@nithin554/code-crawler 0.1.81 → 0.1.82

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 (66) hide show
  1. package/README.md +105 -10
  2. package/dist/crawler.d.ts +2 -0
  3. package/dist/crawler.js +91 -16
  4. package/dist/crawler.js.map +1 -1
  5. package/dist/graph/budget.d.ts +10 -0
  6. package/dist/graph/budget.js +12 -0
  7. package/dist/graph/budget.js.map +1 -1
  8. package/dist/graph/changeImpact.d.ts +123 -0
  9. package/dist/graph/changeImpact.js +431 -0
  10. package/dist/graph/changeImpact.js.map +1 -0
  11. package/dist/graph/compact.d.ts +45 -0
  12. package/dist/graph/compact.js +57 -0
  13. package/dist/graph/compact.js.map +1 -0
  14. package/dist/graph/insights.d.ts +2 -0
  15. package/dist/graph/insights.js +5 -1
  16. package/dist/graph/insights.js.map +1 -1
  17. package/dist/graph/queries.d.ts +76 -2
  18. package/dist/graph/queries.js +123 -13
  19. package/dist/graph/queries.js.map +1 -1
  20. package/dist/graph/schema.d.ts +18 -3
  21. package/dist/graph/schema.js +1 -0
  22. package/dist/graph/schema.js.map +1 -1
  23. package/dist/graph/store.js +26 -4
  24. package/dist/graph/store.js.map +1 -1
  25. package/dist/parser/cache.d.ts +3 -2
  26. package/dist/parser/cache.js +2 -0
  27. package/dist/parser/cache.js.map +1 -1
  28. package/dist/parser/frameworks/fastapi.js +3 -0
  29. package/dist/parser/frameworks/fastapi.js.map +1 -1
  30. package/dist/parser/frameworks/index.d.ts +8 -0
  31. package/dist/parser/frameworks/index.js +39 -1
  32. package/dist/parser/frameworks/index.js.map +1 -1
  33. package/dist/parser/frameworks/lombok.d.ts +10 -0
  34. package/dist/parser/frameworks/lombok.js +14 -0
  35. package/dist/parser/frameworks/lombok.js.map +1 -0
  36. package/dist/parser/frameworks/spring.js +18 -0
  37. package/dist/parser/frameworks/spring.js.map +1 -1
  38. package/dist/parser/frameworks/types.d.ts +15 -0
  39. package/dist/parser/language.d.ts +47 -0
  40. package/dist/parser/languages/java.js +245 -17
  41. package/dist/parser/languages/java.js.map +1 -1
  42. package/dist/parser/languages/python.js +179 -8
  43. package/dist/parser/languages/python.js.map +1 -1
  44. package/dist/resolver/channels.d.ts +14 -0
  45. package/dist/resolver/channels.js +334 -0
  46. package/dist/resolver/channels.js.map +1 -0
  47. package/dist/resolver/common.d.ts +23 -2
  48. package/dist/resolver/common.js +46 -27
  49. package/dist/resolver/common.js.map +1 -1
  50. package/dist/resolver/genericResolver.d.ts +70 -2
  51. package/dist/resolver/genericResolver.js +165 -25
  52. package/dist/resolver/genericResolver.js.map +1 -1
  53. package/dist/resolver/javaResolver.js +31 -13
  54. package/dist/resolver/javaResolver.js.map +1 -1
  55. package/dist/resolver/types.d.ts +22 -0
  56. package/dist/resolver/types.js +13 -0
  57. package/dist/resolver/types.js.map +1 -1
  58. package/dist/server.js +238 -21
  59. package/dist/server.js.map +1 -1
  60. package/dist/toolGroups.d.ts +24 -0
  61. package/dist/toolGroups.js +67 -0
  62. package/dist/toolGroups.js.map +1 -0
  63. package/package.json +7 -2
  64. package/skills/code-crawler/SKILL.md +40 -5
  65. package/skills/code-crawler/reference/edge-semantics.md +115 -6
  66. package/skills/code-crawler/reference/tools.md +41 -1
@@ -1,6 +1,6 @@
1
1
  # Tool reference
2
2
 
3
- All 27 tools, grouped by the question they answer. Run `index_status` before trusting any
3
+ All 29 tools, grouped by the question they answer. Run `index_status` before trusting any
4
4
  result, and `crawl_project` before that if the index is empty.
5
5
 
6
6
  ## Orientation
@@ -43,6 +43,11 @@ payload. Reach for it first when exploring an unfamiliar symbol; drop to `get_ca
43
43
  `get_callers`/`get_callees` take `depth` - keep it at 1 unless the question is explicitly
44
44
  transitive, because depth 3 on a hub method returns most of the repository.
45
45
 
46
+ All three call-graph tools report `alternatives` when an overloaded call site could not be
47
+ narrowed to one declaration. The edge is still resolved - only the choice among overloads is
48
+ uncertain - and its confidence is capped at `0.6`. Read the call site before reporting a single
49
+ callee.
50
+
46
51
  `get_subgraph` is bounded by `radius`/`limit` rather than `max_tokens`, because its `nodes`
47
52
  and `edges` are two views of one slice and cutting one list leaves dangling references.
48
53
 
@@ -51,6 +56,7 @@ and `edges` are two views of one slice and cutting one list leaves dangling refe
51
56
  | Tool | Use it when | Key argument |
52
57
  | --- | --- | --- |
53
58
  | `impact_analysis` | "What breaks if I change this?" - the one call to prefer | `id` |
59
+ | `change_impact` | You have a diff, a changed-file list or several changed symbols | `diff`, `files`, `symbols` |
54
60
  | `find_implementations` | You have an interface and need its implementers | `id` |
55
61
  | `find_cycles` | You suspect mutual recursion or a dependency knot | none |
56
62
  | `find_dead_code` | You want methods with no incoming edges at all | none |
@@ -59,6 +65,14 @@ and `edges` are two views of one slice and cutting one list leaves dangling refe
59
65
  `impact_analysis` bundles callers, entry points, routes, overrides, and a risk band. Prefer
60
66
  it over assembling the same answer from four calls.
61
67
 
68
+ `change_impact` is the same answer for a review rather than a single symbol: pass the output
69
+ of `git diff` and every touched declaration is mapped by line span, then ranked. A changed
70
+ method replaces its enclosing class, so a class-level and a method-level view of the same
71
+ edit are not reported twice. It also adds what `impact_analysis` does not: who injects the
72
+ changed type and which advice intercepts the changed method. The `score` field orders the
73
+ report; it is not a probability, and a low score does not mean a change is safe. Pass
74
+ `files` when the change is committed, `symbols` when you already know what moved.
75
+
62
76
  `find_dead_code` reports *no incoming call, dispatch, or advice edge*. Treat that as a
63
77
  candidate list: a method invoked purely by reflection or by an external framework will
64
78
  appear here. Cross-check with `find_reflections` and `find_entry_points` before deleting
@@ -72,6 +86,7 @@ These tools exist because the call graph alone cannot see how a framework invoke
72
86
  | --- | --- | --- |
73
87
  | `find_entry_points` | "Where does this system begin?" | `kind` |
74
88
  | `find_routes` | You want HTTP route to handler mappings | `framework` |
89
+ | `find_event_flows` | You want publisher to listener (events, Kafka/JMS topics, `@OnEvent`) | `symbol` |
75
90
  | `find_injections` | You want DI-supplied dependencies | `framework` |
76
91
  | `find_annotated` | You want every symbol carrying one annotation | `annotation` |
77
92
  | `get_decorators` | You want the decorators on one symbol | `id`, `includeMembers` |
@@ -82,6 +97,10 @@ Entry-point kinds include HTTP routes, listeners, schedulers, CLI mains, and tes
82
97
  method looks dead but is plausibly framework-invoked, check `find_entry_points` and
83
98
  `find_reflections` before concluding it is unreachable.
84
99
 
100
+ Proxy annotations (`@Transactional`, `@Async`, `@Cacheable`) have no dedicated tool: they
101
+ are node properties, so ask `get_callers` about the method and read `proxy`,
102
+ `proxyBlocked` and `inert` on the direct callers.
103
+
85
104
  ## Coverage and dependencies
86
105
 
87
106
  | Tool | Use it when | Key argument |
@@ -102,7 +121,28 @@ Every list-returning tool accepts `max_tokens` and `cursor`; passing either adds
102
121
  block with `totalCount`, `returnedCount`, `truncated`, `estimatedTokens`, and `nextCursor`.
103
122
  Omit both and the response shape is unchanged.
104
123
 
124
+ When the budget cuts the list, `page.truncated` is true and `page.hint` names the exact
125
+ `cursor` value to pass next. Read the hint instead of reconstructing the page arithmetic.
126
+
105
127
  Aggregate tools (`impact_analysis`, `explain_symbol`, `export_graph`) and single-object
106
128
  tools (`get_node`, `index_status`, `get_schema`) return one object and take no budget.
107
129
 
108
130
  Use `totalCount` from the first page instead of paging to count.
131
+
132
+ ## Compact responses
133
+
134
+ Every tool accepts `compact: true`, which returns each symbol reference as its
135
+ fully-qualified name (`com.acme.Payment#pay`) instead of an `{id, name, kind, filePath}`
136
+ object. Measured on the dispatch fixture it removes 61% (`get_callers`) to 83%
137
+ (`search_symbols`) of the response.
138
+
139
+ Reach for it when you are scanning a wide trace, comparing which symbols appear on both
140
+ sides of a call, or reading a ranking and only need the names. Do not use it when you need
141
+ `kind` (to tell a class from a method you cannot tell, though the `Type` / `Type#member`
142
+ form usually settles it), `filePath` (to jump to a file), or when you are going to pass the
143
+ value somewhere that needs a node id. `get_node` accepts a qualified name, so `compact` then
144
+ `get_node` is a cheap way to expand exactly the symbols you decided to care about.
145
+
146
+ The budget is computed before the projection runs, so `compact` keeps the same items and
147
+ makes them cheaper to read rather than fitting more into one page. Raise `max_tokens` for
148
+ more items.