java-codebase-rag 0.6.6__py3-none-any.whl → 0.8.0__py3-none-any.whl

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 (33) hide show
  1. ast_java.py +8 -3
  2. build_ast_graph.py +72 -16
  3. graph_enrich.py +2 -1
  4. graph_types.py +133 -0
  5. java_codebase_rag/_fdlimit.py +10 -2
  6. java_codebase_rag/_stdio.py +32 -0
  7. java_codebase_rag/cli.py +135 -24
  8. java_codebase_rag/config.py +128 -9
  9. java_codebase_rag/install_data/agents/explorer-rag-cli.md +291 -0
  10. java_codebase_rag/install_data/agents/explorer-rag-enhanced.md +8 -8
  11. java_codebase_rag/install_data/skills/explore-codebase/SKILL.md +8 -8
  12. java_codebase_rag/install_data/skills/explore-codebase-cli/SKILL.md +251 -0
  13. java_codebase_rag/installer.py +438 -103
  14. java_codebase_rag/jrag.py +4300 -0
  15. java_codebase_rag/jrag_envelope.py +1085 -0
  16. java_codebase_rag/jrag_hints.py +204 -0
  17. java_codebase_rag/jrag_render.py +688 -0
  18. java_codebase_rag/pipeline.py +20 -0
  19. {java_codebase_rag-0.6.6.dist-info → java_codebase_rag-0.8.0.dist-info}/METADATA +137 -94
  20. java_codebase_rag-0.8.0.dist-info/RECORD +43 -0
  21. {java_codebase_rag-0.6.6.dist-info → java_codebase_rag-0.8.0.dist-info}/WHEEL +1 -1
  22. {java_codebase_rag-0.6.6.dist-info → java_codebase_rag-0.8.0.dist-info}/entry_points.txt +1 -0
  23. {java_codebase_rag-0.6.6.dist-info → java_codebase_rag-0.8.0.dist-info}/top_level.txt +2 -0
  24. java_index_flow_lancedb.py +34 -19
  25. java_ontology.py +12 -0
  26. ladybug_queries.py +233 -52
  27. mcp_hints.py +6 -6
  28. mcp_v2.py +205 -617
  29. resolve_service.py +649 -0
  30. search_lancedb.py +10 -1
  31. server.py +20 -12
  32. java_codebase_rag-0.6.6.dist-info/RECORD +0 -34
  33. {java_codebase_rag-0.6.6.dist-info → java_codebase_rag-0.8.0.dist-info}/licenses/LICENSE +0 -0
