weavatrix 0.3.14 → 1.1.0
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/LICENSE +1 -0
- package/README.md +132 -200
- package/bin/native/darwin-arm64/weavatrix +0 -0
- package/bin/native/darwin-x64/weavatrix +0 -0
- package/bin/native/linux-arm64/weavatrix +0 -0
- package/bin/native/linux-x64/weavatrix +0 -0
- package/bin/native/win32-arm64/weavatrix.exe +0 -0
- package/bin/native/win32-x64/weavatrix.exe +0 -0
- package/bin/resolve-binary.mjs +73 -0
- package/bin/run-native.mjs +26 -0
- package/bin/weavatrix-mcp.mjs +7 -6
- package/bin/weavatrix.mjs +5 -0
- package/package.json +10 -67
- package/server.json +38 -0
- package/skill/SKILL.md +62 -374
- package/skill/agents/openai.yaml +4 -0
- package/skill/references/tool-routing.md +45 -0
- package/SECURITY.md +0 -101
- package/docs/adr/0001-v0.3-offline-online-split.md +0 -60
- package/docs/agent-task-benchmark.md +0 -58
- package/docs/releases/v0.2.19.md +0 -33
- package/docs/releases/v0.3.0.md +0 -43
- package/docs/releases/v0.3.1.md +0 -30
- package/docs/releases/v0.3.10.md +0 -76
- package/docs/releases/v0.3.11.md +0 -55
- package/docs/releases/v0.3.12.md +0 -44
- package/docs/releases/v0.3.13.md +0 -34
- package/docs/releases/v0.3.14.md +0 -37
- package/docs/releases/v0.3.2.md +0 -15
- package/docs/releases/v0.3.3.md +0 -25
- package/docs/releases/v0.3.4.md +0 -40
- package/docs/releases/v0.3.5.md +0 -50
- package/docs/releases/v0.3.6.md +0 -44
- package/docs/releases/v0.3.7.md +0 -37
- package/docs/releases/v0.3.8.md +0 -21
- package/docs/releases/v0.3.9.md +0 -36
- package/scripts/run-agent-task-benchmark.mjs +0 -118
- package/src/analysis/allowed-test-runner.js +0 -70
- package/src/analysis/architecture/contract-graph.js +0 -119
- package/src/analysis/architecture/contract-schema.js +0 -110
- package/src/analysis/architecture/contract-storage.js +0 -35
- package/src/analysis/architecture/contract-verification.js +0 -168
- package/src/analysis/architecture-contract.js +0 -16
- package/src/analysis/audit-debt.js +0 -94
- package/src/analysis/audit-extensions.js +0 -60
- package/src/analysis/cargo-dependency-evidence.js +0 -108
- package/src/analysis/cargo-manifests.js +0 -81
- package/src/analysis/change-classification/diff-parser.js +0 -103
- package/src/analysis/change-classification/options.js +0 -40
- package/src/analysis/change-classification/symbol-classifier.js +0 -177
- package/src/analysis/change-classification.js +0 -188
- package/src/analysis/coverage-reports-tarpaulin.js +0 -112
- package/src/analysis/coverage-reports.js +0 -246
- package/src/analysis/cycle-route.js +0 -14
- package/src/analysis/data-flow-evidence.js +0 -114
- package/src/analysis/dead-check.js +0 -300
- package/src/analysis/dead-code-review/candidates.js +0 -194
- package/src/analysis/dead-code-review/policy.js +0 -23
- package/src/analysis/dead-code-review.js +0 -119
- package/src/analysis/dep-check-ecosystems.js +0 -205
- package/src/analysis/dep-check.js +0 -290
- package/src/analysis/dep-rules.js +0 -10
- package/src/analysis/dependency/conventions.js +0 -16
- package/src/analysis/dependency/scoped-dependencies.js +0 -51
- package/src/analysis/dependency/source-references.js +0 -21
- package/src/analysis/duplicate-groups.js +0 -104
- package/src/analysis/duplicates-worker.js +0 -11
- package/src/analysis/duplicates.compute.js +0 -269
- package/src/analysis/duplicates.js +0 -15
- package/src/analysis/duplicates.run.js +0 -52
- package/src/analysis/duplicates.tokenize.js +0 -199
- package/src/analysis/endpoints/common.js +0 -79
- package/src/analysis/endpoints/extract.js +0 -120
- package/src/analysis/endpoints/inventory.js +0 -84
- package/src/analysis/endpoints/mounts.js +0 -129
- package/src/analysis/endpoints-java.js +0 -260
- package/src/analysis/endpoints-rust.js +0 -124
- package/src/analysis/endpoints.js +0 -3
- package/src/analysis/findings.js +0 -70
- package/src/analysis/git-history/analytics.js +0 -177
- package/src/analysis/git-history/collector.js +0 -67
- package/src/analysis/git-history/options.js +0 -66
- package/src/analysis/git-history.js +0 -143
- package/src/analysis/git-ref-graph.js +0 -76
- package/src/analysis/go-dependency-evidence.js +0 -62
- package/src/analysis/graph-analysis.aggregate.js +0 -296
- package/src/analysis/graph-analysis.edges.js +0 -24
- package/src/analysis/graph-analysis.js +0 -7
- package/src/analysis/graph-analysis.refs.js +0 -202
- package/src/analysis/graph-analysis.summaries.js +0 -65
- package/src/analysis/health-capabilities.js +0 -83
- package/src/analysis/hot-path-review.js +0 -266
- package/src/analysis/http-contract-wrappers.js +0 -241
- package/src/analysis/http-contracts/analysis.js +0 -179
- package/src/analysis/http-contracts/client-call-detection.js +0 -82
- package/src/analysis/http-contracts/client-call-parser.js +0 -273
- package/src/analysis/http-contracts/graph-context.js +0 -143
- package/src/analysis/http-contracts/matching.js +0 -61
- package/src/analysis/http-contracts/shared.js +0 -85
- package/src/analysis/http-contracts.js +0 -6
- package/src/analysis/internal-audit/dependency-health.js +0 -113
- package/src/analysis/internal-audit/python-manifests.js +0 -78
- package/src/analysis/internal-audit/repo-files.js +0 -50
- package/src/analysis/internal-audit/supply-chain.js +0 -149
- package/src/analysis/internal-audit.collect.js +0 -213
- package/src/analysis/internal-audit.js +0 -9
- package/src/analysis/internal-audit.reach.js +0 -201
- package/src/analysis/internal-audit.run.js +0 -256
- package/src/analysis/java-source.js +0 -36
- package/src/analysis/jvm-artifact-index.js +0 -87
- package/src/analysis/jvm-dependency-evidence.js +0 -138
- package/src/analysis/jvm-manifests.js +0 -114
- package/src/analysis/manifests.js +0 -123
- package/src/analysis/package-reachability.js +0 -39
- package/src/analysis/source-complexity.ast.js +0 -97
- package/src/analysis/source-complexity.constants.js +0 -55
- package/src/analysis/source-complexity.js +0 -14
- package/src/analysis/source-complexity.report.js +0 -81
- package/src/analysis/source-complexity.walk.js +0 -228
- package/src/analysis/source-correctness/retry-patterns.js +0 -93
- package/src/analysis/source-correctness.js +0 -222
- package/src/analysis/static-test-reachability.js +0 -150
- package/src/analysis/structure/dependency-graph.js +0 -151
- package/src/analysis/structure/findings.js +0 -162
- package/src/analysis/task-retrieval.js +0 -107
- package/src/analysis/transport-contracts.js +0 -224
- package/src/analysis/transport-runtime-evidence.js +0 -155
- package/src/analysis-kit.mjs +0 -17
- package/src/bounds.js +0 -4
- package/src/build-graph.js +0 -209
- package/src/child-env.js +0 -7
- package/src/config.js +0 -5
- package/src/extension/local-services.mjs +0 -75
- package/src/git-exec.js +0 -67
- package/src/graph/build-worker.js +0 -49
- package/src/graph/builder/go-receiver-resolution.js +0 -112
- package/src/graph/builder/js/dynamic-import.js +0 -26
- package/src/graph/builder/js/queries.js +0 -48
- package/src/graph/builder/lang-csharp.js +0 -40
- package/src/graph/builder/lang-css.js +0 -29
- package/src/graph/builder/lang-go.js +0 -140
- package/src/graph/builder/lang-html.js +0 -29
- package/src/graph/builder/lang-java-calls.js +0 -142
- package/src/graph/builder/lang-java.js +0 -215
- package/src/graph/builder/lang-js.js +0 -291
- package/src/graph/builder/lang-python.js +0 -235
- package/src/graph/builder/lang-rust-calls.js +0 -63
- package/src/graph/builder/lang-rust.js +0 -299
- package/src/graph/builder/lang-solidity.js +0 -126
- package/src/graph/builder/lang-sql.js +0 -263
- package/src/graph/builder/pass2-resolution.js +0 -81
- package/src/graph/builder/spec-pkg.js +0 -87
- package/src/graph/community.js +0 -27
- package/src/graph/edge-provenance.js +0 -31
- package/src/graph/file-lock.js +0 -69
- package/src/graph/freshness-probe.js +0 -142
- package/src/graph/graph-filter.js +0 -63
- package/src/graph/incremental-refresh.js +0 -235
- package/src/graph/internal-builder.barrels.js +0 -235
- package/src/graph/internal-builder.build.js +0 -300
- package/src/graph/internal-builder.java.js +0 -33
- package/src/graph/internal-builder.js +0 -12
- package/src/graph/internal-builder.langs.js +0 -157
- package/src/graph/internal-builder.pass2.js +0 -163
- package/src/graph/internal-builder.resolvers.js +0 -286
- package/src/graph/layout.js +0 -51
- package/src/graph/node-id.js +0 -7
- package/src/graph/parser-artifact-boundary.js +0 -55
- package/src/graph/relations.js +0 -4
- package/src/graph/repo-registry.js +0 -124
- package/src/graph/resolvers/rust.js +0 -117
- package/src/infra/infra-items.js +0 -255
- package/src/infra/infra-registry.js +0 -184
- package/src/infra/infra.detect.js +0 -119
- package/src/infra/infra.js +0 -38
- package/src/infra/infra.match.js +0 -102
- package/src/infra/infra.scan.js +0 -93
- package/src/mcp/actions/graph-lifecycle.mjs +0 -148
- package/src/mcp/architecture-bootstrap.mjs +0 -168
- package/src/mcp/architecture-starter.mjs +0 -234
- package/src/mcp/catalog.mjs +0 -233
- package/src/mcp/company-contract-page.mjs +0 -142
- package/src/mcp/company-contract-reconcile.mjs +0 -87
- package/src/mcp/company-contract-verdict.mjs +0 -42
- package/src/mcp/evidence/bun-lock-graph.mjs +0 -209
- package/src/mcp/evidence/duplicate-member-order.mjs +0 -8
- package/src/mcp/evidence/package-graph-common.mjs +0 -115
- package/src/mcp/evidence/package-lock-graph.mjs +0 -92
- package/src/mcp/evidence-snapshot.architecture.mjs +0 -80
- package/src/mcp/evidence-snapshot.common.mjs +0 -158
- package/src/mcp/evidence-snapshot.duplicates.mjs +0 -213
- package/src/mcp/evidence-snapshot.health.mjs +0 -102
- package/src/mcp/evidence-snapshot.inventory.mjs +0 -148
- package/src/mcp/evidence-snapshot.mjs +0 -50
- package/src/mcp/evidence-snapshot.package-graph.mjs +0 -34
- package/src/mcp/evidence-snapshot.structure.mjs +0 -84
- package/src/mcp/extension-api.mjs +0 -77
- package/src/mcp/git-output.mjs +0 -7
- package/src/mcp/graph/context-core.mjs +0 -111
- package/src/mcp/graph/context-seeds.mjs +0 -207
- package/src/mcp/graph/context-state.mjs +0 -85
- package/src/mcp/graph/reverse-reach.mjs +0 -42
- package/src/mcp/graph/tools-core.mjs +0 -143
- package/src/mcp/graph/tools-query.mjs +0 -276
- package/src/mcp/graph-context.mjs +0 -5
- package/src/mcp/graph-diff.mjs +0 -218
- package/src/mcp/health/audit-format.mjs +0 -199
- package/src/mcp/health/audit.mjs +0 -199
- package/src/mcp/health/dead-code.mjs +0 -110
- package/src/mcp/health/duplicates.mjs +0 -121
- package/src/mcp/health/endpoints.mjs +0 -71
- package/src/mcp/health/structure.mjs +0 -220
- package/src/mcp/runtime-version.mjs +0 -31
- package/src/mcp/server/auto-refresh.mjs +0 -66
- package/src/mcp/server/runtime-config.mjs +0 -43
- package/src/mcp/server/shutdown.mjs +0 -40
- package/src/mcp/staleness-notice.mjs +0 -20
- package/src/mcp/sync/evidence-architecture.mjs +0 -54
- package/src/mcp/sync/evidence-common.mjs +0 -88
- package/src/mcp/sync/evidence-duplicates.mjs +0 -97
- package/src/mcp/sync/evidence-health.mjs +0 -56
- package/src/mcp/sync/evidence-packages.mjs +0 -95
- package/src/mcp/sync/payload-common.mjs +0 -97
- package/src/mcp/sync/payload-v2.mjs +0 -54
- package/src/mcp/sync/payload-v3.mjs +0 -79
- package/src/mcp/sync-evidence.mjs +0 -23
- package/src/mcp/sync-payload.mjs +0 -70
- package/src/mcp/tool-result.mjs +0 -54
- package/src/mcp/tools-actions.mjs +0 -11
- package/src/mcp/tools-architecture.mjs +0 -177
- package/src/mcp/tools-company.mjs +0 -251
- package/src/mcp/tools-context.mjs +0 -222
- package/src/mcp/tools-endpoints.mjs +0 -207
- package/src/mcp/tools-graph-hubs.mjs +0 -78
- package/src/mcp/tools-graph.mjs +0 -17
- package/src/mcp/tools-health.mjs +0 -24
- package/src/mcp/tools-history.mjs +0 -28
- package/src/mcp/tools-impact-change.mjs +0 -220
- package/src/mcp/tools-impact-precision.mjs +0 -89
- package/src/mcp/tools-impact.mjs +0 -169
- package/src/mcp/tools-source.mjs +0 -238
- package/src/mcp/tools-verified-change.mjs +0 -200
- package/src/mcp-rg.mjs +0 -50
- package/src/mcp-runtime.mjs +0 -2
- package/src/mcp-server.mjs +0 -298
- package/src/mcp-source-tools.mjs +0 -163
- package/src/path-classification.js +0 -226
- package/src/path-ignore.js +0 -69
- package/src/precision/lsp-client/constants.js +0 -12
- package/src/precision/lsp-client/environment.js +0 -20
- package/src/precision/lsp-client/errors.js +0 -15
- package/src/precision/lsp-client/lifecycle.js +0 -114
- package/src/precision/lsp-client/message-parser.js +0 -81
- package/src/precision/lsp-client/protocol.js +0 -212
- package/src/precision/lsp-client/registry.js +0 -59
- package/src/precision/lsp-client/repo-uri.js +0 -60
- package/src/precision/lsp-client/stdio-client.js +0 -140
- package/src/precision/lsp-client.js +0 -10
- package/src/precision/lsp-overlay/budget-policy.js +0 -78
- package/src/precision/lsp-overlay/build.js +0 -261
- package/src/precision/lsp-overlay/contract.js +0 -61
- package/src/precision/lsp-overlay/reference-results.js +0 -108
- package/src/precision/lsp-overlay/semantic-inputs.js +0 -62
- package/src/precision/lsp-overlay/source-session.js +0 -142
- package/src/precision/lsp-overlay/store.js +0 -150
- package/src/precision/lsp-overlay/target-index.js +0 -152
- package/src/precision/lsp-overlay/target-query.js +0 -55
- package/src/precision/lsp-overlay.js +0 -11
- package/src/precision/symbol-query.js +0 -224
- package/src/precision/typescript-lsp-provider.js +0 -12
- package/src/precision/typescript-provider/client.js +0 -89
- package/src/precision/typescript-provider/discovery.js +0 -124
- package/src/precision/typescript-provider/isolated-runtime.js +0 -39
- package/src/precision/typescript-provider/project-host.js +0 -254
- package/src/precision/typescript-provider/project-safety.js +0 -166
- package/src/precision/typescript-provider/reference-usage.js +0 -53
- package/src/process.js +0 -95
- package/src/repo-path.js +0 -53
- package/src/scan/discover.inventory.js +0 -78
- package/src/scan/discover.js +0 -5
- package/src/scan/discover.list.js +0 -79
- package/src/scan/discover.stack.js +0 -227
- package/src/scan/search.core.js +0 -24
- package/src/scan/search.git.js +0 -102
- package/src/scan/search.js +0 -9
- package/src/scan/search.node.js +0 -83
- package/src/scan/search.preview.js +0 -49
- package/src/scan/search.rg.js +0 -145
- package/src/security/advisory-store.js +0 -172
- package/src/security/installed-jvm-rust.js +0 -46
- package/src/security/installed.js +0 -280
- package/src/security/malware-file-heuristics.js +0 -121
- package/src/security/malware-heuristics.exclusions.js +0 -134
- package/src/security/malware-heuristics.js +0 -15
- package/src/security/malware-heuristics.roots.js +0 -145
- package/src/security/malware-heuristics.scan.js +0 -89
- package/src/security/malware-heuristics.sweep.js +0 -122
- package/src/security/malware-scoring.js +0 -105
- package/src/security/match.js +0 -85
- package/src/security/registry-sig.classify.js +0 -137
- package/src/security/registry-sig.js +0 -18
- package/src/security/registry-sig.rules.js +0 -192
- package/src/security/rust-advisory-report.js +0 -60
- package/src/security/typosquat.js +0 -81
- package/src/util.js +0 -40
- package/src/version.js +0 -7
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,233 +1,165 @@
|
|
|
1
|
-
# Weavatrix
|
|
1
|
+
# Weavatrix — native MCP repository intelligence
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/sergii-ziborov/weavatrix/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/weavatrix)
|
|
5
|
+
[](https://crates.io/crates/weavatrix-rust)
|
|
6
|
+
[](https://github.com/sergii-ziborov/weavatrix/blob/main/LICENSE)
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
inheritance, Health findings, clone families and Git-history coupling — and gives Claude Code, Codex
|
|
7
|
-
or any MCP client a bounded map for fast understanding and low repeated context. The same graph then
|
|
8
|
-
answers change impact, Health, dead-code review, duplicates, history and intended-architecture
|
|
9
|
-
questions. **34 network-free tools. No repository data leaves your machine.**
|
|
8
|
+
**Give your coding agent repository evidence before it starts guessing.**
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
10
|
+
Weavatrix is the native MCP product for repository intelligence. It gives
|
|
11
|
+
Codex, Claude Code, and other coding agents 39 read-only operations over one
|
|
12
|
+
revision-bound evidence graph: impact, architecture, APIs, Git history,
|
|
13
|
+
duplicates, dead code, search, semantic links, and temporal memory.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
hash-verified, reversible edits, or [`weavatrix-online`](https://github.com/sergii-ziborov/weavatrix-online)
|
|
19
|
-
for authorized Cloud or self-hosted sync. Each is an optional superset that depends on this core through
|
|
20
|
-
a supported extension API; the offline/online split is documented in
|
|
21
|
-
[docs/adr/0001-v0.3-offline-online-split.md](docs/adr/0001-v0.3-offline-online-split.md).
|
|
15
|
+
It does not answer from a larger grep or an invented confidence score. Every
|
|
16
|
+
bounded result can carry the repository revision, file, line, extractor,
|
|
17
|
+
evidence kind, and confidence that produced it.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
This npm package is the convenient prebuilt distribution of the same native
|
|
20
|
+
product published on crates.io as `weavatrix`. It is not a separate
|
|
21
|
+
JavaScript engine; both registry packages run the same Rust adapter and engine.
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
## Install in 30 seconds
|
|
26
24
|
|
|
27
25
|
```sh
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
npx -y weavatrix mcp .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or install the same native MCP product through Cargo:
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
```sh
|
|
32
|
+
cargo install weavatrix
|
|
33
|
+
weavatrix mcp .
|
|
33
34
|
```
|
|
34
35
|
|
|
36
|
+
### Codex
|
|
37
|
+
|
|
35
38
|
```toml
|
|
36
|
-
# or in ~/.codex/config.toml
|
|
37
39
|
[mcp_servers.weavatrix]
|
|
38
40
|
command = "npx"
|
|
39
|
-
args = ["-y", "weavatrix", "
|
|
40
|
-
startup_timeout_sec = 20
|
|
41
|
-
tool_timeout_sec = 60
|
|
41
|
+
args = ["-y", "weavatrix", "mcp", "."]
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
### Claude Code
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
|
|
48
|
-
cd weavatrix && npm install
|
|
49
|
-
claude mcp add -s user weavatrix -- node <path-to>/weavatrix/bin/weavatrix-mcp.mjs <repoRoot>
|
|
47
|
+
claude mcp add weavatrix -- npx -y weavatrix mcp .
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
they are stored in the per-user registry at `~/.weavatrix/graphs/<repository-storage-key>/graph.json`
|
|
54
|
-
(with a stable `.repository-id` beside them). No graph yet? Ask the agent to call `rebuild_graph`, or
|
|
55
|
-
just use a tool — graph and Health reads auto-reconcile the working graph before answering.
|
|
50
|
+
Profiles expose bounded views of the same engine:
|
|
56
51
|
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
```sh
|
|
53
|
+
npx -y weavatrix mcp . --profile=all
|
|
54
|
+
npx -y weavatrix mcp . --profile=code
|
|
55
|
+
npx -y weavatrix mcp . --profile=seo
|
|
56
|
+
```
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
The package contains native binaries for Windows x64/arm64, macOS x64/arm64,
|
|
59
|
+
and glibc Linux x64/arm64. It has no install script and performs no runtime
|
|
60
|
+
download.
|
|
61
|
+
|
|
62
|
+
## What an agent can ask
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
What breaks if I change src/auth/middleware.ts?
|
|
66
|
+
Trace POST /api/orders through this backend and its clients.
|
|
67
|
+
Which production symbols are dead, and what evidence proves it?
|
|
68
|
+
Show duplicate implementations but suppress router boilerplate.
|
|
69
|
+
Which dependency violates .weavatrix/architecture.json?
|
|
70
|
+
Find every GraphQL, gRPC, Kafka, RabbitMQ, NATS, JMS, SQS, or SNS
|
|
71
|
+
contract affected by this branch.
|
|
72
|
+
Build the smallest source bundle needed to edit this symbol safely.
|
|
73
|
+
```
|
|
61
74
|
|
|
62
|
-
|
|
75
|
+
## The 39 read-only operations
|
|
76
|
+
|
|
77
|
+
| Workflow | Operations |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| Graph orientation | `graph_stats`, `get_node`, `get_neighbors`, `query_graph`, `god_nodes`, `shortest_path`, `get_community`, `list_communities`, `module_map` |
|
|
80
|
+
| Change impact | `get_dependents`, `change_impact`, `verified_change`, `prepare_change`, `graph_diff` |
|
|
81
|
+
| Exact source context | `search_code`, `read_source`, `inspect_symbol`, `context_bundle` |
|
|
82
|
+
| Health and quality | `find_duplicates`, `find_dead_code`, `run_audit`, `coverage_map`, `hot_path_review` |
|
|
83
|
+
| APIs and transports | `list_endpoints`, `trace_endpoint`, `trace_api_contract` |
|
|
84
|
+
| Architecture | `get_architecture_contract`, `verify_architecture`, `explain_architecture_violation`, `propose_architecture_exception` |
|
|
85
|
+
| Git and repositories | `git_history`, `cross_repo_git`, `open_repo`, `list_known_repos`, `rebuild_graph` |
|
|
86
|
+
| Native extensions | `vector_search`, `semantic_link`, `seo_link_suggestions`, `memory_context` |
|
|
87
|
+
|
|
88
|
+
Every operation is read-only with respect to the analyzed repository.
|
|
89
|
+
Pagination and explicit limits bound large neighborhoods, histories, searches,
|
|
90
|
+
and contract inventories.
|
|
91
|
+
|
|
92
|
+
## 24 repository surfaces
|
|
93
|
+
|
|
94
|
+
| Group | Surfaces |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| Code | Rust; JavaScript/JSX; TypeScript/TSX; Python; Go; Java; C#; C; C++; SQL; Bash/Zsh; Swift; Solidity |
|
|
97
|
+
| Contracts and configuration | GraphQL; Protobuf/gRPC; JSON/JSONC; YAML/Kubernetes; Terraform/HCL; XML |
|
|
98
|
+
| Documents and UI | HTML/Vue/Svelte; CSS/SCSS/Sass/Less; Markdown/MDX; reStructuredText; AsciiDoc |
|
|
99
|
+
|
|
100
|
+
Cross-surface analysis connects HTTP, GraphQL, gRPC, Kafka, RabbitMQ/AMQP,
|
|
101
|
+
JMS, NATS, SQS, and SNS evidence. Dynamic dispatch that cannot be proved stays
|
|
102
|
+
unresolved; static reachability is never presented as measured coverage.
|
|
103
|
+
|
|
104
|
+
## Product and engine are separate
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
coding agent
|
|
108
|
+
|
|
|
109
|
+
| MCP over stdio
|
|
110
|
+
v
|
|
111
|
+
weavatrix 1.1
|
|
112
|
+
profile catalog · refresh · watcher · MCP framing
|
|
113
|
+
|
|
|
114
|
+
v
|
|
115
|
+
weavatrix-rust 2.0
|
|
116
|
+
typed graph · analysis · 39 read-only operations
|
|
117
|
+
```
|
|
63
118
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| `pinned` | No | No | None | 31 |
|
|
119
|
+
This npm product owns MCP transport and native distribution. The
|
|
120
|
+
[`weavatrix-rust`](https://github.com/sergii-ziborov/weavatrix-rust) crate is
|
|
121
|
+
the reusable protocol-independent engine; it is not an MCP server.
|
|
68
122
|
|
|
69
|
-
|
|
70
|
-
# hard-pin one repository and expose no cross-repo tools:
|
|
71
|
-
claude mcp add -s user weavatrix -- npx -y weavatrix <repoRoot> pinned
|
|
72
|
-
```
|
|
123
|
+
## Release evidence
|
|
73
124
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
`weavatrix-online`.
|
|
78
|
-
|
|
79
|
-
**Semantic precision** — a bounded, read-only TypeScript/JavaScript language-server overlay is on by
|
|
80
|
-
default for new graphs and upgrades confirmed references to `EXACT_LSP`. Turn it off for parser-only
|
|
81
|
-
operation with `WEAVATRIX_PRECISION=off` (env), `precision:"off"` on `rebuild_graph`/`open_repo`, or
|
|
82
|
-
the MCPB installer's precision choice. Java and Rust have no bundled language server; their edges stay
|
|
83
|
-
parser-derived.
|
|
84
|
-
|
|
85
|
-
The startup prewarm queries 32 ranked symbols (never more than 64) by default. For a deliberate
|
|
86
|
-
high-budget pass, set `WEAVATRIX_PRECISION_MAX_SYMBOLS` above 64 or `WEAVATRIX_PRECISION_PREWARM=full`
|
|
87
|
-
to cover every eligible target up to a 10,000-symbol ceiling; `WEAVATRIX_PRECISION_MAX_REFERENCES`,
|
|
88
|
-
`WEAVATRIX_PRECISION_MAX_LINKS` and `WEAVATRIX_PRECISION_TIMEOUT_MS` tune the budgets. Repositories
|
|
89
|
-
that exceed a hard ceiling stay honestly `PARTIAL`.
|
|
90
|
-
|
|
91
|
-
**Repository config files** (all optional, repository-root):
|
|
92
|
-
|
|
93
|
-
- `.weavatrixignore` — analysis-only exclusions that should stay tracked in Git (`*`, `**`, `?`,
|
|
94
|
-
root-anchored `/patterns`, directory suffixes, ordered `!` re-includes).
|
|
95
|
-
- `.weavatrix.json` — cross-repository HTTP client/wrapper contracts (`httpContracts`) and
|
|
96
|
-
`classify.product` overrides.
|
|
97
|
-
- `.weavatrix-deps.json` — `entrypoints`, `nonRuntimeRoots`, and Python `managedDependencies` /
|
|
98
|
-
`ignoreDependencies` for conventions that cannot be inferred safely.
|
|
99
|
-
|
|
100
|
-
**Test execution** — `verified_change` is read-only by default. Running an existing package
|
|
101
|
-
test/check/verify script requires both `run_tests:true` and `WEAVATRIX_ALLOW_TEST_RUNS=1`; arbitrary
|
|
102
|
-
commands are always rejected.
|
|
103
|
-
|
|
104
|
-
After an upgrade, reconnect the MCP server or start a new agent task before checking the tool list —
|
|
105
|
-
many clients snapshot `tools/list` for the lifetime of a connection. `graph_stats` reports the running
|
|
106
|
-
version, enabled capabilities and registered-tool count so a cached process is distinguishable from
|
|
107
|
-
the installed package.
|
|
108
|
-
|
|
109
|
-
## Tools
|
|
110
|
-
|
|
111
|
-
The 34 methods project the same reusable graph into the smallest view a task needs.
|
|
112
|
-
|
|
113
|
-
- **graph** — `graph_stats`, `get_node`, `get_neighbors`, `query_graph`, `god_nodes`, `shortest_path`,
|
|
114
|
-
`get_community`, `list_communities`, `module_map`, `get_dependents`, `change_impact`,
|
|
115
|
-
`verified_change`, `git_history`, `graph_diff`, `get_architecture_contract`, `prepare_change`.
|
|
116
|
-
Runtime, TypeScript type-only and language compile-only edges are reported separately; every edge
|
|
117
|
-
carries versioned provenance (`EXTRACTED` / `RESOLVED` / `INFERRED`, upgraded to `EXACT_LSP` only by
|
|
118
|
-
the bundled TS/JS overlay, `CONFLICT` when evidence disagrees).
|
|
119
|
-
- **search / source** — `search_code` (ripgrep-backed with a pure-Node fallback and
|
|
120
|
-
repository-relative path globs), `read_source`, `context_bundle`, `inspect_symbol`,
|
|
121
|
-
`list_endpoints` (Express/Fastify/Nest/Flask/FastAPI/Go mux/Rust axum & actix-web/Spring),
|
|
122
|
-
`trace_endpoint`.
|
|
123
|
-
- **health** — `find_dead_code`, `run_audit` (capability matrix + unused files/exports/dependencies,
|
|
124
|
-
missing/duplicate deps, offline OSV vulnerabilities, typosquats, lockfile drift; `base_ref` +
|
|
125
|
-
`debt: new|existing|all` for review-scoped results), `find_duplicates` (MOSS winnowing, catches
|
|
126
|
-
renamed clones), `coverage_map`, `hot_path_review`, `verify_architecture`,
|
|
127
|
-
`explain_architecture_violation`, `propose_architecture_exception`.
|
|
128
|
-
- **build** — `rebuild_graph` (reports the structural delta, keeps the prior state as `graph.prev.json`).
|
|
129
|
-
- **retarget** *(in `offline`, absent from `pinned`)* — `open_repo`, `list_known_repos`.
|
|
130
|
-
- **crossrepo** *(in `offline`, absent from `pinned`)* — `trace_api_contract` (joins routes to client
|
|
131
|
-
call-sites across registered local graphs; reads no source). Results are compact and paginated by
|
|
132
|
-
default (`page_size`, opaque `cursor`, and bounded `per_item_limit` samples); `response_detail="full"`
|
|
133
|
-
is an explicit opt-in and remains paginated.
|
|
134
|
-
|
|
135
|
-
Every finding is review evidence, never an auto-delete verdict: `find_dead_code` /
|
|
136
|
-
`run_audit category=unused` always return `REVIEW_REQUIRED` with `autoDelete:false`. Typecheck, tests
|
|
137
|
-
and runtime checks remain the release authority.
|
|
138
|
-
|
|
139
|
-
## Always-fresh graph
|
|
140
|
-
|
|
141
|
-
There is no watcher daemon to run and no manual refresh step: every graph/health call reconciles the
|
|
142
|
-
graph before answering. A Git-token freshness probe (HEAD + dirty/untracked content, debounced 2 s)
|
|
143
|
-
decides whether anything changed; when it did, a bounded incremental refresh reparses only the changed
|
|
144
|
-
files plus their reverse importers (≤ 24 changed / ≤ 80 reparsed JS/TS files) and merges the scoped
|
|
145
|
-
result into the previous graph under a file lock. Config/lockfile edits, export-surface changes,
|
|
146
|
-
barrel files and non-JS/TS languages fall back to a full rebuild — correctness always wins over speed.
|
|
147
|
-
Each refreshed answer carries a structured `refresh` record (`none` / `incremental` / `full`, changed
|
|
148
|
-
file count), so an agent can tell exactly which repository state it is reasoning about. The same
|
|
149
|
-
guarantees hold across concurrent MCP clients sharing one canonical graph.
|
|
150
|
-
|
|
151
|
-
## Benchmarks
|
|
152
|
-
|
|
153
|
-
Two gates ship in the repository:
|
|
154
|
-
|
|
155
|
-
- `npm run benchmark` — a reproducible golden suite for TypeScript, JavaScript, Python, Go, Java and
|
|
156
|
-
Rust, plus cross-repository HTTP matching, framework conventions and the MCP graph lifecycle.
|
|
157
|
-
- `npm run benchmark:real` — compares revision-pinned local snapshots against the checked-in 0.2.1
|
|
158
|
-
relation baseline; it fails on unexplained signal loss (`MISSING`/`STALE`/`UNBASELINED` stay
|
|
159
|
-
incomplete, not green).
|
|
160
|
-
|
|
161
|
-
Representative local regression run (Windows x64, Node 24.15.0):
|
|
162
|
-
|
|
163
|
-
| Gate | Result | Selected evidence |
|
|
164
|
-
|---|---:|---|
|
|
165
|
-
| Six language fixtures | 6/6 PASS | exact symbols/edges and complete edge provenance |
|
|
166
|
-
| Cross-repo fixture | PASS, ~432 ms cold | endpoint match, typed wrapper, external use |
|
|
167
|
-
| Lifecycle | PASS | `full → incremental → none → reconnect/none` |
|
|
168
|
-
| Total fixture cold build | ~1.31 s | all six language graphs |
|
|
169
|
-
| Real-repository baseline | 6/6 PASS | TS, JS, Python, Go, Java and Rust snapshots |
|
|
170
|
-
|
|
171
|
-
Real snapshots ranged from 473 nodes / 1,165 edges in 0.22 s (Go) to 8,192 nodes / 21,814 edges in
|
|
172
|
-
9.44 s (TypeScript). These are regression measurements on one machine, not competitor benchmarks. See
|
|
173
|
-
[benchmark/cases.mjs](benchmark/cases.mjs) and [docs/benchmarking.md](docs/benchmarking.md).
|
|
174
|
-
|
|
175
|
-
## Security model
|
|
176
|
-
|
|
177
|
-
Socket capability alerts describe the expected powers of a local code-analysis tool; they are not
|
|
178
|
-
vulnerability findings. Where each comes from and how it is bounded:
|
|
179
|
-
|
|
180
|
-
| Capability alert | Why it exists | Activation and boundary |
|
|
181
|
-
|---|---|---|
|
|
182
|
-
| Network access | None in the MIT core | `offline`/`pinned` expose only local tools; online integration is a separate package |
|
|
183
|
-
| Shell access | Local `git` (staleness/impact), `rg` (search), the bundled tsserver for JS/TS semantics, Windows child-tree termination, optional `verified_change` test scripts | The semantic provider never runs repository code; test execution needs `run_tests:true` + `WEAVATRIX_ALLOW_TEST_RUNS=1` and rejects arbitrary commands |
|
|
184
|
-
| Debug / dynamic loading | Cache-busted `import()` hot-reloads watched MCP tool modules; `createRequire` loads package metadata and parser deps | Loads files from the installed package only; no `eval` |
|
|
185
|
-
| Environment access | Reads local `WEAVATRIX_*` settings; children inherit a credential-stripped env | Connector secrets are removed; tsserver receives only allowlisted OS/temp/locale values |
|
|
186
|
-
| Filesystem access | Reads the active repository, graph, lockfiles and coverage; writes derived graphs and caches | Realpath containment blocks traversal and symlink escapes; `pinned` removes `open_repo` |
|
|
187
|
-
| URL strings | Advisory findings may contain fixed OSV documentation links | The core has no outbound request implementation |
|
|
188
|
-
|
|
189
|
-
`read_source` accepts repo-relative regular files only, caps a read at 2 MB, and refuses lexical or
|
|
190
|
-
realpath escapes. Report suspected vulnerabilities privately as described in [SECURITY.md](SECURITY.md).
|
|
191
|
-
|
|
192
|
-
## Languages
|
|
193
|
-
|
|
194
|
-
JavaScript · TypeScript · TSX · Python · Go · Java · C# · Rust · Solidity · HTML · CSS — parsed with
|
|
195
|
-
[web-tree-sitter](https://github.com/tree-sitter/tree-sitter) WASM grammars; no Python install and no
|
|
196
|
-
native compilation.
|
|
197
|
-
|
|
198
|
-
SQL is indexed without a grammar: `.sql` files contribute tables, views, columns, functions, indexes
|
|
199
|
-
and triggers as first-class graph symbols, and SQL found in string literals of any other language
|
|
200
|
-
links the enclosing function to the table it queries. That makes schema objects visible to
|
|
201
|
-
`change_impact`/`get_dependents` (who touches this table?) and lets the dead-code check flag columns
|
|
202
|
-
no statement references — conservatively: verdicts require literal-SQL evidence in the repo, and
|
|
203
|
-
`SELECT *`-consumed tables never have their columns judged by name (ORM-generated SQL stays invisible
|
|
204
|
-
and is therefore never judged either).
|
|
205
|
-
|
|
206
|
-
Test surfaces are classified per file (path conventions plus `.weavatrix.json` overrides) and, for
|
|
207
|
-
Rust, per symbol: `#[cfg(test)]` modules and `#[test]`/`#[bench]` items inside production `.rs` files
|
|
208
|
-
carry a node-level `test_surface` flag, so dead-code, query, hot-path and hub tools treat them as
|
|
209
|
-
tests rather than production code.
|
|
210
|
-
|
|
211
|
-
## Development
|
|
125
|
+
The installed-package benchmark packs both products, installs them into
|
|
126
|
+
isolated npm roots, starts fresh MCP processes with empty caches, and validates
|
|
127
|
+
identity, advertised operations, results, and cleanup.
|
|
212
128
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
129
|
+
The packaged 1.1.0 release candidate (`weavatrix-rust` 2.0.0) passed the
|
|
130
|
+
bounded native gate on 2026-07-30: 39 tools; cold initialize **343.248 ms**;
|
|
131
|
+
`tools/list` **1.059 ms**; first `graph_stats` **46.600 ms**; and 1,000 hot
|
|
132
|
+
`graph_stats` calls at **172.97 calls/s** with **0 failures**, p50 **4.337 ms**,
|
|
133
|
+
p95 **11.201 ms**, and p99 **14.056 ms**.
|
|
134
|
+
|
|
135
|
+
The last published baseline (`weavatrix` 1.0.0 versus `weavatrix-js` 0.3.15)
|
|
136
|
+
measured a **30.34x** median cold-boundary ratio and **156.10x** warm-call
|
|
137
|
+
ratio. Those comparison numbers remain historical; the bounded 1.1.0 gate is
|
|
138
|
+
not presented as a fresh competitor benchmark.
|
|
139
|
+
|
|
140
|
+
Full evidence and methodology:
|
|
141
|
+
[benchmarks](https://github.com/sergii-ziborov/weavatrix/blob/main/docs/benchmarks.md).
|
|
142
|
+
|
|
143
|
+
## Safety
|
|
219
144
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
145
|
+
- read-only MCP surface;
|
|
146
|
+
- no repository-code execution or source writes;
|
|
147
|
+
- no network path in analysis;
|
|
148
|
+
- no npm install script or runtime binary download;
|
|
149
|
+
- bounded inputs, outputs, histories, and pagination;
|
|
150
|
+
- stable ordering and revision provenance;
|
|
151
|
+
- `unsafe` Rust forbidden in first-party engine crates;
|
|
152
|
+
- MIT licensed.
|
|
223
153
|
|
|
224
|
-
##
|
|
154
|
+
## Links
|
|
225
155
|
|
|
226
|
-
|
|
227
|
-
|
|
156
|
+
- [Source and issues](https://github.com/sergii-ziborov/weavatrix)
|
|
157
|
+
- [Engine API](https://github.com/sergii-ziborov/weavatrix-rust)
|
|
158
|
+
- [Tool reference](https://github.com/sergii-ziborov/weavatrix/blob/main/docs/tool-reference.md)
|
|
159
|
+
- [Language support](https://github.com/sergii-ziborov/weavatrix/blob/main/docs/language-support.md)
|
|
160
|
+
- [Architecture](https://github.com/sergii-ziborov/weavatrix/blob/main/docs/architecture.md)
|
|
161
|
+
- [Benchmarks](https://github.com/sergii-ziborov/weavatrix/blob/main/docs/benchmarks.md)
|
|
228
162
|
|
|
229
163
|
## License
|
|
230
164
|
|
|
231
|
-
|
|
232
|
-
Third-party dependencies retain their own licenses. See the public
|
|
233
|
-
[license page](https://weavatrix.com/license) for the same notice.
|
|
165
|
+
MIT.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Resolves the platform-specific Weavatrix binary bundled in the universal npm
|
|
2
|
+
// package. Separate platform packages remain a development/test fallback.
|
|
3
|
+
// Pure Node: built-ins only, no install scripts and no network access.
|
|
4
|
+
import { existsSync } from 'node:fs'
|
|
5
|
+
import { createRequire } from 'node:module'
|
|
6
|
+
import { dirname, join } from 'node:path'
|
|
7
|
+
import { fileURLToPath } from 'node:url'
|
|
8
|
+
|
|
9
|
+
const PLATFORM_PACKAGES = {
|
|
10
|
+
'win32 x64': ['@weavatrix/cli-win32-x64', 'weavatrix.exe'],
|
|
11
|
+
'win32 arm64': ['@weavatrix/cli-win32-arm64', 'weavatrix.exe'],
|
|
12
|
+
'darwin x64': ['@weavatrix/cli-darwin-x64', 'weavatrix'],
|
|
13
|
+
'darwin arm64': ['@weavatrix/cli-darwin-arm64', 'weavatrix'],
|
|
14
|
+
'linux x64': ['@weavatrix/cli-linux-x64', 'weavatrix'],
|
|
15
|
+
'linux arm64': ['@weavatrix/cli-linux-arm64', 'weavatrix'],
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const BUNDLED_BINARIES = {
|
|
19
|
+
'win32 x64': ['win32-x64', 'weavatrix.exe'],
|
|
20
|
+
'win32 arm64': ['win32-arm64', 'weavatrix.exe'],
|
|
21
|
+
'darwin x64': ['darwin-x64', 'weavatrix'],
|
|
22
|
+
'darwin arm64': ['darwin-arm64', 'weavatrix'],
|
|
23
|
+
'linux x64': ['linux-x64', 'weavatrix'],
|
|
24
|
+
'linux arm64': ['linux-arm64', 'weavatrix'],
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function resolveBinary() {
|
|
28
|
+
const key = `${process.platform} ${process.arch}`
|
|
29
|
+
const entry = PLATFORM_PACKAGES[key]
|
|
30
|
+
if (!entry) {
|
|
31
|
+
fail(`Unsupported platform: ${key}.`,
|
|
32
|
+
'Prebuilt binaries cover win32/darwin/linux on x64 and arm64.',
|
|
33
|
+
'On other platforms build the canonical weavatrix repository from source.')
|
|
34
|
+
}
|
|
35
|
+
const bundled = locateBundled(key)
|
|
36
|
+
if (bundled) return bundled
|
|
37
|
+
const [packageName, binaryName] = entry
|
|
38
|
+
const binary = locate(packageName, binaryName)
|
|
39
|
+
if (binary) return binary
|
|
40
|
+
fail(`The bundled native executable for ${key} is missing.`,
|
|
41
|
+
'The installed package is incomplete; reinstall weavatrix,',
|
|
42
|
+
'or build the canonical weavatrix repository from source')
|
|
43
|
+
return null
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function locateBundled(key) {
|
|
47
|
+
const [directory, binaryName] = BUNDLED_BINARIES[key]
|
|
48
|
+
const binary = join(dirname(fileURLToPath(import.meta.url)), 'native', directory, binaryName)
|
|
49
|
+
return existsSync(binary) ? binary : null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Registry installs resolve from this file's own location. The extra bases
|
|
53
|
+
// keep symlinked installs working (npm file:/link: put the real files outside
|
|
54
|
+
// the consumer's node_modules, and ESM canonicalizes import.meta.url).
|
|
55
|
+
function locate(packageName, binaryName) {
|
|
56
|
+
const bases = [import.meta.url, process.argv[1], join(process.cwd(), 'package.json')]
|
|
57
|
+
for (const base of bases) {
|
|
58
|
+
if (!base) continue
|
|
59
|
+
try {
|
|
60
|
+
const packageJson = createRequire(base).resolve(`${packageName}/package.json`)
|
|
61
|
+
const binary = packageJson.slice(0, -'package.json'.length) + binaryName
|
|
62
|
+
if (existsSync(binary)) return binary
|
|
63
|
+
} catch (error) {
|
|
64
|
+
if (error?.code !== 'MODULE_NOT_FOUND') throw error
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return null
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function fail(...lines) {
|
|
71
|
+
for (const line of lines) console.error(`weavatrix: ${line}`)
|
|
72
|
+
process.exit(1)
|
|
73
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process'
|
|
2
|
+
import { resolveBinary } from './resolve-binary.mjs'
|
|
3
|
+
|
|
4
|
+
export function runNative(command, label) {
|
|
5
|
+
const binary = resolveBinary()
|
|
6
|
+
const args = command ? [command, ...process.argv.slice(2)] : process.argv.slice(2)
|
|
7
|
+
// Node 22.15+ can replace the launcher process on POSIX. This preserves
|
|
8
|
+
// the stdio file descriptors while removing an otherwise idle wrapper
|
|
9
|
+
// process from every MCP request and from its measured memory footprint.
|
|
10
|
+
// Older Node releases and Windows retain the compatible spawn path.
|
|
11
|
+
if (['darwin', 'linux'].includes(process.platform) && typeof process.execve === 'function') {
|
|
12
|
+
process.execve(binary, [binary, ...args], process.env)
|
|
13
|
+
}
|
|
14
|
+
const child = spawn(binary, args, { stdio: 'inherit', windowsHide: true })
|
|
15
|
+
child.on('error', (error) => {
|
|
16
|
+
console.error(`${label}: failed to start native binary: ${error.message}`)
|
|
17
|
+
process.exit(1)
|
|
18
|
+
})
|
|
19
|
+
child.on('exit', (code, signal) => {
|
|
20
|
+
if (signal) process.kill(process.pid, signal)
|
|
21
|
+
process.exit(code ?? 1)
|
|
22
|
+
})
|
|
23
|
+
for (const signal of ['SIGINT', 'SIGTERM']) {
|
|
24
|
+
process.on(signal, () => child.kill(signal))
|
|
25
|
+
}
|
|
26
|
+
}
|
package/bin/weavatrix-mcp.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
// MCP stdio entry - drop-in compatible with the JavaScript weavatrix-mcp bin:
|
|
3
|
+
// weavatrix-mcp <repoRoot> [--profile=all|code|seo]
|
|
4
|
+
// Spawns the native Rust server with stdio inherited; this wrapper adds no
|
|
5
|
+
// buffering, no framing, and no event-loop work between client and server.
|
|
6
|
+
import { runNative } from './run-native.mjs'
|
|
7
|
+
|
|
8
|
+
runNative('mcp', 'weavatrix-mcp')
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weavatrix",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"weavatrixEngineVersion": "2.0.0",
|
|
5
|
+
"description": "Native repository intelligence for coding agents: 39 read-only MCP operations backed by typed evidence graphs, impact, architecture, APIs, Git, search, semantics, and memory.",
|
|
6
6
|
"author": "Sergii Ziborov <sergii.ziborov@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://weavatrix.com",
|
|
@@ -14,86 +14,29 @@
|
|
|
14
14
|
"url": "https://github.com/sergii-ziborov/weavatrix/issues"
|
|
15
15
|
},
|
|
16
16
|
"mcpName": "io.github.sergii-ziborov/weavatrix",
|
|
17
|
+
"type": "module",
|
|
17
18
|
"engines": {
|
|
18
19
|
"node": ">=18"
|
|
19
20
|
},
|
|
20
21
|
"bin": {
|
|
22
|
+
"weavatrix": "bin/weavatrix.mjs",
|
|
21
23
|
"weavatrix-mcp": "bin/weavatrix-mcp.mjs"
|
|
22
24
|
},
|
|
23
|
-
"exports": {
|
|
24
|
-
"./mcp-runtime": "./src/mcp-runtime.mjs",
|
|
25
|
-
"./extension-api": "./src/mcp/extension-api.mjs",
|
|
26
|
-
"./extension/local-services": "./src/extension/local-services.mjs",
|
|
27
|
-
"./analysis-kit": "./src/analysis-kit.mjs",
|
|
28
|
-
"./package.json": "./package.json"
|
|
29
|
-
},
|
|
30
25
|
"files": [
|
|
31
26
|
"bin",
|
|
32
|
-
"src",
|
|
33
27
|
"skill",
|
|
34
|
-
"scripts/run-agent-task-benchmark.mjs",
|
|
35
|
-
"docs/agent-task-benchmark.md",
|
|
36
|
-
"docs/adr/0001-v0.3-offline-online-split.md",
|
|
37
|
-
"docs/releases/v0.3.0.md",
|
|
38
|
-
"docs/releases/v0.3.1.md",
|
|
39
|
-
"docs/releases/v0.3.2.md",
|
|
40
|
-
"docs/releases/v0.3.3.md",
|
|
41
|
-
"docs/releases/v0.3.4.md",
|
|
42
|
-
"docs/releases/v0.3.5.md",
|
|
43
|
-
"docs/releases/v0.3.6.md",
|
|
44
|
-
"docs/releases/v0.3.7.md",
|
|
45
|
-
"docs/releases/v0.3.8.md",
|
|
46
|
-
"docs/releases/v0.3.9.md",
|
|
47
|
-
"docs/releases/v0.3.10.md",
|
|
48
|
-
"docs/releases/v0.3.11.md",
|
|
49
|
-
"docs/releases/v0.3.12.md",
|
|
50
|
-
"docs/releases/v0.3.13.md",
|
|
51
|
-
"docs/releases/v0.3.14.md",
|
|
52
|
-
"docs/releases/v0.2.19.md",
|
|
53
28
|
"README.md",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"server.json"
|
|
56
31
|
],
|
|
57
|
-
"scripts": {
|
|
58
|
-
"test": "node --test",
|
|
59
|
-
"benchmark": "node scripts/run-benchmark.mjs",
|
|
60
|
-
"benchmark:quick": "node scripts/run-benchmark.mjs --quick",
|
|
61
|
-
"benchmark:real": "node scripts/run-real-benchmark.mjs",
|
|
62
|
-
"benchmark:real:release": "node scripts/run-real-benchmark.mjs --require-all",
|
|
63
|
-
"benchmark:agent": "node scripts/run-agent-task-benchmark.mjs",
|
|
64
|
-
"benchmark:agent:release": "node scripts/run-agent-task-benchmark.mjs --require-independent",
|
|
65
|
-
"build:mcpb": "node scripts/build-mcpb.mjs",
|
|
66
|
-
"verify:release": "node scripts/verify-release.mjs"
|
|
67
|
-
},
|
|
68
|
-
"publishConfig": {
|
|
69
|
-
"access": "public"
|
|
70
|
-
},
|
|
71
32
|
"keywords": [
|
|
72
33
|
"mcp",
|
|
73
34
|
"model-context-protocol",
|
|
35
|
+
"repository-intelligence",
|
|
74
36
|
"code-graph",
|
|
75
|
-
"impact-analysis",
|
|
76
|
-
"blast-radius",
|
|
77
37
|
"static-analysis",
|
|
78
|
-
"dead-code",
|
|
79
|
-
"dependency-graph",
|
|
80
|
-
"tree-sitter",
|
|
81
38
|
"claude",
|
|
82
39
|
"codex",
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
"ai-agents"
|
|
86
|
-
],
|
|
87
|
-
"dependencies": {
|
|
88
|
-
"tree-sitter-wasms": "0.1.13",
|
|
89
|
-
"typescript": "5.9.3",
|
|
90
|
-
"typescript-language-server": "4.4.1",
|
|
91
|
-
"web-tree-sitter": "0.25.10"
|
|
92
|
-
},
|
|
93
|
-
"devDependencies": {
|
|
94
|
-
"@anthropic-ai/mcpb": "2.1.2"
|
|
95
|
-
},
|
|
96
|
-
"overrides": {
|
|
97
|
-
"tmp": "0.2.7"
|
|
98
|
-
}
|
|
40
|
+
"rust"
|
|
41
|
+
]
|
|
99
42
|
}
|