java-codebase-rag 0.5.1__tar.gz → 0.5.3__tar.gz

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 (84) hide show
  1. {java_codebase_rag-0.5.1/java_codebase_rag.egg-info → java_codebase_rag-0.5.3}/PKG-INFO +31 -2
  2. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/README.md +30 -1
  3. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/build_ast_graph.py +3 -6
  4. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/pipeline.py +4 -0
  5. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3/java_codebase_rag.egg-info}/PKG-INFO +31 -2
  6. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/pyproject.toml +1 -1
  7. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/server.py +3 -0
  8. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/LICENSE +0 -0
  9. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/ast_java.py +0 -0
  10. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/brownfield_events.py +0 -0
  11. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/chunk_heuristics.py +0 -0
  12. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/graph_enrich.py +0 -0
  13. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/index_common.py +0 -0
  14. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/__init__.py +0 -0
  15. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/cli.py +0 -0
  16. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/cli_format.py +0 -0
  17. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/cli_progress.py +0 -0
  18. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/config.py +0 -0
  19. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/install_data/agents/explorer-rag-enhanced.md +0 -0
  20. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/install_data/skills/explore-codebase/SKILL.md +0 -0
  21. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag/installer.py +0 -0
  22. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag.egg-info/SOURCES.txt +0 -0
  23. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag.egg-info/dependency_links.txt +0 -0
  24. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag.egg-info/entry_points.txt +0 -0
  25. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag.egg-info/requires.txt +0 -0
  26. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_codebase_rag.egg-info/top_level.txt +0 -0
  27. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_index_flow_lancedb.py +0 -0
  28. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_index_v1_common.py +0 -0
  29. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/java_ontology.py +0 -0
  30. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/kuzu_queries.py +0 -0
  31. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/mcp_hints.py +0 -0
  32. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/mcp_v2.py +0 -0
  33. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/path_filtering.py +0 -0
  34. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/pr_analysis.py +0 -0
  35. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/search_lancedb.py +0 -0
  36. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/setup.cfg +0 -0
  37. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_agent_skills_static.py +0 -0
  38. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_assign_endpoint_client_extraction.py +0 -0
  39. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_ast_graph_build.py +0 -0
  40. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_ast_java_calls.py +0 -0
  41. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_ast_java_capabilities.py +0 -0
  42. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_bank_chat_brownfield_integration.py +0 -0
  43. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_brownfield_clients.py +0 -0
  44. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_brownfield_events.py +0 -0
  45. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_brownfield_overrides.py +0 -0
  46. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_brownfield_routes.py +0 -0
  47. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_call_edge_matching.py +0 -0
  48. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_call_edges_e2e.py +0 -0
  49. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_call_graph_receiver_resolution.py +0 -0
  50. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_call_graph_smoke_roundtrip.py +0 -0
  51. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_call_invariant.py +0 -0
  52. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_cli_progress_stdout_invariant.py +0 -0
  53. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_cli_quiet_parity.py +0 -0
  54. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_client_hint_recovery.py +0 -0
  55. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_client_node_extraction.py +0 -0
  56. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_client_role_rename.py +0 -0
  57. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_config.py +0 -0
  58. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_cross_service_resolution_flag.py +0 -0
  59. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_edge_navigation_doc.py +0 -0
  60. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_feign_not_exposer.py +0 -0
  61. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_graph_enrich.py +0 -0
  62. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_incremental_graph.py +0 -0
  63. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_installer.py +0 -0
  64. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_installer_integration.py +0 -0
  65. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_java_codebase_rag_cli.py +0 -0
  66. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_kuzu_queries.py +0 -0
  67. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_lancedb_e2e.py +0 -0
  68. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_mcp_hints.py +0 -0
  69. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_mcp_server_project_root.py +0 -0
  70. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_mcp_tools.py +0 -0
  71. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_mcp_v2.py +0 -0
  72. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_mcp_v2_compose.py +0 -0
  73. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_meta_chain_core.py +0 -0
  74. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_microservice_scope.py +0 -0
  75. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_outgoing_call_extraction.py +0 -0
  76. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_packaging_metadata.py +0 -0
  77. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_path_filtering.py +0 -0
  78. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_pr_analysis.py +0 -0
  79. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_resolve_routes_messaging_layer_c.py +0 -0
  80. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_route_extraction.py +0 -0
  81. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_schema_consistency.py +0 -0
  82. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_search_lancedb.py +0 -0
  83. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_search_lancedb_capability.py +0 -0
  84. {java_codebase_rag-0.5.1 → java_codebase_rag-0.5.3}/tests/test_string_value_atoms.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: java-codebase-rag
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: MCP server for semantic + structural search over Java codebases
5
5
  Author: HumanBean17