server.py CHANGED
@@ -26,7 +26,8 @@ from java_codebase_rag.config import (
26
26
  from ladybug_queries import LadybugGraph, resolve_ladybug_path
27
27
  from mcp.server.fastmcp import FastMCP
28
28
  from pydantic import BaseModel, Field
29
- from search_lancedb import TABLES
29
+ # NOTE: search_lancedb.TABLES is imported lazily in list_code_index_tables_payload() — it
30
+ # pulls lancedb/torch and is unavailable on graph-only installs (macOS Intel).
30
31
 
31
32
  _COCOINDEX_TARGET = "java_index_flow_lancedb.py:JavaCodeIndexLance"
32
33
  _INSTRUCTIONS = (
@@ -296,12 +297,19 @@ def _graph_meta_output() -> GraphMetaOutput:
296
297
 
297
298
 
298
299
  def list_code_index_tables_payload() -> IndexInfoOutput:
300
+ try:
301
+ from search_lancedb import TABLES
302
+
303
+ tables = dict(TABLES)
304
+ except ImportError:
305
+ # Graph-only install (no lancedb): no Lance vector tables exist.
306
+ tables = {}
299
307
  return IndexInfoOutput(
300
308
  lancedb_uri=_resolve_lancedb_uri(),
301
309
  embedding_model=resolved_sbert_model_for_process_env(SBERT_MODEL),
302
310
  project_root=str(_project_root()),
303
311
  cocoindex_target=_COCOINDEX_TARGET,
304
- tables=dict(TABLES),
312
+ tables=tables,
305
313
  graph=_graph_meta_output(),
306
314
  )
307
315
 
@@ -499,10 +507,10 @@ def create_mcp_server() -> FastMCP:
499
507
  "Ranked chunk retrieval over content tables (java/sql/yaml); `query` is opaque text (natural language or code "
500
508
  "fragments) and results are score-ranked, not boolean-matched. For graph-structured listing "
501
509
  "(symbols/routes/clients/producers) use `find`, not `search`. Optional `filter` uses the same NodeFilter "
502
- "schema as `find` but only **symbol-applicable** fields apply — others return success=false. Wildcards "
503
- "(`*`, `?`) in prefix fields are rejected—use ranked `query` text instead. There is **no** "
510
+ "schema as `find` but only **symbol-applicable** fields apply — others return success=false. Substring "
511
+ "fields match literally (no `*`/`?` metacharacters)—use ranked `query` text for fuzzy discovery. There is **no** "
504
512
  "structured DSL inside `query`; structured predicates belong in `find`. "
505
- "For identifier-shaped lookups (FQN, id prefix, route/client identifiers, …), use `resolve` first; "
513
+ "For identifier-shaped lookups (FQN, id, route/client identifiers, …), use `resolve` first; "
506
514
  "use `search` for natural-language or ranked fuzzy discovery. "
507
515
  "Successful responses echo `limit`/`offset`."
508
516
  ),
@@ -548,13 +556,13 @@ def create_mcp_server() -> FastMCP:
548
556
  name="find",
549
557
  description=(
550
558
  "Exact structured listing for one node kind. Per-kind applicable fields: **symbol** — "
551
- "microservice, module, role, exclude_roles, annotation, capability, fqn_prefix, symbol_kind, symbol_kinds; "
552
- "**route** — microservice, module, http_method, path_prefix, framework; **client** — microservice, module, "
553
- "source_layer, client_kind, target_service, target_path_prefix, http_method; **producer** — microservice, "
554
- "module, source_layer, producer_kind, topic_prefix. "
559
+ "microservice, module, role, exclude_roles, annotation, capability, fqn_contains, symbol_kind, symbol_kinds; "
560
+ "**route** — microservice, module, http_method, path_contains, framework; **client** — microservice, module, "
561
+ "source_layer, client_kind, target_service, target_path_contains, http_method; **producer** — microservice, "
562
+ "module, source_layer, producer_kind, topic_contains. "
555
563
  "`role` is singular and `exclude_roles` plural; `capability` is a functional tag assigned during indexing. "
556
- "`fqn_prefix` is a prefix predicate — for exact FQN or id lookup use `resolve`/`describe`. "
557
- "Wildcards in prefix fields are rejected. An empty filter (`{}`) or `filter=None` means no predicate (all nodes of "
564
+ "`fqn_contains` is a substring predicate — for exact FQN or id lookup use `resolve`/`describe`. "
565
+ "Substring fields match literally (Cypher `CONTAINS`); no wildcard metacharacters. An empty filter (`{}`) or `filter=None` means no predicate (all nodes of "
558
566
  "that kind; use pagination). Unknown keys or inapplicable populated fields return success=false. "
559
567
  "Successful responses echo `limit`/`offset`."
560
568
  ),
@@ -620,7 +628,7 @@ def create_mcp_server() -> FastMCP:
620
628
  "`direction` and `edge_types` have no defaults; an empty `edge_types` fails. The CALLS-only features — "
621
629
  "`edge_filter`, `include_unresolved`, `dedup_calls` — each require `edge_types=['CALLS']`; `edge_filter` and "
622
630
  "`include_unresolved` are mutually exclusive. Violating a precondition (wrong CALLS context, composed/override "
623
- "keys on an ineligible origin or with `direction='in'`, wildcards in prefix fields, unknown filter keys) returns "
631
+ "keys on an ineligible origin or with `direction='in'`, unknown filter keys) returns "
624
632
  "success=false with a message; `dedup_calls` with other edge_types is a silent no-op. "
625
633
  "Optional `filter` applies to each neighbor endpoint row; populated fields must be applicable to that "
626
634
  "neighbor's kind—mixed-kind result sets fail on the first inapplicable neighbor (per-neighbor strict frame). "
@@ -1,34 +0,0 @@
1
- ast_java.py,sha256=Paee3ZV9G5iy8LqfkVq0Ah_1fV0k632oS5JPkiWzwB8,99206
2
- brownfield_events.py,sha256=yxXkKDgMb3VPtaiakGzncHM_EGnda8xIue6w90yYp8s,2055
3
- build_ast_graph.py,sha256=jubb9Ex_6B3ktsInqNkk-EksBtQjofoFhE92lmHr308,169659
4
- chunk_heuristics.py,sha256=aQk2NOKxzUdqoUAJUO3G3LE0MN_bYZWNLQ0tkmj5uts,1813
5
- graph_enrich.py,sha256=W_OQK7YRU1K8wi-vfrxZWUd-EErTqWx840UBrhVpNsM,62788
6
- index_common.py,sha256=HT6FKHFJ084eFvd3fR1j8z8gf4eWoPHVW8GXLpw464I,285
7
- java_index_flow_lancedb.py,sha256=JHdRWDZoZ3wnxi8NNG2ck8zEmSALHB2UVB1N8TSvlmg,24109
8
- java_index_v1_common.py,sha256=nF1KrSqboF_RRvWerG9knRRFmWwsrG_CvhgnsoZ8KqA,1154
9
- java_ontology.py,sha256=71bCLDNvMy0SpZPzSR5apJ0qJXNd6y5ggkLdBEw_PFo,16682
10
- ladybug_queries.py,sha256=7vSP7WsUKQYXHFenBMlCdpUFed39h3oul-WRkf55YVc,90330
11
- mcp_hints.py,sha256=3swh05LSiWur3tm3-yssndBsLxIxFhy501kBtJI8jJ0,42509
12
- mcp_v2.py,sha256=S8PiVGDlyI7cvTmeMdQobhKUxWqKoY2YxXXr4pu9lQI,80348
13
- path_filtering.py,sha256=R--XzI51LXBu5IBKMCnJWbkNr6I5d-SDmltyQQnWco0,17674
14
- pr_analysis.py,sha256=zrmZZD5yotJtM02Kif6_jgI_oeformOao793akp0N6Y,18394
15
- search_lancedb.py,sha256=ga_qySeCzA6hCibxUPXpCbTxW9mCjTdwirMhMhfNCz4,36801
16
- server.py,sha256=DcJwocSknBy0vwsUvYiC5hr-hrD_rRT-u9_DmuRTC9k,35035
17
- java_codebase_rag/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
18
- java_codebase_rag/_fdlimit.py,sha256=WroFdfSNbcriKok6q8znTf74dqlznxea_1Fd5bHl_3o,1930
19
- java_codebase_rag/cli.py,sha256=zMZcjVKRgfv7VpTb0h1vjGGzPXY4NT2Uqyz77uysc0c,40085
20
- java_codebase_rag/cli_format.py,sha256=CT7-xdwZ0bMCdP68_UOwkvm-mnLluU3LutlM-mDNk60,1839
21
- java_codebase_rag/cli_progress.py,sha256=q6Wh97yzLGs1B8UFk_WAKivfQu7Y5RnUUE-T2YHWkIs,3237
22
- java_codebase_rag/config.py,sha256=bfwYI4R8PU9YV_M4r8-03iaUZ_0TW-qN_NuhIsDXy2M,18769
23
- java_codebase_rag/installer.py,sha256=sXsHPo24aoDFoTr0D_vYLg0MFdGAV2wdL05FqRaul6E,52861
24
- java_codebase_rag/lance_optimize.py,sha256=25Rwj7HNO8F-35MxhFK6naqgbjd3H-T0zKb3pXB4H0s,9268
25
- java_codebase_rag/pipeline.py,sha256=ydNktEGL1YniAjJsr37yKBo_bGV4cN_LTGVTmmrsrZw,14688
26
- java_codebase_rag/progress.py,sha256=2IxdMALDM0wAQCyJrrfZ975zM_85C-4BfHxf4AtYifE,23212
27
- java_codebase_rag/install_data/agents/explorer-rag-enhanced.md,sha256=BkdQpBEWqSdvGHgbqMdRb5CWfEiFRJK4Dgqbyal3l6s,14551
28
- java_codebase_rag/install_data/skills/explore-codebase/SKILL.md,sha256=YkRnrM7Wh5E8raFjAW3RrN2V9-ov8upaGC3UdpSx6U8,12346
29
- java_codebase_rag-0.6.6.dist-info/licenses/LICENSE,sha256=gxvtiHtuviR_q8ZAjWw-QTcF3DyPzg6ZY-lQrr8OPpw,1068
30
- java_codebase_rag-0.6.6.dist-info/METADATA,sha256=69hho-GAzcyMq8CHyIGpQBtoupE-SRBc4_2dcqhbB2g,17242
31
- java_codebase_rag-0.6.6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
32
- java_codebase_rag-0.6.6.dist-info/entry_points.txt,sha256=wsPZwot0Ui4JI3TIgW8LcbN8bNtKFbwQAlHAAJXfYgQ,117
33
- java_codebase_rag-0.6.6.dist-info/top_level.txt,sha256=syQgi8XPBwY2ws_NZ1uRCxTf_s41NpshwEHNdcdnk3A,245
34
- java_codebase_rag-0.6.6.dist-info/RECORD,,