@codragraph/cli 2.1.0 → 2.1.1
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 +58 -20
- package/dist/_shared/cgdb/schema-constants.d.ts +2 -2
- package/dist/_shared/cgdb/schema-constants.d.ts.map +1 -1
- package/dist/_shared/cgdb/schema-constants.js +3 -0
- package/dist/_shared/cgdb/schema-constants.js.map +1 -1
- package/dist/_shared/feature-clusters.d.ts +99 -0
- package/dist/_shared/feature-clusters.d.ts.map +1 -0
- package/dist/_shared/feature-clusters.js +2 -0
- package/dist/_shared/feature-clusters.js.map +1 -0
- package/dist/_shared/graph/types.d.ts +16 -2
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +1 -0
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/pipeline.d.ts +1 -1
- package/dist/_shared/pipeline.d.ts.map +1 -1
- package/dist/cli/ai-context.js +4 -0
- package/dist/cli/analyze.js +27 -24
- package/dist/cli/index.js +37 -0
- package/dist/cli/setup.js +9 -5
- package/dist/cli/tool.d.ts +25 -0
- package/dist/cli/tool.js +74 -0
- package/dist/config/supported-languages.d.ts +3 -3
- package/dist/config/supported-languages.js +3 -3
- package/dist/core/cgdb/cgdb-adapter.js +19 -3
- package/dist/core/cgdb/csv-generator.js +33 -2
- package/dist/core/cgdb/schema.d.ts +2 -1
- package/dist/core/cgdb/schema.js +55 -0
- package/dist/core/embeddings/embedder.js +4 -2
- package/dist/core/graphstore/index.d.ts +1 -1
- package/dist/core/graphstore/index.js +1 -1
- package/dist/core/group/service.d.ts +16 -0
- package/dist/core/group/service.js +360 -0
- package/dist/core/ingestion/emit-references.d.ts +1 -1
- package/dist/core/ingestion/emit-references.js +1 -1
- package/dist/core/ingestion/feature-cluster-processor.d.ts +62 -0
- package/dist/core/ingestion/feature-cluster-processor.js +626 -0
- package/dist/core/ingestion/finalize-orchestrator.js +1 -1
- package/dist/core/ingestion/model/registration-table.js +1 -0
- package/dist/core/ingestion/model/resolve.d.ts +2 -2
- package/dist/core/ingestion/model/resolve.js +3 -3
- package/dist/core/ingestion/model/semantic-model.d.ts +1 -1
- package/dist/core/ingestion/model/semantic-model.js +1 -1
- package/dist/core/ingestion/model/symbol-table.d.ts +1 -1
- package/dist/core/ingestion/model/symbol-table.js +1 -1
- package/dist/core/ingestion/pipeline-phases/feature-clusters.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/feature-clusters.js +88 -0
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline.d.ts +4 -0
- package/dist/core/ingestion/pipeline.js +9 -5
- package/dist/core/run-analyze.d.ts +1 -0
- package/dist/core/run-analyze.js +12 -6
- package/dist/mcp/core/embedder.js +5 -2
- package/dist/mcp/local/local-backend.d.ts +12 -0
- package/dist/mcp/local/local-backend.js +381 -3
- package/dist/mcp/resources.js +139 -0
- package/dist/mcp/tools.js +174 -2
- package/dist/server/api.js +116 -0
- package/dist/storage/repo-manager.d.ts +6 -1
- package/dist/storage/repo-manager.js +5 -1
- package/dist/types/pipeline.d.ts +2 -0
- package/package.json +13 -4
- package/scripts/build.js +13 -12
- package/skills/codragraph-cli.md +17 -1
- package/skills/codragraph-guide.md +6 -2
- package/skills/codragraph-onboarding.md +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Works with **Cursor**, **Claude Code**, **Codex**, **Windsurf**, **Cline**, **Op
|
|
|
10
10
|
|
|
11
11
|
## Why?
|
|
12
12
|
|
|
13
|
-
AI coding tools don't understand your codebase structure. They edit a function without knowing 47 other functions depend on it. CodraGraph fixes this by **precomputing every dependency, call chain, and relationship** into a queryable graph.
|
|
13
|
+
AI coding tools don't understand your codebase structure. They edit a function without knowing 47 other functions depend on it, or which files make up a product area like Settings, Auth, AI, or Billing. CodraGraph fixes this by **precomputing every dependency, call chain, feature cluster, and relationship** into a queryable graph.
|
|
14
14
|
|
|
15
15
|
**Three commands to give your AI agent full codebase awareness.**
|
|
16
16
|
|
|
@@ -23,6 +23,8 @@ npx @codragraph/cli analyze
|
|
|
23
23
|
|
|
24
24
|
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.
|
|
25
25
|
|
|
26
|
+
The same CLI commands work in Windows PowerShell, macOS bash/zsh, and Linux shells. Use `npx @codragraph/cli ...` for no-install runs or `codragraph ...` after a global install.
|
|
27
|
+
|
|
26
28
|
To configure MCP for your editor, run `npx @codragraph/cli setup` once — or set it up manually below.
|
|
27
29
|
|
|
28
30
|
`codragraph setup` auto-detects your editors and writes the correct global MCP config. You only need to run it once.
|
|
@@ -53,16 +55,16 @@ If you prefer to configure manually instead of using `codragraph setup`:
|
|
|
53
55
|
|
|
54
56
|
```bash
|
|
55
57
|
# macOS / Linux
|
|
56
|
-
claude mcp add codragraph -- npx -y @codragraph/cli@
|
|
58
|
+
claude mcp add codragraph -- npx -y @codragraph/cli@2.1.1 mcp
|
|
57
59
|
|
|
58
60
|
# Windows
|
|
59
|
-
claude mcp add codragraph -- cmd /c npx -y @codragraph/cli@
|
|
61
|
+
claude mcp add codragraph -- cmd /c npx -y @codragraph/cli@2.1.1 mcp
|
|
60
62
|
```
|
|
61
63
|
|
|
62
64
|
### Codex (full support — MCP + skills)
|
|
63
65
|
|
|
64
66
|
```bash
|
|
65
|
-
codex mcp add codragraph -- npx -y @codragraph/cli@
|
|
67
|
+
codex mcp add codragraph -- npx -y @codragraph/cli@2.1.1 mcp
|
|
66
68
|
```
|
|
67
69
|
|
|
68
70
|
### Cursor / Windsurf
|
|
@@ -74,7 +76,7 @@ Add to `~/.cursor/mcp.json` (global — works for all projects):
|
|
|
74
76
|
"mcpServers": {
|
|
75
77
|
"codragraph": {
|
|
76
78
|
"command": "npx",
|
|
77
|
-
"args": ["-y", "@codragraph/cli@
|
|
79
|
+
"args": ["-y", "@codragraph/cli@2.1.1", "mcp"]
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -89,7 +91,7 @@ Add to `~/.config/opencode/config.json`:
|
|
|
89
91
|
"mcp": {
|
|
90
92
|
"codragraph": {
|
|
91
93
|
"command": "npx",
|
|
92
|
-
"args": ["-y", "@codragraph/cli@
|
|
94
|
+
"args": ["-y", "@codragraph/cli@2.1.1", "mcp"]
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
}
|
|
@@ -104,9 +106,10 @@ CodraGraph builds a complete knowledge graph of your codebase through a multi-ph
|
|
|
104
106
|
3. **Resolution** — Resolves imports and function calls across files with language-aware logic
|
|
105
107
|
- **Field & Property Type Resolution** — Tracks field types across classes and interfaces for deep chain resolution (e.g., `user.address.city.getName()`)
|
|
106
108
|
- **Return-Type-Aware Variable Binding** — Infers variable types from function return types, enabling accurate call-result binding
|
|
107
|
-
4. **Clustering** — Groups related symbols into
|
|
109
|
+
4. **Clustering** — Groups related symbols into structural communities
|
|
108
110
|
5. **Processes** — Traces execution flows from entry points through call chains
|
|
109
|
-
6. **
|
|
111
|
+
6. **Feature clusters** — Builds human-facing product/domain areas with members, dependencies, and line ranges
|
|
112
|
+
7. **Search** — Builds hybrid search indexes for fast retrieval
|
|
110
113
|
|
|
111
114
|
The result is a **LadybugDB graph database** stored locally in `.codragraph/` with full-text search and semantic embeddings.
|
|
112
115
|
|
|
@@ -122,6 +125,9 @@ Your AI agent gets these tools automatically:
|
|
|
122
125
|
| `impact` | Blast radius analysis with depth grouping and confidence | Optional |
|
|
123
126
|
| `detect_changes` | Git-diff impact — maps changed lines to affected processes | Optional |
|
|
124
127
|
| `rename` | Multi-file coordinated rename with graph + text search | Optional |
|
|
128
|
+
| `feature_clusters` / `cluster_query` | Product/domain feature map for targeted context | Optional |
|
|
129
|
+
| `feature_context` / `cluster_context` / `context_pack` | Files, line ranges, dependencies, and flows for one feature | Optional |
|
|
130
|
+
| `cluster_impact` | Feature-level blast radius and safe edit surface | Optional |
|
|
125
131
|
| `cypher` | Raw Cypher graph queries | Optional |
|
|
126
132
|
|
|
127
133
|
> With one indexed repo, the `repo` param is optional. With multiple, specify which: `query({query: "auth", repo: "my-app"})`.
|
|
@@ -133,6 +139,8 @@ Your AI agent gets these tools automatically:
|
|
|
133
139
|
| `codragraph://repos` | List all indexed repositories (read first) |
|
|
134
140
|
| `codragraph://repo/{name}/context` | Codebase stats, staleness check, and available tools |
|
|
135
141
|
| `codragraph://repo/{name}/clusters` | All functional clusters with cohesion scores |
|
|
142
|
+
| `codragraph://repo/{name}/feature-clusters` | Product/domain feature areas |
|
|
143
|
+
| `codragraph://repo/{name}/feature/{name}` | Focused feature context pack |
|
|
136
144
|
| `codragraph://repo/{name}/cluster/{name}` | Cluster members and details |
|
|
137
145
|
| `codragraph://repo/{name}/processes` | All execution flows |
|
|
138
146
|
| `codragraph://repo/{name}/process/{name}` | Full process trace with steps |
|
|
@@ -143,7 +151,7 @@ Your AI agent gets these tools automatically:
|
|
|
143
151
|
| Prompt | What It Does |
|
|
144
152
|
|--------|-------------|
|
|
145
153
|
| `detect_impact` | Pre-commit change analysis — scope, affected processes, risk level |
|
|
146
|
-
| `generate_map` | Architecture documentation from the knowledge graph with
|
|
154
|
+
| `generate_map` | Architecture documentation from the knowledge graph with simple Mermaid diagrams |
|
|
147
155
|
|
|
148
156
|
## CLI Commands
|
|
149
157
|
|
|
@@ -158,6 +166,11 @@ codragraph analyze --max-file-size 1024 # Skip files larger than N KB (default:
|
|
|
158
166
|
codragraph analyze --compress brotli # Per-row body compression. Also: zstd, none.
|
|
159
167
|
codragraph profile-heap [path] # Run analyze with v8 heap-snapshot instrumentation
|
|
160
168
|
codragraph profile-heap --no-summary # Same, but skip the post-run RSS / heapUsed table
|
|
169
|
+
codragraph feature-clusters # List product/domain feature areas
|
|
170
|
+
codragraph cluster-query settings # Search product/domain feature areas
|
|
171
|
+
codragraph feature-context Settings # Focus files, line ranges, flows, dependencies for one feature
|
|
172
|
+
codragraph context-pack Settings # Compact agent context pack for one feature
|
|
173
|
+
codragraph cluster-impact Settings --direction both # Feature-level blast radius
|
|
161
174
|
codragraph mcp # Start MCP server (stdio) — serves all indexed repos
|
|
162
175
|
codragraph serve # Start local HTTP server (multi-repo) for web UI
|
|
163
176
|
codragraph index # Register an existing .codragraph/ folder into the global registry
|
|
@@ -184,11 +197,19 @@ codragraph group status <name> # Check staleness of repos in a group
|
|
|
184
197
|
Set these env vars to use a remote OpenAI-compatible `/v1/embeddings` endpoint instead of the local model:
|
|
185
198
|
|
|
186
199
|
```bash
|
|
200
|
+
# macOS/Linux bash/zsh
|
|
187
201
|
export CODRAGRAPH_EMBEDDING_URL=http://your-server:8080/v1
|
|
188
202
|
export CODRAGRAPH_EMBEDDING_MODEL=BAAI/bge-large-en-v1.5
|
|
189
203
|
export CODRAGRAPH_EMBEDDING_DIMS=1024 # optional, default 384
|
|
190
204
|
export CODRAGRAPH_EMBEDDING_API_KEY=your-key # optional, default: "unused"
|
|
191
205
|
codragraph analyze . --embeddings
|
|
206
|
+
|
|
207
|
+
# Windows PowerShell
|
|
208
|
+
$env:CODRAGRAPH_EMBEDDING_URL = "http://your-server:8080/v1"
|
|
209
|
+
$env:CODRAGRAPH_EMBEDDING_MODEL = "BAAI/bge-large-en-v1.5"
|
|
210
|
+
$env:CODRAGRAPH_EMBEDDING_DIMS = "1024"
|
|
211
|
+
$env:CODRAGRAPH_EMBEDDING_API_KEY = "your-key"
|
|
212
|
+
codragraph analyze . --embeddings
|
|
192
213
|
```
|
|
193
214
|
|
|
194
215
|
Works with Infinity, vLLM, TEI, llama.cpp, Ollama, LM Studio, or OpenAI. When unset, local embeddings are used unchanged.
|
|
@@ -197,6 +218,12 @@ Works with Infinity, vLLM, TEI, llama.cpp, Ollama, LM Studio, or OpenAI. When un
|
|
|
197
218
|
|
|
198
219
|
CodraGraph supports indexing multiple repositories. Each `codragraph analyze` registers the repo in a global registry (`~/.codragraph/registry.json`). The MCP server serves all indexed repos automatically.
|
|
199
220
|
|
|
221
|
+
For one product spread across many repos, use `codragraph group ...` plus
|
|
222
|
+
`repo: "@<group>"` in MCP tools. `feature_clusters`, `feature_context`, and
|
|
223
|
+
`cluster_impact` fan out across members and include contract-aware cross-repo
|
|
224
|
+
cluster links when the group Contract Registry has matching provider/consumer
|
|
225
|
+
edges.
|
|
226
|
+
|
|
200
227
|
## Supported Languages
|
|
201
228
|
|
|
202
229
|
TypeScript, JavaScript, Python, Java, C, C++, C#, Go, Rust, PHP, Kotlin, Swift, Ruby
|
|
@@ -234,7 +261,7 @@ Installed automatically by both `codragraph analyze` (per-repo) and `codragraph
|
|
|
234
261
|
|
|
235
262
|
## Requirements
|
|
236
263
|
|
|
237
|
-
- Node.js >=
|
|
264
|
+
- Node.js >= 20
|
|
238
265
|
- Git repository (uses git for commit tracking)
|
|
239
266
|
|
|
240
267
|
## Release candidates
|
|
@@ -265,19 +292,20 @@ bigger cycle) and `N` increments per published rc. Example sequence:
|
|
|
265
292
|
|
|
266
293
|
This crash was caused by a dependency URL format that is incompatible with
|
|
267
294
|
certain npm/arborist versions ([npm/cli#8126](https://github.com/npm/cli/issues/8126)).
|
|
268
|
-
It is fixed in **codragraph v1.6.2+**. Upgrade to the
|
|
295
|
+
It is fixed in **codragraph v1.6.2+**. Upgrade to the current workspace
|
|
296
|
+
version, or pin the version your team has validated:
|
|
269
297
|
|
|
270
298
|
```bash
|
|
271
|
-
npx @codragraph/cli@
|
|
272
|
-
#
|
|
273
|
-
npm install -g @codragraph/cli@
|
|
299
|
+
npx @codragraph/cli@2.1.1 analyze # no global install
|
|
300
|
+
# or
|
|
301
|
+
npm install -g @codragraph/cli@2.1.1 # upgrade a global install
|
|
274
302
|
```
|
|
275
303
|
|
|
276
304
|
If you still hit npm install issues after upgrading, these generic workarounds
|
|
277
305
|
may help:
|
|
278
306
|
|
|
279
307
|
```bash
|
|
280
|
-
npm install -g npm@
|
|
308
|
+
npm install -g npm@10 # update npm within the Node 20 line
|
|
281
309
|
npm cache clean --force # clear a possibly corrupt cache
|
|
282
310
|
```
|
|
283
311
|
|
|
@@ -301,9 +329,13 @@ npm install -g @codragraph/cli
|
|
|
301
329
|
For very large repositories:
|
|
302
330
|
|
|
303
331
|
```bash
|
|
304
|
-
# Increase Node.js heap size
|
|
332
|
+
# Increase Node.js heap size on macOS/Linux bash/zsh
|
|
305
333
|
NODE_OPTIONS="--max-old-space-size=16384" npx @codragraph/cli analyze
|
|
306
334
|
|
|
335
|
+
# Windows PowerShell
|
|
336
|
+
$env:NODE_OPTIONS = "--max-old-space-size=16384"
|
|
337
|
+
npx @codragraph/cli analyze
|
|
338
|
+
|
|
307
339
|
# Exclude large directories
|
|
308
340
|
echo "vendor/" >> .codragraphignore
|
|
309
341
|
echo "dist/" >> .codragraphignore
|
|
@@ -348,9 +380,13 @@ By default the walker skips files larger than **512 KB** (see log line `Skipped
|
|
|
348
380
|
# CLI flag (takes precedence over the env var)
|
|
349
381
|
npx @codragraph/cli analyze --max-file-size 2048 # skip only files > 2 MB
|
|
350
382
|
|
|
351
|
-
# Environment variable
|
|
383
|
+
# Environment variable on macOS/Linux bash/zsh
|
|
352
384
|
export CODRAGRAPH_MAX_FILE_SIZE=2048
|
|
353
385
|
npx @codragraph/cli analyze
|
|
386
|
+
|
|
387
|
+
# Windows PowerShell
|
|
388
|
+
$env:CODRAGRAPH_MAX_FILE_SIZE = "2048"
|
|
389
|
+
npx @codragraph/cli analyze
|
|
354
390
|
```
|
|
355
391
|
|
|
356
392
|
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. `CODRAGRAPH_MAX_FILE_SIZE: effective threshold 2048KB (default 512KB)`).
|
|
@@ -366,10 +402,12 @@ Values above **32768 KB (32 MB)** are clamped to the tree-sitter parser ceiling;
|
|
|
366
402
|
|
|
367
403
|
CodraGraph also has a browser-based UI at [codragraph.vercel.app](https://codragraph.vercel.app) — 100% client-side, your code never leaves the browser.
|
|
368
404
|
|
|
369
|
-
**Local Backend Mode:** Run `codragraph serve` and open the web UI locally — it auto-detects the server and shows all your indexed repos,
|
|
405
|
+
**Local Backend Mode:** Run `codragraph serve` and open the web UI locally — it auto-detects the server and shows all your indexed repos, feature clusters, dependency context, and 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.
|
|
370
406
|
|
|
371
407
|
## License
|
|
372
408
|
|
|
373
|
-
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
|
409
|
+
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
|
374
410
|
|
|
375
|
-
Permissive open source
|
|
411
|
+
Permissive open source. You can use, modify, redistribute, bundle, and host
|
|
412
|
+
the CLI commercially, subject to the Apache-2.0 notice and attribution
|
|
413
|
+
requirements.
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* Full DDL schemas remain in each package's own schema.ts because
|
|
8
8
|
* the CLI uses native LadybugDB and the web uses WASM.
|
|
9
9
|
*/
|
|
10
|
-
export declare const NODE_TABLES: readonly ["File", "Folder", "Function", "Class", "Interface", "Method", "CodeElement", "Community", "Process", "Section", "Struct", "Enum", "Macro", "Typedef", "Union", "Namespace", "Trait", "Impl", "TypeAlias", "Const", "Static", "Variable", "Property", "Record", "Delegate", "Annotation", "Constructor", "Template", "Module", "Route", "Tool"];
|
|
10
|
+
export declare const NODE_TABLES: readonly ["File", "Folder", "Function", "Class", "Interface", "Method", "CodeElement", "Community", "Process", "FeatureCluster", "Section", "Struct", "Enum", "Macro", "Typedef", "Union", "Namespace", "Trait", "Impl", "TypeAlias", "Const", "Static", "Variable", "Property", "Record", "Delegate", "Annotation", "Constructor", "Template", "Module", "Route", "Tool"];
|
|
11
11
|
export type NodeTableName = (typeof NODE_TABLES)[number];
|
|
12
12
|
export declare const REL_TABLE_NAME = "CodeRelation";
|
|
13
|
-
export declare const REL_TYPES: readonly ["CONTAINS", "DEFINES", "IMPORTS", "CALLS", "EXTENDS", "IMPLEMENTS", "HAS_METHOD", "HAS_PROPERTY", "ACCESSES", "METHOD_OVERRIDES", "OVERRIDES", "METHOD_IMPLEMENTS", "MEMBER_OF", "STEP_IN_PROCESS", "HANDLES_ROUTE", "FETCHES", "HANDLES_TOOL", "ENTRY_POINT_OF", "WRAPS", "QUERIES"];
|
|
13
|
+
export declare const REL_TYPES: readonly ["CONTAINS", "DEFINES", "IMPORTS", "CALLS", "EXTENDS", "IMPLEMENTS", "HAS_METHOD", "HAS_PROPERTY", "ACCESSES", "METHOD_OVERRIDES", "OVERRIDES", "METHOD_IMPLEMENTS", "MEMBER_OF", "STEP_IN_PROCESS", "HANDLES_ROUTE", "FETCHES", "HANDLES_TOOL", "ENTRY_POINT_OF", "WRAPS", "QUERIES", "FEATURE_MEMBER_OF", "FEATURE_DEPENDS_ON"];
|
|
14
14
|
export type RelType = (typeof REL_TYPES)[number];
|
|
15
15
|
export declare const EMBEDDING_TABLE_NAME = "CodeEmbedding";
|
|
16
16
|
//# sourceMappingURL=schema-constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-constants.d.ts","sourceRoot":"","sources":["../../src/cgdb/schema-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"schema-constants.d.ts","sourceRoot":"","sources":["../../src/cgdb/schema-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,WAAW,4WAiCd,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAE7C,eAAO,MAAM,SAAS,4UAuBZ,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,oBAAoB,kBAAkB,CAAC"}
|
|
@@ -17,6 +17,7 @@ export const NODE_TABLES = [
|
|
|
17
17
|
'CodeElement',
|
|
18
18
|
'Community',
|
|
19
19
|
'Process',
|
|
20
|
+
'FeatureCluster',
|
|
20
21
|
'Section',
|
|
21
22
|
'Struct',
|
|
22
23
|
'Enum',
|
|
@@ -62,6 +63,8 @@ export const REL_TYPES = [
|
|
|
62
63
|
'ENTRY_POINT_OF',
|
|
63
64
|
'WRAPS',
|
|
64
65
|
'QUERIES',
|
|
66
|
+
'FEATURE_MEMBER_OF',
|
|
67
|
+
'FEATURE_DEPENDS_ON',
|
|
65
68
|
];
|
|
66
69
|
export const EMBEDDING_TABLE_NAME = 'CodeEmbedding';
|
|
67
70
|
//# sourceMappingURL=schema-constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-constants.js","sourceRoot":"","sources":["../../src/cgdb/schema-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM;IACN,QAAQ;IACR,UAAU;IACV,OAAO;IACP,WAAW;IACX,QAAQ;IACR,aAAa;IACb,WAAW;IACX,SAAS;IACT,SAAS;IACT,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,OAAO;IACP,WAAW;IACX,OAAO;IACP,MAAM;IACN,WAAW;IACX,OAAO;IACP,QAAQ;IACR,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,aAAa;IACb,UAAU;IACV,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU;IACV,SAAS;IACT,SAAS;IACT,OAAO;IACP,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,UAAU;IACV,kBAAkB;IAClB,WAAW,EAAE,mEAAmE;IAChF,mBAAmB;IACnB,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,OAAO;IACP,SAAS;
|
|
1
|
+
{"version":3,"file":"schema-constants.js","sourceRoot":"","sources":["../../src/cgdb/schema-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM;IACN,QAAQ;IACR,UAAU;IACV,OAAO;IACP,WAAW;IACX,QAAQ;IACR,aAAa;IACb,WAAW;IACX,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,OAAO;IACP,WAAW;IACX,OAAO;IACP,MAAM;IACN,WAAW;IACX,OAAO;IACP,QAAQ;IACR,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,aAAa;IACb,UAAU;IACV,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU;IACV,SAAS;IACT,SAAS;IACT,OAAO;IACP,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,UAAU;IACV,kBAAkB;IAClB,WAAW,EAAE,mEAAmE;IAChF,mBAAmB;IACnB,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,OAAO;IACP,SAAS;IACT,mBAAmB;IACnB,oBAAoB;CACZ,CAAC;AAIX,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { NodeLabel } from './graph/types.js';
|
|
2
|
+
export type FeatureClusterKind = 'feature' | 'page' | 'domain' | 'service' | 'api' | 'tooling' | 'data' | 'docs' | 'test' | 'infrastructure';
|
|
3
|
+
export interface FeatureClusterSignal {
|
|
4
|
+
kind: 'path' | 'symbol' | 'route' | 'tool' | 'process' | 'community' | 'test' | 'docs' | 'package' | 'contract';
|
|
5
|
+
value: string;
|
|
6
|
+
weight: number;
|
|
7
|
+
}
|
|
8
|
+
export type ClusterSignal = FeatureClusterSignal;
|
|
9
|
+
export interface CrossRepoClusterLink {
|
|
10
|
+
sourceRepo: string;
|
|
11
|
+
sourceService?: string;
|
|
12
|
+
sourceClusterId: string;
|
|
13
|
+
sourceClusterName?: string;
|
|
14
|
+
targetRepo: string;
|
|
15
|
+
targetService?: string;
|
|
16
|
+
targetClusterId?: string;
|
|
17
|
+
targetClusterName?: string;
|
|
18
|
+
contractName?: string;
|
|
19
|
+
relationship: 'provider' | 'consumer' | 'shared-contract' | 'depends-on';
|
|
20
|
+
confidence: number;
|
|
21
|
+
evidence: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface FeatureCluster {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
slug: string;
|
|
27
|
+
featureKind: FeatureClusterKind;
|
|
28
|
+
summary: string;
|
|
29
|
+
description: string;
|
|
30
|
+
repo?: string;
|
|
31
|
+
service?: string;
|
|
32
|
+
signals: string[];
|
|
33
|
+
memberCount: number;
|
|
34
|
+
entryPointIds: string[];
|
|
35
|
+
routes: string[];
|
|
36
|
+
tools: string[];
|
|
37
|
+
testCoverageHints: string[];
|
|
38
|
+
lastIndexedCommit?: string;
|
|
39
|
+
confidence: number;
|
|
40
|
+
source: 'heuristic' | 'manual' | 'imported';
|
|
41
|
+
crossRepoLinks?: CrossRepoClusterLink[];
|
|
42
|
+
}
|
|
43
|
+
export interface FeatureClusterMember {
|
|
44
|
+
nodeId?: string;
|
|
45
|
+
id?: string;
|
|
46
|
+
clusterId?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
label?: NodeLabel;
|
|
49
|
+
type?: NodeLabel;
|
|
50
|
+
filePath?: string;
|
|
51
|
+
startLine?: number;
|
|
52
|
+
endLine?: number;
|
|
53
|
+
role?: 'entrypoint' | 'definition' | 'implementation' | 'supporting';
|
|
54
|
+
confidence: number;
|
|
55
|
+
signals: string[];
|
|
56
|
+
}
|
|
57
|
+
export interface FeatureClusterDependency {
|
|
58
|
+
sourceClusterId: string;
|
|
59
|
+
targetClusterId: string;
|
|
60
|
+
edgeCount: number;
|
|
61
|
+
relationshipTypes: string[];
|
|
62
|
+
confidence: number;
|
|
63
|
+
}
|
|
64
|
+
export interface FeatureClusterReference {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
slug?: string;
|
|
68
|
+
featureKind?: FeatureClusterKind | string;
|
|
69
|
+
confidence?: number;
|
|
70
|
+
reason?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface FeatureContextPack {
|
|
73
|
+
cluster: FeatureCluster;
|
|
74
|
+
members: FeatureClusterMember[];
|
|
75
|
+
dependencies: {
|
|
76
|
+
incoming: FeatureClusterReference[];
|
|
77
|
+
outgoing: FeatureClusterReference[];
|
|
78
|
+
};
|
|
79
|
+
dependencyEdges?: FeatureClusterDependency[];
|
|
80
|
+
entryPoints?: FeatureClusterMember[];
|
|
81
|
+
routes?: FeatureClusterMember[];
|
|
82
|
+
tools?: FeatureClusterMember[];
|
|
83
|
+
processes?: Array<{
|
|
84
|
+
id: string;
|
|
85
|
+
label: string;
|
|
86
|
+
processType?: string;
|
|
87
|
+
stepCount?: number;
|
|
88
|
+
}>;
|
|
89
|
+
tests?: FeatureClusterMember[];
|
|
90
|
+
docs?: FeatureClusterMember[];
|
|
91
|
+
crossRepoLinks?: CrossRepoClusterLink[];
|
|
92
|
+
safeEditSurface?: {
|
|
93
|
+
files: string[];
|
|
94
|
+
symbols: string[];
|
|
95
|
+
warnings: string[];
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export type ClusterContextPack = FeatureContextPack;
|
|
99
|
+
//# sourceMappingURL=feature-clusters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-clusters.d.ts","sourceRoot":"","sources":["../src/feature-clusters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,MAAM,GACN,QAAQ,GACR,SAAS,GACT,KAAK,GACL,SAAS,GACT,MAAM,GACN,MAAM,GACN,MAAM,GACN,gBAAgB,CAAC;AAErB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EACA,MAAM,GACN,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,UAAU,GAAG,UAAU,GAAG,iBAAiB,GAAG,YAAY,CAAC;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,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specific or browser-specific imports here.
|
|
6
6
|
*/
|
|
7
7
|
import { SupportedLanguages } from '../languages.js';
|
|
8
|
-
export type NodeLabel = 'Project' | 'Package' | 'Module' | 'Folder' | 'File' | 'Class' | 'Function' | 'Method' | 'Variable' | 'Interface' | 'Enum' | 'Decorator' | 'Import' | 'Type' | 'CodeElement' | 'Community' | 'Process' | 'Struct' | 'Macro' | 'Typedef' | 'Union' | 'Namespace' | 'Trait' | 'Impl' | 'TypeAlias' | 'Const' | 'Static' | 'Property' | 'Record' | 'Delegate' | 'Annotation' | 'Constructor' | 'Template' | 'Section' | 'Route' | 'Tool';
|
|
8
|
+
export type NodeLabel = 'Project' | 'Package' | 'Module' | 'Folder' | 'File' | 'Class' | 'Function' | 'Method' | 'Variable' | 'Interface' | 'Enum' | 'Decorator' | 'Import' | 'Type' | 'CodeElement' | 'Community' | 'Process' | 'FeatureCluster' | 'Struct' | 'Macro' | 'Typedef' | 'Union' | 'Namespace' | 'Trait' | 'Impl' | 'TypeAlias' | 'Const' | 'Static' | 'Property' | 'Record' | 'Delegate' | 'Annotation' | 'Constructor' | 'Template' | 'Section' | 'Route' | 'Tool';
|
|
9
9
|
export type NodeProperties = {
|
|
10
10
|
name: string;
|
|
11
11
|
filePath: string;
|
|
@@ -45,9 +45,23 @@ export type NodeProperties = {
|
|
|
45
45
|
responseKeys?: string[];
|
|
46
46
|
errorKeys?: string[];
|
|
47
47
|
middleware?: string[];
|
|
48
|
+
slug?: string;
|
|
49
|
+
featureKind?: string;
|
|
50
|
+
summary?: string;
|
|
51
|
+
repo?: string;
|
|
52
|
+
service?: string;
|
|
53
|
+
signals?: string[];
|
|
54
|
+
memberCount?: number;
|
|
55
|
+
entryPointIds?: string[];
|
|
56
|
+
routes?: string[];
|
|
57
|
+
tools?: string[];
|
|
58
|
+
testCoverageHints?: string[];
|
|
59
|
+
lastIndexedCommit?: string;
|
|
60
|
+
confidence?: number;
|
|
61
|
+
source?: string;
|
|
48
62
|
[key: string]: unknown;
|
|
49
63
|
};
|
|
50
|
-
export type RelationshipType = 'CONTAINS' | 'CALLS' | 'INHERITS' | 'METHOD_OVERRIDES' | 'METHOD_IMPLEMENTS' | 'IMPORTS' | 'USES' | 'DEFINES' | 'DECORATES' | 'IMPLEMENTS' | 'EXTENDS' | 'HAS_METHOD' | 'HAS_PROPERTY' | 'ACCESSES' | 'MEMBER_OF' | 'STEP_IN_PROCESS' | 'HANDLES_ROUTE' | 'FETCHES' | 'HANDLES_TOOL' | 'ENTRY_POINT_OF' | 'WRAPS' | 'QUERIES';
|
|
64
|
+
export type RelationshipType = 'CONTAINS' | 'CALLS' | 'INHERITS' | 'METHOD_OVERRIDES' | 'METHOD_IMPLEMENTS' | 'IMPORTS' | 'USES' | 'DEFINES' | 'DECORATES' | 'IMPLEMENTS' | 'EXTENDS' | 'HAS_METHOD' | 'HAS_PROPERTY' | 'ACCESSES' | 'MEMBER_OF' | 'STEP_IN_PROCESS' | 'HANDLES_ROUTE' | 'FETCHES' | 'HANDLES_TOOL' | 'ENTRY_POINT_OF' | 'WRAPS' | 'QUERIES' | 'FEATURE_MEMBER_OF' | 'FEATURE_DEPENDS_ON';
|
|
51
65
|
export interface GraphNode {
|
|
52
66
|
id: string;
|
|
53
67
|
label: NodeLabel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,WAAW,GACX,MAAM,GACN,WAAW,GACX,QAAQ,GACR,MAAM,GACN,aAAa,GACb,WAAW,GACX,SAAS,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],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,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,mBAAmB,GACnB,SAAS,GACT,MAAM,GACN,SAAS,GACT,WAAW,GACX,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,cAAc,GACd,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,SAAS,GACT,cAAc,GACd,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,SAAS;QAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL"}
|
package/dist/_shared/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type { NodeTableName, RelType } from './cgdb/schema-constants.js';
|
|
|
4
4
|
export { SupportedLanguages } from './languages.js';
|
|
5
5
|
export { getLanguageFromFilename, getSyntaxLanguageFromFilename } from './language-detection.js';
|
|
6
6
|
export type { MroStrategy } from './mro-strategy.js';
|
|
7
|
+
export type { FeatureClusterKind, FeatureClusterSignal, ClusterSignal, CrossRepoClusterLink, FeatureCluster, FeatureClusterMember, FeatureClusterDependency, FeatureClusterReference, FeatureContextPack, ClusterContextPack, } from './feature-clusters.js';
|
|
7
8
|
export type { PipelinePhase, PipelineProgress } from './pipeline.js';
|
|
8
9
|
export type { SymbolDefinition } from './scope-resolution/symbol-definition.js';
|
|
9
10
|
export type { ScopeId, DefId, ScopeKind, Range, Capture, CaptureMatch, BindingRef, ImportEdge, TypeRef, Scope, ResolutionEvidence, Resolution, Reference, ReferenceIndex, LookupParams, RegistryContributor, ParsedImport, ParsedTypeBinding, WorkspaceIndex, Callsite, ScopeLookup, } from './scope-resolution/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAGzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACjG,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,YAAY,EACV,OAAO,EACP,KAAK,EACL,SAAS,EACT,KAAK,EACL,OAAO,EACP,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL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,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,YAAY,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,YAAY,EACV,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,mBAAmB;AACnB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,mBAAmB;AACnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,mBAAmB;AACnB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,mBAAmB;AACnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AA+CjG,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,yDAAyD;AACzD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AAGvD,sEAAsE;AACtE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
/**
|
|
2
2
|
* Pipeline progress types — shared between CLI and web.
|
|
3
3
|
*/
|
|
4
|
-
export type PipelinePhase = 'idle' | 'extracting' | 'structure' | 'parsing' | 'imports' | 'calls' | 'heritage' | 'communities' | 'processes' | 'enriching' | 'complete' | 'error';
|
|
4
|
+
export type PipelinePhase = 'idle' | 'extracting' | 'structure' | 'parsing' | 'imports' | 'calls' | 'heritage' | 'communities' | 'processes' | 'feature_clusters' | 'enriching' | 'complete' | 'error';
|
|
5
5
|
export interface PipelineProgress {
|
|
6
6
|
phase: PipelinePhase;
|
|
7
7
|
percent: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,YAAY,GACZ,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,GACb,WAAW,GACX,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,cAAc,EAAE,MAAM,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,YAAY,GACZ,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,GACb,WAAW,GACX,kBAAkB,GAClB,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,cAAc,EAAE,MAAM,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH"}
|
package/dist/cli/ai-context.js
CHANGED
|
@@ -109,6 +109,8 @@ This project is indexed by CodraGraph as **${projectName}**${noStats ? '' : ` ($
|
|
|
109
109
|
|----------|---------|
|
|
110
110
|
| \`codragraph://repo/${projectName}/context\` | Codebase overview, check index freshness |
|
|
111
111
|
| \`codragraph://repo/${projectName}/clusters\` | All functional areas |
|
|
112
|
+
| \`codragraph://repo/${projectName}/feature-clusters\` | Product/domain feature areas |
|
|
113
|
+
| \`codragraph://repo/${projectName}/feature/{name}\` | Focused files, line ranges, flows, dependencies |
|
|
112
114
|
| \`codragraph://repo/${projectName}/processes\` | All execution flows |
|
|
113
115
|
| \`codragraph://repo/${projectName}/process/{name}\` | Step-by-step execution trace |
|
|
114
116
|
|
|
@@ -120,6 +122,8 @@ This repository is listed under CodraGraph **group(s): ${groupNames.join(', ')}*
|
|
|
120
122
|
`
|
|
121
123
|
: ''}## CLI
|
|
122
124
|
|
|
125
|
+
Commands are cross-platform: use \`npx @codragraph/cli ...\` or \`codragraph ...\` in Windows PowerShell, macOS bash/zsh, and Linux shells. Prefer package commands like \`npm --prefix packages/core test\` from repo root instead of shell-specific \`cd dir && ...\` chains.
|
|
126
|
+
|
|
123
127
|
${skillsTable}
|
|
124
128
|
|
|
125
129
|
${CODRAGRAPH_END_MARKER}`;
|
package/dist/cli/analyze.js
CHANGED
|
@@ -12,12 +12,16 @@ import { execFileSync } from 'child_process';
|
|
|
12
12
|
import v8 from 'v8';
|
|
13
13
|
import cliProgress from 'cli-progress';
|
|
14
14
|
import * as fsSync from 'node:fs';
|
|
15
|
+
import { createRequire } from 'module';
|
|
15
16
|
import { closeCgdb } from '../core/cgdb/cgdb-adapter.js';
|
|
16
17
|
import { getStoragePaths, getGlobalRegistryPath, RegistryNameCollisionError, } from '../storage/repo-manager.js';
|
|
17
18
|
import { getGitRoot, hasGitDir } from '../storage/git.js';
|
|
18
19
|
import { runFullAnalysis } from '../core/run-analyze.js';
|
|
19
20
|
import { getMaxFileSizeBannerMessage } from '../core/ingestion/utils/max-file-size.js';
|
|
20
21
|
import fs from 'fs/promises';
|
|
22
|
+
const require = createRequire(import.meta.url);
|
|
23
|
+
const pkg = require('../../package.json');
|
|
24
|
+
const CLI_PACKAGE_SPEC = `@codragraph/cli@${pkg.version}`;
|
|
21
25
|
const HEAP_MB = 8192;
|
|
22
26
|
const HEAP_FLAG = `--max-old-space-size=${HEAP_MB}`;
|
|
23
27
|
/** Increase default stack size (KB) to prevent stack overflow on deep class hierarchies. */
|
|
@@ -105,25 +109,6 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
105
109
|
}
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
|
-
// ── First-run auto-setup ───────────────────────────────────────────
|
|
109
|
-
// Makes `npx @codragraph/cli analyze` a true one-command entry. We detect
|
|
110
|
-
// first-run by the absence of the global registry — analyze writes to it on
|
|
111
|
-
// every successful index, so it's a reliable "this user has never run us
|
|
112
|
-
// before" signal. Opt out with `--no-setup` for CI / headless contexts;
|
|
113
|
-
// commander maps `--no-setup` to `options.setup === false`.
|
|
114
|
-
if (options?.setup !== false) {
|
|
115
|
-
let registryExists = true;
|
|
116
|
-
try {
|
|
117
|
-
await fs.access(getGlobalRegistryPath());
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
registryExists = false;
|
|
121
|
-
}
|
|
122
|
-
if (!registryExists) {
|
|
123
|
-
const { runSetup } = await import('./setup.js');
|
|
124
|
-
await runSetup({ skipNextSteps: true, compactHeader: true });
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
112
|
console.log('\n CodraGraph Analyzer\n');
|
|
128
113
|
let repoPath;
|
|
129
114
|
if (inputPath) {
|
|
@@ -153,6 +138,23 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
153
138
|
if (!repoHasGit) {
|
|
154
139
|
console.log(' Warning: no .git directory found \u2014 commit-tracking and incremental updates disabled.\n');
|
|
155
140
|
}
|
|
141
|
+
// ── First-run auto-setup ───────────────────────────────────────────
|
|
142
|
+
// Makes `npx @codragraph/cli analyze` a true one-command entry. Validate
|
|
143
|
+
// the target repo first so invalid invocations fail fast without mutating
|
|
144
|
+
// editor/global config.
|
|
145
|
+
if (options?.setup !== false) {
|
|
146
|
+
let registryExists = true;
|
|
147
|
+
try {
|
|
148
|
+
await fs.access(getGlobalRegistryPath());
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
registryExists = false;
|
|
152
|
+
}
|
|
153
|
+
if (!registryExists) {
|
|
154
|
+
const { runSetup } = await import('./setup.js');
|
|
155
|
+
await runSetup({ skipNextSteps: true, compactHeader: true });
|
|
156
|
+
}
|
|
157
|
+
}
|
|
156
158
|
// KuzuDB migration cleanup is handled by runFullAnalysis internally.
|
|
157
159
|
// Note: --skills is handled after runFullAnalysis using the returned pipelineResult.
|
|
158
160
|
if (process.env.CODRAGRAPH_NO_GITIGNORE) {
|
|
@@ -299,7 +301,8 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
299
301
|
nodes: s.nodes ?? 0,
|
|
300
302
|
edges: s.edges ?? 0,
|
|
301
303
|
communities: s.communities,
|
|
302
|
-
clusters:
|
|
304
|
+
clusters: result.pipelineResult?.featureClusterResult?.stats.totalClusters ??
|
|
305
|
+
aggregatedClusterCount,
|
|
303
306
|
processes: s.processes,
|
|
304
307
|
}, skillResult.skills, { skipAgentsMd: options?.skipAgentsMd, noStats: options?.noStats });
|
|
305
308
|
}
|
|
@@ -392,8 +395,8 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
392
395
|
console.error(' Suggestions:');
|
|
393
396
|
console.error(' 1. Clear the npm cache: npm cache clean --force');
|
|
394
397
|
console.error(' 2. Update npm: npm install -g npm@latest');
|
|
395
|
-
console.error(
|
|
396
|
-
console.error(
|
|
398
|
+
console.error(` 3. Reinstall codragraph: npm install -g ${CLI_PACKAGE_SPEC}`);
|
|
399
|
+
console.error(` 4. Or try npx directly: npx ${CLI_PACKAGE_SPEC} analyze`);
|
|
397
400
|
console.error('');
|
|
398
401
|
}
|
|
399
402
|
else if (msg.includes('MODULE_NOT_FOUND') ||
|
|
@@ -401,8 +404,8 @@ export const analyzeCommand = async (inputPath, options) => {
|
|
|
401
404
|
msg.includes('ERR_MODULE_NOT_FOUND')) {
|
|
402
405
|
console.error(' A required module could not be loaded. The installation may be corrupt.');
|
|
403
406
|
console.error(' Suggestions:');
|
|
404
|
-
console.error(
|
|
405
|
-
console.error(
|
|
407
|
+
console.error(` 1. Reinstall: npm install -g ${CLI_PACKAGE_SPEC}`);
|
|
408
|
+
console.error(` 2. Clear cache: npm cache clean --force && npx ${CLI_PACKAGE_SPEC} analyze`);
|
|
406
409
|
console.error('');
|
|
407
410
|
}
|
|
408
411
|
process.exitCode = 1;
|