6
6
  License-Expression: MIT
@@ -84,6 +84,31 @@ pip install java-codebase-rag
84
84
  Python **3.11+** required. After install, `java-codebase-rag --help` should print the CLI groups.
85
85
  The package includes the CocoIndex lifecycle dependency used by `init`, `increment`, `reprocess`, and `erase`.
86
86
 
87
+ ### Interactive setup (recommended)
88
+
89
+ Run `java-codebase-rag install` from your Java project root to launch an interactive setup wizard that:
90
+
91
+ 1. Detects Java source directories (Maven/Gradle modules)
92
+ 2. Configures the embedding model (auto-downloads ~90MB or uses a local path)
93
+ 3. Selects agent hosts (Claude Code, Qwen Code, GigaCode)
94
+ 4. Deploys MCP registration, skill, and agent artifacts
95
+ 5. Generates `.java-codebase-rag.yml` configuration
96
+ 6. Runs `init` to build the index
97
+
98
+ ```bash
99
+ # Interactive mode
100
+ java-codebase-rag install
101
+
102
+ # Non-interactive mode (for CI/automation)
103
+ java-codebase-rag install --non-interactive --agent claude-code
104
+ ```
105
+
106
+ After `pip install --upgrade java-codebase-rag`, run `java-codebase-rag update` to refresh shipped artifacts.
107
+
108
+ ### Manual registration
109
+
110
+ If you prefer manual configuration, see [`docs/JAVA-CODEBASE-RAG-CLI.md`](./docs/JAVA-CODEBASE-RAG-CLI.md) for the full CLI reference.
111
+
87
112
  > **Stability disclaimer.** This package does **not** promise backward compatibility. MCP tool contracts, env vars, Lance/Kuzu schemas, config files, and Python APIs may change without a deprecation period. Track `main` and rebuild indexes when ontology or embedding settings change.
88
113
 
89
114
  ---
@@ -124,7 +149,9 @@ If vector hits come back and graph expansion adds neighbor symbols, the install
124
149
 
125
150
  ## Wire into an MCP host
126
151
 
127
- ### Claude Code
152
+ > **Quick setup:** Run `java-codebase-rag install` from your Java project root. The interactive wizard handles MCP registration, skill deployment, and configuration for Claude Code, Qwen Code, and GigaCode in one step.
153
+
154
+ ### Claude Code (manual)
128
155
 
129
156
  With the package installed, the console script `java-codebase-rag-mcp` is on your `PATH`. Register it project-scoped:
130
157
 
@@ -207,6 +234,8 @@ Run `java-codebase-rag --help` to list grouped subcommands. Operator playbook wi
207
234
 
208
235
  | Group | Subcommand | What it does |
209
236
  |---|---|---|
237
+ | Setup | `install` | Interactive setup wizard: config, MCP registration, skill/agent deployment, indexing. |
238
+ | Setup | `update` | Refresh shipped artifacts (skill, agent, MCP entry) after pip upgrade. |
210
239
  | Lifecycle | `init` | First-time index. Refuses if artifacts already exist. |
211
240
  | Lifecycle | `increment` | CocoIndex catch-up + incremental Kuzu update. `--vectors-only` for Lance only. |
212
241
  | Lifecycle | `reprocess` | Full Lance + Kuzu rebuild. `--vectors-only` / `--graph-only` for a single phase. |
@@ -44,6 +44,31 @@ pip install java-codebase-rag
44
44
  Python **3.11+** required. After install, `java-codebase-rag --help` should print the CLI groups.
45
45
  The package includes the CocoIndex lifecycle dependency used by `init`, `increment`, `reprocess`, and `erase`.
46
46
 
