viafrei 2.6.17 → 2.7.2

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/API.md CHANGED
@@ -9,7 +9,7 @@ the server's own text, reproduced verbatim, because that text is what an
9
9
  assistant reads when it decides which tool to call; paraphrasing it here would
10
10
  document a different server.
11
11
 
12
- **It is a dated snapshot, taken on 2026-11-14.** Generating this file makes
12
+ **It is a dated snapshot, taken on 2026-11-20.** Generating this file makes
13
13
  it impossible for the document and the snapshot to disagree — CI regenerates and
14
14
  compares — but it cannot keep the snapshot from ageing against the live server,
15
15
  because a capture is a point in time. **The source of truth is the running
@@ -17,11 +17,11 @@ server:** connect any MCP client and call `tools/list`.
17
17
 
18
18
  | | |
19
19
  | --- | --- |
20
- | Server | `viafrei` 2.6.17 |
20
+ | Server | `viafrei` 2.7.2 (set by hand; the capture is of 2.6.40 and is taken again after the 2.7.2 deploy) |
21
21
  | MCP protocol | `2025-06-18` |
22
22
  | Streamable HTTP | https://mcp.viafrei.de/mcp |
23
23
  | Legacy HTTP+SSE | https://mcp.viafrei.de/sse |
24
- | Captured from | `https://mcp.viafrei.de/mcp` on 2026-11-14 |
24
+ | Captured from | `https://mcp.viafrei.de/mcp` on 2026-11-20 |
25
25
  | Surface | 24 tools, 10 resources, 2 resource templates, 9 prompts |
26
26
  | Parameter schemas | JSON Schema draft-07 |
27
27
  | Capabilities | `tools`, `resources`, `prompts`, `logging` |
@@ -814,5 +814,5 @@ single call.
814
814
  ---
815
815
 
816
816
  Generated from `catalogue.json` by `scripts/gen-api-doc.mjs`. The snapshot was
817
- read from `https://mcp.viafrei.de/mcp` on 2026-11-14; no tool was invoked to
817
+ read from `https://mcp.viafrei.de/mcp` on 2026-11-20; no tool was invoked to
818
818
  produce it, so no data provider was contacted.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,81 @@ a Changelog and the versions follow Semantic Versioning.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.7.2] - 2026-11-23
