arceus-s 1.6.5 → 1.6.7
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 +126 -318
- package/dist/_shared/integrations/understand-quickly.js +1 -1
- package/dist/cli/analyze.js +0 -10
- package/dist/cli/serve.js +1 -1
- package/dist/core/embeddings/config.js +1 -3
- package/dist/core/lbug/lbug-adapter.d.ts +2 -1
- package/dist/core/lbug/lbug-adapter.js +6 -6
- package/dist/core/lbug/lbug-config.js +19 -0
- package/dist/core/lbug/pool-adapter.js +24 -0
- package/dist/server/api.js +28 -12
- package/package.json +1 -1
- package/scripts/build.js +1 -1
- package/scripts/install-duckdb-extension.mjs +1 -3
- package/web/assets/__vite-browser-external-ZHh0aOLt.js +1 -0
- package/web/assets/{agent-DaYmiVrk.js → agent-D08sq62e.js} +3 -3
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-Cg69mitr.js +1 -0
- package/web/assets/{architectureDiagram-UL44E2DR-613o-OfM.js → architectureDiagram-UL44E2DR-D_Kwz4GF.js} +1 -1
- package/web/assets/{blockDiagram-7IZFK4PR-BBJRt4vF.js → blockDiagram-7IZFK4PR-Rftr7I3J.js} +1 -1
- package/web/assets/{c4Diagram-Y2BXMSZH-BhR2CErx.js → c4Diagram-Y2BXMSZH-Blfibz8B.js} +1 -1
- package/web/assets/{chunk-3SSMPTDK-DWfEAoKy.js → chunk-3SSMPTDK-Dzc7Yf3M.js} +1 -1
- package/web/assets/{chunk-6764PJDD-NOXEgi3n.js → chunk-6764PJDD-y1Zhu3dl.js} +1 -1
- package/web/assets/{chunk-AZZRMDJM-DVvcxwI7.js → chunk-AZZRMDJM-Ckc7sqLz.js} +1 -1
- package/web/assets/{chunk-JQRUD6KW-CQgkrimK.js → chunk-JQRUD6KW-OwYAjIDW.js} +1 -1
- package/web/assets/{chunk-KGYTTC2M-DxOdSoAJ.js → chunk-KGYTTC2M-icDjj_dF.js} +2 -2
- package/web/assets/{chunk-KRXBNO2N-BlnQTnxv.js → chunk-KRXBNO2N-DST_NbH2.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-Dhf_u-1F.js → chunk-LCXTWHL2-HAyCqcYc.js} +1 -1
- package/web/assets/{chunk-LII3EMHJ-Cb3HLCZX.js → chunk-LII3EMHJ-CK3snkrl.js} +1 -1
- package/web/assets/{chunk-RG4AUYOV-DLCfNede.js → chunk-RG4AUYOV-Fv4PUQgU.js} +1 -1
- package/web/assets/chunk-T5OCTHI4-nCSIBvb4.js +1 -0
- package/web/assets/{chunk-W44A43WB-ZyrAMwtT.js → chunk-W44A43WB-CXihcI9p.js} +1 -1
- package/web/assets/{chunk-ZXARS5L4-B0TJPmj5.js → chunk-ZXARS5L4-BxJ5q1D9.js} +1 -1
- package/web/assets/classDiagram-KGZ6W3CR-BukzWJD4.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-BukzWJD4.js +1 -0
- package/web/assets/{cose-bilkent-UX7MHV2Q-BsPIaeag.js → cose-bilkent-UX7MHV2Q-DuYon5xW.js} +1 -1
- package/web/assets/{dagre-ND4H6XIP-CV4l9vOZ.js → dagre-ND4H6XIP-CmcxqIrI.js} +1 -1
- package/web/assets/{diagram-3NCE3AQN-9kSzEbS8.js → diagram-3NCE3AQN-C1qPDs8V.js} +1 -1
- package/web/assets/{diagram-GF46GFSD-qRvqbex6.js → diagram-GF46GFSD-BGcKhccJ.js} +1 -1
- package/web/assets/{diagram-HNR7UZ2L-Dj_ye4Ua.js → diagram-HNR7UZ2L-CmQInrek.js} +1 -1
- package/web/assets/{diagram-QXG6HAR7-COwBV6B0.js → diagram-QXG6HAR7-D0COCNQM.js} +1 -1
- package/web/assets/{diagram-WEQXMOUZ-C9xjn5dU.js → diagram-WEQXMOUZ-Dp4WM6wH.js} +1 -1
- package/web/assets/{erDiagram-L5TCEMPS-fRp0t1Yd.js → erDiagram-L5TCEMPS-Bvi8O3E7.js} +1 -1
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-1KjNRBui.js +1 -0
- package/web/assets/{flowDiagram-H6V6AXG4-Ccr8FDLD.js → flowDiagram-H6V6AXG4-86waGA_9.js} +1 -1
- package/web/assets/{ganttDiagram-JCBTUEKG-DfBPqAGN.js → ganttDiagram-JCBTUEKG-CB2y4tlc.js} +1 -1
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DpY0BgB0.js +1 -0
- package/web/assets/{gitGraphDiagram-S2ZK5IYY-CHvG_UQ0.js → gitGraphDiagram-S2ZK5IYY-CTB3Q2Jy.js} +1 -1
- package/web/assets/{index-CJJQgfSH.js → index-C_U4LtVd.js} +8 -8
- package/web/assets/index-ChWMOJVF.css +2 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-DpUIwTWQ.js +1 -0
- package/web/assets/{infoDiagram-3YFTVSEB-C7cMy-GP.js → infoDiagram-3YFTVSEB-L4P_fiuW.js} +1 -1
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-C80yCPYi.js → ishikawaDiagram-BNXS4ZKH-CITb_lI_.js} +1 -1
- package/web/assets/{journeyDiagram-M6C3CM3L-BHxH1zjE.js → journeyDiagram-M6C3CM3L-C_GoTswH.js} +1 -1
- package/web/assets/{kanban-definition-75IXJCU3-DNZo1hOE.js → kanban-definition-75IXJCU3-DIO2rDwv.js} +1 -1
- package/web/assets/{katex-K3KEBU37-CbyuvTf1.js → katex-K3KEBU37-BGx8vmMI.js} +1 -1
- package/web/assets/{mindmap-definition-2TDM6QVE-Dpgl3Elt.js → mindmap-definition-2TDM6QVE-BwpfdZuv.js} +1 -1
- package/web/assets/packet-YPE3B663-LP52Z2RK-CS02eChX.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-MN8Lhnq1.js +1 -0
- package/web/assets/{pieDiagram-CU6KROY3-BW0mr0ek.js → pieDiagram-CU6KROY3-CJydlFN5.js} +1 -1
- package/web/assets/{quadrantDiagram-VICAPDV7-C1dCMBbk.js → quadrantDiagram-VICAPDV7-C_tHB163.js} +1 -1
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DlPHMJir.js +1 -0
- package/web/assets/{requirementDiagram-JXO7QTGE-Dyqqny4j.js → requirementDiagram-JXO7QTGE-4ugGQFD5.js} +1 -1
- package/web/assets/{sankeyDiagram-URQDO5SZ-B3FGr5SL.js → sankeyDiagram-URQDO5SZ-B22-qiwB.js} +1 -1
- package/web/assets/{sequenceDiagram-VS2MUI6T-B4LlGP9C.js → sequenceDiagram-VS2MUI6T-BxYAC7JW.js} +1 -1
- package/web/assets/{stateDiagram-7D4R322I-V9F-klBP.js → stateDiagram-7D4R322I-DtGlq52y.js} +1 -1
- package/web/assets/stateDiagram-v2-36443NZ5-DVW4TIqN.js +1 -0
- package/web/assets/{timeline-definition-O6YCAMPW-CX2WjkZA.js → timeline-definition-O6YCAMPW-BvLaVchF.js} +1 -1
- package/web/assets/treeView-BLDUP644-QA4HXRO3-BhurUJPT.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-CNYyLmQO.js +1 -0
- package/web/assets/{vennDiagram-MWXL3ELB-BxZPYqOF.js → vennDiagram-MWXL3ELB-DzWO4INt.js} +1 -1
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-DVYbFSZ8.js +1 -0
- package/web/assets/{wardleyDiagram-CUQ6CDDI-BLdJJYkV.js → wardleyDiagram-CUQ6CDDI-zMXmXc6p.js} +1 -1
- package/web/assets/{xychartDiagram-N2JHSOCM-DqDgigLa.js → xychartDiagram-N2JHSOCM-8TsH4zE8.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/__vite-browser-external-CLwMvL_q.js +0 -1
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-aGTGQQQG.js +0 -1
- package/web/assets/chunk-T5OCTHI4-B0CGAG7q.js +0 -1
- package/web/assets/classDiagram-KGZ6W3CR-CvSnsfJD.js +0 -1
- package/web/assets/classDiagram-v2-72OJOZXJ-CvSnsfJD.js +0 -1
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BR0Ygfrw.js +0 -1
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-CYihBz6Z.js +0 -1
- package/web/assets/index-B7cw1L6-.css +0 -2
- package/web/assets/info-J43DQDTF-KCYPFFUO-BmmoeX4D.js +0 -1
- package/web/assets/packet-YPE3B663-LP52Z2RK-7JAqDnUy.js +0 -1
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-Bv9vE7io.js +0 -1
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-dtZpcOZd.js +0 -1
- package/web/assets/stateDiagram-v2-36443NZ5-CKDYYzqR.js +0 -1
- package/web/assets/treeView-BLDUP644-QA4HXRO3-BQaKTdhr.js +0 -1
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-Bqlxdyrq.js +0 -1
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-dofeprUr.js +0 -1
package/README.md
CHANGED
|
@@ -1,92 +1,67 @@
|
|
|
1
|
-
# Arceus
|
|
1
|
+
# Arceus Core CLI: `arceus-s`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Works with **Cursor**, **Claude Code**, **Codex**, **Windsurf**, **Cline**, **OpenCode**, and any MCP-compatible tool.
|
|
3
|
+
This is the core compiler-aware static analyzer and Model Context Protocol (MCP) server daemon for Arceus. It parses raw codebase trees into a queryable semantic graph database (built on LadybugDB) to empower AI engineering agents with high-fidelity system-level reasoning.
|
|
6
4
|
|
|
7
5
|
[](https://www.npmjs.com/package/arceus-s)
|
|
8
6
|
[](https://polyformproject.org/licenses/noncommercial/1.0.0/)
|
|
9
7
|
|
|
10
8
|
---
|
|
11
9
|
|
|
12
|
-
## Why?
|
|
10
|
+
## Why Use Arceus?
|
|
13
11
|
|
|
14
|
-
AI
|
|
12
|
+
Standard AI code generation assistants are constrained by linear text analysis. They write, edit, and refactor lines of code without a compiler's understanding of structural side effects and calling dependencies.
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Arceus resolves imports, cross-file call targets, variable types, class interfaces, and modular clusters, representing the entire relational map inside an embedded local database. AI agents can then query this database, minimizing context pollution and preventing broken implementation chains.
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
---
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
## Installation & Command Ingestion
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
Because the command name `arc` is already registered by an unrelated project in the public registry, Arceus is distributed under the name **`arceus-s`**. Npm automatically routes global binary path calls to both `arc` and `arceus`.
|
|
23
21
|
|
|
24
22
|
```bash
|
|
25
|
-
#
|
|
23
|
+
# Global install from registry
|
|
26
24
|
npm install -g arceus-s
|
|
27
25
|
|
|
28
|
-
#
|
|
29
|
-
arc
|
|
30
|
-
# or: arceus analyze
|
|
26
|
+
# Verify CLI commands
|
|
27
|
+
arc --help
|
|
31
28
|
```
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
If you prefer to run it without a global installation:
|
|
36
|
-
|
|
30
|
+
### Ingesting Your First Repository
|
|
31
|
+
Run the indexer from your project's root folder:
|
|
37
32
|
```bash
|
|
38
|
-
#
|
|
33
|
+
# Run one-off without global install
|
|
39
34
|
npx arceus-s analyze
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
That's it. This indexes the codebase, installs agent skills, registers Claude Code hooks, and creates `AGENTS.md` / `CLAUDE.md` context files — all in one command.
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Editor Support
|
|
49
|
-
|
|
50
|
-
| Editor | MCP | Skills | Hooks (auto-augment) | Support |
|
|
51
|
-
|--------|-----|--------|---------------------|---------|
|
|
52
|
-
| **Claude Code** | Yes | Yes | Yes (PreToolUse) | **Full** |
|
|
53
|
-
| **Cursor** | Yes | Yes | Yes (postToolUse, [manual install](../arceus-cursor-integration/README.md#hook-install)) | **Full** |
|
|
54
|
-
| **Codex** | Yes | Yes | — | MCP + Skills |
|
|
55
|
-
| **Windsurf** | Yes | — | — | MCP |
|
|
56
|
-
| **OpenCode** | Yes | Yes | — | MCP + Skills |
|
|
57
|
-
|
|
58
|
-
> **Claude Code** gets the deepest integration: MCP tools + agent skills + PreToolUse hooks that automatically enrich grep/glob/bash calls with knowledge graph context.
|
|
36
|
+
# Or run via global installer
|
|
37
|
+
arc analyze
|
|
38
|
+
```
|
|
39
|
+
This command maps the directory, persists the graph database inside `.arc/`, registers the repository in your global directory, and generates `AGENTS.md` and `CLAUDE.md` context files.
|
|
59
40
|
|
|
60
|
-
|
|
41
|
+
---
|
|
61
42
|
|
|
62
|
-
|
|
63
|
-
|-------|---------|--------|
|
|
64
|
-
| [pi](https://pi.dev) | `pi install npm:pi-arc` | [pi-arc](https://github.com/tintinweb/pi-arc) |
|
|
43
|
+
## Editor & MCP Server Integration
|
|
65
44
|
|
|
66
|
-
|
|
45
|
+
To automatically write the connection parameters for your active editors, run:
|
|
46
|
+
```bash
|
|
47
|
+
arc setup
|
|
48
|
+
```
|
|
67
49
|
|
|
68
|
-
|
|
50
|
+
### Manual Configuration Schemes
|
|
69
51
|
|
|
70
|
-
|
|
52
|
+
If your editor requires manual server setup:
|
|
71
53
|
|
|
54
|
+
#### 1. Claude Code
|
|
72
55
|
```bash
|
|
73
|
-
#
|
|
74
|
-
claude mcp add arceus -- npx -y arceus-s mcp
|
|
75
|
-
|
|
76
|
-
# Windows
|
|
56
|
+
# Windows systems
|
|
77
57
|
claude mcp add arceus -- cmd /c npx -y arceus-s mcp
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Codex (full support — MCP + skills)
|
|
81
58
|
|
|
82
|
-
|
|
83
|
-
|
|
59
|
+
# Unix / macOS systems
|
|
60
|
+
claude mcp add arceus -- npx -y arceus-s mcp
|
|
84
61
|
```
|
|
85
62
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Add to `~/.cursor/mcp.json` (global — works for all projects):
|
|
89
|
-
|
|
63
|
+
#### 2. Cursor
|
|
64
|
+
Add this entry to your system's global config (`~/.cursor/mcp.json`):
|
|
90
65
|
```json
|
|
91
66
|
{
|
|
92
67
|
"mcpServers": {
|
|
@@ -98,10 +73,8 @@ Add to `~/.cursor/mcp.json` (global — works for all projects):
|
|
|
98
73
|
}
|
|
99
74
|
```
|
|
100
75
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Add to `~/.config/opencode/config.json`:
|
|
104
|
-
|
|
76
|
+
#### 3. OpenCode
|
|
77
|
+
Append this config to `~/.config/opencode/config.json`:
|
|
105
78
|
```json
|
|
106
79
|
{
|
|
107
80
|
"mcp": {
|
|
@@ -113,283 +86,118 @@ Add to `~/.config/opencode/config.json`:
|
|
|
113
86
|
}
|
|
114
87
|
```
|
|
115
88
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Arceus builds a complete knowledge graph of your codebase through a multi-phase indexing pipeline:
|
|
119
|
-
|
|
120
|
-
1. **Structure** — Walks the file tree and maps folder/file relationships
|
|
121
|
-
2. **Parsing** — Extracts functions, classes, methods, and interfaces using Tree-sitter ASTs
|
|
122
|
-
3. **Resolution** — Resolves imports and function calls across files with language-aware logic
|
|
123
|
-
- **Field & Property Type Resolution** — Tracks field types across classes and interfaces for deep chain resolution (e.g., `user.address.city.getName()`)
|
|
124
|
-
- **Return-Type-Aware Variable Binding** — Infers variable types from function return types, enabling accurate call-result binding
|
|
125
|
-
4. **Clustering** — Groups related symbols into functional communities
|
|
126
|
-
5. **Processes** — Traces execution flows from entry points through call chains
|
|
127
|
-
6. **Search** — Builds hybrid search indexes for fast retrieval
|
|
128
|
-
|
|
129
|
-
The result is a **LadybugDB graph database** stored locally in `.arc/` with full-text search and semantic embeddings.
|
|
130
|
-
|
|
131
|
-
## MCP Tools
|
|
132
|
-
|
|
133
|
-
Your AI agent gets these tools automatically:
|
|
134
|
-
|
|
135
|
-
| Tool | What It Does | `repo` Param |
|
|
136
|
-
|------|-------------|--------------|
|
|
137
|
-
| `list_repos` | Discover all indexed repositories | — |
|
|
138
|
-
| `query` | Process-grouped hybrid search (BM25 + semantic + RRF) | Optional |
|
|
139
|
-
| `context` | 360-degree symbol view — categorized refs, process participation | Optional |
|
|
140
|
-
| `impact` | Blast radius analysis with depth grouping and confidence | Optional |
|
|
141
|
-
| `detect_changes` | Git-diff impact — maps changed lines to affected processes | Optional |
|
|
142
|
-
| `rename` | Multi-file coordinated rename with graph + text search | Optional |
|
|
143
|
-
| `cypher` | Raw Cypher graph queries | Optional |
|
|
144
|
-
|
|
145
|
-
> With one indexed repo, the `repo` param is optional. With multiple, specify which: `query({query: "auth", repo: "my-app"})`.
|
|
146
|
-
|
|
147
|
-
## MCP Resources
|
|
148
|
-
|
|
149
|
-
| Resource | Purpose |
|
|
150
|
-
|----------|---------|
|
|
151
|
-
| `arc://repos` | List all indexed repositories (read first) |
|
|
152
|
-
| `arc://repo/{name}/context` | Codebase stats, staleness check, and available tools |
|
|
153
|
-
| `arc://repo/{name}/clusters` | All functional clusters with cohesion scores |
|
|
154
|
-
| `arc://repo/{name}/cluster/{name}` | Cluster members and details |
|
|
155
|
-
| `arc://repo/{name}/processes` | All execution flows |
|
|
156
|
-
| `arc://repo/{name}/process/{name}` | Full process trace with steps |
|
|
157
|
-
| `arc://repo/{name}/schema` | Graph schema for Cypher queries |
|
|
158
|
-
|
|
159
|
-
## MCP Prompts
|
|
160
|
-
|
|
161
|
-
| Prompt | What It Does |
|
|
162
|
-
|--------|-------------|
|
|
163
|
-
| `detect_impact` | Pre-commit change analysis — scope, affected processes, risk level |
|
|
164
|
-
| `generate_map` | Architecture documentation from the knowledge graph with mermaid diagrams |
|
|
89
|
+
---
|
|
165
90
|
|
|
166
|
-
## CLI
|
|
91
|
+
## CLI Command Interface
|
|
167
92
|
|
|
168
93
|
```bash
|
|
169
|
-
arc setup
|
|
170
|
-
arc analyze [path]
|
|
171
|
-
arc analyze --force
|
|
172
|
-
arc analyze --
|
|
173
|
-
arc analyze --skip-
|
|
174
|
-
arc analyze --
|
|
175
|
-
arc analyze --
|
|
176
|
-
arc analyze --
|
|
177
|
-
arc
|
|
178
|
-
arc
|
|
179
|
-
arc
|
|
180
|
-
arc list
|
|
181
|
-
arc status
|
|
182
|
-
arc clean
|
|
183
|
-
arc clean --all --force
|
|
184
|
-
arc wiki [path]
|
|
185
|
-
arc wiki --model <
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
arc group
|
|
191
|
-
arc group
|
|
192
|
-
arc group
|
|
193
|
-
arc group
|
|
194
|
-
arc group
|
|
195
|
-
arc group
|
|
196
|
-
|
|
94
|
+
arc setup # Writes MCP configurations for active editors
|
|
95
|
+
arc analyze [path] # Parses source code and updates repository index
|
|
96
|
+
arc analyze --force # Discards graph caches and runs a full re-index
|
|
97
|
+
arc analyze --skills # Generates specialized AI agent guidelines
|
|
98
|
+
arc analyze --skip-embeddings # Fast parse mode; skips calculating vector embeddings
|
|
99
|
+
arc analyze --skip-git # Indexes folder even if not initialized as a git repo
|
|
100
|
+
arc analyze --embeddings # Generates full semantic vector embeddings (slower)
|
|
101
|
+
arc analyze --verbose # Outputs file skips and parser debug logs
|
|
102
|
+
arc analyze --worker-timeout N# Sets custom parse timeout in seconds
|
|
103
|
+
arc mcp # Runs the Model Context Protocol daemon (stdio)
|
|
104
|
+
arc serve # Launches HTTP server for browser Web UI connection
|
|
105
|
+
arc list # Prints all registered repositories on this machine
|
|
106
|
+
arc status # Shows index health, size, and statistics
|
|
107
|
+
arc clean # Deletes database files for the current project
|
|
108
|
+
arc clean --all --force # Wipes all repository graphs from disk
|
|
109
|
+
arc wiki [path] # Formulates a markdown wiki from the codebase graph
|
|
110
|
+
arc wiki --model <name> # Custom LLM model target (defaults: gpt-4o-mini)
|
|
111
|
+
arc wiki --base-url <url> # Custom LLM provider endpoint URL
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Multi-Service Sync & Monorepos
|
|
115
|
+
* `arc group create <name>`: Mappings a new microservice group structure.
|
|
116
|
+
* `arc group add <group> <path> <name>`: Registers a codebase in a sync group.
|
|
117
|
+
* `arc group remove <group> <path>`: Deletes a codebase from a sync group.
|
|
118
|
+
* `arc group list [name]`: Outputs active group schemas.
|
|
119
|
+
* `arc group sync <name>`: Resolves boundaries and maps contract exchanges.
|
|
120
|
+
* `arc group contracts <name>`: Reviews service endpoints and interface dependencies.
|
|
121
|
+
* `arc group query <name> <q>`: Executes search routines across all service libraries in a group.
|
|
122
|
+
* `arc group status <name>`: Reports health and stale statuses for grouped codebases.
|
|
197
123
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
Set these env vars to use a remote OpenAI-compatible `/v1/embeddings` endpoint instead of the local model:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
export ARC_EMBEDDING_URL=http://your-server:8080/v1
|
|
204
|
-
export ARC_EMBEDDING_MODEL=BAAI/bge-large-en-v1.5
|
|
205
|
-
export ARC_EMBEDDING_DIMS=1024 # optional, default 384
|
|
206
|
-
export ARC_EMBEDDING_API_KEY=your-key # optional, default: "unused"
|
|
207
|
-
arc analyze . --embeddings
|
|
208
|
-
```
|
|
124
|
+
---
|
|
209
125
|
|
|
210
|
-
|
|
126
|
+
## Token Efficiency & Graph RAG Performance
|
|
211
127
|
|
|
212
|
-
|
|
128
|
+
Arceus's semantic graph model drastically reduces token wastage and context pollution for downstream LLMs compared to traditional lexical exploration (e.g., recursive grep and file reading).
|
|
213
129
|
|
|
214
|
-
|
|
130
|
+
### Quantitative Efficiency Comparison
|
|
215
131
|
|
|
216
|
-
|
|
132
|
+
| Inquiry Scenario | Lexical Method (Grep + Full File Read) | Semantics-Guided (MCP / Cypher Query) | Token Conservation Ratio | Impact & Efficiency Gain |
|
|
133
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
134
|
+
| **1. Call-Site Tracing** <br> Retrieve all calling methods and files invoking `withLbugDb`. | **~21,000 tokens** <br>(Requires scanning grep results, opening and parsing `api.ts` [69.6KB] and `lbug-adapter.ts` [14.4KB] to locate calling signatures). | **~28 tokens** <br>(Cypher execution: returns a targeted JSON array referencing the exact caller `handler` in `api.ts`). | **750x Reduction** <br>(99.87% Saved) | **Critical Path Tracing**: Eliminates ingestion of unrelated implementation details, preserving LLM context window. |
|
|
135
|
+
| **2. API Route Mapping** <br> Discover all registered endpoints and handler files. | **~20,162 tokens** <br>(Requires reading multiple route-registration files, middleware modules, and unit test suites). | **~65 tokens** <br>(Cypher execution: fetches all `Route` nodes containing route paths and source locations). | **310x Reduction** <br>(99.68% Saved) | **Interface Discovery**: Obtains complete routing topography without feeding entire source files to the LLM. |
|
|
136
|
+
| **3. Monorepo Class Indexing** <br> Index all classes and paths in the workspace. | **~87,500 tokens** <br>(Requires reading over 20 files containing class structures to capture inheritance and signatures). | **~1,250 tokens** <br>(Cypher execution: returns a complete node list of all `Class` names and file paths). | **70x Reduction** <br>(98.57% Saved) | **Architecture Mapping**: Instant monorepo-wide indexing with minimal network and computational overhead. |
|
|
217
137
|
|
|
218
|
-
|
|
138
|
+
---
|
|
219
139
|
|
|
220
|
-
|
|
140
|
+
## Language Support Matrix
|
|
221
141
|
|
|
222
142
|
| Language | Imports | Named Bindings | Exports | Heritage | Type Annotations | Constructor Inference | Config | Frameworks | Entry Points |
|
|
223
|
-
|
|
224
|
-
| TypeScript | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
225
|
-
| JavaScript | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ |
|
|
226
|
-
| Python | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
227
|
-
| Java | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
228
|
-
| Kotlin | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
229
|
-
| C
|
|
230
|
-
| Go | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
231
|
-
| Rust | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
232
|
-
| PHP | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
233
|
-
| Ruby | ✓ | — | ✓ | ✓ | — | ✓ | — | ✓ | ✓ |
|
|
234
|
-
| Swift | — | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
235
|
-
| C | — | — | ✓ | — | ✓ | ✓ | — | ✓ | ✓ |
|
|
236
|
-
| C
|
|
237
|
-
|
|
238
|
-
**Imports** — cross-file import resolution · **Named Bindings** — `import { X as Y }` / re-export tracking · **Exports** — public/exported symbol detection · **Heritage** — class inheritance, interfaces, mixins · **Type Annotations** — explicit type extraction for receiver resolution · **Constructor Inference** — infer receiver type from constructor calls (`self`/`this` resolution included for all languages) · **Config** — language toolchain config parsing (tsconfig, go.mod, etc.) · **Frameworks** — AST-based framework pattern detection · **Entry Points** — entry point scoring heuristics
|
|
239
|
-
|
|
240
|
-
## Agent Skills
|
|
241
|
-
|
|
242
|
-
Arceus ships with skill files that teach AI agents how to use the tools effectively:
|
|
243
|
-
|
|
244
|
-
- **Exploring** — Navigate unfamiliar code using the knowledge graph
|
|
245
|
-
- **Debugging** — Trace bugs through call chains
|
|
246
|
-
- **Impact Analysis** — Analyze blast radius before changes
|
|
247
|
-
- **Refactoring** — Plan safe refactors using dependency mapping
|
|
143
|
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
144
|
+
| **TypeScript** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
145
|
+
| **JavaScript** | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ |
|
|
146
|
+
| **Python** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
147
|
+
| **Java** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
148
|
+
| **Kotlin** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
149
|
+
| **C#** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
150
|
+
| **Go** | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
151
|
+
| **Rust** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
152
|
+
| **PHP** | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
153
|
+
| **Ruby** | ✓ | — | ✓ | ✓ | — | ✓ | — | ✓ | ✓ |
|
|
154
|
+
| **Swift** | — | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
155
|
+
| **C** | — | — | ✓ | — | ✓ | ✓ | — | ✓ | ✓ |
|
|
156
|
+
| **C++** | — | — | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
157
|
+
| **Dart** | ✓ | — | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
|
|
248
158
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
## Requirements
|
|
252
|
-
|
|
253
|
-
- Node.js >= 18
|
|
254
|
-
- Git repository (uses git for commit tracking)
|
|
255
|
-
|
|
256
|
-
## Release candidates
|
|
257
|
-
|
|
258
|
-
Stable releases publish to the default `latest` dist-tag. When a pull request
|
|
259
|
-
with non-documentation changes merges into `main`, an automated workflow also
|
|
260
|
-
publishes a prerelease build under the `rc` dist-tag, so early adopters can
|
|
261
|
-
try in-flight fixes without waiting for the next stable cut. (Docs-only
|
|
262
|
-
merges are skipped.)
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
# Try the latest release candidate (pre-stable — may change at any time)
|
|
266
|
-
npm install -g arceus-s@rc
|
|
267
|
-
# — or —
|
|
268
|
-
npx arceus-s@rc analyze
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Release-candidate versions follow the standard semver prerelease format
|
|
272
|
-
`X.Y.Z-rc.N`, where `X.Y.Z` is the next stable target (bumped from the
|
|
273
|
-
current `latest` by patch by default; `minor` or `major` when kicking off a
|
|
274
|
-
bigger cycle) and `N` increments per published rc. Example sequence:
|
|
275
|
-
`1.6.2-rc.1`, `1.6.2-rc.2`, …, then once `1.6.2` ships stable,
|
|
276
|
-
`1.6.3-rc.1`. See the [Releases page](https://github.com/Sirius6907/Arceus/releases)
|
|
277
|
-
for the full list; stable `latest` is unaffected.
|
|
278
|
-
|
|
279
|
-
## Troubleshooting
|
|
280
|
-
|
|
281
|
-
### `Cannot destructure property 'package' of 'node.target' as it is null`
|
|
282
|
-
|
|
283
|
-
This crash was caused by a dependency URL format that is incompatible with
|
|
284
|
-
certain npm/arborist versions ([npm/cli#8126](https://github.com/npm/cli/issues/8126)).
|
|
285
|
-
It is fixed in **arc v1.6.2+**. Upgrade to the latest version:
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
npx arceus-s analyze # always uses the newest release
|
|
289
|
-
# — or —
|
|
290
|
-
npm install -g arceus-s # upgrade a global install
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
If you still hit npm install issues after upgrading, these generic workarounds
|
|
294
|
-
may help:
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
npm install -g npm@latest # update npm itself
|
|
298
|
-
npm cache clean --force # clear a possibly corrupt cache
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### Installation fails with native module errors
|
|
302
|
-
|
|
303
|
-
Some optional language grammars (Dart, Kotlin, Swift) require native compilation. If they fail, Arceus still works — those languages will be skipped.
|
|
304
|
-
|
|
305
|
-
If `npm install -g arceus-s` fails on native modules:
|
|
306
|
-
|
|
307
|
-
```bash
|
|
308
|
-
# Ensure build tools are available (Linux/macOS)
|
|
309
|
-
# Ubuntu/Debian: sudo apt install python3 make g++
|
|
310
|
-
# macOS: xcode-select --install
|
|
311
|
-
|
|
312
|
-
# Retry installation
|
|
313
|
-
npm install -g arceus-s
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Analyze warns about unavailable FTS or VECTOR extensions
|
|
317
|
-
|
|
318
|
-
Arceus uses optional DuckDB extensions for BM25 and vector search. The `arc serve` and MCP read paths only ever try to `LOAD` the extensions — they never block on a network install. The `analyze` command, by default, attempts one bounded out-of-process `INSTALL` if `LOAD` fails and proceeds even when that install times out, so the index is always written to disk; BM25/vector search degrade gracefully until the extensions become available.
|
|
319
|
-
|
|
320
|
-
Configure the behavior with two environment variables:
|
|
321
|
-
|
|
322
|
-
| Variable | Values | Default | Effect |
|
|
323
|
-
|----------|--------|---------|--------|
|
|
324
|
-
| `ARC_LBUG_EXTENSION_INSTALL` | `auto`, `load-only`, `never` | `auto` | `auto` runs one bounded INSTALL if LOAD fails. `load-only` only uses already-installed extensions (recommended for offline / firewalled environments). `never` skips optional extensions entirely. |
|
|
325
|
-
| `ARC_LBUG_EXTENSION_INSTALL_TIMEOUT_MS` | positive integer | `15000` | Wall-clock budget for the out-of-process `INSTALL` child before it is killed. |
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
# Offline/airgapped: never reach the network for extensions
|
|
329
|
-
ARC_LBUG_EXTENSION_INSTALL=load-only npx arceus-s analyze
|
|
330
|
-
|
|
331
|
-
# Slow network: give extension downloads more time
|
|
332
|
-
ARC_LBUG_EXTENSION_INSTALL_TIMEOUT_MS=30000 npx arceus-s analyze
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### Analysis runs out of memory
|
|
336
|
-
|
|
337
|
-
For very large repositories:
|
|
338
|
-
|
|
339
|
-
```bash
|
|
340
|
-
# Increase Node.js heap size
|
|
341
|
-
NODE_OPTIONS="--max-old-space-size=16384" npx arceus-s analyze
|
|
342
|
-
|
|
343
|
-
# Exclude large directories
|
|
344
|
-
echo "vendor/" >> .arcignore
|
|
345
|
-
echo "dist/" >> .arcignore
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
### Large files are being skipped
|
|
349
|
-
|
|
350
|
-
By default the walker skips files larger than **512 KB** (see log line `Skipped N large files (>512KB)`). Raise the threshold via either the CLI flag or the environment variable — both accept a value in **KB**:
|
|
351
|
-
|
|
352
|
-
```bash
|
|
353
|
-
# CLI flag (takes precedence over the env var)
|
|
354
|
-
npx arceus-s analyze --max-file-size 2048 # skip only files > 2 MB
|
|
355
|
-
|
|
356
|
-
# Environment variable (persists across commands)
|
|
357
|
-
export ARC_MAX_FILE_SIZE=2048
|
|
358
|
-
npx arceus-s analyze
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
Values above **32768 KB (32 MB)** are clamped to the tree-sitter parser ceiling; invalid values fall back to the 512 KB default with a one-time warning. When an override is active, `analyze` prints the effective threshold in its startup banner (e.g. `ARC_MAX_FILE_SIZE: effective threshold 2048KB (default 512KB)`).
|
|
362
|
-
|
|
363
|
-
### Analyze reports a worker timeout
|
|
364
|
-
|
|
365
|
-
Worker parse timeouts are recoverable. Arceus retries stalled worker jobs with backoff, splits large jobs to isolate slow files, and falls back to the sequential parser when needed. If a large repository needs more time per worker job, use either:
|
|
159
|
+
---
|
|
366
160
|
|
|
161
|
+
## Troubleshooting Guide
|
|
162
|
+
|
|
163
|
+
### 1. Arborist Conflict: `Cannot destructure property 'package'`
|
|
164
|
+
This error occurs in older npm environments due to unresolved symbolic references.
|
|
165
|
+
* **Remedy**: Update your CLI package to version `v1.6.2+`:
|
|
166
|
+
```bash
|
|
167
|
+
npm install -g arceus-s@latest
|
|
168
|
+
npm cache clean --force
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 2. Grammar Compilation Failures
|
|
172
|
+
Advanced syntax structures (Dart, Kotlin, Swift) require local C++ compilers. If compilation fails, Arceus bypasses these optional parsers and functions normally for other languages.
|
|
173
|
+
* **Remedy (macOS/Linux)**: Install development essentials:
|
|
174
|
+
```bash
|
|
175
|
+
# Debian/Ubuntu
|
|
176
|
+
sudo apt install python3 make g++
|
|
177
|
+
# macOS
|
|
178
|
+
xcode-select --install
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 3. DuckDB Vector Extension Load Warns
|
|
182
|
+
Arceus queries leverage local analytical extensions. During `analyze`, it attempts to auto-download them. If offline or in an air-gapped environment, you can set the install behavior:
|
|
183
|
+
|
|
184
|
+
| Environment Variable | Supported Options | Description |
|
|
185
|
+
| :--- | :--- | :--- |
|
|
186
|
+
| `ARC_LBUG_EXTENSION_INSTALL` | `auto`, `load-only`, `never` | `auto` downloads on demand. `load-only` prevents network queries. `never` disables vector extensions. |
|
|
187
|
+
| `ARC_LBUG_EXTENSION_INSTALL_TIMEOUT_MS` | Integer value | Download process budget in milliseconds (defaults to `15000`). |
|
|
188
|
+
|
|
189
|
+
### 4. Memory Heap Exceeded on Large Codebases
|
|
190
|
+
If the process runs out of memory, increase Node's heap size:
|
|
367
191
|
```bash
|
|
368
|
-
|
|
369
|
-
npx arceus-s analyze --worker-timeout 60
|
|
370
|
-
|
|
371
|
-
# Environment variable, in milliseconds
|
|
372
|
-
export ARC_WORKER_SUB_BATCH_TIMEOUT_MS=60000
|
|
373
|
-
npx arceus-s analyze
|
|
192
|
+
NODE_OPTIONS="--max-old-space-size=16384" arc analyze
|
|
374
193
|
```
|
|
375
194
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
## Privacy
|
|
379
|
-
|
|
380
|
-
- All processing happens locally on your machine
|
|
381
|
-
- No code is sent to any server
|
|
382
|
-
- Index stored in `.arc/` inside your repo (gitignored)
|
|
383
|
-
- Global registry at `~/.arc/` stores only paths and metadata
|
|
384
|
-
|
|
385
|
-
## Web UI
|
|
386
|
-
|
|
387
|
-
Arceus also has a browser-based UI at [arc.vercel.app](https://arc.vercel.app) — 100% client-side, your code never leaves the browser.
|
|
388
|
-
|
|
389
|
-
**Local Backend Mode:** Run `arc serve` and open the web UI locally — it auto-detects the server and shows all your indexed repos, with full AI chat support. No need to re-upload or re-index. The agent's tools (Cypher queries, search, code navigation) route through the backend HTTP API automatically.
|
|
195
|
+
---
|
|
390
196
|
|
|
391
197
|
## License
|
|
392
198
|
|
|
199
|
+
Copyright (c) 2026 Chandan Kumar Behera
|
|
200
|
+
|
|
393
201
|
[PolyForm Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/)
|
|
394
202
|
|
|
395
203
|
Free for non-commercial use. Contact for commercial licensing.
|
package/dist/cli/analyze.js
CHANGED
|
@@ -271,9 +271,7 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
271
271
|
// overwrite the bar mid-render. We capture originals, swap to barLog for
|
|
272
272
|
// the lifetime of the run, and restore on completion/error/SIGINT.
|
|
273
273
|
const origLog = console.log.bind(console);
|
|
274
|
-
// eslint-disable-next-line no-console -- intentional console-routing for progress bar UX
|
|
275
274
|
const origWarn = console.warn.bind(console);
|
|
276
|
-
// eslint-disable-next-line no-console -- intentional console-routing for progress bar UX
|
|
277
275
|
const origError = console.error.bind(console);
|
|
278
276
|
let barCurrentValue = 0;
|
|
279
277
|
const barLog = (...args) => {
|
|
@@ -282,9 +280,7 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
282
280
|
bar.update(barCurrentValue);
|
|
283
281
|
};
|
|
284
282
|
console.log = barLog;
|
|
285
|
-
// eslint-disable-next-line no-console -- intentional console-routing for progress bar UX
|
|
286
283
|
console.warn = barLog;
|
|
287
|
-
// eslint-disable-next-line no-console -- intentional console-routing for progress bar UX
|
|
288
284
|
console.error = barLog;
|
|
289
285
|
// Track elapsed time per phase
|
|
290
286
|
let lastPhaseLabel = 'Initializing...';
|
|
@@ -344,9 +340,7 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
344
340
|
clearInterval(elapsedTimer);
|
|
345
341
|
process.removeListener('SIGINT', sigintHandler);
|
|
346
342
|
console.log = origLog;
|
|
347
|
-
// eslint-disable-next-line no-console -- restoring after intentional progress-bar routing
|
|
348
343
|
console.warn = origWarn;
|
|
349
|
-
// eslint-disable-next-line no-console -- restoring after intentional progress-bar routing
|
|
350
344
|
console.error = origError;
|
|
351
345
|
bar.stop();
|
|
352
346
|
console.log(' Already up to date\n');
|
|
@@ -404,9 +398,7 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
404
398
|
clearInterval(elapsedTimer);
|
|
405
399
|
process.removeListener('SIGINT', sigintHandler);
|
|
406
400
|
console.log = origLog;
|
|
407
|
-
// eslint-disable-next-line no-console -- restoring after intentional progress-bar routing
|
|
408
401
|
console.warn = origWarn;
|
|
409
|
-
// eslint-disable-next-line no-console -- restoring after intentional progress-bar routing
|
|
410
402
|
console.error = origError;
|
|
411
403
|
bar.update(100, { phase: 'Done' });
|
|
412
404
|
bar.stop();
|
|
@@ -427,9 +419,7 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
427
419
|
clearInterval(elapsedTimer);
|
|
428
420
|
process.removeListener('SIGINT', sigintHandler);
|
|
429
421
|
console.log = origLog;
|
|
430
|
-
// eslint-disable-next-line no-console -- restoring after intentional progress-bar routing
|
|
431
422
|
console.warn = origWarn;
|
|
432
|
-
// eslint-disable-next-line no-console -- restoring after intentional progress-bar routing
|
|
433
423
|
console.error = origError;
|
|
434
424
|
bar.stop();
|
|
435
425
|
const msg = err.message || String(err);
|
package/dist/cli/serve.js
CHANGED
|
@@ -26,7 +26,7 @@ export const serveCommand = async (options) => {
|
|
|
26
26
|
const port = Number(options?.port ?? 4747);
|
|
27
27
|
// Default to 'localhost' so the OS decides whether to bind to 127.0.0.1 or
|
|
28
28
|
// ::1 based on system configuration, avoiding spurious CORS errors when the
|
|
29
|
-
// hosted frontend at arc.vercel.app connects to localhost.
|
|
29
|
+
// hosted frontend at arceus-arc.vercel.app connects to localhost.
|
|
30
30
|
const host = options?.host ?? 'localhost';
|
|
31
31
|
try {
|
|
32
32
|
await createServer(port, host);
|
|
@@ -29,8 +29,6 @@ export const resolveEmbeddingConfig = (overrides = {}) => {
|
|
|
29
29
|
batchSize: parsePositiveInt('ARC_EMBEDDING_BATCH_SIZE', env.ARC_EMBEDDING_BATCH_SIZE, overrides.batchSize ?? DEFAULT_EMBEDDING_CONFIG.batchSize),
|
|
30
30
|
subBatchSize: parsePositiveInt('ARC_EMBEDDING_SUB_BATCH_SIZE', env.ARC_EMBEDDING_SUB_BATCH_SIZE, overrides.subBatchSize ?? DEFAULT_EMBEDDING_CONFIG.subBatchSize),
|
|
31
31
|
threads: parsePositiveInt('ARC_EMBEDDING_THREADS', env.ARC_EMBEDDING_THREADS, overrides.threads ?? defaultEmbeddingThreads()),
|
|
32
|
-
device: parseDevice(env.ARC_EMBEDDING_DEVICE) ??
|
|
33
|
-
overrides.device ??
|
|
34
|
-
DEFAULT_EMBEDDING_CONFIG.device,
|
|
32
|
+
device: parseDevice(env.ARC_EMBEDDING_DEVICE) ?? overrides.device ?? DEFAULT_EMBEDDING_CONFIG.device,
|
|
35
33
|
};
|
|
36
34
|
};
|
|
@@ -2,6 +2,7 @@ import lbug from '@ladybugdb/core';
|
|
|
2
2
|
import { KnowledgeGraph } from '../graph/types.js';
|
|
3
3
|
import type { CachedEmbedding } from '../embeddings/types.js';
|
|
4
4
|
import { type ExtensionEnsureOptions } from './extension-loader.js';
|
|
5
|
+
import { type LbugDatabaseOptions } from './lbug-config.js';
|
|
5
6
|
/** Factory for creating WriteStreams — injectable for testing. */
|
|
6
7
|
export type WriteStreamFactory = (filePath: string) => import('fs').WriteStream;
|
|
7
8
|
/** Result of splitting the relationship CSV into per-label-pair files. */
|
|
@@ -53,7 +54,7 @@ export declare const initLbug: (dbPath: string) => Promise<{
|
|
|
53
54
|
* database is busy (e.g. `arc analyze` holds the write lock).
|
|
54
55
|
* Each retry waits DB_LOCK_RETRY_DELAY_MS * attempt milliseconds.
|
|
55
56
|
*/
|
|
56
|
-
export declare const withLbugDb: <T>(dbPath: string, operation: () => Promise<T
|
|
57
|
+
export declare const withLbugDb: <T>(dbPath: string, operation: () => Promise<T>, options?: LbugDatabaseOptions) => Promise<T>;
|
|
57
58
|
export type LbugProgressCallback = (message: string) => void;
|
|
58
59
|
export declare const loadGraphToLbug: (graph: KnowledgeGraph, repoPath: string, storagePath: string, onProgress?: LbugProgressCallback) => Promise<{
|
|
59
60
|
success: boolean;
|