47
+ ### Interactive setup (recommended)
48
+
49
+ Run `java-codebase-rag install` from your Java project root to launch an interactive setup wizard that:
50
+
51
+ 1. Detects Java source directories (Maven/Gradle modules)
52
+ 2. Configures the embedding model (auto-downloads ~90MB or uses a local path)
53
+ 3. Selects agent hosts (Claude Code, Qwen Code, GigaCode)
54
+ 4. Deploys MCP registration, skill, and agent artifacts
55
+ 5. Generates `.java-codebase-rag.yml` configuration
56
+ 6. Runs `init` to build the index
57
+
58
+ ```bash
59
+ # Interactive mode
60
+ java-codebase-rag install
61
+
62
+ # Non-interactive mode (for CI/automation)
63
+ java-codebase-rag install --non-interactive --agent claude-code
64
+ ```
65
+
66
+ After `pip install --upgrade java-codebase-rag`, run `java-codebase-rag update` to refresh shipped artifacts.
67
+
68
+ ### Manual registration
69
+
70
+ If you prefer manual configuration, see [`docs/JAVA-CODEBASE-RAG-CLI.md`](./docs/JAVA-CODEBASE-RAG-CLI.md) for the full CLI reference.
71
+
47
72
  > **Stability disclaimer.** This package does **not** promise backward compatibility. MCP tool contracts, env vars, Lance/Kuzu schemas, config files, and Python APIs may change without a deprecation period. Track `main` and rebuild indexes when ontology or embedding settings change.
48
73
 
49
74
  ---
@@ -84,7 +109,9 @@ If vector hits come back and graph expansion adds neighbor symbols, the install
84
109
 
85
110
  ## Wire into an MCP host
86
111
 
87
- ### Claude Code
112
+ > **Quick setup:** Run `java-codebase-rag install` from your Java project root. The interactive wizard handles MCP registration, skill deployment, and configuration for Claude Code, Qwen Code, and GigaCode in one step.
113
+
114
+ ### Claude Code (manual)
88
115
 
89
116
  With the package installed, the console script `java-codebase-rag-mcp` is on your `PATH`. Register it project-scoped:
90
117
 
@@ -167,6 +194,8 @@ Run `java-codebase-rag --help` to list grouped subcommands. Operator playbook wi
167
194
 
168
195
  | Group | Subcommand | What it does |
169
196
  |---|---|---|
197
+ | Setup | `install` | Interactive setup wizard: config, MCP registration, skill/agent deployment, indexing. |
198
+ | Setup | `update` | Refresh shipped artifacts (skill, agent, MCP entry) after pip upgrade. |
170
199
  | Lifecycle | `init` | First-time index. Refuses if artifacts already exist. |
171
200
  | Lifecycle | `increment` | CocoIndex catch-up + incremental Kuzu update. `--vectors-only` for Lance only. |
172
201
  | Lifecycle | `reprocess` | Full Lance + Kuzu rebuild. `--vectors-only` / `--graph-only` for a single phase. |