9
+
10
+ **2.7.1 was tagged and its image built, but its npm publish was stopped again: 7 of the 8 mutation shards ran past the 15-minute job limit. 2.7.2 carries the fix and everything 2.7.1 holds.** The server's tools, prompts and resources and what they answer are those of 2.7.1.
11
+
12
+ ### Fixed
13
+ - **The mutation run ends inside the 30 minutes a ViaFrei MCP pipeline may take.** Each mutant costs less: Stryker runs the tests on worker threads again, with its own test configuration without the garbage-collection flag a thread refuses (`server/vitest.stryker.config.ts`). 2.7.1 had moved it to separate processes to carry that flag, which made every mutant about 1.7 times as slow. The one test that needs a real collection is declared off there by name and runs in the main suite. There a test also fails after 5 seconds instead of 20, so a mutant that leaves a request unanswered is killed at once instead of timing out the worker. The ~10,700 mutants are also cut into 18 parallel shards instead of 8, dealt by the seconds each piece costs (`server/scripts/mutation-weights.json`, fitted to two measured runs by the tests each piece's mutants run, their timeouts and their count). A static table whose mutants time out (`src/tools/facilities.ts:61-71`) had been weighed far too light and pushed one shard to 19.4 minutes; it now has a shard of its own, and no shard is dealt more than 10 minutes. A measured run took 19 minutes, its slowest shard 14; each shard may take up to 20, the one job allowed more than 15. 18 shards beside the release's other jobs fit GitHub's 20 concurrent jobs, but a pull request's CI running at the same time can hold runners: in the measured run some shards waited up to 6.5 minutes to start. The 70 % floor is unchanged.
14
+
15
+ ## [2.7.1] - 2026-11-23
16
+
17
+ **2.7.0 was tagged and its image built, but its npm publish was stopped by two release gates; 2.7.1 carries their fixes and everything 2.7.0 holds.** The server's tools, prompts and resources and what they answer are those of 2.7.0.
18
+
19
+ ### Fixed
20
+ - **The mutation run starts.** Every shard's initial test run failed before a mutant was tried: Stryker's vitest runner started worker threads, which refuse the `--expose-gc` flag the server's test config gives its workers. It now runs vitest in forked processes.
21
+ - **The pre-release end-to-end run asks the API's fixture world for names it holds.** Five cases asked for "Köln Hbf" and the region "VBB", which the API's synthetic test world does not contain, and the server refuses a name it cannot find, as the hosted server does. Against a real API they now ask a stop the API lists and that stop's district, as the road cases already ask its motorway.
22
+
23
+ ## [2.7.0] - 2026-11-23
24
+
25
+ **The server is in this repository.** From 2.7.0 the ViaFrei MCP server is built, tested and released here, as the container image `ghcr.io/mavrovde/viafrei-mcp:2.7.0`, and it reads the ViaFrei API, never a database. The npm package and the image carry one version, and the catalogue they ship is the server's own. Its tools, prompts and resources are those of 2.6.40, and they answer in 2.6.40's words, except where the database does not yet hold what an answer needs (accepted gaps).
26
+
27
+ ### Added
28
+ - **The server's container image**, `ghcr.io/mavrovde/viafrei-mcp:<version>` (`image.yml`, `server/Dockerfile`). It is released only from an annotated `vX.Y.Z` tag on main that equals both `package.json` versions, with CI green on that commit and the server's tests passed in the same run. Trivy must find nothing HIGH or CRITICAL before anything is pushed. The image is pushed by digest, signed keyless and attested (SLSA provenance, SPDX SBOM). It is tagged only after cosign verify passes with the identity pinned to this workflow, and after the digest has run as uid 10001 with a read-only root file system and answered `/healthz`. Every action is pinned by full SHA, and every job ends within 15 minutes (`npm run test:image`).
29
+ - **The HTTP hardening the hosted server runs**: the `Host` and `Origin` allow-list (403) and CORS; the session caps; the per-address limits behind a trusted proxy; the body bound; the idle session lifetime and its sweep; and the usage counters, one structured log line per bucket. Each is set by the `MCP_*` keys in the README. The SSE keep-alive and idle connection timeouts outlast the edge's limits. SIGTERM writes the last usage bucket, then exits 143.
30
+ - The server card at `/.well-known/mcp.json`, `/.well-known/mcp/server-card.json` and `/mcp/server-card`, readable from any origin; `/.well-known/security.txt` and the favicons redirect to viafrei.de.
31
+ - **A fault line beside each request line that went wrong**, as the hosted server writes it: `server_5xx` (error), and `rpc_unknown_method`, `tool_unknown`, `tool_error` (with the tool's `code` and `reason`) and `rpc_error` (warn). A refused request (429) writes none. The line holds the same closed field list as the request line, never an argument or an address.
32
+ - **`find_parking` answers `kind=disabled_badge`**: the on-street bays reserved for a disabled parking permit near the place, with their counts and, where a sensor reports, free or occupied. `road` together with it is refused, with `_meta.errorCode`.
33
+ - **The share-alike sentence after the credit line** when a credit of the answer is licensed CC BY-SA, in the answer's language and in today's server's words: it names the licence the source gives and, when that is not CC BY-SA 4.0, the CC BY-SA 4.0 we release our adaptation under; two differing licences are both named, joined by " / ". An ODbL database gets no such sentence.
34
+ - **The person-name rule of the leak sweep** (`scripts/person-names.mjs`, run by `check-leaks.mjs`): a string literal in a test may not read as a person's name; tests use placeholders such as Max Mustermann. A finding names the file, the line and the length, never the name.
35
+ - **`scripts/parity-attribute.mjs`**: attributes every row in which a parity run's old and new answers differ to its cause (a named database gap, the credit, structuredContent, an `isError` flip, or "unexplained"), by the smallest set of masks that makes the two equal.
36
+
37
+ ### Changed
38
+ - **The HTTP answers are the hosted server's again.** A GET or HEAD on `/mcp` without a session is 405 with `Allow`, and so is any other method. A request naming an ended session is 404 with -32001, and one with no session is 400. A body that is not JSON is 400 with -32700, an oversized one is 413 with -32600, and JSON that is no JSON-RPC message is 400 with -32600. An unknown `/messages` session is 400. `/readyz` answers `ok`, `slow` or `degraded`. Any other path is a JSON 404 naming the endpoint, and `/` is a bare 404.
39
+ - The server's copy of the catalogue and its version follow main's 2.6.40.
40
+ - **Every credit row carries its links as today's server prints them**: the provider's terms address, and, where the licence asks for it, `Lizenz: <licence>, <address of its text>`; a credit that already spells its licence's address gets no second one. An empty answer credits only what it listed.
41
+ - **The tools answer in today's server's words**: the heads, the lines, the "no result" sentences and the refusals of every tool, in German and English, checked against answers recorded from the running server. Where the database does not yet hold what an answer needs, the difference is a named, accepted gap.
42
+ - Every tool error carries `_meta.errorCode` (`invalid_input`, `not_found`, `limit_reached`, `unavailable`, `internal`).
43
+
44
+ ## [2.6.40] - 2026-11-20
45
+
46
+ **Mirrors the server.** The bridge is versioned to match the ViaFrei MCP server it
47
+ relays to. The running server reports 2.6.40 while the registry's latest is 2.6.18, so
48
+ this release moves the package to the server's number and carries whatever had been
49
+ waiting under `[Unreleased]`. Prepared by the `Version sync` workflow: the shipped
50
+ reference was re-captured from the running server, and the probe reported the surface
51
+ **unchanged** — only the version string and the capture date moved.
52
+
53
+ ## [2.6.37] - 2026-11-19
54
+
55
+ **Mirrors the server.** The bridge is versioned to match the ViaFrei MCP server it
56
+ relays to. The running server reports 2.6.37 while the registry's latest is 2.6.18, so
57
+ this release moves the package to the server's number and carries whatever had been
58
+ waiting under `[Unreleased]`. Prepared by the `Version sync` workflow: the shipped
59
+ reference was re-captured from the running server, and the probe reported the surface
60
+ **unchanged** — only the version string and the capture date moved.
61
+
62
+ ## [2.6.23] - 2026-11-18
63
+
64
+ **Mirrors the server.** The bridge is versioned to match the ViaFrei MCP server it
65
+ relays to. The running server reports 2.6.23 while the registry's latest is 2.6.18, so
66
+ this release moves the package to the server's number and carries whatever had been
67
+ waiting under `[Unreleased]`. Prepared by the `Version sync` workflow: the shipped
68
+ reference was re-captured from the running server, and the probe reported the surface
69
+ **unchanged** — only the version string and the capture date moved.
70
+
71
+ ## [2.6.18] - 2026-11-16
72
+
73
+ **Mirrors the server.** The bridge is versioned to match the ViaFrei MCP server it
74
+ relays to. The running server reports 2.6.18 while the registry's latest is 2.6.17, so
75
+ this release moves the package to the server's number and carries whatever had been
76
+ waiting under `[Unreleased]`. Prepared by the `Version sync` workflow: the shipped
77
+ reference was re-captured from the running server, and the probe reported the surface
78
+ **unchanged** — only the version string and the capture date moved.
79
+
80
+ ### Changed
81
+ - **Freshness and Version sync run once a day** (06:00 and 06:30 UTC). Freshness ran every six hours and Version sync hourly, so this saves about 780 Actions runs a month (owner, 2026-11-15: use GitHub by minimum). Run Version sync by hand right after a release.
82
+
8
83
  ## [2.6.17] - 2026-11-14
9
84
 
10
85
  **Mirrors the server.** The bridge is versioned to match the ViaFrei MCP server it
@@ -4494,6 +4569,13 @@ for it, so the number is free; the bridge will use it when the platform does.
4494
4569
  commits, and a squash makes them unreachable from `main` - which would turn
4495
4570
  the check red on `main` for everybody, for something no contributor did.
4496
4571
 
4572
+ [2.7.2]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.7.2
4573
+ [2.7.1]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.7.1
4574
+ [2.7.0]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.7.0
4575
+ [2.6.40]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.40
4576
+ [2.6.37]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.37
4577
+ [2.6.23]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.23
4578
+ [2.6.18]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.18
4497
4579
  [2.6.17]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.17
4498
4580
  [2.6.16]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.16
4499
4581
  [2.6.15]: https://github.com/mavrovde/viafrei-mcp/releases/tag/v2.6.15
package/README.md CHANGED
@@ -2336,7 +2336,7 @@ Restart the client and ask one of the questions above.
2336
2336
 
2337
2337
  <!-- catalogue:begin — generated by scripts/gen-readme-catalogue.mjs from catalogue.json; do not edit by hand -->
2338
2338
 
2339
- **24 tools, 9 prompts, 10 resources and 2 resource templates** — server 2.6.17, snapshot of 2026-11-14. Each line is the server's own words; the full parameters are in [API.md](API.md).
2339
+ **24 tools, 9 prompts, 10 resources and 2 resource templates** — server 2.7.2, snapshot of 2026-11-20. The version 2.7.2 was set by hand; the capture is of 2.6.40 and is taken again after the 2.7.2 deploy. Each line is the server's own words; the full parameters are in [API.md](API.md).
2340
2340
 
2341
2341
  #### 🚗 On the road
2342
2342
 
@@ -2653,11 +2653,39 @@ one thing we cannot get any other way.
2653
2653
 
2654
2654
  ## The server itself
2655
2655
 
2656
- The MCP server is a **hosted service**, and its source is closed. It is not in
2657
- this repository and is not published. What is public is the part meant to be:
2658
- the tool names, descriptions, input schemas, result shapes and attribution
2659
- lines, which is everything a client reads from `tools/list`. We say this plainly
2660
- so nobody spends an evening looking for the server code.
2656
+ The MCP server lives in [`server/`](server/): Streamable HTTP on `/mcp`, the
2657
+ legacy HTTP+SSE pair on `/sse` + `/messages`, and stdio. Every answer it gives
2658
+ comes from the ViaFrei API; it holds no data of its own. Each release is also a
2659
+ container image, `ghcr.io/mavrovde/viafrei-mcp:<version>`, for linux/amd64 and
2660
+ linux/arm64, signed keyless with cosign and carrying SLSA provenance and an SPDX
2661
+ SBOM. It runs as uid 10001 with a read-only root file system.
2662
+
2663
+ ```sh
2664
+ cosign verify ghcr.io/mavrovde/viafrei-mcp:<version> \
2665
+ --certificate-identity https://github.com/mavrovde/viafrei-mcp/.github/workflows/image.yml@refs/tags/v<version> \
2666
+ --certificate-oidc-issuer https://token.actions.githubusercontent.com
2667
+ docker run --read-only --tmpfs /tmp -p 127.0.0.1:8787:8787 \
2668
+ -e MCP_HOST=0.0.0.0 -e MCP_ALLOW_PUBLIC=1 -e VIAFREI_API_URL=<the API> \
2669
+ ghcr.io/mavrovde/viafrei-mcp:<version>
2670
+ ```
2671
+
2672
+ The server binds 127.0.0.1 unless told otherwise, and binding any other address
2673
+ needs `MCP_ALLOW_PUBLIC=1`, because `/mcp` has no auth of its own. Put a proxy in
2674
+ front and list its public origin in `MCP_ALLOWED_ORIGINS` and `MCP_PUBLIC_URL`.
2675
+
2676
+ | key | default | what it bounds |
2677
+ |-|-|-|
2678
+ | `MCP_HOST`, `MCP_PORT` | `127.0.0.1`, `8787` | the bind (`HOST`, `PORT` are read when these are unset) |
2679
+ | `MCP_ALLOWED_ORIGINS` | the loopback origins | browser `Origin`s; any other is 403 |
2680
+ | `MCP_PUBLIC_URL` | none | the public URL; its host is an accepted `Host` |
2681
+ | `MCP_MAX_BODY_KB` | `64` | the request body; larger is 413 |
2682
+ | `MCP_SESSION_TTL_S`, `MCP_SESSION_SWEEP_S` | `1800`, `60` | the idle session lifetime and its sweep |
2683
+ | `MCP_MAX_SESSIONS`, `MCP_MAX_SESSIONS_PER_ADDRESS` | `500`, `0` (off) | open sessions; past the cap 503 or 429 with `Retry-After` |
2684
+ | `MCP_IP_MAX_INFLIGHT`, `MCP_IP_RATE_PER_MIN`, `MCP_IP_RATE_BURST` | `8`, `240`, `60` | per client address; past it 429 with `Retry-After` |
2685
+ | `MCP_TRUSTED_PROXY_CIDR` | none | the proxies whose `X-Forwarded-For` is read |
2686
+
2687
+ `/healthz` is liveness, `/readyz` readiness (the API's own). On SIGTERM the server
2688
+ stops listening, writes its last usage counts and exits 143.
2661
2689
 
2662
2690
  ## Contributing · Security · Licence
2663
2691
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viafrei",
3
- "version": "2.6.17",
3
+ "version": "2.7.2",
4
4
  "description": "The German Real-Time Mobility Context Platform for AI: live motorway traffic and roadworks, trains and buses, parking, charging, fuel and weather in your AI assistant - MCP, no API key, no sign-up. stdio bridge to the hosted ViaFrei MCP server.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -74,7 +74,7 @@
74
74
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true});require('node:fs').rmSync('.test-build',{recursive:true,force:true})\"",
75
75
  "test": "npm run build && tsc -p tsconfig.test.json && node --test --test-timeout=30000 .test-build/test/*.test.js",
76
76
  "test:gate": "node scripts/check-tarball.test.mjs",
77
- "test:leaks": "node scripts/check-leaks.test.mjs",
77
+ "test:leaks": "node scripts/check-leaks.test.mjs && node scripts/person-names.test.mjs",
78
78
  "test:tools": "node scripts/tools.test.mjs",
79
79
  "test:docs": "node scripts/gen-api-doc.test.mjs",
80
80
  "test:versions": "node scripts/check-versions.test.mjs",
@@ -95,9 +95,16 @@
95
95
  "propose:release": "node scripts/propose-release.mjs",
96
96
  "test:propose": "node scripts/propose-release.test.mjs",
97
97
  "test:auto-release": "node scripts/auto-release.test.mjs",
98
+ "test:parity": "node scripts/parity-mcp.test.mjs",
99
+ "test:parity-attribute": "node scripts/parity-attribute.test.mjs",
98
100
  "test:verify": "node scripts/verify-published.test.mjs",
99
101
  "test:verify-smithery": "node scripts/verify-smithery.test.mjs",
100
102
  "test:release-notes": "node scripts/release-notes.test.mjs",
103
+ "test:snyk": "node scripts/snyk-workflow.test.mjs",
104
+ "test:mutation-wiring": "node scripts/mutation-workflow.test.mjs",
105
+ "check:timeouts": "node scripts/check-timeouts.mjs",
106
+ "test:timeouts": "node scripts/check-timeouts.test.mjs",
107
+ "test:image": "node scripts/image-workflow.test.mjs",
101
108
  "rules:show": "node scripts/show-rules.mjs"
102
109
  },
103
110
  "dependencies": {