viafrei 0.0.2 → 1.3.12
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/CHANGELOG.md +271 -0
- package/LICENSE +218 -0
- package/NOTICE +32 -0
- package/README.md +199 -1
- package/SOURCES.md +454 -0
- package/dist/bridge.d.ts +23 -0
- package/dist/bridge.js +242 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +113 -0
- package/dist/config.d.ts +59 -0
- package/dist/config.js +177 -0
- package/dist/failure.d.ts +61 -0
- package/dist/failure.js +186 -0
- package/dist/fetch.d.ts +24 -0
- package/dist/fetch.js +120 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.js +23 -0
- package/package.json +64 -5
- package/index.js +0 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package are documented here. The format follows Keep
|
|
4
|
+
a Changelog and the versions follow Semantic Versioning.
|
|
5
|
+
|
|
6
|
+
## [1.3.12] - 2026-09-23
|
|
7
|
+
|
|
8
|
+
The bridge's code is unchanged since 0.0.9. This release replaces 1.3.10,
|
|
9
|
+
which was published and then withdrawn from npm.
|
|
10
|
+
|
|
11
|
+
**Why 1.3.12.** npm never lets a version number be used twice, even after an
|
|
12
|
+
unpublish, so 1.3.10 cannot come back. This release is numbered 1.3.12, and
|
|
13
|
+
1.3.11 is not used by this package. Everything 1.3.10 described below still
|
|
14
|
+
applies to this release: the same code, the same README.
|
|
15
|
+
|
|
16
|
+
**If you pinned 1.3.10,** move the pin to 1.3.12. Anyone who used `npx -y viafrei`
|
|
17
|
+
without a version got 0.0.9 while 1.3.10 was withdrawn, and gets 1.3.12 from now
|
|
18
|
+
on. Nothing about the connection changes: all three versions relay to the same
|
|
19
|
+
endpoint in the same way.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **The version is 1.3.12.** No other change to the published files.
|
|
24
|
+
|
|
25
|
+
## [1.3.10] - 2026-09-23 [YANKED]
|
|
26
|
+
|
|
27
|
+
The bridge's code is unchanged since 0.0.9; this release exists so that its
|
|
28
|
+
number matches the endpoint it connects to again.
|
|
29
|
+
|
|
30
|
+
**Why 1.3.10, straight from 0.0.9.** The bridge tracks the platform, and the
|
|
31
|
+
hosted endpoint now reports `serverInfo.version` 1.3.10. The platform moved
|
|
32
|
+
through 0.1.x and 1.x without the bridge needing to change, so no bridge was
|
|
33
|
+
published for those numbers, and none will be: a version is only cut when
|
|
34
|
+
there is something to install. The versions in between are not skipped
|
|
35
|
+
releases of this package; they never existed here.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **The README says which clients need this package, and which do not.** The
|
|
40
|
+
server now also answers the older HTTP+SSE transport at
|
|
41
|
+
`https://mcp.viafrei.de/sse`, so a client that speaks only HTTP+SSE can connect
|
|
42
|
+
directly. The bridge is for stdio-only clients and nobody else, and the page
|
|
43
|
+
now says so instead of "most clients".
|
|
44
|
+
|
|
45
|
+
## [0.0.9] - 2026-09-21
|
|
46
|
+
|
|
47
|
+
The first release with code in it.
|
|
48
|
+
|
|
49
|
+
`viafrei@0.0.2` on the registry is a three-file placeholder published to reserve
|
|
50
|
+
the name; no code was ever shipped under it. npm versions are immutable, so the
|
|
51
|
+
first release that ships anything is this one.
|
|
52
|
+
|
|
53
|
+
**Why 0.0.9 and not 0.1.0.** This package is the client end of a hosted service,
|
|
54
|
+
and a version that does not say which service it was built against is a version
|
|
55
|
+
you have to look up. So the bridge tracks the platform: 0.0.9 is what the hosted
|
|
56
|
+
endpoint runs today. Nothing was ever published as 0.1.0 and no tag was ever cut
|
|
57
|
+
for it, so the number is free; the bridge will use it when the platform does.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- **The publish pipeline no longer depends on the calendar.** It installed
|
|
62
|
+
`npm@latest` before publishing, so the version of npm that built and uploaded
|
|
63
|
+
a release was whichever one npm had shipped most recently. npm 12 became
|
|
64
|
+
`latest`, changed `npm pack --json` from an array to an object keyed by
|
|
65
|
+
package name — a deliberate change, announced in npm's own source before it
|
|
66
|
+
landed — and the job broke with no commit here. The npm is pinned now
|
|
67
|
+
(`NPM_VERSION` in the publish workflow), the install is asserted rather than
|
|
68
|
+
assumed, and both shapes are read by one file, `scripts/npm-pack-json.mjs`,
|
|
69
|
+
which every caller goes through: the gate, its self-test, and the workflow
|
|
70
|
+
step that packs the tarball all used to parse that output by hand, three
|
|
71
|
+
copies of an assumption about a format none of them owns. A shape the reader
|
|
72
|
+
does not know is one sentence naming the npm version and pointing at the pin
|
|
73
|
+
— not a `TypeError` with a stack trace of absolute paths in a public log,
|
|
74
|
+
which is what the self-test did, and not the wrong exit code, which the gate
|
|
75
|
+
contract already forbids. The reader's cases are fixtures, so they hold under
|
|
76
|
+
an npm nobody has installed yet.
|
|
77
|
+
|
|
78
|
+
- **`npx viafrei` started nothing.** The check for "was this file the program,
|
|
79
|
+
or was it imported" compared `process.argv[1]` with `import.meta.url` without
|
|
80
|
+
resolving symlinks. npm installs a `bin` as a symlink and every client starts
|
|
81
|
+
the package through it, so `argv[1]` was the link while Node had already
|
|
82
|
+
resolved the module's own URL to the target: the two never matched, the
|
|
83
|
+
process loaded the file, ran nothing and exited **0 with no output**, which
|
|
84
|
+
reads as a bridge that started and closed rather than as a failure. The entry
|
|
85
|
+
point is now compared both as given and resolved, so it holds under
|
|
86
|
+
`--preserve-symlinks-main` too. Found by installing the packed tarball into an
|
|
87
|
+
empty directory and running the installed command - the whole test suite
|
|
88
|
+
spawned the built file by its real path, which is the one way nobody starts
|
|
89
|
+
it, so 50 passing tests said nothing about the only invocation that exists.
|
|
90
|
+
The regression test spawns through a symlink and fails against the old check.
|
|
91
|
+
|
|
92
|
+
- **The unreachable-endpoint line advised something that does not exist.** It
|
|
93
|
+
ended "check the URL, or pass `--url` for a different endpoint", which reads
|
|
94
|
+
as though another ViaFrei could be reached at another address. There is one,
|
|
95
|
+
it is hosted, and `--url` is for a proxy in front of it. The line now says to
|
|
96
|
+
check the network connection, and names `--url` only for the proxy case.
|
|
97
|
+
|
|
98
|
+
### Added
|
|
99
|
+
|
|
100
|
+
- **The bridge.** `npx viafrei` opens an MCP server on stdio and relays every
|
|
101
|
+
JSON-RPC message to a Streamable-HTTP MCP endpoint - requests, responses,
|
|
102
|
+
notifications and progress, in both directions, unchanged. It is a message
|
|
103
|
+
relay rather than a client/server pair, so a tool added on the server works
|
|
104
|
+
through it the same day without a release here.
|
|
105
|
+
- **Configuration.** `--url` / `VIAFREI_MCP_URL` for the endpoint (a proxy in
|
|
106
|
+
front of the service, or the test suite's stub - the server itself is hosted
|
|
107
|
+
and cannot be run yourself), `--header` for a future API key, `--timeout` /
|
|
108
|
+
`VIAFREI_MCP_TIMEOUT_MS`, `--version`, `--help`. No telemetry, no analytics,
|
|
109
|
+
and no file written outside the OS temp directory.
|
|
110
|
+
- **Honest failure.** An unreachable or refusing endpoint prints one line naming
|
|
111
|
+
the URL and the status and exits with a code that says which
|
|
112
|
+
(`3` unreachable, `4` the endpoint answered and this cannot continue,
|
|
113
|
+
`5` protocol mismatch, `2` bad usage, `1` anything else) - never a stack
|
|
114
|
+
trace. A protocol mismatch says which version the server speaks; an endpoint
|
|
115
|
+
that answers with something that is not MCP is told apart from one that
|
|
116
|
+
refuses; a session the server has forgotten ends the process instead of being
|
|
117
|
+
warned about for ever; and several failures in a row with nothing succeeding
|
|
118
|
+
in between end it too, so a client never keeps a bridge that cannot relay.
|
|
119
|
+
- **Headers stay on the origin you chose.** Redirects are resolved by the bridge
|
|
120
|
+
rather than by `fetch`: same-origin hops are followed with the headers,
|
|
121
|
+
cross-origin redirects are refused with one line naming both ends. `fetch`
|
|
122
|
+
drops `Authorization` across origins and nothing else, so an API key sent as
|
|
123
|
+
`X-Api-Key` would otherwise have travelled wherever the server pointed.
|
|
124
|
+
- **Offline test suite.** Every test runs against a stub MCP server the test
|
|
125
|
+
starts itself; nothing contacts the public endpoint or any provider.
|
|
126
|
+
- **A publish-hygiene gate that runs in CI**, against the built tarball rather
|
|
127
|
+
than the source tree - five checks: the tarball is the package and only the
|
|
128
|
+
package; no embedded sources; no platform content; **no lifecycle script in
|
|
129
|
+
the published manifest** (npm runs those by itself on every machine that
|
|
130
|
+
installs the package - ours included, so there is no `prepack` here); and
|
|
131
|
+
**every dependency judged by what it resolves to**, not by its name, because a
|
|
132
|
+
git URL under an innocent name is still a git URL. The scan decodes base64,
|
|
133
|
+
hex, percent-encoding, JavaScript escapes and concatenated string literals,
|
|
134
|
+
and prints what it still cannot see on every run - computed from the
|
|
135
|
+
thresholds the decoders actually use, so it cannot claim a coverage the code
|
|
136
|
+
does not have. Its self-test builds one poisoned tarball per rule the gate
|
|
137
|
+
reads - every lifecycle script, every forbidden file name, every required
|
|
138
|
+
file, every pattern, every number, every encoding at every alignment - plus
|
|
139
|
+
one mutated ruleset per refusal the rules can produce, run against BOTH legs
|
|
140
|
+
with a clean control each. It asserts that every case it planned actually ran,
|
|
141
|
+
and refuses when a rule list it derives cases from is empty.
|
|
142
|
+
- **A repository leak sweep** over the working tree and the history, with **no
|
|
143
|
+
file skipped**, which refuses (exit 2) rather than passing when there is
|
|
144
|
+
nothing to read: no tracked files, no commits, no blobs, an empty ruleset, or
|
|
145
|
+
a rule whose window can no longer match what it is for. The names it looks for
|
|
146
|
+
are salted hashes rather than text, so the rules file carries no secret and
|
|
147
|
+
needs no exemption - the previous arrangement published the list it was
|
|
148
|
+
protecting and then skipped the file it was in. A name is looked for across
|
|
149
|
+
every separator, at camel-case boundaries, inside an unbroken run of letters
|
|
150
|
+
and digits, and in the file path as well as in the contents. Findings print a
|
|
151
|
+
hash prefix, a length and a location, never the value - a host, a dependency
|
|
152
|
+
spec and a path included, and in the findings themselves rather than only in
|
|
153
|
+
the listing above them: every location a finding carries is built in one
|
|
154
|
+
place, so there is no second printing site to remember. The self-test asserts
|
|
155
|
+
the absence as well as the presence - a case that catches what it was given
|
|
156
|
+
and prints it while doing so fails.
|
|
157
|
+
- **Two rules now govern what may go on the private-name list, and they are in
|
|
158
|
+
`scripts/rules.json` next to the list rather than in a review thread.** They
|
|
159
|
+
fail in opposite directions. An entry must not be a substring of text this
|
|
160
|
+
repository legitimately prints, because such an entry can never be satisfied
|
|
161
|
+
and the only ways out are deleting it or weakening the scanner. And nothing
|
|
162
|
+
whose harm *is* the confirmation of a guess may ever be added - a credential,
|
|
163
|
+
a key or token, a password, a session, subscription or contract identifier, a
|
|
164
|
+
certificate serial, a hostname that grants access, personal data - because
|
|
165
|
+
the list is public and it answers questions. A table name confirmed is a fact
|
|
166
|
+
about a schema a stranger cannot reach; an identifier confirmed *is* the
|
|
167
|
+
identifier. Nothing on the list is from that class, checked rather than
|
|
168
|
+
assumed.
|
|
169
|
+
- **What the hashes do is now a measured number rather than an impression.**
|
|
170
|
+
A wordlist built from the platform's own files recovers **all** of them; a
|
|
171
|
+
wordlist of ordinary English and technical vocabulary recovers **none** over
|
|
172
|
+
236,132 candidates. The file used to say "most of them", which understated
|
|
173
|
+
the property the arrangement depends on. The hashing is a lint aid, not a
|
|
174
|
+
store, and that sentence is now at the two places where somebody is told how
|
|
175
|
+
to add an entry, rather than four paragraphs away in the rationale.
|
|
176
|
+
- **Two entries changed under the first of those rules**: one removed (8
|
|
177
|
+
characters) and one replaced (7 characters out, 10 in), with the rule, the
|
|
178
|
+
lengths and the declared narrowing recorded and nothing else. A name of
|
|
179
|
+
several segments is stored **glued** from now on: the scanner offers every
|
|
180
|
+
window both glued and underscore-joined, so the glued form is found in all
|
|
181
|
+
ten placements measured - including inside a run of letters with no boundary
|
|
182
|
+
in it, the shape a name takes in a minified bundle - while the
|
|
183
|
+
underscore-joined form is found in nine. `blindSpots()` said "with none at
|
|
184
|
+
all" while the entry was stored the other way, and a check that overstates
|
|
185
|
+
its own coverage is worse than one that understates it; it now states the
|
|
186
|
+
condition it actually depends on.
|
|
187
|
+
- **The worked example for that spelling rule can now be reproduced.** The pair
|
|
188
|
+
it used was shorter than `minTokenLength`, so a reader who tried it literally
|
|
189
|
+
matched nothing and concluded the rule was broken - and it is printed on every
|
|
190
|
+
run, in four places. Both spellings of the replacement are inside the declared
|
|
191
|
+
window. `_tokenLength` now says what those two numbers are: **the scanner's
|
|
192
|
+
bounds, not a description of the entries, and not to be adjusted to fit them.**
|
|
193
|
+
The decoders size themselves from the lower bound, so trimming the range to
|
|
194
|
+
match whatever is on the list would stop shorter encoded forms from being
|
|
195
|
+
looked at *and* sharpen a published range, in one edit that would feel like
|
|
196
|
+
housekeeping. An entry outside the window means widening the window.
|
|
197
|
+
- **Earlier wordings of those notes, in this file and in `scripts/rules.json`,
|
|
198
|
+
said what the changed entries were *about*.** Together those descriptions
|
|
199
|
+
narrowed the guess for a live entry further than the hashes do, which is the
|
|
200
|
+
caption failure the numbers list refuses on the facing page. The wording is
|
|
201
|
+
corrected going forward and no more than that is claimed: the earlier text is
|
|
202
|
+
in this repository's history and in the pull request that carried it, and
|
|
203
|
+
editing a published file does not unpublish it - the same reasoning
|
|
204
|
+
`CONTRIBUTING.md` gives for not squash-merging. The rule from here on is to
|
|
205
|
+
record the rule, the lengths and the narrowing, and never the subject.
|
|
206
|
+
- **Two more module-scope ruleset loads are guarded.** The gate's self-test and
|
|
207
|
+
the rule printer both died with an uncaught exception on a malformed or
|
|
208
|
+
missing `rules.json` - the self-test with exit 1 where its own header defines
|
|
209
|
+
2. Each leg loads the file for itself, so one guard cannot cover another.
|
|
210
|
+
- **The publish gate cannot die of its own ruleset any more.** Loading
|
|
211
|
+
`rules.json` ran outside every guard, so an unreadable or malformed file
|
|
212
|
+
killed the gate with an uncaught exception - exit 1, the code that means
|
|
213
|
+
*findings*, and a stack trace carrying absolute paths - for a condition its
|
|
214
|
+
own contract defines as exit 2. It now refuses like the sweep does, and a
|
|
215
|
+
ruleset file that is not JSON is a case in the self-test on all three legs.
|
|
216
|
+
- **The tarball that is checked is the tarball that is published.** The publish
|
|
217
|
+
workflow packed once for the gate and again for `npm publish`; it now packs
|
|
218
|
+
once and hands that exact file to both.
|
|
219
|
+
- **The endpoint check in CI fails when it reads nothing.** It grepped `test/`
|
|
220
|
+
and passed on no hits, so an empty or renamed directory reported success; it
|
|
221
|
+
now asserts that the one legitimate occurrence is there before judging it.
|
|
222
|
+
- **[SOURCES.md](SOURCES.md) - where every answer comes from**, and it ships in
|
|
223
|
+
the tarball beside NOTICE rather than living only on the web page. One entry
|
|
224
|
+
per source: who publishes it, what it covers, the publisher's own rhythm, the
|
|
225
|
+
licence with the operative sentence quoted and the date it was read, and the
|
|
226
|
+
**exact attribution line** a recipient has to reproduce. Two obligations that
|
|
227
|
+
bind the *reader* are stated before the catalogue rather than linked from it:
|
|
228
|
+
MTS-K fuel prices are consumer information only and may not be redistributed
|
|
229
|
+
in any form, aggregates included, and DELFI public-transport realtime is
|
|
230
|
+
CC BY-SA 4.0, so anything derived from it stays share-alike. The page says
|
|
231
|
+
which sources do **not** answer today - fuel coverage is a watch list and not
|
|
232
|
+
the country, station lift and escalator status is not available on the public
|
|
233
|
+
service yet - and it names the three cases where a publisher's terms are
|
|
234
|
+
unknown or unreadable instead of rounding them up to "open data".
|
|
235
|
+
- **The leak sweep now distinguishes a data provider from the platform, in
|
|
236
|
+
writing.** It did not before, and the distinction was carried by the
|
|
237
|
+
private-name list rather than by a rule: the sweep refused the page above,
|
|
238
|
+
in eleven places in it and one in the rules file itself. **Two entries were
|
|
239
|
+
removed under the first list rule** (10 and 12 characters), and **the two had
|
|
240
|
+
different reasons**, which is worth separating because the stronger one does
|
|
241
|
+
not cover both. The 12-character spelling is **compelled**: a licence
|
|
242
|
+
requires that source to be named by a link, and the link's host contains it.
|
|
243
|
+
The 10-character one is not compelled by any licence - the attribution
|
|
244
|
+
conditions require the creator, the notices and a supplied URI, and none of
|
|
245
|
+
them requires naming an intermediary - it is simply a spelling **our own
|
|
246
|
+
server already broadcasts** in the attribution line it hands to every user
|
|
247
|
+
who receives such an answer, so a page that quotes that line cannot avoid it
|
|
248
|
+
and the rule could be satisfied only by never writing the page. The
|
|
249
|
+
alternative was real and was not taken: the server's own line could have been
|
|
250
|
+
narrowed so it never named the intermediary. It was not, because that line is
|
|
251
|
+
the server's to decide rather than a lint rule's, and because naming the route
|
|
252
|
+
data reached us by is provenance a reader checking a claim uses. That is a
|
|
253
|
+
product decision, and it is recorded as one rather than as law. Rule 2 was
|
|
254
|
+
applied to both before they went - neither is a credential, an identifier or a
|
|
255
|
+
host that grants access. What replaces them is a boundary between a **name**
|
|
256
|
+
and a **route**: a publisher or an intermediary may be named wherever the
|
|
257
|
+
server's own public attribution names it, while a fetch endpoint, an API path,
|
|
258
|
+
a per-offer deep link or a subscription identifier may not appear at all -
|
|
259
|
+
which is why the access point is named in words and its host is on no
|
|
260
|
+
allow-list. The host allow-list gains a second group on the same test: the
|
|
261
|
+
page that publishes a source's terms, the licence text it invokes, or a URL a
|
|
262
|
+
licence compels us to print, and nothing that merely looks relevant.
|
|
263
|
+
- **Merged with a merge commit, never a squash**, and
|
|
264
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) says why at length: the history sweep's
|
|
265
|
+
accepted residue is keyed by blob, those blobs live only in intermediate
|
|
266
|
+
commits, and a squash makes them unreachable from `main` - which would turn
|
|
267
|
+
the check red on `main` for everybody, for something no contributor did.
|
|
268
|
+
|
|
269
|
+
[1.3.12]: https://github.com/mavrovde/viafrei-bridge/releases/tag/v1.3.12
|
|
270
|
+
[1.3.10]: https://github.com/mavrovde/viafrei-bridge/releases/tag/v1.3.10
|
|
271
|
+
[0.0.9]: https://github.com/mavrovde/viafrei-bridge/releases/tag/v0.0.9
|
package/LICENSE
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 ViaFrei
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
-------------------------------------------------------------------------------
|
|
206
|
+
ADDENDUM — what this licence does not cover
|
|
207
|
+
|
|
208
|
+
The Apache License above covers THIS CODE ONLY: the stdio-to-Streamable-HTTP
|
|
209
|
+
bridge in this repository.
|
|
210
|
+
|
|
211
|
+
Data obtained through the ViaFrei MCP server keeps its own provider licence and
|
|
212
|
+
is not relicensed by anything here. Several of those licences are share-alike
|
|
213
|
+
(DELFI public-transport data is CC BY-SA 4.0) or purpose-limited (MTS-K fuel
|
|
214
|
+
prices are consumer information only, with no redistribution in any form,
|
|
215
|
+
aggregates included).
|
|
216
|
+
|
|
217
|
+
Each tool result carries its own attribution line, and the full register is
|
|
218
|
+
published by the server at the resource `viafrei://attribution`. See NOTICE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
ViaFrei bridge
|
|
2
|
+
Copyright 2026 ViaFrei
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
THE LICENCE ABOVE COVERS THIS CODE ONLY.
|
|
7
|
+
|
|
8
|
+
Data obtained *through* the ViaFrei MCP server is not ours to relicense and
|
|
9
|
+
keeps its provider's own terms. Those terms travel with the answer, not with
|
|
10
|
+
this package, and several of them are share-alike or purpose-limited. In
|
|
11
|
+
particular:
|
|
12
|
+
|
|
13
|
+
- DELFI public-transport data is CC BY-SA 4.0. Share-alike: anything derived
|
|
14
|
+
from it inherits the obligation, and it must not be blended into a result
|
|
15
|
+
carrying a different licence.
|
|
16
|
+
- MTS-K fuel prices (Tankerkönig) are consumer information only. No
|
|
17
|
+
redistribution in any form, aggregates and derived tables included.
|
|
18
|
+
- Address results are derived from OpenStreetMap under the ODbL 1.0. The
|
|
19
|
+
share-alike is on the database rather than on the sentence, and our offer
|
|
20
|
+
under section 4.6 stands: ask and you get the extract and our alterations
|
|
21
|
+
to it under the same licence.
|
|
22
|
+
- Autobahn GmbH, BKG, DWD, Deutsche Bahn, GeoNames and the AFIR charging
|
|
23
|
+
feeds each carry their own licence and attribution string.
|
|
24
|
+
|
|
25
|
+
Every tool result from the server carries its own attribution line, and the
|
|
26
|
+
server exposes the full register at the resource `viafrei://attribution`. Show
|
|
27
|
+
the attribution line to the person reading the answer. If you are building on
|
|
28
|
+
top of this bridge, read that resource before you decide what you may do with
|
|
29
|
+
what comes back.
|
|
30
|
+
|
|
31
|
+
SOURCES.md in this package lists every source, its publisher, its licence and
|
|
32
|
+
the attribution line it requires, in full.
|