@@ -3422,12 +3422,10 @@ def incremental_rebuild(
3422
3422
  pass6_match_edges(tables, verbose=verbose)
3423
3423
  write_kuzu(kuzu_path, tables, source_root=source_root, verbose=verbose)
3424
3424
 
3425
- n_files = _init_hash_tracker(source_root, kuzu_path)
3426
-
3427
3425
  return IncrementalResult(
3428
3426
  mode="full_fallback",
3429
3427
  files_changed=0,
3430
- files_added=n_files,
3428
+ files_added=0,
3431
3429
  files_removed=0,
3432
3430
  dependents_reprocessed=0,
3433
3431
  elapsed_sec=time.time() - t_start,
@@ -3648,12 +3646,10 @@ def _fallback_to_full(source_root: Path, kuzu_path: Path, verbose: bool, t_start
3648
3646
  pass6_match_edges(tables, verbose=verbose)
3649
3647
  write_kuzu(kuzu_path, tables, source_root=source_root, verbose=verbose)
3650
3648
 
3651
- n_files = _init_hash_tracker(source_root, kuzu_path)
3652
-
3653
3649
  return IncrementalResult(
3654
3650
  mode="full_fallback",
3655
3651
  files_changed=0,
3656
- files_added=n_files,
3652
+ files_added=0,
3657
3653
  files_removed=0,
3658
3654
  dependents_reprocessed=0,
3659
3655
  elapsed_sec=time.time() - t_start,
@@ -3785,6 +3781,7 @@ def write_kuzu(
3785
3781
  _verbose_stderr_line(f"[graph] writing · routes/exposes written in {time.time() - t2:.2f}s")
3786
3782
  _write_meta(conn, tables, source_root)
3787
3783
  conn.close()
3784
+ _init_hash_tracker(source_root, db_path)
3788
3785
 
3789
3786
 
3790
3787
  # ---------- CLI ----------
@@ -128,6 +128,10 @@ def run_cocoindex_update(
128
128
  stdout="",
129
129
  stderr=f"java_index_flow_lancedb.py not found under {bd}",
130
130
  )
131
+ # Set CocoIndex concurrency limits to prevent "too many open files" error
132
+ # See: https://github.com/HumanBean17/java-codebase-rag/issues/293
133
+ env = env.copy()
134
+ env.setdefault("COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS", "256")
131
135
  cmd: list[str] = [str(exe), "update", COCOINDEX_TARGET]
132
136
  if full_reprocess:
133
137
  cmd.extend(["--full-reprocess", "-f"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: java-codebase-rag
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: MCP server for semantic + structural search over Java codebases
5
5
  Author: HumanBean17
6
6
  License-Expression: MIT
@@ -84,6 +84,31 @@ pip install java-codebase-rag
84
84
  Python **3.11+** required. After install, `java-codebase-rag --help` should print the CLI groups.
85
85
  The package includes the CocoIndex lifecycle dependency used by `init`, `increment`, `reprocess`, and `erase`.
86
86
 
87
+ ### Interactive setup (recommended)
88
+
89
+ Run `java-codebase-rag install` from your Java project root to launch an interactive setup wizard that:
90
+
91
+ 1. Detects Java source directories (Maven/Gradle modules)
92
+ 2. Configures the embedding model (auto-downloads ~90MB or uses a local path)
93
+ 3. Selects agent hosts (Claude Code, Qwen Code, GigaCode)
94
+ 4. Deploys MCP registration, skill, and agent artifacts
95
+ 5. Generates `.java-codebase-rag.yml` configuration
96
+ 6. Runs `init` to build the index
97
+
98
+ ```bash
99
+ # Interactive mode
100
+ java-codebase-rag install
101
+
102
+ # Non-interactive mode (for CI/automation)
103
+ java-codebase-rag install --non-interactive --agent claude-code
104
+ ```
105
+
106
+ After `pip install --upgrade java-codebase-rag`, run `java-codebase-rag update` to refresh shipped artifacts.
107
+
108
+ ### Manual registration
109
+
110
+ If you prefer manual configuration, see [`docs/JAVA-CODEBASE-RAG-CLI.md`](./docs/JAVA-CODEBASE-RAG-CLI.md) for the full CLI reference.
111
+
87
112
  > **Stability disclaimer.** This package does **not** promise backward compatibility. MCP tool contracts, env vars, Lance/Kuzu schemas, config files, and Python APIs may change without a deprecation period. Track `main` and rebuild indexes when ontology or embedding settings change.
88
113
 
89
114
  ---
@@ -124,7 +149,9 @@ If vector hits come back and graph expansion adds neighbor symbols, the install
124
149
 
125
150
  ## Wire into an MCP host
126
151
 
127
- ### Claude Code
152
+ > **Quick setup:** Run `java-codebase-rag install` from your Java project root. The interactive wizard handles MCP registration, skill deployment, and configuration for Claude Code, Qwen Code, and GigaCode in one step.
153
+
154
+ ### Claude Code (manual)
128
155
 
129
156
  With the package installed, the console script `java-codebase-rag-mcp` is on your `PATH`. Register it project-scoped:
130
157
 
@@ -207,6 +234,8 @@ Run `java-codebase-rag --help` to list grouped subcommands. Operator playbook wi
207
234
 
208
235
  | Group | Subcommand | What it does |
209
236
  |---|---|---|
237
+ | Setup | `install` | Interactive setup wizard: config, MCP registration, skill/agent deployment, indexing. |
238
+ | Setup | `update` | Refresh shipped artifacts (skill, agent, MCP entry) after pip upgrade. |
210
239
  | Lifecycle | `init` | First-time index. Refuses if artifacts already exist. |
211
240
  | Lifecycle | `increment` | CocoIndex catch-up + incremental Kuzu update. `--vectors-only` for Lance only. |
212
241
  | Lifecycle | `reprocess` | Full Lance + Kuzu rebuild. `--vectors-only` / `--graph-only` for a single phase. |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "java-codebase-rag"
7
- version = "0.5.1"
7
+ version = "0.5.3"
8
8
  description = "MCP server for semantic + structural search over Java codebases"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -162,6 +162,9 @@ def _cocoindex_subprocess_env(project_root: Path) -> dict[str, str]:
162
162
  idx = os.environ.get("JAVA_CODEBASE_RAG_INDEX_DIR", "").strip()
163
163
  if idx:
164
164
  sub_env["JAVA_CODEBASE_RAG_INDEX_DIR"] = str(Path(idx).expanduser().resolve())
165
+ # Set CocoIndex concurrency limits to prevent "too many open files" error
166
+ # See: https://github.com/HumanBean17/java-codebase-rag/issues/293
167
+ sub_env.setdefault("COCOINDEX_SOURCE_MAX_INFLIGHT_ROWS", "256")
165
168
  return sub_env
166
169
 
167
170