@ractive-ch/tab-mcp-client 0.18.1 → 0.19.0-rc.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.
- package/CHANGELOG.md +160 -0
- package/README.md +348 -68
- package/allowed.d.ts +2 -2
- package/allowed.js.map +1 -1
- package/always-allowed.d.ts +15 -15
- package/cdn/allowed.min.js +2 -2
- package/cdn/allowed.min.js.map +2 -2
- package/cdn/confirm-ba3dkf9p.min.js +4 -0
- package/cdn/confirm-ba3dkf9p.min.js.map +10 -0
- package/cdn/connect-my0pbqd7.min.js +6 -0
- package/cdn/connect-my0pbqd7.min.js.map +12 -0
- package/cdn/connection-yf2x9zz2.min.js +17 -0
- package/cdn/{connection-0xqwz17v.min.js.map → connection-yf2x9zz2.min.js.map} +5 -5
- package/cdn/strings.min.js +4 -0
- package/cdn/strings.min.js.map +9 -0
- package/cdn/{tab-mcp-client-2vx9mcww.min.js → tab-mcp-client-8r6h3wza.min.js} +9 -8
- package/cdn/tab-mcp-client-8r6h3wza.min.js.map +11 -0
- package/cdn/tab-mcp-client-nnxcwrxp.min.js +5 -0
- package/cdn/tab-mcp-client-nnxcwrxp.min.js.map +11 -0
- package/cdn/{tab-mcp-client-5j3brdf3.min.js → tab-mcp-client-q758jr4g.min.js} +4 -4
- package/cdn/tab-mcp-client-q758jr4g.min.js.map +10 -0
- package/cdn/tab-mcp-client.min.js +3 -3
- package/cdn/tab-mcp-client.min.js.map +4 -4
- package/cdn/webmcp-84k58gsw.min.js +4 -0
- package/cdn/webmcp-84k58gsw.min.js.map +11 -0
- package/{confirm-bqfdrx3f.js → confirm-hymzwx3b.js} +7 -5
- package/confirm-hymzwx3b.js.map +10 -0
- package/confirm.d.ts +2 -2
- package/{connect-ztsgybpq.js → connect-fhtjdmf3.js} +75 -37
- package/connect-fhtjdmf3.js.map +10 -0
- package/connect.d.ts +7 -6
- package/{connection-gang7f5x.js → connection-73fbg99k.js} +70 -8
- package/connection-73fbg99k.js.map +16 -0
- package/connection.d.ts +23 -2
- package/dialog.d.ts +19 -9
- package/extension.d.ts +347 -0
- package/extension.js +394 -0
- package/extension.js.map +10 -0
- package/handshake.d.ts +82 -0
- package/index-00p8b969.js +221 -0
- package/index-00p8b969.js.map +11 -0
- package/index-1tssct09.js +58 -0
- package/index-1tssct09.js.map +11 -0
- package/{index-c1c266tm.js → index-7qqhn3zv.js} +28 -110
- package/index-7qqhn3zv.js.map +10 -0
- package/index-s31xrfa2.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +59 -64
- package/index.js.map +4 -4
- package/internal.d.ts +2 -0
- package/mcp.d.ts +5 -3
- package/package.json +11 -2
- package/protocol.d.ts +11 -1
- package/react.d.ts +11 -4
- package/react.js +57 -10
- package/react.js.map +5 -4
- package/secret.d.ts +1 -1
- package/setup.d.ts +4 -1
- package/setup.js +3 -2
- package/setup.js.map +1 -1
- package/strings.d.ts +149 -28
- package/strings.js +13 -0
- package/strings.js.map +9 -0
- package/tab-mcp.d.ts +30 -7
- package/text.d.ts +39 -0
- package/types.d.ts +76 -17
- package/webmcp-d2ec3v3g.js +221 -0
- package/webmcp-d2ec3v3g.js.map +11 -0
- package/webmcp.d.ts +17 -4
- package/cdn/confirm-d722a9eb.min.js +0 -4
- package/cdn/confirm-d722a9eb.min.js.map +0 -10
- package/cdn/connect-x6ws6wqt.min.js +0 -6
- package/cdn/connect-x6ws6wqt.min.js.map +0 -12
- package/cdn/connection-0xqwz17v.min.js +0 -17
- package/cdn/tab-mcp-client-2vx9mcww.min.js.map +0 -12
- package/cdn/tab-mcp-client-5j3brdf3.min.js.map +0 -10
- package/cdn/webmcp-khy4f5rj.min.js +0 -4
- package/cdn/webmcp-khy4f5rj.min.js.map +0 -10
- package/confirm-bqfdrx3f.js.map +0 -10
- package/connect-ztsgybpq.js.map +0 -10
- package/connection-gang7f5x.js.map +0 -16
- package/index-5jyqehpk.js +0 -63
- package/index-5jyqehpk.js.map +0 -11
- package/index-c1c266tm.js.map +0 -11
- package/webmcp-zq1enyz0.js +0 -57
- package/webmcp-zq1enyz0.js.map +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,165 @@ the Git tag `client-v<version>`. The format follows
|
|
|
6
6
|
[Semantic Versioning](https://semver.org/). The relay has its own
|
|
7
7
|
[changelog](https://github.com/ractive/tab-mcp/blob/main/packages/tab-mcp/CHANGELOG.md).
|
|
8
8
|
|
|
9
|
+
## [0.19.0-rc.1][client-0.19.0-rc.1] - 2026-11-21
|
|
10
|
+
|
|
11
|
+
### Breaking
|
|
12
|
+
|
|
13
|
+
**`newAddress()` is `disconnectAll()`** (DEC-201): since 0.17 the address names the app
|
|
14
|
+
and never changes; the method disconnects every AI app and makes a new secret, as the
|
|
15
|
+
dialogs' "Disconnect all apps" says. Every name that went with it is renamed, with no
|
|
16
|
+
alias. Search your code for the old names:
|
|
17
|
+
|
|
18
|
+
| Old | New |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `TabMcp.newAddress()` | `TabMcp.disconnectAll()` |
|
|
21
|
+
| `addressChanged` (on a rejection of it) | `secretChanged` |
|
|
22
|
+
| `DisconnectReason` `"new_address"` (`statechange` `reason`) | `"disconnect_all"` |
|
|
23
|
+
| `ui.strings.newAddress` | `ui.strings.disconnectAll` |
|
|
24
|
+
| `ui.strings.newAddressNote` | `ui.strings.disconnectAllNote` |
|
|
25
|
+
| `ui.strings.newAddressQuestionOne`, `ui.strings.newAddressQuestionMany` | `ui.strings.disconnectAllQuestion` (plural forms, see "Changed") |
|
|
26
|
+
| `ui.strings.newAddressConfirm` | `ui.strings.disconnectAllConfirm` |
|
|
27
|
+
| `ui.strings.gettingNewAddress` | `ui.strings.disconnectingAll` |
|
|
28
|
+
| `ui.strings.newAddressDone` | `ui.strings.disconnectAllDone` |
|
|
29
|
+
| CSS class `tab-mcp-new-address` (the dialog's and the takeover notice's button) | `tab-mcp-disconnect-all` |
|
|
30
|
+
| CSS class `tab-mcp-new-address-row` | `tab-mcp-disconnect-all-row` |
|
|
31
|
+
| CSS class `tab-mcp-new-address-question` | `tab-mcp-disconnect-all-question` |
|
|
32
|
+
| CSS class `tab-mcp-new-address-confirm` | `tab-mcp-disconnect-all-confirm` |
|
|
33
|
+
|
|
34
|
+
What the method does is unchanged, and so is the protocol (`hello.revokeAll`,
|
|
35
|
+
`grants.revokeAll`). A page's own texts under an old key are no longer used, as any
|
|
36
|
+
unknown key.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **Translated texts in one step** (DEC-208): `ui.strings` is the one table for every
|
|
41
|
+
text the library shows a person, given once on `TabMcp` (or `<TabMcpProvider>`): the
|
|
42
|
+
dialogs, their setup steps and now also `ConnectButton` of `./react`. Partial tables
|
|
43
|
+
keep English for every missing key. New entry **`@ractive-ch/tab-mcp-client/strings`**
|
|
44
|
+
(and `cdn/strings.min.js`): `STRINGS`, the English table, typed, so a translation
|
|
45
|
+
typed as `DialogStrings` names every key it lacks or misspells in the type check;
|
|
46
|
+
`pickStrings(tables, languages?)`, which loads the page's own table for the user's
|
|
47
|
+
languages (`navigator.languages`: the same tag, else the same script, region or the
|
|
48
|
+
language alone), English when they prefer it or nothing matches, and never rejects (a
|
|
49
|
+
table that does not load gives English, with a warning);
|
|
50
|
+
`withEnglish(strings)`, the full table for a page's own UI; the type `PluralText`.
|
|
51
|
+
`setupInstructions(serverName, address, strings?)` takes the table too. New keys:
|
|
52
|
+
`allowEverythingUntilReloadNote`, `setupClaudeApp`, `setupClaude`, `setupChatGpt`,
|
|
53
|
+
`setupRun`, `setupClaudeCode`, `setupClaudeCodeNote`, `setupCodex`, `setupCodexNote`,
|
|
54
|
+
`buttonReconnecting`, `buttonConnected`. A table with texts but no `lang` counts as
|
|
55
|
+
English and the console says so once. See [Translating](README.md#translating). The
|
|
56
|
+
core grows by 10 bytes gzipped (6270 B). The React entry keeps `ConnectButton`'s few
|
|
57
|
+
English texts inline and does not load the table: what a React page loads first grows
|
|
58
|
+
by about 0.5 KB gzipped (13.2 KB, 13.0 KB before), the entry itself to 3.1 KB.
|
|
59
|
+
- **The page and the tab-mcp browser extension know of each other** (`webmcp: true`,
|
|
60
|
+
DEC-207): a plain handshake over DOM events (`tab-mcp-page`, `tab-mcp-extension`) with
|
|
61
|
+
the extension from its next release.
|
|
62
|
+
- **No second question.** Right before the extension runs a tool that the user
|
|
63
|
+
allowed there (asked, or its "Always allow"), it vouches for that call: the tool,
|
|
64
|
+
the exact arguments and the AI app. The next WebMCP call of that tool with equal
|
|
65
|
+
arguments within 2 seconds runs without the page's question and without
|
|
66
|
+
`onConfirm`; a vouch is used once, and any other call is asked as before. A vouch
|
|
67
|
+
the extension withdraws (its call ended, or never reached the page) is dropped.
|
|
68
|
+
- **`trustExtension: false`** keeps asking every WebMCP call (a site that insists on
|
|
69
|
+
its own question).
|
|
70
|
+
- **`extension` and the event `extensionchange`** (also in the React snapshot): while
|
|
71
|
+
the extension serves the page, `{ name, version, apps, whileInFront }`, with the AI
|
|
72
|
+
apps connected through it (`name`, `host`); `undefined` otherwise.
|
|
73
|
+
- **A vouched call's caller** is `{ kind: "webmcp", via: "tab-mcp-extension", name,
|
|
74
|
+
host }` in `execute`, `toolcall` and `toolcallend` (`WebMcpClient` has the new
|
|
75
|
+
optional fields).
|
|
76
|
+
- The connect dialog says first which AI apps are connected through the extension
|
|
77
|
+
("… while this tab is in front."), texts `viaExtension` and `viaExtensionInFront`
|
|
78
|
+
(plural forms); the rest stays.
|
|
79
|
+
- The page tells the extension the library's version, the app id and the AI apps
|
|
80
|
+
connected to it directly (at most 64), and marks `<html data-tab-mcp-handshake>`.
|
|
81
|
+
- In the WebMCP mirror's chunk: the core grows by 9 bytes gzipped.
|
|
82
|
+
- **`pairingUntil` and the event `pairinguntil`** (identity binding, DEC-202): until when
|
|
83
|
+
a sign-in pairs the page (an ISO time on the page's clock: the `expiresInMs` of the
|
|
84
|
+
relay's new `pairing.open`, counted from its arrival, so a page clock that differs
|
|
85
|
+
from the relay's does not matter). Also in the React bindings' snapshot. `undefined`
|
|
86
|
+
while pairing is off, from each `startPairing()` until the relay answers, after the
|
|
87
|
+
session ended (`disconnect()`, `disconnectAll()`, a refusal), and with relays up to
|
|
88
|
+
0.12.1, which do not send it.
|
|
89
|
+
- Dialog texts `signInUntil`, `signInTimeUp` and `continuePairing`.
|
|
90
|
+
- **`@ractive-ch/tab-mcp-client/extension`** (DEC-206): for a browser extension that is a
|
|
91
|
+
tab-mcp page itself, filling in its own pairing code on the relay's pairing page after
|
|
92
|
+
asking its user, as the tab-mcp browser extension does (DEC-203). The content script's
|
|
93
|
+
part (`runPairingPage`), the worker's rules as one state machine (`CodeFiller`: the
|
|
94
|
+
origin check, one question per page load, the one more fill for the same tab and
|
|
95
|
+
request, what withdraws a question), which code to fill in (`takeCode`,
|
|
96
|
+
`pairingCodes`), the relay's patterns and the messages. The extension supplies how its
|
|
97
|
+
user is asked, its setting, the permission prompt and the content script's
|
|
98
|
+
registration. An entry of its own, out of the core, with no `chrome` types; a content
|
|
99
|
+
script bundles less than 1 KB gzipped of it. See
|
|
100
|
+
[For browser extensions](README.md#for-browser-extensions).
|
|
101
|
+
|
|
102
|
+
### Changed
|
|
103
|
+
|
|
104
|
+
- **Texts: English only, plural forms and lists by `Intl`** (DEC-208). The package
|
|
105
|
+
ships English only. The keys that made grammar by hand are gone, with no alias: a
|
|
106
|
+
page's own text under an old key is no longer used, as any unknown key.
|
|
107
|
+
|
|
108
|
+
| Old | New |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `ui.strings.and` | none: lists are joined by `Intl.ListFormat` in the texts' `lang` |
|
|
111
|
+
| `ui.strings.waitingOne`, `waitingMany` | `waiting` |
|
|
112
|
+
| `ui.strings.connectedOne`, `connectedMany` | `connected` |
|
|
113
|
+
| `ui.strings.connectedNextOne`, `connectedNextMany` | `connectedNext` |
|
|
114
|
+
| `ui.strings.disconnectAllQuestionOne`, `disconnectAllQuestionMany` | `disconnectAllQuestion` |
|
|
115
|
+
| `ui.strings.runsWithoutAsking` | none: the switches are headed by `alwaysAllow` ("Always allow"), or `allowUntilReload` when nothing is kept |
|
|
116
|
+
| `ui.strings.dir` (default `"ltr"`) | optional, no default: the direction of `lang` where the browser knows it, else `"ltr"` |
|
|
117
|
+
|
|
118
|
+
The new keys hold one form per plural category of the language
|
|
119
|
+
(`{ one: "…", other: "…" }` in English, chosen by `Intl.PluralRules`), with `{n}` for
|
|
120
|
+
the count.
|
|
121
|
+
- **One wording for one thing** (DEC-208; the glossary is `kb/design/wording.md`), also
|
|
122
|
+
in the texts of the tab-mcp browser extension and the relay:
|
|
123
|
+
|
|
124
|
+
| Key | Was | Now |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| `allow` | Allow | Allow once |
|
|
127
|
+
| `codeSentence` | When asked, enter the code {code} | When asked, type the code {code} |
|
|
128
|
+
| `codeNote` | A new code appears every 2 minutes and after each use. | The code changes every 2 minutes and after each use. |
|
|
129
|
+
| `connectAnother` | Connect another app | Connect another AI app |
|
|
130
|
+
| `connectedHeading` | Connected | Connected AI apps |
|
|
131
|
+
| `disconnectAllConfirm` | Disconnect all | Disconnect all apps (the button that asked) |
|
|
132
|
+
| `disconnectAllNote`, `disconnectAllQuestion` | … connect again with a new code / and enter a new code | … connect again (with identity binding there is no code) |
|
|
133
|
+
| `disconnectNote` | To disconnect an app, … | To disconnect an AI app, … |
|
|
134
|
+
| `disconnectFailed` | Could not disconnect the app. … | Could not disconnect the AI app. … |
|
|
135
|
+
| `allowEverything`, `allowEverythingApp` | Allow everything, no questions asked (, for {app}) | Always allow everything (for {app}) |
|
|
136
|
+
| `allowEverythingNote` | … and ones that delete or overwrite. | … and ones that delete or overwrite, until you disconnect {app}. |
|
|
137
|
+
| `closeNote` | Closing this stops the code. To connect later, … | Closing this ends the code. To connect an AI app later, … |
|
|
138
|
+
| `replaced` | … now reach that tab … copied what this page keeps to connect … again with a new code. | … now use that tab … copied this page's saved connection … again. |
|
|
139
|
+
| `ConnectButton` | Connection lost, retrying… | Connection lost. Reconnecting… |
|
|
140
|
+
|
|
141
|
+
What an AI app reads: a refused call is "The user did not allow this call." (was "The
|
|
142
|
+
user declined"), and a call cancelled while the user was asked "The call was
|
|
143
|
+
cancelled." (was "The user declined", though the user did nothing).
|
|
144
|
+
- **With identity binding the connect dialog counts for 10 minutes** (DEC-202): the
|
|
145
|
+
relay pairs a sign-in with the page only until 10 minutes after the dialog opened. The
|
|
146
|
+
dialog says until when ("Your AI app can connect until 14:32.") and, once the time is
|
|
147
|
+
up (checked again when the tab comes back to the front), "The time to connect your AI
|
|
148
|
+
app is up. To connect it now, continue." with a Continue button that starts the 10
|
|
149
|
+
minutes again; with an app connected, "Connect another AI app" shows that sentence next
|
|
150
|
+
to Continue. Nothing starts them again by itself: on an `oidc` session a reconnect
|
|
151
|
+
the library makes by itself does not send `pairing.start` again once the user's start
|
|
152
|
+
was sent, answered or not (`pairingUntil` is then the time of the reconnect, so the
|
|
153
|
+
dialog shows Continue). `connect()` from a click while reconnecting ("Connect again")
|
|
154
|
+
does send it, and a session that pairs by code gets it after every reconnect, as
|
|
155
|
+
before. `startPairing()` now sends `pairing.start` on each call while connected, also
|
|
156
|
+
when pairing is on already; call it only when the user acts. With a relay up to
|
|
157
|
+
0.12.1 the dialog counts as long as it is open, as before, but after a reconnect it
|
|
158
|
+
shows Continue. Libraries up to 0.18.1 send `pairing.start` after every reconnect, so
|
|
159
|
+
for their pages each reconnect starts another 10 minutes: this release is needed for
|
|
160
|
+
the limit to be complete.
|
|
161
|
+
- The takeover notice says "If you did not open this page in another tab or window of
|
|
162
|
+
this browser" (was "in another tab or browser"): a page in another browser has a
|
|
163
|
+
secret of its own and cannot take this one's place.
|
|
164
|
+
- The listeners that make a reconnect try at once when the tab comes back to the front
|
|
165
|
+
or the browser is online again, and the wait for the relay's answer to `revoke()` and
|
|
166
|
+
`signOut()`, are in the lazy chunk, which keeps the core within its size limit.
|
|
167
|
+
|
|
9
168
|
## [0.18.1][client-0.18.1] - 2026-11-20
|
|
10
169
|
|
|
11
170
|
### Fixed
|
|
@@ -907,6 +1066,7 @@ First alpha of the browser library, on the npm dist-tag `alpha`.
|
|
|
907
1066
|
`<script type="module">` under `@ractive-ch/tab-mcp-client/cdn`.
|
|
908
1067
|
- The connect dialog shows the pairing code from the relay.
|
|
909
1068
|
|
|
1069
|
+
[client-0.19.0-rc.1]: https://github.com/ractive/tab-mcp/releases/tag/client-v0.19.0-rc.1
|
|
910
1070
|
[client-0.18.1]: https://github.com/ractive/tab-mcp/releases/tag/client-v0.18.1
|
|
911
1071
|
[client-0.18.0]: https://github.com/ractive/tab-mcp/releases/tag/client-v0.18.0
|
|
912
1072
|
[client-0.17.0]: https://github.com/ractive/tab-mcp/releases/tag/client-v0.17.0
|