weavatrix 0.3.14 → 1.0.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 +231 -199
- 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 +8 -66
- 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,265 @@
|
|
|
1
1
|
# Weavatrix
|
|
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://docs.rs/weavatrix-rust)
|
|
7
|
+
[](https://github.com/sergii-ziborov/weavatrix/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
**Give your coding agent the map of the repository before it starts guessing.**
|
|
10
|
+
|
|
11
|
+
Weavatrix is a native Rust repository-intelligence engine and MCP server for
|
|
12
|
+
Codex, Claude Code, and other coding agents. It turns source, Git history,
|
|
13
|
+
coverage, endpoints, infrastructure, clones, search, vectors, semantic links,
|
|
14
|
+
and temporal memory into one always-fresh evidence graph.
|
|
15
|
+
|
|
16
|
+
Ask what breaks, where an API is used, why a cycle exists, which code is truly
|
|
17
|
+
dead, or whether a change preserved the architecture. Weavatrix answers from
|
|
18
|
+
bounded graph evidence with file, line, extractor, confidence, and revision
|
|
19
|
+
provenance—not from a wider grep and not from a fabricated certainty score.
|
|
20
|
+
|
|
21
|
+
| Release proof | Result |
|
|
22
|
+
| --- | ---: |
|
|
23
|
+
| Read-only MCP tools | **39** |
|
|
24
|
+
| Installed-package cold speed vs `weavatrix-js` | **30.34x** |
|
|
25
|
+
| Warm tool-call speed vs `weavatrix-js` | **156.10x** |
|
|
26
|
+
| Shared JS call targets missing or wrong | **0 / 0** |
|
|
27
|
+
| Shared imports, methods, and re-exports covered | **100%** |
|
|
28
|
+
| Rust line coverage release gate | **87.18%** |
|
|
29
|
+
| Runtime downloads, install scripts, external executables | **0** |
|
|
30
|
+
|
|
31
|
+
## Install in 30 seconds
|
|
4
32
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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.**
|
|
10
|
-
|
|
11
|
-
- Website: [weavatrix.com](https://weavatrix.com)
|
|
12
|
-
- Source: [github.com/sergii-ziborov/weavatrix](https://github.com/sergii-ziborov/weavatrix)
|
|
13
|
-
- npm: [`weavatrix`](https://www.npmjs.com/package/weavatrix) — `npx -y weavatrix <repoRoot>`
|
|
14
|
-
|
|
15
|
-
This package is the complete offline engine under the MIT license: it reads and analyzes your code,
|
|
16
|
-
initiates no outbound HTTP, and never edits your source. It is the read-only base of a layered stack —
|
|
17
|
-
add [`weavatrix-refactor`](https://github.com/sergii-ziborov/weavatrix-refactor) (Apache-2.0) to apply
|
|
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).
|
|
22
|
-
|
|
23
|
-
## Install
|
|
33
|
+
```sh
|
|
34
|
+
npx -y weavatrix mcp .
|
|
35
|
+
```
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
Or install the Rust binary directly:
|
|
26
38
|
|
|
27
39
|
```sh
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
# Codex CLI
|
|
32
|
-
codex mcp add weavatrix -- npx -y weavatrix <repoRoot>
|
|
40
|
+
cargo install weavatrix-rust
|
|
41
|
+
weavatrix mcp . --profile=all
|
|
33
42
|
```
|
|
34
43
|
|
|
44
|
+
### Codex
|
|
45
|
+
|
|
35
46
|
```toml
|
|
36
|
-
#
|
|
47
|
+
# ~/.codex/config.toml
|
|
37
48
|
[mcp_servers.weavatrix]
|
|
38
49
|
command = "npx"
|
|
39
|
-
args = ["-y", "weavatrix", "
|
|
40
|
-
startup_timeout_sec = 20
|
|
41
|
-
tool_timeout_sec = 60
|
|
50
|
+
args = ["-y", "weavatrix", "mcp", "."]
|
|
42
51
|
```
|
|
43
52
|
|
|
44
|
-
|
|
53
|
+
### Claude Code
|
|
45
54
|
|
|
46
55
|
```sh
|
|
47
|
-
|
|
48
|
-
cd weavatrix && npm install
|
|
49
|
-
claude mcp add -s user weavatrix -- node <path-to>/weavatrix/bin/weavatrix-mcp.mjs <repoRoot>
|
|
56
|
+
claude mcp add weavatrix -- npx -y weavatrix mcp .
|
|
50
57
|
```
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
The npm package contains prebuilt binaries for Windows x64/arm64, macOS
|
|
60
|
+
x64/arm64, and glibc-based Linux x64/arm64. It has no install script and does
|
|
61
|
+
not download a binary after installation.
|
|
62
|
+
|
|
63
|
+
## What your agent can ask
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
What breaks if I change src/auth/middleware.ts?
|
|
67
|
+
Trace POST /api/orders through the backend and its clients.
|
|
68
|
+
Which production symbols are dead, and what evidence says so?
|
|
69
|
+
Show duplicate implementations but suppress router boilerplate.
|
|
70
|
+
Which service violates the intended architecture, and why?
|
|
71
|
+
Find every HTTP, GraphQL, gRPC, Kafka, RabbitMQ, NATS, JMS,
|
|
72
|
+
SQS or SNS contract affected by this branch.
|
|
73
|
+
Build the smallest context bundle needed to edit this symbol safely.
|
|
74
|
+
Suggest internal links between these pages without mixing inferred SEO
|
|
75
|
+
relationships into the deterministic code graph.
|
|
76
|
+
```
|
|
56
77
|
|
|
57
|
-
|
|
58
|
-
|
|
78
|
+
Weavatrix builds the graph once and projects the same revision into small,
|
|
79
|
+
task-specific answers. A health result, endpoint trace, blast radius, clone
|
|
80
|
+
family, architecture violation, and context bundle therefore agree about
|
|
81
|
+
repository identity and evidence.
|
|
59
82
|
|
|
60
|
-
##
|
|
83
|
+
## The 39-tool surface
|
|
61
84
|
|
|
62
|
-
|
|
85
|
+
| Workflow | Tools |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| Graph orientation | `graph_stats`, `get_node`, `get_neighbors`, `query_graph`, `god_nodes`, `shortest_path`, `get_community`, `list_communities`, `module_map` |
|
|
88
|
+
| Change impact and proof | `get_dependents`, `change_impact`, `verified_change`, `prepare_change`, `graph_diff` |
|
|
89
|
+
| Exact source context | `search_code`, `read_source`, `inspect_symbol`, `context_bundle` |
|
|
90
|
+
| Health and quality | `find_duplicates`, `find_dead_code`, `run_audit`, `coverage_map`, `hot_path_review` |
|
|
91
|
+
| APIs and transports | `list_endpoints`, `trace_endpoint`, `trace_api_contract` |
|
|
92
|
+
| Architecture | `get_architecture_contract`, `verify_architecture`, `explain_architecture_violation`, `propose_architecture_exception` |
|
|
93
|
+
| Git and repositories | `git_history`, `cross_repo_git`, `open_repo`, `list_known_repos`, `rebuild_graph` |
|
|
94
|
+
| Native Rust extensions | `vector_search`, `semantic_link`, `seo_link_suggestions`, `memory_context` |
|
|
63
95
|
|
|
64
|
-
|
|
65
|
-
|---|---:|---:|---:|---:|
|
|
66
|
-
| `offline` (default) | Yes, only via `open_repo` | Yes, only via `trace_api_contract` | None | 34 |
|
|
67
|
-
| `pinned` | No | No | None | 31 |
|
|
96
|
+
Three profiles expose bounded views of the same read-only engine:
|
|
68
97
|
|
|
69
98
|
```sh
|
|
70
|
-
|
|
71
|
-
|
|
99
|
+
weavatrix mcp . --profile=all # all 39 tools
|
|
100
|
+
weavatrix mcp . --profile=code # code and architecture
|
|
101
|
+
weavatrix mcp . --profile=seo # content and semantic linking
|
|
72
102
|
```
|
|
73
103
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
`run_audit
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
[
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
|
104
|
+
Optional Cargo features remove capabilities from `tools/list`; disabled
|
|
105
|
+
features are never advertised as unavailable stubs.
|
|
106
|
+
|
|
107
|
+
## More than a code graph
|
|
108
|
+
|
|
109
|
+
### Languages and repository surfaces
|
|
110
|
+
|
|
111
|
+
- Rust AST extraction plus JavaScript, TypeScript, Python, Go, Java, C#, C,
|
|
112
|
+
C++, Bash, SQL, Solidity, Swift, HTML, CSS-family, Terraform, XML,
|
|
113
|
+
Markdown-family, GraphQL, Protobuf, YAML, and Kubernetes structures;
|
|
114
|
+
- HTTP routes, GraphQL operations, gRPC services and streaming modes;
|
|
115
|
+
- Kafka, RabbitMQ/AMQP, JMS, NATS, SQS, SNS, and MongoDB evidence;
|
|
116
|
+
- package manifests, lockfiles, JSON configuration, architecture contracts,
|
|
117
|
+
and measured coverage artifacts.
|
|
118
|
+
|
|
119
|
+
### Lossless parsing
|
|
120
|
+
|
|
121
|
+
The first-party
|
|
122
|
+
[`weavatrix-parse`](https://github.com/sergii-ziborov/weavatrix-parse)
|
|
123
|
+
tokenizer preserves every input byte. Structural extraction is fast, but the
|
|
124
|
+
original source remains recoverable for diagnostics, exact spans, future
|
|
125
|
+
compiler work, and source-to-source transformations.
|
|
126
|
+
|
|
127
|
+
The parser is not a regex fallback hidden behind a Rust binary. Its release
|
|
128
|
+
suite checks byte-for-byte round trips, exact facts, GraphQL/Protobuf fixtures,
|
|
129
|
+
and import agreement against tree-sitter on real repositories.
|
|
130
|
+
|
|
131
|
+
### Direct Git and local-only operation
|
|
132
|
+
|
|
133
|
+
Weavatrix reads Git objects through
|
|
134
|
+
[`weavatrix-git`](https://github.com/sergii-ziborov/weavatrix-git); it does not
|
|
135
|
+
spawn `git`. Search does not spawn `rg`. The MCP server does not launch Node,
|
|
136
|
+
Python, a language server, or code from the analyzed repository.
|
|
137
|
+
|
|
138
|
+
Production code has no network or source-write path. Derived in-memory state
|
|
139
|
+
can refresh after files change, but Weavatrix does not edit application source
|
|
140
|
+
or create commits.
|
|
141
|
+
|
|
142
|
+
### Evidence instead of overclaiming
|
|
143
|
+
|
|
144
|
+
Every relationship records its extractor, evidence class, confidence, and
|
|
145
|
+
optional source span. Static reachability is never reported as measured test
|
|
146
|
+
coverage. Dynamic or ambiguous JavaScript and Python behavior remains bounded
|
|
147
|
+
evidence for the agent instead of being silently connected to a same-named
|
|
148
|
+
symbol.
|
|
149
|
+
|
|
150
|
+
## Speed measured at the package boundary
|
|
151
|
+
|
|
152
|
+
The release benchmark does not compare a Rust library function with a full
|
|
153
|
+
JavaScript process. It packs and installs both npm packages into isolated
|
|
154
|
+
roots, starts fresh MCP processes with empty caches, validates package and
|
|
155
|
+
protocol identity, calls the same tools, and checks clean shutdown.
|
|
156
|
+
|
|
157
|
+
On 2026-07-29, `weavatrix` 1.0.0 with Rust engine 1.0.1 was compared with
|
|
158
|
+
`weavatrix-js` 0.3.15 using three paired fresh processes per tool and five warm
|
|
159
|
+
calls per process:
|
|
160
|
+
|
|
161
|
+
| Tool | Rust cold median | JavaScript cold median | Speedup |
|
|
162
|
+
| --- | ---: | ---: | ---: |
|
|
163
|
+
| `graph_stats` | 249.87 ms | 7,561.94 ms | **30.73x** |
|
|
164
|
+
| `list_endpoints` | 321.07 ms | 7,400.17 ms | **26.15x** |
|
|
165
|
+
| `find_dead_code` | 310.45 ms | 9,298.27 ms | **31.81x** |
|
|
166
|
+
| `run_audit` | 378.47 ms | 11,583.83 ms | **35.62x** |
|
|
167
|
+
|
|
168
|
+
The median of all 12 paired cold ratios is **30.34x**. Warm-call medians are
|
|
169
|
+
3.17 ms for Rust and 494.83 ms for JavaScript, a **156.10x** speedup. Every
|
|
170
|
+
selected tool was faster; the gate requires at least 24x cold overall, at
|
|
171
|
+
least 30x warm, valid MCP responses, matching package identity, and no leaked
|
|
172
|
+
child process.
|
|
173
|
+
|
|
174
|
+
Raw report:
|
|
175
|
+
[`npm-mcp-boundary-mcport-0.3.0-vs-js-0.3.15.json`](https://github.com/sergii-ziborov/weavatrix-rust/blob/main/benchmark-results/npm-mcp-boundary-mcport-0.3.0-vs-js-0.3.15.json)
|
|
176
|
+
(SHA-256
|
|
177
|
+
`8224CACEA4F10B6B09BB525FCC1E4FFA0A7AF1292CD1C4EC63515A2CF99D7F5A`).
|
|
178
|
+
|
|
179
|
+
The full methodology, historical same-revision repository measurements,
|
|
180
|
+
component competitors, limitations, and reproduction commands are in the
|
|
181
|
+
[benchmark report](https://github.com/sergii-ziborov/weavatrix-rust/blob/main/docs/benchmarks.md).
|
|
182
|
+
|
|
183
|
+
## Quality measured against the JavaScript engine
|
|
184
|
+
|
|
185
|
+
Both engines analyzed an immutable 502-file `weavatrix-js` 0.3.14 checkout.
|
|
186
|
+
Paths, symbols, and relation identities were normalized before comparison.
|
|
187
|
+
|
|
188
|
+
| Relation | Rust | JavaScript | JavaScript evidence covered |
|
|
189
|
+
| --- | ---: | ---: | ---: |
|
|
190
|
+
| imports | 2,320 | 1,126 | **100%** |
|
|
191
|
+
| methods | 63 | 4 | **100%** |
|
|
192
|
+
| re-exports | 80 | 75 | **100%** |
|
|
193
|
+
| calls | 3,403 | 2,323 | **100% of targets** |
|
|
194
|
+
|
|
195
|
+
For calls, 2,024 edges matched exactly. The remaining 299 reached the same
|
|
196
|
+
source-line target while Rust also attached the containing symbol as owner.
|
|
197
|
+
There were **zero missing targets and zero wrong targets**. Rust-only edges are
|
|
198
|
+
retained as evidence, not automatically declared correct merely because there
|
|
199
|
+
are more of them.
|
|
200
|
+
|
|
201
|
+
Raw parity reports:
|
|
202
|
+
|
|
203
|
+
- [`graph-parity-rust-1.0.0-vs-js-0.3.14.json`](https://github.com/sergii-ziborov/weavatrix-rust/blob/main/benchmark-results/graph-parity-rust-1.0.0-vs-js-0.3.14.json)
|
|
204
|
+
- [`call-audit-rust-1.0.0-vs-js-0.3.14.json`](https://github.com/sergii-ziborov/weavatrix-rust/blob/main/benchmark-results/call-audit-rust-1.0.0-vs-js-0.3.14.json)
|
|
205
|
+
|
|
206
|
+
The release also dogfoods all 39 tools against Weavatrix itself. The verified
|
|
207
|
+
self-run returned `PASS` with zero health findings, zero clone families, zero
|
|
208
|
+
dead-code candidates after correct `#[cfg(test)]` inheritance, and no
|
|
209
|
+
architecture cycles or dependency findings.
|
|
210
|
+
|
|
211
|
+
## Library and standalone CLI
|
|
212
|
+
|
|
213
|
+
The MCP transport is optional. A minimal build keeps the Rust library and
|
|
214
|
+
standalone `analyze`, `list-tools`, and `tool` commands without `mcport`:
|
|
215
|
+
|
|
216
|
+
```toml
|
|
217
|
+
[dependencies]
|
|
218
|
+
weavatrix-rust = { version = "1", default-features = false }
|
|
219
|
+
```
|
|
212
220
|
|
|
213
221
|
```sh
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
cargo build --no-default-features
|
|
223
|
+
weavatrix analyze . --pretty
|
|
224
|
+
weavatrix list-tools
|
|
225
|
+
weavatrix tool graph_stats .
|
|
218
226
|
```
|
|
219
227
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
Enable `mcp` only when embedding the stdio server. The default full build also
|
|
229
|
+
connects the first-party scan, graph, Git, search, clone, vector, semantic, and
|
|
230
|
+
memory crates.
|
|
231
|
+
|
|
232
|
+
## Safety and package integrity
|
|
233
|
+
|
|
234
|
+
- read-only repository analysis;
|
|
235
|
+
- no install scripts or runtime downloads;
|
|
236
|
+
- no application-source writes or commit creation;
|
|
237
|
+
- no execution of analyzed repository code;
|
|
238
|
+
- bounded MCP results with pagination for large neighborhoods and communities;
|
|
239
|
+
- source-free, credential-free evidence by default;
|
|
240
|
+
- npm provenance and immutable GitHub release assets;
|
|
241
|
+
- forbidden unsafe Rust in the engine.
|
|
242
|
+
|
|
243
|
+
## Why the JavaScript version moved
|
|
244
|
+
|
|
245
|
+
The canonical npm package moved to the native Rust engine after the Rust
|
|
246
|
+
implementation covered the complete shared tool contract, found all measured
|
|
247
|
+
JavaScript relation targets, added five native workflows, removed external
|
|
248
|
+
runtime executables, preserved lossless parser input, and passed the installed
|
|
249
|
+
package speed gate.
|
|
250
|
+
|
|
251
|
+
The maintained JavaScript line remains available as
|
|
252
|
+
[`weavatrix-js`](https://github.com/sergii-ziborov/weavatrix-js) for extensions
|
|
253
|
+
and compatibility. `weavatrix@0.3.14` is the last JavaScript release under the
|
|
254
|
+
canonical package name.
|
|
223
255
|
|
|
224
|
-
|
|
256
|
+
Build lineage:
|
|
225
257
|
|
|
226
|
-
|
|
227
|
-
|
|
258
|
+
- [`weavatrix`](https://github.com/sergii-ziborov/weavatrix) — canonical npm package;
|
|
259
|
+
- [`weavatrix-rust`](https://github.com/sergii-ziborov/weavatrix-rust) — native engine and crates.io source;
|
|
260
|
+
- [`weavatrix-parse`](https://github.com/sergii-ziborov/weavatrix-parse) — lossless parser;
|
|
261
|
+
- [`mcport`](https://github.com/sergii-ziborov/mcport) — dependency-light MCP stdio runtime.
|
|
228
262
|
|
|
229
263
|
## License
|
|
230
264
|
|
|
231
|
-
|
|
232
|
-
Third-party dependencies retain their own licenses. See the public
|
|
233
|
-
[license page](https://weavatrix.com/license) for the same notice.
|
|
265
|
+
MIT. Third-party crates retain their own licenses.
|
|
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 install from source: cargo install weavatrix-rust')
|
|
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: cargo install weavatrix-rust')
|
|
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')
|