weavatrix 0.2.19 → 0.3.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.
Files changed (41) hide show
  1. package/README.md +103 -93
  2. package/SECURITY.md +13 -31
  3. package/bin/weavatrix-mcp.mjs +2 -1
  4. package/docs/adr/0001-v0.3-offline-online-split.md +9 -7
  5. package/docs/releases/v0.3.0.md +43 -0
  6. package/docs/releases/v0.3.1.md +30 -0
  7. package/package.json +9 -2
  8. package/skill/SKILL.md +34 -59
  9. package/src/analysis/architecture/contract-storage.js +2 -2
  10. package/src/analysis/audit-extensions.js +60 -0
  11. package/src/analysis/change-classification.js +72 -10
  12. package/src/analysis/duplicate-groups.js +13 -2
  13. package/src/analysis/duplicates.compute.js +7 -2
  14. package/src/analysis/health-capabilities.js +2 -1
  15. package/src/analysis/internal-audit/supply-chain.js +17 -2
  16. package/src/analysis/jvm-artifact-index.js +87 -0
  17. package/src/analysis/jvm-dependency-evidence.js +31 -8
  18. package/src/analysis/transport-contracts.js +78 -11
  19. package/src/analysis/transport-runtime-evidence.js +155 -0
  20. package/src/child-env.js +2 -2
  21. package/src/extension/local-services.mjs +75 -0
  22. package/src/graph/internal-builder.langs.js +2 -0
  23. package/src/graph/repo-registry.js +2 -2
  24. package/src/mcp/catalog.mjs +47 -21
  25. package/src/mcp/evidence/duplicate-member-order.mjs +1 -1
  26. package/src/mcp/evidence-snapshot.health.mjs +2 -2
  27. package/src/mcp/extension-api.mjs +77 -0
  28. package/src/mcp/health/audit-format.mjs +11 -1
  29. package/src/mcp/health/audit.mjs +10 -7
  30. package/src/mcp/health/duplicates.mjs +5 -3
  31. package/src/mcp/sync-payload.mjs +1 -1
  32. package/src/mcp/tools-actions.mjs +1 -8
  33. package/src/mcp/tools-architecture.mjs +2 -2
  34. package/src/mcp/tools-company.mjs +4 -2
  35. package/src/mcp-runtime.mjs +2 -0
  36. package/src/mcp-server.mjs +28 -17
  37. package/src/security/advisory-store.js +133 -181
  38. package/src/security/rust-advisory-report.js +60 -0
  39. package/src/mcp/actions/advisories.mjs +0 -17
  40. package/src/mcp/actions/graph-sync.mjs +0 -195
  41. package/src/mcp/actions/hosted-architecture.mjs +0 -57
package/README.md CHANGED
@@ -7,42 +7,38 @@ inheritance, health findings, clone families and Git-history coupling. It gives
7
7
  or any MCP client a bounded map for fast application understanding and lower repeated context, then
8
8
  reuses the same graph for change impact, Health, dead-code review, duplicates, history and intended-
9
9
  architecture safeguards. Text search is included as a supporting source check, not the product core.
10
- **38 tools available; 34 enabled by the default offline profile. Local-first: with
11
- the defaults, no repository data leaves your machine.**
10
+ **34 network-free tools. No repository data leaves your machine.**
12
11
 
13
12
  - Website: [weavatrix.com](https://weavatrix.com)
14
13
  - Source: [github.com/sergii-ziborov/weavatrix](https://github.com/sergii-ziborov/weavatrix)
15
14
  - npm: [`weavatrix`](https://www.npmjs.com/package/weavatrix) — `npx -y weavatrix <repoRoot>`
16
15
 
17
- ## 0.3 boundary: offline stays MIT
16
+ ## 0.3: the MIT core
18
17
 
19
- The next major boundary makes this package the complete offline engine: graph,
18
+ This package is the complete offline engine: graph,
20
19
  local semantic precision, Health, dependencies, duplicates, impact, history and
21
20
  architecture safeguards remain here under the existing MIT license. The MIT
22
21
  license is not changing.
23
22
 
24
- Every outbound HTTP capability moves to a separately versioned public package,
23
+ Every outbound HTTP capability belongs to the separately versioned package
25
24
  `weavatrix-online`, beginning at 0.1.0. That connector targets either the
26
25
  managed Weavatrix Cloud or a commercially licensed self-hosted Weavatrix
27
- Enterprise deployment through one source-free wire contract. It is a thin
28
- extension of this package, not a fork of the parser/graph/Health engine, so core
29
- updates arrive as normal dependency updates.
30
-
31
- Version 0.2.19 still contains the explicit opt-in compatibility profiles
32
- documented below. The paired 0.3/0.1 release removes their network
33
- implementations from this package; until then the new connector is not
34
- publishable. The decision and release gates are in
26
+ Enterprise deployment through one source-free wire contract. It is an expanded
27
+ superset that depends on this package, not a fork: it may add proprietary tools,
28
+ skills and analyzers through the supported extension API while graph/parser/LSP/
29
+ Health fixes continue to ship once in the MIT core.
30
+
31
+ The decision and release gates are in
35
32
  [docs/adr/0001-v0.3-offline-online-split.md](docs/adr/0001-v0.3-offline-online-split.md).
36
33
 
37
34
  ## One graph, many views
38
35
 
39
- The 38 MCP methods are not one linear workflow. They project the same reusable graph into the
36
+ The 34 MCP methods are not one linear workflow. They project the same reusable graph into the
40
37
  smallest view needed for a task: repository and build state; modules, communities, hubs, neighbors
41
38
  and paths; exact symbols and bounded source context; endpoint and cross-repository API flow; symbol
42
39
  and change-set blast radius; graph revision and behavioral Git history; Health, dependencies,
43
40
  vulnerabilities, dead code, clones, coverage and hot paths; proof-carrying change verification;
44
- intended-architecture contracts and ratchets; local multi-repository work; and explicit,
45
- preview-confirmed Hosted exchange.
41
+ intended-architecture contracts and ratchets; and local multi-repository work.
46
42
 
47
43
  ## Why
48
44
 
@@ -234,38 +230,29 @@ startup_timeout_sec = 20
234
230
  tool_timeout_sec = 60
235
231
  ```
236
232
 
237
- The package has one binary and several explicit security profiles. The omitted profile is `offline`:
238
- all local analysis plus `open_repo`, with every HTTP tool absent. Pass one profile as the final
239
- argument when a stricter repository boundary or a network feature is wanted:
233
+ The package has one binary and two local security profiles. The omitted profile is `offline`:
234
+ all local analysis plus `open_repo`. Pass `pinned` as the final argument for a stricter repository
235
+ boundary:
240
236
 
241
- | Profile | Local repository switching | Cross-repo graph reads | OSV requests | Hosted sync / contract pull |
242
- |---|---:|---:|---:|---:|
243
- | `offline` (default) | Yes, only through `open_repo` | Yes, only through `trace_api_contract` | No | No |
244
- | `pinned` | No | No | No | No |
245
- | `osv` | Yes | Yes, only when called | Only when `refresh_advisories` is called | No |
246
- | `hosted` / `full` | Yes | Yes, only when called | Only when called | `preview_sync` is local; only `sync_graph` or `pull_architecture_contract` can make a request |
237
+ | Profile | Local repository switching | Cross-repo graph reads | Network requests |
238
+ |---|---:|---:|---:|
239
+ | `offline` (default) | Yes, only through `open_repo` | Yes, only through `trace_api_contract` | None |
240
+ | `pinned` | No | No | None |
247
241
 
248
242
  ```sh
249
243
  # Hard-pin one repository and expose no network tools:
250
244
  claude mcp add -s user weavatrix -- npx -y weavatrix <repoRoot> pinned
251
245
 
252
- # Add only explicit OSV refresh:
253
- claude mcp add -s user weavatrix -- npx -y weavatrix <repoRoot> osv
254
-
255
- # Enable the owner-authenticated hosted workflow:
256
- claude mcp add -s user weavatrix -- npx -y weavatrix <repoRoot> hosted
257
246
  ```
258
247
 
259
248
  Advanced registrations may still pass an exact comma-separated capability set:
260
- `graph,search,source,health,build,retarget,crossrepo,advisories,hosted`. The former `online` capability remains
261
- a compatibility alias for `advisories,hosted`; new registrations should use the named profiles or
262
- the narrower capability names.
249
+ `graph,search,source,health,build,retarget,crossrepo`. The former `online`, `osv`, `hosted` and `full`
250
+ profiles fail loudly and direct the user to `weavatrix-online`; none can re-enable HTTP in this artifact.
263
251
 
264
252
  After an upgrade, reconnect the MCP server or start a new agent task before checking its tool list:
265
253
  many clients snapshot `tools/list` and input schemas for the lifetime of one connection. The expected
266
- counts are 31 for `pinned`, 34 for `offline`, 35 for `osv`, and all 38 for `hosted` / `full`. A custom
267
- capability list must include `crossrepo` to expose `trace_api_contract`; `online` alone adds only the
268
- legacy advisory/Hosted groups. `graph_stats` reports the running package version, enabled capabilities
254
+ counts are 31 for `pinned` and 34 for `offline`. A custom capability list must include `crossrepo` to
255
+ expose `trace_api_contract`. `graph_stats` reports the running package version, enabled capabilities
269
256
  and registered-tool count so a cached process can be distinguished from the installed package.
270
257
 
271
258
  Or clone it:
@@ -347,7 +334,7 @@ lockfile drift; accepts an immutable `base_ref`, `changed_files`, and `debt: new
347
334
  review-scoped results; production paths are the default and `include_classified:true` opts into
348
335
  test/generated/docs evidence), `find_duplicates` (MOSS winnowing over method bodies — catches copy-paste even
349
336
  after renames and can inspect strict small clones down to 12 tokens; homogeneous router boilerplate
350
- is suppressed unless `include_boilerplate:true`), `coverage_map` (existing coverage reports mapped onto the graph; untested hotspots
337
+ is suppressed unless `include_boilerplate:true`; immutable declarative catalog shapes require `include_declarative:true`), `coverage_map` (existing coverage reports mapped onto the graph; untested hotspots
351
338
  ranked by connectivity — tests are never executed), `hot_path_review` (bounded local-cost evidence
352
339
  with separate graph/test risk), `verify_architecture`,
353
340
  `explain_architecture_violation`, `propose_architecture_exception`
@@ -411,13 +398,9 @@ are hidden unless `include_low_signal:true`. Broad ranking remains orientation e
411
398
  `seed_files`, `seed_symbols`, an exact endpoint, or `inspect_symbol` when the intended entry point is already known.
412
399
  Instruction words such as “REST”, “path”, and “inspect” do not become fuzzy code seeds.
413
400
 
414
- **advisories** *(network, explicit opt-in)* `refresh_advisories`
415
-
416
- **hosted** *(explicit opt-in; preview is local, send/pull are networked)* — `preview_sync`,
417
- `pull_architecture_contract`, `sync_graph`. `preview_sync` performs no request and returns the destination,
418
- repository UUID, exact payload fields/sections/size/hash and a short-lived confirmation token for
419
- the cached payload. `sync_graph` sends only with both that token and `dry_run:false`; its legacy
420
- dry-run form remains a no-network compatibility alias.
401
+ Remote advisory refresh, source-free sync and shared architecture-contract exchange are supplied by
402
+ the separate `weavatrix-online` superset. The core keeps offline advisory matching and the local
403
+ extension services used to validate imported records and source-free payloads.
421
404
 
422
405
  Quality of life: graph/health reads auto-reconcile and expose `none` / `incremental` / `full`
423
406
  freshness, with a short clean-read debounce to avoid rescanning the repository for every tool call;
@@ -430,6 +413,34 @@ metrics are not persisted or transmitted by Weavatrix. If a source checkout's pa
430
413
  while an old daemon remains alive, `initialize`, `tools/list`, and tool calls fail loudly with
431
414
  `STALE_RUNTIME` until the client reconnects; the opt-out is reserved for deliberate development.
432
415
 
416
+ ### 0.3.1 exact impact over oversized diffs
417
+
418
+ - `change_impact` now recovers a bounded per-file unified diff when one large asset exceeds the
419
+ aggregate diff budget. Normal source files retain line/symbol classification; only the files that
420
+ individually exceed the budget stay conservative `unknown`.
421
+ - Real Hosted dogfood recovered all 27 changed paths, mapped 57 changed symbols, reduced the
422
+ conservative seed set from 1,000 to 72, and verified exact direct references for 16/16 selected
423
+ JavaScript/TypeScript symbols. Transitive hops remain explicitly graph-backed.
424
+ - The global LSP overlay remains a bounded prewarm and can honestly be `PARTIAL`; `get_dependents`,
425
+ `inspect_symbol`, and `change_impact` run revision-bound exact point/batch queries beyond that cap.
426
+
427
+ Full patch notes: [docs/releases/v0.3.1.md](docs/releases/v0.3.1.md).
428
+
429
+ ### 0.3.0 network-free core and exact dependency evidence
430
+
431
+ - The MIT package now contains 34 local tools and no outbound HTTP implementation. Online OSV,
432
+ Cloud and licensed self-hosted workflows live in the separately installed `weavatrix-online`
433
+ 0.1.0 superset, which depends on this core through a supported extension API.
434
+ - Cargo.lock provides exact crates.io pins; saved `cargo audit --json` results add RustSec evidence.
435
+ Missing or stale advisory evidence stays incomplete.
436
+ - Maven/Gradle imports map to exact class ownership from already installed JARs. Missing JARs,
437
+ unresolved build expressions and heuristic fallbacks are `PARTIAL`, never a false `COMPLETE`.
438
+ - Real self-dogfood produced persisted `EXACT_LSP` edges and an exact direct caller for
439
+ `startMcpServer`. GraphQL, gRPC and event/Kafka joins use static evidence plus revision-bound
440
+ runtime/OTLP observations; unobserved dynamic targets remain explicit `UNKNOWN`.
441
+
442
+ Full patch notes: [docs/releases/v0.3.0.md](docs/releases/v0.3.0.md).
443
+
433
444
  ### 0.2.19 supply-chain signal precision
434
445
 
435
446
  - Installed-package URL literals and ordinary standalone network calls no longer become malware
@@ -758,9 +769,36 @@ scope; ambiguous same-name definitions are skipped and reported as incomplete ev
758
769
 
759
770
  The same tool can select GraphQL, gRPC or event evidence. It joins static GraphQL schema fields and
760
771
  operations, proto service methods and typed stub calls, and static Kafka/event-bus topic producers
761
- and consumers across registered repositories. Computed URLs, runtime configuration, dynamic
762
- GraphQL documents/topics, reflection and dynamic stubs remain `UNKNOWN`; they are not converted into
763
- an absence claim.
772
+ and consumers across registered repositories. It also imports a bounded, source-free
773
+ `weavatrix.transport-runtime.v1` report from each repository. Normalized observations and OTLP JSON
774
+ spans can confirm runtime GraphQL fields, gRPC service/methods and Kafka/event destinations. A report
775
+ must match the active `graphRevision`, be fresh, declare per-transport capture completeness and map
776
+ dynamic observations to a repository-relative file/line before that exact `UNKNOWN` is resolved.
777
+
778
+ The default report paths are `.weavatrix/transport-runtime.json` and
779
+ `.weavatrix/reports/transport-runtime.json`; `runtime_evidence_files` can select another contained
780
+ path per repository label/UUID. The minimum envelope is:
781
+
782
+ ```json
783
+ {
784
+ "schema": "weavatrix.transport-runtime.v1",
785
+ "repositoryRevision": "<active graphRevision>",
786
+ "generatedAt": "2026-07-19T12:00:00.000Z",
787
+ "coverage": { "graphql": "COMPLETE", "grpc": "COMPLETE", "event": "COMPLETE" },
788
+ "observations": [
789
+ { "transport": "graphql", "side": "client", "operation": "QUERY", "name": "viewer", "file": "src/api.ts", "line": 42 },
790
+ { "transport": "grpc", "side": "server", "service": "User", "name": "GetUser" },
791
+ { "transport": "event", "side": "publisher", "name": "user.created" }
792
+ ]
793
+ }
794
+ ```
795
+
796
+ OTLP `resourceSpans` may be placed at the envelope root or under `otlp`; standard `rpc.*`,
797
+ `graphql.*`, `messaging.*` and `code.*` span attributes are normalized. Missing, stale, mismatched,
798
+ partial or uncorrelated runtime evidence stays `PARTIAL`/`UNKNOWN`; it is never converted into an
799
+ absence claim. The two default report files are excluded from the graph file universe so they do not
800
+ change the revision they attest; a custom report path must be Git-ignored. Reports must omit payloads,
801
+ headers, source text and credentials.
764
802
 
765
803
  Persistent per-client-repository configuration lives in `.weavatrix.json`:
766
804
 
@@ -819,53 +857,24 @@ Graph queries, audits, clone scans and repository switching run locally. The def
819
857
  is `graph,search,source,health,build,retarget,crossrepo`: no Weavatrix HTTP requests. `open_repo`
820
858
  changes the active local boundary only when called. Select `pinned` to remove repository switching,
821
859
  global repository listing, and cross-repository graph tracing too.
822
- Weavatrix itself initiates outbound HTTP only from three tools; all are absent from `offline` and
823
- `pinned`, and none runs merely because a profile is enabled:
824
-
825
- - `refresh_advisories` queries [OSV.dev](https://osv.dev) with your lockfile's package
826
- **names + versions** (that is what an OSV query is; never source code) and caches the advisories
827
- in `~/.weavatrix/advisories.json`. `run_audit` then matches against that store fully offline.
828
- - `pull_architecture_contract` — sends the active repository's opaque stable UUID with bearer
829
- authentication, downloads the owner-approved target-architecture contract, validates it, and
830
- stores the contract in the local graph cache. It sends no source, symbol, or repository path.
831
- - `preview_sync` — builds a bounded evidence snapshot locally without sending anything. The preview
832
- shows the destination host/path, normalized repository name, opaque UUID,
833
- payload version, exact top-level fields, included sections, node/link/byte counts and canonical
834
- SHA-256 hash. A `sync_graph` call with `dry_run:false` and its exact short-lived `confirm_token` sends
835
- the cached payload to the same destination. A token alone does not send while the default dry-run
836
- remains active. It
837
- sends payload v3: the v2 graph
838
- allowlist plus module dependencies, runtime/compile-time cycles, declared boundary violations,
839
- health findings, complexity-threshold breaches, stack identifiers, a bounded direct/transitive
840
- dependency graph, direct package usage, and bounded clone/divergence review candidates. Local
841
- analyzers may read repository source and manifests to derive those
842
- facts. The wire contract has no fields for file bodies, snippets, absolute host paths, environment
843
- values or Git remotes; unknown fields are discarded and unsafe optional path metadata is omitted.
844
- The confirmed request also carries the normalized repository display name used by the
845
- hosted list. The endpoint is **yours**, configured through `WEAVATRIX_SYNC_URL` and the optional
846
- `WEAVATRIX_SYNC_TOKEN`; the feature is off by default. Pass `payload_version: 2` only for an
847
- intentional graph-only compatibility sync—there is no silent downgrade that discards evidence.
848
- Graphs that predate current typed-edge/provenance metadata must be rebuilt once before V3 sync;
849
- V3 also refuses a stale graph so
850
- source-derived evidence cannot be mixed with old topology. HTTPS is required except for an
851
- explicitly configured loopback endpoint; embedded URL credentials and fragments are rejected.
860
+ Weavatrix 0.3 itself initiates no outbound HTTP. It can validate a connector-provided advisory cache,
861
+ construct a bounded source-free payload locally and cache a validated architecture contract, but
862
+ those local extension services have no transport or credential input. The separately installed
863
+ `weavatrix-online` superset owns OSV requests, Cloud/Enterprise authentication, capability
864
+ negotiation, consent and synchronization. It depends on this MIT core and may add proprietary tools,
865
+ skills and local analyzers without replacing baseline implementations.
852
866
 
853
867
  Evidence sections carry independent `state` (`COMPLETE`, `PARTIAL`, `NOT_CHECKED`,
854
868
  `NOT_APPLICABLE`, `ERROR`) and `verdict` (`PASS`, `FAIL`, `UNKNOWN`) fields plus exact
855
869
  `total/returned/truncated` counts. An incomplete check is never converted into a clean zero. V3 is
856
870
  deterministic: volatile timestamps are excluded and the allowlisted snapshot has a canonical SHA-256
857
- fingerprint, so identical evidence does not manufacture a hosted revision. The client mirrors the
858
- hosted 8 MiB / 25,000-node / 100,000-edge / 50,000-external-import safety limits before networking.
859
-
860
- If a network tool is not listed by the MCP client, that is the expected offline default. With the
861
- user's approval, select `osv` for advisory refresh only or `hosted` for the hosted workflow,
862
- restart/reconnect the MCP server, and then invoke the intended tool. Enabling a profile does not
863
- trigger a request by itself.
871
+ fingerprint. This local service exists so a separately licensed connector can reuse the same bounded
872
+ wire validation without duplicating core logic; it cannot send the payload itself.
864
873
 
865
- Profiles (`offline`, `pinned`, `osv`, `hosted`, `full`) or exact capability groups (`graph`,
866
- `search`, `source`, `health`, `build`, `retarget`, `crossrepo`, `advisories`, `hosted`) are selectable through
867
- the final positional argument. Omitted caps use `offline`; an explicit capability list exposes
868
- exactly the named groups. Legacy `online` expands to `advisories,hosted` for compatibility.
874
+ Profiles (`offline`, `pinned`) or exact local capability groups (`graph`, `search`, `source`, `health`,
875
+ `build`, `retarget`, `crossrepo`) are selectable through the final positional argument. Omitted caps
876
+ use `offline`; an explicit capability list exposes exactly the named groups. Legacy network profile
877
+ names fail loudly and direct the user to `weavatrix-online`.
869
878
 
870
879
  ## Security model
871
880
 
@@ -874,12 +883,12 @@ vulnerability findings. This is where each capability comes from and how it is c
874
883
 
875
884
  | Capability alert | Why it exists | Activation and boundary |
876
885
  |---|---|---|
877
- | Network access | `refresh_advisories` sends pinned package names and versions to OSV; `pull_architecture_contract` sends an opaque repository UUID and receives an owner-approved contract; confirmed `sync_graph` sends a normalized repository label plus an allowlisted graph/evidence payload. Evidence is derived locally from source and manifests, but source bodies, snippets, absolute paths, environment values, credentials and Git remotes are excluded | `offline` and `pinned` expose no network tools. `osv` exposes only advisory refresh. `hosted`/`full` expose all three. Sync defaults to a no-network dry-run and then requires both `dry_run:false` and its exact short-lived token; hosted calls require `WEAVATRIX_SYNC_URL`, and non-loopback hosted endpoints require HTTPS |
886
+ | Network access | None in the MIT core | `offline` and `pinned` expose only local tools; Online/Cloud/Enterprise integration is a separate package |
878
887
  | Shell access | Local `git` powers staleness/change impact; `rg` accelerates search; the bundled TLS/tsserver process supplies bounded JS/TS semantic evidence; timed-out Windows child trees may be terminated; `verified_change` can optionally run an existing package test/check/verify script | The semantic provider never invokes repository code. Test execution separately requires `run_tests:true` plus `WEAVATRIX_ALLOW_TEST_RUNS=1`, rejects arbitrary commands and shell-sensitive arguments, and should be enabled only for trusted repository scripts |
879
888
  | Debug / dynamic loading | Cache-busted `import()` hot-reloads watched MCP tool entry modules; `createRequire` loads package metadata and parser dependencies | Loads files from the installed package; no `eval` |
880
- | Environment access | Reads `WEAVATRIX_*` configuration; ordinary local helpers inherit a credential-stripped environment, while TLS/tsserver receives only allowlisted OS/temp/locale values and a constrained executable path | `WEAVATRIX_SYNC_TOKEN` is removed from every child-process and worker environment. TLS/tsserver also receives no registry/proxy/cloud credentials or `NODE_OPTIONS` |
889
+ | Environment access | Reads local `WEAVATRIX_*` runtime settings; ordinary helpers inherit a credential-stripped environment, while TLS/tsserver receives only allowlisted OS/temp/locale values and a constrained executable path | Connector secrets are removed from child-process and worker environments. TLS/tsserver also receives no registry/proxy/cloud credentials or `NODE_OPTIONS` |
881
890
  | Filesystem access | Reads the active repository, graph, lockfiles and coverage reports; writes derived graphs and advisory/architecture caches | Realpath containment blocks traversal and symlink/junction escapes. The `pinned` profile removes `open_repo`; the default `offline` profile permits only explicit local switching. The optional malware dependency scan may inspect installed dependency caches such as GOPATH |
882
- | URL strings | Fixed OSV/documentation URLs plus a user-configured sync URL | A URL string causes no request by itself; only the three network-profile tools perform requests |
891
+ | URL strings | Advisory findings may contain fixed OSV documentation links | The core has no outbound request implementation |
883
892
 
884
893
  `read_source` accepts repo-relative regular files only, caps a read at 2 MB, and refuses lexical or
885
894
  realpath escapes. Graph-derived paths pass through the same boundary before analysis tools read
@@ -923,8 +932,9 @@ loader) behind the thin stdio entry `src/mcp-server.mjs`.
923
932
  cross-repository wrapper/liveness fixture, framework/convention fixture, full MCP lifecycle gate
924
933
  and a portable real-repository runner. Six source-free 0.2.1 real-repository baselines are
925
934
  recorded; edge provenance is gated end-to-end and the strict six-repository release command passes.
926
- - **Cross-transport contracts** cover bounded HTTP wrappers plus static GraphQL, gRPC and event-bus
927
- identities across registered local repositories, with explicit runtime/dynamic unknown states.
935
+ - **Cross-transport contracts** combine bounded HTTP/static models with revision-bound GraphQL,
936
+ gRPC and Kafka/event runtime or OTLP evidence; unobserved dynamic identities stay explicit
937
+ `UNKNOWN`.
928
938
  - **Hosted architecture workbench** at
929
939
  [app.weavatrix.com](https://app.weavatrix.com) is an access-controlled preview for
930
940
  owner-authenticated source-free evidence and revision history. Its UI and backend evolve
package/SECURITY.md CHANGED
@@ -65,39 +65,21 @@ the selected package-manager script with the credential-stripped child environme
65
65
  scripts are repository-controlled code and may have arbitrary side effects, so enable this flag only
66
66
  for repositories and scripts you trust.
67
67
 
68
- Network capabilities are split by purpose. `osv` adds only `refresh_advisories`, which sends pinned
69
- package names and versions to OSV.dev when called. `hosted` / `full` also expose the local-only
70
- `preview_sync` plus networked `sync_graph` and `pull_architecture_contract`; the network tools require
71
- a user-configured endpoint, and contract pull requires bearer authentication. The legacy `online`
72
- capability remains an alias for advisory plus hosted networking so existing registrations do not break.
73
-
74
- `preview_sync` is the first half of a two-step consent boundary. It constructs the strict allowlisted
75
- payload locally but has no network path. It displays the configured hostname/path, normalized
76
- repository name, opaque repository UUID, payload version, included sections, node/link/byte counts
77
- and canonical SHA-256 hash. Sending requires `sync_graph` with both `dry_run:false` and the exact
78
- confirmation token for that cached payload and destination; the token
79
- expires after five minutes and is stored only in process memory. A token with the default dry-run,
80
- or an incorrect/expired token, does not send. Sync rejects
81
- embedded URL credentials and fragments and requires HTTPS except for explicit loopback development
82
- endpoints. Query parameters may be used by a configured endpoint but are not echoed in previews or
83
- errors.
68
+ The 0.3 MIT artifact contains no HTTP tool, sync endpoint/token setting, remote advisory refresher or
69
+ compatibility alias that can enable one. `offline` and `pinned` are both network-free. Advisory
70
+ matching reads only a local validated cache; a missing or stale cache remains `NOT_CHECKED` or
71
+ `PARTIAL`, never a clean zero.
72
+
73
+ The public extension API allows a dependent package to add MCP tools, packaged skills and local
74
+ audit providers. Extension tools cannot replace a core tool, extension profiles cannot replace a
75
+ core profile, and audit providers must declare `network:"none"`; failures remain explicit
76
+ `ERROR/PARTIAL`. The separate `weavatrix-online` superset owns endpoint policy, consent,
77
+ authentication, capability negotiation and every outbound request.
84
78
 
85
79
  Every MCP response includes transient local `_meta["weavatrix/metrics"]` timing, output-size/token
86
80
  estimate, graph freshness/revision/update and graph-cache status. Weavatrix does not persist, aggregate
87
81
  or transmit these measurements; they are response evidence for the caller, not product telemetry.
88
82
 
89
- Payload v3 runs bounded local analyzers over the active repository, then sends only a strict
90
- graph/evidence allowlist plus a normalized repository display name. That evidence can include a
91
- bounded direct/transitive lockfile dependency graph and stable clone/divergence candidates. The
92
- contract has no source-body,
93
- snippet, absolute-host-path, environment, credential, Git-remote or analyzer-error fields; unknown
94
- fields are discarded and unsafe optional path metadata is omitted. V3 rejects stale graphs,
95
- duplicate node IDs, dangling edges and oversized payloads before any request. Graph-only payload v2
96
- remains an explicit compatibility option and is never selected as a silent fallback.
97
-
98
- `pull_architecture_contract` sends only the active repository's opaque stable UUID, receives an
99
- owner-approved target contract, validates it, and caches it locally. It never sends source, symbols,
100
- file paths, or Git metadata. It applies the same HTTPS-outside-loopback and embedded-credential URL
101
- rules before sending bearer authentication. Authentication, forbidden, not-found and repository-not-ready responses
102
- are reported as distinct states so a missing registration or contract is not presented as an opaque
103
- HTTP failure.
83
+ Core exposes local-only services that build and validate the bounded source-free payload, validate
84
+ connector-provided advisory records, create opaque repository identity and cache a validated
85
+ architecture contract. These services read no connector credential and perform no network I/O.
@@ -3,4 +3,5 @@
3
3
  // while the server itself stays a plain module. Positional args pass through:
4
4
  // weavatrix-mcp <repoRoot> [caps] — graph path derived automatically
5
5
  // weavatrix-mcp <graph.json> <repoRoot> [caps] — explicit graph file
6
- import('../src/mcp-server.mjs')
6
+ const {startMcpServer} = await import('../src/mcp-server.mjs')
7
+ await startMcpServer()
@@ -1,6 +1,6 @@
1
1
  # ADR 0001: Weavatrix 0.3 offline/online split
2
2
 
3
- Status: accepted direction; extraction in progress
3
+ Status: accepted; release candidate implemented
4
4
 
5
5
  Date: 2026-07-19
6
6
 
@@ -12,9 +12,9 @@ registry, Health, dependency, duplicate, impact, history and architecture tools
12
12
  remain available without a network capability.
13
13
 
14
14
  All outbound HTTP tools move to the separate public-source `weavatrix-online`
15
- package, starting at 0.1.0. Its permission-required source license must be
16
- approved before publication; the scaffold remains unpublished and
17
- `UNLICENSED`. It extends the MIT engine rather than copying or relicensing it.
15
+ package, starting at 0.1.0. It uses the permission-required Weavatrix Online
16
+ Source License 1.0 and remains unpublished until the paired release gates pass.
17
+ It extends the MIT engine rather than copying or relicensing it.
18
18
 
19
19
  The managed Cloud and licensed self-hosted Enterprise products are private
20
20
  server implementations of the same source-free wire contract. Neither is
@@ -37,9 +37,11 @@ HTTP implementation.
37
37
  ## Update model
38
38
 
39
39
  `weavatrix-online` depends on a compatible `weavatrix` release and uses a
40
- supported tool-extension API. Parser, graph schema, LSP and Health fixes are
41
- therefore updated once in the MIT core. The online repository contains only
42
- transport, endpoint/authentication and consent-flow code.
40
+ supported extension API. Parser, graph schema, LSP and baseline Health fixes
41
+ are therefore updated once in the MIT core. Online is an expanded superset: it
42
+ may add proprietary MCP tools, packaged skills and local analyzer providers as
43
+ well as transport, endpoint/authentication and consent workflows. It cannot
44
+ replace or carry patched copies of core implementations.
43
45
 
44
46
  ## Release gates
45
47
 
@@ -0,0 +1,43 @@
1
+ # Weavatrix 0.3.0
2
+
3
+ 0.3.0 makes the public MIT package a strictly network-free core and introduces
4
+ the supported extension boundary used by the separately versioned
5
+ `weavatrix-online` product.
6
+
7
+ ## Trust boundary
8
+
9
+ - The 34 core tools are local. Remote OSV refresh, endpoint authentication,
10
+ architecture pull and graph sync were removed from this package.
11
+ - Legacy `online`, `osv`, `hosted` and `full` profile names fail loudly. They
12
+ cannot re-enable an outbound request implementation.
13
+ - The offline artifact gate scans the packed source boundary and rejects an
14
+ HTTP implementation or Hosted credential/config surface.
15
+ - Extensions compose in-process through a stable API. They may add tools,
16
+ skills and local audit providers without copying or patching the core.
17
+
18
+ ## Critical precision fixes
19
+
20
+ - Fresh dogfood of this repository produced 58 persisted `EXACT_LSP` edges.
21
+ An on-demand `get_dependents(startMcpServer)` query returned its direct caller
22
+ as `EXACT_LSP`; zero-edge `UNAVAILABLE` is no longer the expected JS/TS path.
23
+ - `Cargo.lock` v3/v4 registry records become exact crates.io pins for offline
24
+ OSV matching. A saved `cargo audit --json` report is also imported as native
25
+ RustSec vulnerability/warning evidence; missing, invalid or stale reports
26
+ remain visibly incomplete.
27
+ - Maven/Gradle import-to-artifact evidence now reads exact class ownership from
28
+ already installed JAR central directories without executing Java or a build.
29
+ A missing JAR, unresolved property/catalog expression, ambiguity or heuristic
30
+ fallback keeps the ecosystem `PARTIAL` instead of falsely claiming `COMPLETE`.
31
+ - Cross-repository contracts combine static HTTP/GraphQL/gRPC/event models with
32
+ source-free `weavatrix.transport-runtime.v1` reports. Normalized or OTLP JSON
33
+ observations resolve an exact dynamic GraphQL field, gRPC method or
34
+ Kafka/event destination only when the report is fresh, revision-matched,
35
+ capture-complete and source-correlated. Missing or unobserved runtime paths
36
+ remain explicit `UNKNOWN`, never false matches.
37
+
38
+ ## Product family
39
+
40
+ `weavatrix` remains the MIT base of the whole product family. The public-source,
41
+ separately licensed `weavatrix-online` 0.1.0 package depends on this release and
42
+ may add Online-only tools, skills and analyzers. Managed Cloud and licensed
43
+ self-hosted servers implement the same source-free wire contract.
@@ -0,0 +1,30 @@
1
+ # Weavatrix 0.3.1
2
+
3
+ 0.3.1 fixes a dogfood-discovered blind spot in symbol-aware change impact when
4
+ one generated or snapshot asset makes the aggregate Git diff exceed its byte
5
+ budget.
6
+
7
+ ## Bounded large-diff recovery
8
+
9
+ - `change_impact` first keeps its normal bounded zero-context diff.
10
+ - If that aggregate diff is oversized, it obtains the complete bounded changed-
11
+ file list and recovers zero-context diffs one file at a time under the same
12
+ global byte and time budgets.
13
+ - Source files that fit retain line and symbol classification. Only individual
14
+ oversized, timed-out or otherwise unreadable files become conservative
15
+ `unknown` seeds.
16
+ - The result remains `PARTIAL/HIGH` while any file lacks textual evidence; the
17
+ fallback improves useful evidence without turning unknown into clean.
18
+
19
+ ## Exact semantic evidence
20
+
21
+ The global TypeScript/JavaScript LSP overlay is a bounded prewarm and may report
22
+ `PARTIAL` on large repositories. Exact workflows are not limited by that global
23
+ cap: `get_dependents` and `inspect_symbol` use revision-bound point queries, and
24
+ `change_impact` uses one bounded exact batch for changed symbols.
25
+
26
+ On the Hosted 0.3 release commit, the repaired fallback recovered 27/27 changed
27
+ paths and 57 mapped symbol changes, reduced the conservative seed set from the
28
+ 1,000 cap to 72, and produced `DIRECT_EXACT_TRANSITIVE_GRAPH` with 16/16 selected
29
+ JS/TS symbols verified by `typescript-language-server`. The remaining large
30
+ snapshot assets stayed explicit `unknown`; transitive hops stayed graph-backed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weavatrix",
3
- "version": "0.2.19",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "Local repository intelligence MCP for AI coding agents: reusable architecture graph for fast application understanding, Health, dead code, clones, history, blast radius and architecture safeguards.",
6
6
  "author": "Sergii Ziborov <sergii.ziborov@gmail.com>",
@@ -20,6 +20,12 @@
20
20
  "bin": {
21
21
  "weavatrix-mcp": "bin/weavatrix-mcp.mjs"
22
22
  },
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
+ "./package.json": "./package.json"
28
+ },
23
29
  "files": [
24
30
  "bin",
25
31
  "src",
@@ -27,6 +33,8 @@
27
33
  "scripts/run-agent-task-benchmark.mjs",
28
34
  "docs/agent-task-benchmark.md",
29
35
  "docs/adr/0001-v0.3-offline-online-split.md",
36
+ "docs/releases/v0.3.0.md",
37
+ "docs/releases/v0.3.1.md",
30
38
  "docs/releases/v0.2.19.md",
31
39
  "README.md",
32
40
  "SECURITY.md",
@@ -40,7 +48,6 @@
40
48
  "benchmark:real:release": "node scripts/run-real-benchmark.mjs --require-all",
41
49
  "benchmark:agent": "node scripts/run-agent-task-benchmark.mjs",
42
50
  "benchmark:agent:release": "node scripts/run-agent-task-benchmark.mjs --require-independent",
43
- "sync:private": "node scripts/sync-private.mjs",
44
51
  "build:mcpb": "node scripts/build-mcpb.mjs",
45
52
  "verify:release": "node scripts/verify-release.mjs"
46
53
  },